// Inject Nickname and Company fields into Add New User screen add_action(‘user_new_form’, function($form_type) { if ($form_type !== ‘add-new-user’) return; ?>Continue reading
add_action(‘admin_footer-user-new.php’, function() { ?>Continue reading
// Function to duplicate a menu function duplicate_menu_action() { // Check if the action is to duplicate a menu if (isset($_GET[‘action’]) && $_GET[‘action’] === ‘duplicate_menu’ && isset($_GET[‘menu_id’])) { // Verify the user has the required capability if (!current_user_can(‘edit_theme_options’)) { wp_die(__(‘You…Continue reading
add_action(‘admin_head’, function () { echo ‘ ‘; });Continue reading
add_action(‘admin_head’, function () { $current_user = wp_get_current_user(); if (strpos($current_user->user_email, ‘rosso-digital’) === false) { echo ‘ ‘; } });Continue reading
add_action(‘admin_head’, function () { $current_user = wp_get_current_user(); if (strpos($current_user->user_email, ‘rosso-digital’) === false) { echo ‘ ‘; } });Continue reading
add_action(‘admin_head’, function () { $current_user = wp_get_current_user(); if (strpos($current_user->user_email, ‘rosso-digital’) === false) { echo ‘ ‘; } });Continue reading
// 1. Register the rule under the ‘User’ group add_filter(‘acf/location/rule_types’, function($choices) { $choices[‘User’][‘logged_in_admin’] = ‘Logged-In Admin’; return $choices; }); // 2. Limit to only valid operators for dropdown-based values add_filter(‘acf/location/rule_operators/logged_in_admin’, function($choices) { return [ ‘==’ => ‘is equal to’, ‘!=’…Continue reading
function wpcb_hide_admin_notices() { ?>Continue reading
// 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