Filter Code to increase SEO Analyzer timeout

add_filter( ‘http_request_args’, ‘aioseo_filter_analyzer_timeout’, 1, 2 ); function aioseo_filter_analyzer_timeout( $args, $url ) { if ( ‘https://analyze.aioseo.com/v1/analyze/’ === $url ) { $args[‘timeout’] = 120; } return $args; }Continue reading

Admin Panel Footer – Menu

add_filter( ‘admin_footer_text’, function ( $footer_text ) { // Edit the line below to customize the footer text. $footer_text = ‘Check Scorecard | Get Kallados | Check GT Speed | Check Goog Speed | Update CSP | Login CDN‘; return $footer_text;…Continue reading

Admin Bar – Updates

function add_updates_admin_bar_menu() { global $wp_admin_bar; $wp_admin_bar->add_menu( array( ‘id’ => ‘updates’, ‘title’ => ‘Updates’, ‘href’ => admin_url( ‘update-core.php’ ), ‘parent’ => ‘top-secondary’, ) ); } add_action( ‘wp_before_admin_bar_render’, ‘add_updates_admin_bar_menu’ );Continue reading

Setting default template for post type

/** * Setting default template for post type as a pattern php file * */ function awesome_register_podcast_template() { $post_type_object = get_post_type_object( ‘podcast’ ); $post_type_object->template = array( array( ‘core/pattern’, array( ‘slug’ => ‘vivek/podcast-audio’, ) ), ); } add_action( ‘init’, ‘awesome_register_podcast_template’ );Continue reading

Loading ACF Blocks from theme

/** * Load Blocks */ function load_blocks() { $theme = wp_get_theme(); $blocks = get_blocks(); foreach( $blocks as $block ) { if ( file_exists( get_template_directory() . ‘/blocks/’ . $block . ‘/block.json’ ) ) { register_block_type( get_template_directory() . ‘/blocks/’ . $block .…Continue reading

Load all Customizer “Additional CSS” in Block Editor

// Load the Frontend customizer “Additonal CSS” in the block editor. add_action( ‘enqueue_block_editor_assets’, ‘wp_custom_css_cb’ ); // Uncomment below if you need to manually manipulate the CSS for the block editor. // add_action( ‘enqueue_block_editor_assets’, function() { // ob_start(); // wp_custom_css_cb(); //…Continue reading

Order WPCode snippets by title in the admin

add_filter( ‘wpcode_code_snippets_table_prepare_items_args’, function( $args ) { if ( ! isset( $_GET[‘orderby’] ) ) { $args[‘orderby’] = ‘title’; } if ( ! isset( $_GET[‘order’] ) ) { $args[‘order’] = ‘ASC’; } return $args; });Continue reading