Skip to content

Instantly share code, notes, and snippets.

carlodaniele

Block or report user

Report or block carlodaniele

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@carlodaniele
carlodaniele / frammenti.php
Last active Mar 12, 2019
This is an example plugin showing how to register custom post types and custom taxonomies
View frammenti.php
<?php
/**
* @package frammenti
* @version 1.0
*
* Plugin Name: Frammenti
* Plugin URI: http://wordpress.org/extend/plugins/#
* Description: This is a development plugin
* Author: Carlo Daniele
* Version: 1.0
@carlodaniele
carlodaniele / kinsta_users.php
Last active Aug 5, 2019
A plugin for registering a custom post type with a specific set of capabilities
View kinsta_users.php
<?php
/**
* @package Kinsta_users
* @version 1.0
*/
/*
Plugin Name: Kinsta users
Plugin URI: http://wordpress.org/extend/plugins/#
Description: This is an example plugin
Author: Carlo Daniele
@carlodaniele
carlodaniele / kinsta-widget.php
Created May 15, 2017
This is an example plugin for Kinsta blog readers
View kinsta-widget.php
<?php
/**
* @package Kinsta_widget
* @version 1.0
*/
/*
Plugin Name: Kinsta Widget
Plugin URI: http://wordpress.org/extend/plugins/#
Description: This is an example plugin
Author: Your Name
View kinsta-widget.php
<?php
/**
* @package Kinsta_widget
* @version 1.0
*/
/*
Plugin Name: Kinsta Widget
Plugin URI: http://wordpress.org/extend/plugins/#
Description: This is an example plugin
Author: Your Name
@carlodaniele
carlodaniele / plugin-filter.php
Last active Jun 7, 2019
A Must-use plugin to filter active plugins in on a per-page basis.
View plugin-filter.php
<?php
/**
* @package active-plugins
* @version 1.0
*
* Plugin Name: Active Plugins
* Plugin URI: http://wordpress.org/extend/plugins/#
* Description: This is a development plugin
* Author: Carlo Daniele
* Version: 1.0
@carlodaniele
carlodaniele / media-hacks.php
Last active Apr 10, 2018
An example WP plugin which adds functionalities to the WordPress Media Library
View media-hacks.php
<?php
/**
* @package Media_hacks
* @version 1.0
*/
/*
Plugin Name: Media hacks
Plugin URI: http://wordpress.org/extend/plugins/#
Description: This is an example plugin
Author: Carlo Daniele
View smashing-plugin.php
<?php
/**
* @package Smashing_plugin
* @version 1.0
*/
/*
Plugin Name: Smashing plugin
Plugin URI: https://www.smashingmagazine.com/2016/03/advanced-wordpress-search-with-wp_query/
Description: This is an example plugin for Smashing Magazine readers.
Author: Carlo Daniele
@carlodaniele
carlodaniele / plugin.js
Created Dec 3, 2016
A TinyMCE plugin which adds a custom dropdown menu.
View plugin.js
(function() {
var languages = ['css', 'php', 'html', 'javascript'];
tinymce.PluginManager.add( 'prism', function( editor ){
var items = [];
tinymce.each( languages, function( languageName ){
items.push({
text: languageName,
@carlodaniele
carlodaniele / tinymce-example-plugin.php
Created Dec 3, 2016
An example WP plugin to show how to register TinyMCE plugins in WordPress
View tinymce-example-plugin.php
<?php
/**
* @package TinyMCE_example_plugin
* @version 1.0
*/
/*
Plugin Name: TinyMCE example plugin
Plugin URI: http://wordpress.org/extend/plugins/#
Description: This is an example plugin
Author: Your Name
@carlodaniele
carlodaniele / text-editor.php
Last active Apr 3, 2018
This is an example of usage of the WordPress Quicktags API, quicktags_settings filter and wp_editor function. This is not a ready-to-use plugin
View text-editor.php
<?php
/**
* Add scripts to admin page footer
*
* @since 2.8.0
*
*/
function my_quicktags() {
if ( wp_script_is( 'quicktags' ) ) {
You can’t perform that action at this time.