// Check if a user is logged in if (is_user_logged_in()) { // Get the current user’s information $current_user = wp_get_current_user(); // Get the user’s email address $user_email = $current_user->user_email; // Check if the email address is not empty if (!empty($user_email))…Continue reading
// Check if a user is logged in if (is_user_logged_in()) { // Get the current user’s information $current_user = wp_get_current_user(); // Get the first name and last name of the user $first_name = $current_user->first_name; $last_name = $current_user->last_name; // Check if…Continue reading
// Check if a user is logged in if (is_user_logged_in()) { // Get the current user’s information $current_user = wp_get_current_user(); // Get the last name of the user $last_name = $current_user->last_name; // Check if the last name is not empty…Continue reading
// Check if a user is logged in if (is_user_logged_in()) { // Get the current user’s information $current_user = wp_get_current_user(); // Get the first name of the user $first_name = $current_user->first_name; // Check if the first name is not empty…Continue reading
function change_menu($items){ foreach($items as $item){ if( $item->title == “Log Out”){ $item->url = wp_logout_url(‘/’); } } return $items; } add_filter(‘wp_nav_menu_objects’, ‘change_menu’);Continue reading
add_action( ‘woocommerce_after_add_to_cart_quantity’, ‘ts_quantity_plus_sign’ ); function ts_quantity_plus_sign() { echo ‘+‘; } add_action( ‘woocommerce_before_add_to_cart_quantity’, ‘ts_quantity_minus_sign’ ); function ts_quantity_minus_sign() { echo ‘–‘; } add_action( ‘wp_footer’, ‘ts_quantity_plus_minus’ ); function ts_quantity_plus_minus() { // To run this on the single product page if ( ! is_product()…Continue reading
/** * Plugin Name: Admin Panel Settings * Description: This plugin contains your admin panel settings. * Author: NoBull. * Version: 1.0 */ // Remove Powered By WP Bakery Builder Snippet add_action(‘wp_head’, ‘removebakery’, 1); function removebakery() { if ( class_exists(…Continue reading
add_filter( ‘automatic_updater_disabled’, ‘__return_true’ );Continue reading
/** * Allow SVG uploads for administrator users. * * @param array $upload_mimes Allowed mime types. * * @return mixed */ add_filter( ‘upload_mimes’, function ( $upload_mimes ) { // By default, only administrator users are allowed to add SVGs. //…Continue reading
/** * Allow SVG uploads for administrator users. * * @param array $upload_mimes Allowed mime types. * * @return mixed */ add_filter( ‘upload_mimes’, function ( $upload_mimes ) { // By default, only administrator users are allowed to add SVGs. //…Continue reading