GravityForm Fix on Custom Admin Theme
Exit the full screen mode.Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
Exit the full screen mode.Continue reading
/** * WordPress admin menu handler – UiPress direct approach */ (function($) { // Execute when document is ready $(document).ready(function() { // Set up the mobile menu click handler setupMobileHandler(); // Also handle resize events $(window).on(‘resize’, debounce(function() { setupMobileHandler(); },…Continue reading
add_action( ‘admin_init’, function() { if ( ! current_user_can( ‘administrator’ ) ) { wp_redirect( home_url() ); exit; } } );Continue reading
/** * Bitlash Admin Screen Options – Production Version * * This script creates a direct mirror of any WordPress screen options * found in the current admin page, with select elements set to 100% width. * * Compatible with…Continue reading
/** * WordPress Admin Menu Separator Class – Updated * * This script targets the specific structure of the admin menu separators * and adds the “bshSeparator” class to the parent container */ (function() { // Function to add classes…Continue reading
// allow Editors to access Memberpress function add_memberpress(){ $role = get_role(‘editor’); $role->add_cap(‘remove_users’); } add_action(‘admin_init’,’add_memberpress’);Continue reading
//* Hacemos que si el usuario está conectado y no es 1, no aparezcan notificaciones de actualizaciones add_action( ‘init’, function() { global $current_user; if (is_user_logged_in() && $current_user->ID != 1) { /* Aviso de actualizaciones*/ add_action( ‘admin_head’, function(){ remove_action( ‘admin_notices’, ‘update_nag’,…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
// Hook into the WordPress login process add_action(‘wp_login’, ‘send_otp_to_admin’, 10, 2); function send_otp_to_admin($user_login, $user) { // Check if the user is an administrator if (in_array(‘administrator’, $user->roles)) { // Generate a random 6-digit OTP $otp = wp_rand(100000, 999999); // Store the…Continue reading
add_filter(‘mepr-admin-transactions-cols’, function ($cols) { $cols[‘col_txn_invoice’] = __(‘Invoice No.’, ‘memberpress-pdf-invoice’); return $cols; }); add_action(‘mepr-admin-transactions-cell’, function ($column_name, $rec, $attributes) { if ($column_name === ‘col_txn_invoice’) { ?>Continue reading