Duplicate Post/Page Link

// Add duplicate button to post/page list of actions. add_filter( ‘post_row_actions’, ‘wpcode_snippet_duplicate_post_link’, 10, 2 ); add_filter( ‘page_row_actions’, ‘wpcode_snippet_duplicate_post_link’, 10, 2 ); // Let’s make sure the function doesn’t already exist. if ( ! function_exists( ‘wpcode_snippet_duplicate_post_link’ ) ) { /** *…Continue reading

Charitable Reporting: Adjusting Initial Filters

add_filter( ‘charitable_report_overview_args’, ‘example_charitable_report_overview_defaults’, 999 ); function example_charitable_report_overview_defaults( $defaults = array() ) { // Defaults array contains: // start_date, end_date, filter, campaign_id, category_id. // The $defaults array contains the default values for the report overview. // You can modify these as…Continue reading

Smush – Original Images

/** * Plugin Name: [Smush] – Original Images * Plugin URI: https://premium.wpmudev.org/ * Description: Displays all original images so they can be deleted. Requires Smush * Author: Panos Lyrakis @ WPMUDEV * Author URI: https://premium.wpmudev.org/ * License: GPLv2 or later…Continue reading

Add duplicate link to admin bar menu (copy)

add_action( ‘admin_bar_menu’, function ( $admin_bar ) { // Only show this when editing a post. $screen = get_current_screen(); if ( ! $screen || ‘post’ !== $screen->base ) { return; } $post = get_post(); $post_type_object = get_post_type_object( $post->post_type ); if (…Continue reading

Add duplicate link to admin bar menu

add_action( ‘admin_bar_menu’, function ( $admin_bar ) { // Only show this when editing a post. $screen = get_current_screen(); if ( ! $screen || ‘post’ !== $screen->base ) { return; } $post = get_post(); $post_type_object = get_post_type_object( $post->post_type ); if (…Continue reading