add_action(‘init’, function () { global $wp_post_types; if (isset($wp_post_types[‘post’])) { $wp_post_types[‘post’]->capabilities = []; $wp_post_types[‘post’]->map_meta_cap = false; } register_taxonomy(‘post_category’, []); register_taxonomy(‘post_tag’, []); }); add_action(‘widgets_init’, function () { unregister_widget(‘WP_Widget_Recent_Posts’); }); add_action(‘admin_bar_menu’, function ($wp_admin_bar) { //$wp_admin_bar->remove_node(‘new-post’); }, 999); add_action(‘admin_menu’, function () { remove_menu_page(‘edit.php’); remove_submenu_page(‘edit.php’,…Continue reading
add_filter( ‘login_display_language_dropdown’, ‘__return_false’ );Continue reading
// 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
//* Mete el favicon como imagen del login add_action(‘login_head’, function () { $favicon_url = get_site_icon_url(); // Obtiene la URL del favicon desde el personalizador if ($favicon_url) { echo ‘ ‘; } });Continue reading
add_filter(‘the_generator’, ‘__return_empty_string’);Continue reading
add_filter( ‘frm_filtered_lookup_options’, ‘change_lookup_options’, 10, 2 ); function change_lookup_options( $options, $args ) { if ( $args[‘field’]->id == 478 ) { // change 25 to the id of the field in the other form foreach ( $options as $k => $option )…Continue reading
add_filter(‘frm_setup_new_fields_vars’, ‘customize_dfe’, 25, 2); function customize_dfe( $values, $field ) { if ( $field->id == 819 && !empty( $values[‘options’] ) ){//Replace 125 with the ID of your dynamic field $temp_values = $values; $temp_values[‘form_select’] = 478; //change 30 to the id of…Continue reading
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
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