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 / plugin-filter.php
Last active Oct 11, 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 / add-query-vars.php
Last active Oct 6, 2019
Register custom query vars
View add-query-vars.php
<?php
/**
* Register custom query vars
*
* @param array $vars The array of available query variables
*
* @link https://codex.wordpress.org/Plugin_API/Filter_Reference/query_vars
*/
function myplugin_register_query_vars( $vars ) {
$vars[] = 'key1';
@carlodaniele
carlodaniele / text-editor.php
Last active Oct 1, 2019
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' ) ) {
@carlodaniele
carlodaniele / custom_menu_admin.php
Last active Sep 29, 2019
A basic plugin showing how to add menu metaboxes to admin menu page
View custom_menu_admin.php
<?php
/**
* @package Custom_menu_admin
* @version 1.0
*/
/*
Plugin Name: Custom menu admin
Plugin URI: http://wordpress.org/extend/plugins/#
Description: This is an example plugin
Author: Carlo Daniele
@carlodaniele
carlodaniele / custom-queries.php
Last active Sep 26, 2019
An example plugin showing how to add custom query vars, rewrite tags and rewrite rules to WordPress
View custom-queries.php
<?php
/**
* @package Custom_queries
* @version 1.0
*/
/*
Plugin Name: Custom queries
Plugin URI: http://wordpress.org/extend/plugins/#
Description: This is an example plugin
Author: Carlo Daniele
@carlodaniele
carlodaniele / kinsta_users.php
Last active Sep 12, 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 / media-hacks.php
Last active Sep 3, 2019
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 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 / 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
@carlodaniele
carlodaniele / kinsta-share-users.php
Last active May 28, 2019
A plugin to share users and usermeta tables between independent WordPress installations. This plugin requires CUSTOM_USER_TABLE and CUSTOM_USER_META_TABLE defined into wp-config file
View kinsta-share-users.php
<?php
/**
* @package Kinsta_Share_Users
* @version 1.0
*/
/*
Plugin Name: Kinsta Share Users
Plugin URI: http://wordpress.org/extend/plugins/#
Description: This is an example plugin for Kinsta blog readers
Author: Carlo Daniele
You can’t perform that action at this time.