Disable Google Fonts (Elementor)
add_filter( ‘elementor/frontend/print_google_fonts’, ‘__return_false’ );Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
add_filter( ‘elementor/frontend/print_google_fonts’, ‘__return_false’ );Continue reading
function year_shortcode () { $year = date_i18n (‘Y’); return $year; } add_shortcode (‘year’, ‘year_shortcode’);Continue reading
add_filter(‘gutenberg_can_edit_post’, ‘__return_false’, 5); add_filter(‘use_block_editor_for_post’, ‘__return_false’, 5);Continue reading
add_filter( ‘comment_form_defaults’, ‘custom_reply_title’ ); function custom_reply_title( $defaults ){ $defaults[‘title_reply_before’] = ‘ ‘; $defaults[‘title_reply_after’] = ‘ ‘; return $defaults; }Continue reading
add_filter( ‘comment_form_defaults’, ‘custom_reply_title’ ); function custom_reply_title( $defaults ){ $defaults[‘title_reply_before’] = ‘ ‘; $defaults[‘title_reply_after’] = ‘ ‘; return $defaults; }Continue reading
add_filter( ‘acf/admin/prevent_escaped_html_notice’, ‘__return_true’ );Continue reading
function remove_pages_from_menu() { if ( current_user_can( ‘editor’ ) ) { remove_menu_page( ‘edit-comments.php’ ); remove_menu_page( ‘edit.php’ ); remove_menu_page( ‘edit.php?post_type=page’ ); remove_menu_page( ‘edit.php?post_type=jet-theme-core’ ); remove_menu_page( ‘tools.php’ ); remove_menu_page( ‘edit.php?post_type=jet-popup’ ); remove_menu_page( ‘edit.php?post_type=jet-form-builder’ ); } } add_action( ‘admin_menu’, ‘remove_pages_from_menu’ ); function remove_link_from_admin_bar( $wp_admin_bar…Continue reading
add_action( ‘wfea_popup_scripts_enqueued’, function () { $script = ‘ window.onbeforeunload = null; // set to null to avoid a message about leaving the page before saved – use if redirecting wfeaModalCallback = function () { console.log(“There has been an Eventbrite checkout.”);…Continue reading
// Add a hook. function custom_as_retention_period( ) { return WEEK_IN_SECONDS; } add_filter( ‘action_scheduler_retention_period’, ‘custom_as_retention_period’, 10 );Continue reading
add_action(‘admin_init’, function () { // Redirect any user trying to access comments page global $pagenow; if ($pagenow === ‘edit-comments.php’) { wp_safe_redirect(admin_url()); exit; } // Remove comments metabox from dashboard remove_meta_box(‘dashboard_recent_comments’, ‘dashboard’, ‘normal’); // Disable support for comments and trackbacks in…Continue reading