Archives: Snippets
FC – Disable languages in admin login page
add_filter( ‘login_display_language_dropdown’, ‘__return_false’ );Continue reading
FC – Set login cookie expiration to 1 year
// La cookie de login durará 354 días. Usar en sitios en los que sólo entramos nosotros add_filter(‘auth_cookie_expiration’, function ($expires) { return 3153600000; // Logged in for 365 days });Continue reading
DJFrancois
DJ Francois DJ FRANCOIS HOME ABOUT EVENTS & TICKETS BOOKINGS Meet the true king of The Classixs About Information about DJ Francois… Events & Tickets Upcoming events and ticket information… Bookings Booking information and contact details…Continue reading
Fantasygem
MemberPress: Customize Default WordPress Password Reset Request Email Body
function simple_password_reset_message( $message, $key, $user_login ) { // Custom message for the password reset email $message = __( ‘Hi ‘ . $user_login . ‘, you recently requested a password reset for your account.’, ‘text_domain’ ) . “\n”; // Rest of…Continue reading
MemberPress: Change Email Subject in Bulk
function mepr_change_subject($subject, $recipients, $message, $headers) { if (strpos(strtolower($subject), ‘your new password’) !== false) { $subject = ‘Your New Password on yourdomain.com’; } return $subject; } add_filter(‘mepr-wp-mail-subject’, ‘mepr_change_subject’, 10, 4);Continue reading
MemberPress: Add Email Recipients to Specific Emails
add_filter( ‘mepr-wp-mail-recipients’, function( $recipients, $subject, $message, $headers ) { // Check if the email subject contains “payment of” if( strpos( strtolower( $subject ), ‘payment of’ ) !== false ) { // Add email recipients $recipients[] = ‘[email protected]’; $recipients[] = ‘[email protected]’;…Continue reading
MemberPress: Add Custom Field to Transactions Table
function custom_admin_transaction_col($cols) { $cols[‘col_business_name’] = __(‘Business Name’, ‘memberpress’); return $cols; } add_filter(‘mepr-admin-transactions-cols’, ‘custom_admin_transaction_col’); function custom_admin_transaction_col_sort($cols) { $cols[‘col_business_name’] = array(‘business_name’, true); return $cols; } add_filter(‘mepr-admin-transactions-sortable-cols’, ‘custom_admin_transaction_col_sort’); function custom_admin_transaction_col_content($column_name, $rec, $attributes) { if($column_name == ‘col_business_name’) { $user = get_user_by(‘login’, $rec->user_login); $business_name =…Continue reading