Category: Admin
Google Tag
Open All Internal and External Link in New Tab in WordPress
function open_internal_links_in_new_tab() { echo ‘ ‘; } add_action(‘wp_footer’, ‘open_internal_links_in_new_tab’);Continue reading
Pixel Bluue Sleep
Enqueue Custom Admin CSS
function my_custom_admin_styles() { // Ensure the file path is correct wp_enqueue_style(‘my-custom-admin-style’, get_stylesheet_directory_uri() . ‘/css/custom-admin-styles.css’); } // Hook the function to ‘admin_enqueue_scripts’ to apply it to the WordPress admin area add_action(‘admin_enqueue_scripts’, ‘my_custom_admin_styles’);Continue reading
Untitled Snippet
// Get the butterflies container const butterfliesContainer = document.querySelector(‘.butterflies’); // Create a function to generate a butterfly function createButterfly() { const butterfly = document.createElement(‘div’); butterfly.className = ‘butterfly’; butterfliesContainer.appendChild(butterfly); return butterfly; } // Create multiple butterflies for (let i = 0;…Continue reading
Admin/Nav Extension – CSS
/* this is an update I made on the wpcode website that should trigger an available update badge */ .mx_nav { background: #dadada; padding: 0 0 5px 0; margin: 0px 0 -5px -20px; line-height: 27px; border-bottom: 1px solid #c5c5c5; }…Continue reading
Plugin/WPCode – CSS
/* Custom editor styling for WPCode IDE window */ #wpcode-snippet-manager-form .CodeMirror pre { tab-size: 2 !important; line-height: 18px; font-family: “JetBrains Mono”, monospace; font-feature-settings: “calt”; font-size: 13px !important; font-variant-ligatures: no-common-ligatures; } /* WPCode snippets list table */ table.wpcode-snippets .manage-column.column-name { width:…Continue reading
Admin/Floating Toolbar
/** * Create a secondary admin toolbar in the top right with integrated plugin/users search * * @author mccannex * * Changelog * 2024-08-01 – Fixed issue with crashing admin backend because WP core changed priority on certain hooks *…Continue reading
Add Custom Element to Breadcrumbs
add_filter( ‘aioseo_breadcrumbs_trail’, function( $crumbs ) { if(is_singular(‘post’) || is_category()){ $blog = [ ‘label’ => ‘Resources’, ‘link’ => ‘https://whatisnosy.com/resources’, ‘type’ => ” ]; array_splice( $crumbs, 0, 0, [$blog] ); } return $crumbs; }, 10, 2);Continue reading