Add user registration date

/* * Creating a column (it is also possible to remove some default ones) */ add_filter( ‘manage_users_columns’, ‘rudr_modify_user_table’ ); function rudr_modify_user_table( $columns ) { // unset( $columns[‘posts’] ); // maybe you would like to remove default columns $columns[ ‘registration_date’ ]…Continue reading

Disable Attachment Filters to Fix Envira Gallery

add_action( ‘plugins_loaded’, function(){ remove_filter(‘attachment_fields_to_edit’, array(‘Fusion_Images’, ‘add_image_meta_fields’), 10); remove_filter(‘attachment_fields_to_edit’, array(‘Avada_Images’, ‘add_image_meta_fields’), 10); }, 99); function remove_masonry($fields) { unset($fields[‘fusion_masonry_element_layout’]); return $fields; } add_filter(‘attachment_fields_to_edit’, ‘remove_caption’, 99);Continue reading

Allow JS Files Upload

/** * Allow JS uploads for administrator users. * * @param array $upload_mimes Allowed mime types. * * @return mixed */ add_filter( ‘upload_mimes’, function ( $upload_mimes ) { // By default, only administrator users are allowed to add SVGs. //…Continue reading

Allow CSS Files Upload

/** * Allow CSS uploads for administrator users. * * @param array $upload_mimes Allowed mime types. * * @return mixed */ add_filter( ‘upload_mimes’, function ( $upload_mimes ) { // By default, only administrator users are allowed to add SVGs. //…Continue reading

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