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
| // Theme My Login - Remove Login Text from Login Area | |
| function tml_title_filter( $title, $action ) { | |
| if ( 'login' == $action ) return ''; | |
| return $title; | |
| } | |
| add_filter( 'tml_title', 'tml_title_filter', 10, 2 ); |
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
| // Remove Visual Composer Update Nag | |
| add_action('admin_init', function() | |
| { | |
| setcookie('vchideactivationmsg', '1', strtotime('+3 years'), '/'); | |
| }); |
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
| // Remove Yoast SEO Update Nags | |
| add_action('admin_init', 'wpc_disable_yoast_notifications'); | |
| function wpc_disable_yoast_notifications() { | |
| if (is_plugin_active('wordpress-seo/wp-seo.php')) { | |
| remove_action('admin_notices', array(Yoast_Notification_Center::get(), 'display_notifications')); | |
| remove_action('all_admin_notices', array(Yoast_Notification_Center::get(), 'display_notifications')); | |
| } | |
| } |
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
| // Change Pods MORE FIELDS Metabox Title to Custom | |
| add_filter('pods_meta_default_box_title','changethatname',10,5); | |
| function changethatname($title, $pod, $fields, $type, $name ) { | |
| $title = ($name=='pod-slug') ? __('Your New Title Here', 'plugin_lang') : $title ; | |
| return $title; | |
| } |
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
| <script type="text/javascript"> | |
| jQuery(document).on( 'keypress', '.gform_wrapper', function (e) { | |
| var code = e.keyCode || e.which; | |
| if ( code == 13 && ! jQuery( e.target ).is( 'textarea,input[type="submit"],input[type="button"]' ) ) { | |
| e.preventDefault(); | |
| return false; | |
| } | |
| } ); | |
| </script> |
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 placeholder text for Gravity Forms | |
| add_filter( 'gform_enable_field_label_visibility_settings', '__return_true' ); |
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
| //WP Logout URL Shortcode | |
| function ni_Logout() { | |
| $NIlogout = wp_logout_url(); | |
| return $NIlogout; | |
| } | |
| add_shortcode('logout', 'ni_Logout'); |
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
| // Hides WP Help Functions for Non-Admins | |
| // Add to the functions.php of your active child theme | |
| function ni_hide_wphelp_actions() { | |
| echo '<style type="text/css"> | |
| #cws-wp-help-actions {display:none !important;} | |
| </style>'; | |
| } | |
| if ( ! current_user_can('administrator') ) { |
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
| // Fixes Gravity Form Display in WP Help | |
| // Add to functions.php of active child theme | |
| function ni_gf_in_wphelp() { | |
| echo '<style type="text/css"> | |
| #cws-wp-help-document .gform_wrapper {display:inline-block !important;} | |
| </style>'; | |
| } | |
| add_action('admin_head', 'ni_gf_in_wphelp'); |
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
| // Prefill Gravity Form with User Data | |
| function populate_usermeta($meta_key){ global $current_user; | |
| return $current_user->__get($meta_key); | |
| } | |
| add_filter('gform_field_value_userfirstname', create_function("", '$value = populate_usermeta(\'user_firstname\'); return $value;' )); | |
| add_filter('gform_field_value_userlastname', create_function("", '$value = populate_usermeta(\'user_lastname\'); return $value;' )); | |
| add_filter('gform_field_value_useremail', | |
| create_function("", '$value = populate_usermeta(\'user_email\'); return $value;' )); |