Category: Disable
Remove hyperlink from name field
add_filter(‘preprocess_comment’, ‘remove_links_from_comment_author’); function remove_links_from_comment_author($commentdata) { // Regular expression to detect hyperlinks $pattern = ‘/Continue reading
Remove Recurring Donation Time Periods
/** * This snippet removes some options for recurring donation periods with Charitable’s Recurring Donations addon. * This might reset or cause odd things to happen to campaigns who resave settings without updating the period if * they already selected…Continue reading
Disable EDD Software Licensing Activation/Deactivation Logs
// Don’t log license activations and deactivations. add_filter( ‘edd_sl_log_license_activation’, ‘__return_false’ ); add_filter( ‘edd_sl_log_license_deactivation’, ‘__return_false’ );Continue reading
remove auto linkig
remove_filter( ‘comment_text’, ‘make_clickable’, 9 );Continue reading
WordPress自動更新無効
add_filter( ‘automatic_updater_disabled’, ‘__return_true’ );Continue reading
Event Snippet (Schedule Fitting)
Google Tag Fitting
Remove title on all pages for Hello Theme
function ele_disable_page_title( $return ) { return false; } add_filter( ‘hello_elementor_page_title’, ‘ele_disable_page_title’ );Continue reading
Site Security & Optimization
// Disable Yoast SEO HTML Comments add_filter(‘wpseo_debug_markers’, ‘__return_false’); // Disable XML-RPC add_filter(‘xmlrpc_enabled’, ‘__return_false’); // Remove WordPress Version Number add_filter(‘the_generator’, ‘__return_empty_string’); // Disable Plugin & Theme Editor if (!defined(‘DISALLOW_FILE_EDIT’)) { define(‘DISALLOW_FILE_EDIT’, true); } // Disable Author Archives add_action(‘template_redirect’, function(){ global $wp_query;…Continue reading