Change text of Forgot Your Password link
function custom_forgot_password_text($text) { return str_replace(‘Forgot your password?’, ‘Forgot your username or password?’, $text); } add_filter(‘gettext’, ‘custom_forgot_password_text’);Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
function custom_forgot_password_text($text) { return str_replace(‘Forgot your password?’, ‘Forgot your username or password?’, $text); } add_filter(‘gettext’, ‘custom_forgot_password_text’);Continue reading
add_filter(‘retrieve_password_message’, ‘custom_password_reset_email’, 10, 4); add_filter(‘wp_mail_content_type’, ‘set_html_content_type’); function custom_password_reset_email($message, $key, $user_login, $user_data) { $site_name = wp_specialchars_decode(get_option(‘blogname’), ENT_QUOTES); $user_nickname = get_user_meta($user_data->ID, ‘nickname’, true); $user_display_name = $user_data->display_name; // Changed to use direct property $user_name = !empty($user_nickname) ? $user_nickname : $user_login; // $reset_url =…Continue reading
/** * Main LifterLMS Course Sync Engine * * PURPOSE: * – Syncs LifterLMS courses to llms_content_sync CPT * – Handles both automatic and manual synchronization * – Fires completion action for detail population extensions * – Cloudflare-safe with proper…Continue reading
/** * LifterLMS Course Sync – Detail Population Module * * PURPOSE: * – Hooks into main sync completion * – Populates comprehensive course data (lessons, sections, quizzes, etc.) * – Populates ACF fields on llms_content_sync CPT * – Uses…Continue reading
add_filter(‘get_avatar’, function($avatar_html, $id_or_email, $size) { // Force width/height attributes to match the requested avatar size $size = intval($size) ?: 26; // Remove existing width/height to avoid duplicates $avatar_html = preg_replace(‘/\s(width|height)=”\d+”/i’, ”, $avatar_html); // Add explicit width/height $avatar_html = preg_replace( ‘/]+)>/’,…Continue reading
add_filter(‘get_custom_logo’, function($html) { // Only touch the header logo return preg_replace( ‘/]+)>/’, ‘‘, // set to your display size $html, 1 ); });Continue reading
add_filter(‘get_custom_logo’, function($html) { // Only touch the header logo return preg_replace( ‘/]+)>/’, ‘‘, // set to your display size $html, 1 ); });Continue reading
… document.addEventListener(“DOMContentLoaded”, () => { // Customize this to match your sticky header (or set to null if not needed) const HEADER_SELECTOR = “#site-header”; const getHeaderOffset = () => { const header = HEADER_SELECTOR && document.querySelector(HEADER_SELECTOR); return header ? header.getBoundingClientRect().height…Continue reading
/** * Remove the “Have a coupon?” text and field from the cart page. Amiru アミル さん */ function woo_remove_coupon_form_on_cart() { remove_action( ‘woocommerce_before_cart_table’, ‘woocommerce_output_all_notices’, 10 ); remove_action( ‘woocommerce_cart_collaterals’, ‘woocommerce_cart_totals’, 10 ); } add_action( ‘woocommerce_cart_is_empty’, ‘woo_remove_coupon_form_on_cart’ ); remove_action( ‘woocommerce_cart_collaterals’, ‘woocommerce_form_coupon’, 10…Continue reading
/** * Remove default WooCommerce product data tabs. Amiru アミル さん */ function woo_remove_product_tabs( $tabs ) { // Remove the Description tab unset( $tabs[‘description’] ); // Remove the Additional Information tab unset( $tabs[‘additional_information’] ); // Remove the Reviews tab unset(…Continue reading