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 / 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
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 / login-logout-menu-items.php
Created Feb 29, 2016
Add login and logout links to main menu
View login-logout-menu-items.php
<?php
/**
* Add login and logout links to main menu
*
* @param string $items The HTML list content for the menu items.
* @param obj $args An object containing wp_nav_menu() arguments.
*
* @link https://codex.wordpress.org/Function_Reference/wp_login_url
* @link https://codex.wordpress.org/Function_Reference/wp_logout_url
* @link https://developer.wordpress.org/reference/functions/wp_nav_menu/
@carlodaniele
carlodaniele / frontend-login-form.php
Last active Mar 31, 2019
This plugin allows to include a login form into the site front end with a shortcode
View frontend-login-form.php
<?php
/**
* Setup
*/
function frontend_user_manager_init() {
add_shortcode( 'frontend-login-form', 'frontend_login_form' );
}
add_action('init', 'frontend_user_manager_init');
/**
@carlodaniele
carlodaniele / custom-login-page.php
Created Feb 27, 2016
Switch the URL of default login page with the URL of a custom login page
View custom-login-page.php
<?php
/**
* Set a custom login page
*
* @param string $url Default login URL
* @param string $redirect Redirect URL on login
* @param bool $force_reauth Whether to force reauthorization
* @link https://developer.wordpress.org/reference/hooks/login_url/
*/
function frontend_login_url( $url, $redirect, $force_reauth ){
@carlodaniele
carlodaniele / food-example-plugin.php
Last active Mar 29, 2019
An example plugin for WPMU DEV readers
View food-example-plugin.php
<?php
/**
* @package Food_example_plugin
* @version 1.0
*/
/*
Plugin Name: Food example plugin
Plugin URI: http://wordpress.org/extend/plugins/#
Description: This is an example plugin for WPMU DEV readers
Author: Carlo Daniele
@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 / 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 / food-example-plugin-2.php
Created Nov 15, 2016
An example for WPMU readers
View food-example-plugin-2.php
<?php
/**
* @package Food_example_plugin_2
* @version 1.0
*/
/*
Plugin Name: Food example plugin 2
Plugin URI: http://wordpress.org/extend/plugins/#
Description: This is an example plugin for WPMU DEV readers
Author: Carlo Daniele
@carlodaniele
carlodaniele / remove-toolbar-5.php
Last active May 17, 2017
Remove Toolbar for all users
View remove-toolbar-5.php
<?php
/**
* Remove WordPress Toolbar for all users
*
*/
function myplugin_remove_admin_bar(){
return false;
}
add_filter( 'show_admin_bar' , 'myplugin_remove_admin_bar' );
You can’t perform that action at this time.