add_action( ‘shutdown’, ‘advads_schedule_order_notes_to_set_actions_run’ ); /** * Schedule the order notes to set actions run cron event. * * @return void */ function prefix_schedule_order_notes_to_set_actions_run() { // This option is added when no more notes can be found. if ( get_option( ‘prefix_use_order_notes_to_set_actions_run’…Continue reading
add_action( ‘admin_footer’, ‘prefix_mailchimp_stop_sync’ ); /** * Stop the Mailchimp sync from running. * This is a temporary function to stop the sync from running and can be deleted once the sync is stopped. * * @return void */ function prefix_mailchimp_stop_sync()…Continue reading
function disable_all_admin_notices() { remove_all_actions(‘admin_notices’); } add_action(‘admin_init’, ‘disable_all_admin_notices’);Continue reading
# BEGIN WordPress RewriteEngine On RewriteRule .* – [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] RewriteBase / RewriteRule ^index\.php$ – [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] # END WordPressContinue reading
add_action( ‘admin_head’, function () { if ( current_user_can( ‘update_core’ ) ) { return; } remove_action( ‘admin_notices’, ‘update_nag’, 3 ); }, 1 );Continue reading
add_action( ‘enqueue_block_editor_assets’, function () { $script = “jQuery( window ).load(function() { const isFullscreenMode = wp.data.select( ‘core/edit-post’ ).isFeatureActive( ‘fullscreenMode’ ); if ( isFullscreenMode ) { wp.data.dispatch( ‘core/edit-post’ ).toggleFeature( ‘fullscreenMode’ ); } });”; wp_add_inline_script( ‘wp-blocks’, $script ); } );Continue reading
add_filter( ‘manage_upload_columns’, function ( $columns ) { $columns [‘file_size’] = esc_html__( ‘File size’ ); return $columns; } ); add_action( ‘manage_media_custom_column’, function ( $column_name, $media_item ) { if ( ‘file_size’ !== $column_name || ! wp_attachment_is_image( $media_item ) ) { return; }…Continue reading
function wpcode_snippet_replace_howdy( $wp_admin_bar ) { // Edit the line below to set what you want the admin bar to display intead of “Howdy,”. $new_howdy = ‘Welcome,’; $my_account = $wp_admin_bar->get_node( ‘my-account’ ); $wp_admin_bar->add_node( array( ‘id’ => ‘my-account’, ‘title’ => str_replace( ‘Howdy,’,…Continue reading
add_filter( ‘wpcode_add_snippet_show_library’, ‘__return_false’ );Continue reading
add_filter(‘allowed_block_types_all’, ‘enable_blocks_for_custom_post_type’, 10, 2); function enable_blocks_for_custom_post_type($allowed_block_types, $block_editor_context) { if ($block_editor_context->post->post_type === ‘team-member’) { return array(‘acf/team-member’, ‘core/post-featured-image’); } return $allowed_block_types;}Continue reading