This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action('admin_head', 'custom_admin_bar_color'); | |
add_action('wp_head', 'custom_admin_bar_color'); | |
function custom_admin_bar_color() { | |
// Check if the "Discourage search engines from indexing this site" setting is enabled | |
if (get_option('blog_public') == '0') { | |
// Output CSS to change the admin bar color | |
echo '<style> | |
#wpadminbar { | |
border-top: 5px solid #cf0000 !important; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function move_plugins_to_end() { | |
global $menu; | |
$plugin_menus = []; | |
$non_plugin_menus = []; | |
if (!isset($menu) || !is_array($menu)) { | |
return; // Exit if $menu is not properly set | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'woocommerce_thankyou', 'my_custom_tracking' ); | |
if ( ! function_exists( 'custom_meta_to_order' ) ) { | |
add_action( 'woocommerce_checkout_create_order', 'custom_meta_to_order', 20, 1 ); | |
function custom_meta_to_order( $order ) { | |
$eftid = isset( $_COOKIE['ef_tid_c_a_1342'] ) ? sanitize_text_field( $_COOKIE['ef_tid_c_a_1342'] ) : ''; | |
$order->update_meta_data( "eftid", $eftid ); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function wp_admin_footer_text() { | |
echo '<span style="color:#50575e">Website built by Nerd Rush! For questions or support, please visit our website at <a href="https://nerdrush.com/" target="blank" rel="noopener">www.nerdrush.com</a></span>'; | |
} | |
add_filter('admin_footer_text', 'wp_admin_footer_text'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Client editing disclaimer | |
function custom_admin_notice_with_logo() { | |
$user_id = get_current_user_id(); | |
if (get_user_meta($user_id, 'custom_notice_dismissed', true) !== 'yes') { | |
if (current_user_can('administrator') || current_user_can('editor') || current_user_can('author')) { | |
$nonce = wp_create_nonce('custom_notice_dismiss_nonce'); | |
$image_url = 'https://nerdrush.com/wp-content/uploads/2023/08/Nerd-Rush-Logo-Blue-2023.svg'; // External image URL | |
?> | |
<div class="notice notice-warning custom-notice" style="padding-top: 20px;"> | |
<img src="<?php echo esc_url( $image_url ); ?>" alt="Logo" style="width: 120px; display: block; margin-bottom: 10px;"> |