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

Duplicate Post/Page Link (copy)

// Add duplicate button to post/page list of actions. add_filter( ‘post_row_actions’, ‘wpcode_snippet_duplicate_post_link’, 10, 2 ); add_filter( ‘page_row_actions’, ‘wpcode_snippet_duplicate_post_link’, 10, 2 ); // Let’s make sure the function doesn’t already exist. if ( ! function_exists( ‘wpcode_snippet_duplicate_post_link’ ) ) { /** *…Continue reading

Duplicate Post/Page Link (copy)

// Add duplicate button to post/page list of actions. add_filter( ‘post_row_actions’, ‘wpcode_snippet_duplicate_post_link’, 10, 2 ); add_filter( ‘page_row_actions’, ‘wpcode_snippet_duplicate_post_link’, 10, 2 ); // Let’s make sure the function doesn’t already exist. if ( ! function_exists( ‘wpcode_snippet_duplicate_post_link’ ) ) { /** *…Continue reading

Duplicate Post/Page Link

// Add duplicate button to post/page list of actions. add_filter( ‘post_row_actions’, ‘wpcode_snippet_duplicate_post_link’, 10, 2 ); add_filter( ‘page_row_actions’, ‘wpcode_snippet_duplicate_post_link’, 10, 2 ); // Let’s make sure the function doesn’t already exist. if ( ! function_exists( ‘wpcode_snippet_duplicate_post_link’ ) ) { /** *…Continue reading

Duplicate Post/Page Link

// Add duplicate button to post/page list of actions. add_filter( ‘post_row_actions’, ‘wpcode_snippet_duplicate_post_link’, 10, 2 ); add_filter( ‘page_row_actions’, ‘wpcode_snippet_duplicate_post_link’, 10, 2 ); // Let’s make sure the function doesn’t already exist. if ( ! function_exists( ‘wpcode_snippet_duplicate_post_link’ ) ) { /** *…Continue reading

Clean Up HTML – Post Content Editor

// Clean up HTML from blog posts function add_custom_cleanup_checkbox() { add_meta_box( ‘custom_cleanup_id’, // ID of the meta box ‘Custom Cleanup’, // Title of the meta box ‘custom_cleanup_checkbox_callback’, // Callback function ‘post’, // Post type ‘side’, // Context ‘high’ // Priority…Continue reading

Hide unnecessary roles

add_filter( ‘editable_roles’, function( $roles ) { if (!current_user_can(‘administrator’) && !is_admin()) { unset( $roles[‘administrator’] ); } unset( $roles[‘editor’] ); unset( $roles[‘subscriber’] ); unset( $roles[‘revisor’] ); unset( $roles[‘docspress_manager’] ); unset( $roles[‘author’] ); unset( $roles[‘contributor’] ); return $roles; } );Continue reading