get_node('my-account'); $newtitle = str_replace( 'Howdy,', 'Greetings,', $my_account->title ); $wp_admin_bar->add_node( array( 'id' => 'my-account', 'title' => $newtitle, ) ); } add_filter( 'admin_bar_menu', 'ni_replace_howdy',25 ); // Remove WP Dashboard Menu function ni_admin_bar_remove() { global $wp_admin_bar; $wp_admin_bar->remove_menu('wp-logo'); } add_action('wp_before_admin_bar_render', 'ni_admin_bar_remove', 0); // Remove Dashboard Widgets function ni_remove_dashboard_widgets() { global $wp_meta_boxes; // Activity Widget unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_activity']); // At a Glance Widget unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']); // Quick Draft Widget unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']); // News Widget unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']) ; } add_action('wp_dashboard_setup', 'ni_remove_dashboard_widgets',11); // WordPress Welcome Menu remove_action('welcome_panel', 'wp_welcome_panel'); // Modify the thank you footer text add_filter('admin_footer_text', 'ni_modify_footer_admin'); function ni_modify_footer_admin () { echo '
 
Brilliant Web Works – Custom WordPress Management System'; } /////////////////// CREATE CUSTOM DASHBOARD WIDGETS /////////////////// // Create Custom Client Dashboard Widget add_action('wp_dashboard_setup', 'ni_custom_dashboard_widget'); function ni_custom_dashboard_widget() { global $wp_meta_boxes; wp_add_dashboard_widget('ni_client_widget', ' ', 'ni_client_widget_content'); } function ni_client_widget_content() { $url = get_site_url(); echo '

Google Analytics Instructions

WordPress Help Videos

WordPress Manual

Create a Support Ticket

'; } //Add a Support Form Widget function ni_register_custom_dashboard_support_widget() { wp_add_dashboard_widget( 'custom_dashboard_widget', 'Support Request Form', //Title for Dashboard Widget 'ni_custom_dashboard_support_widget_content' ); } function ni_custom_dashboard_support_widget_content() { echo do_shortcode('[gravityform id="2" title="false" description="false" ajax="true"]'); //Add your shortcode here } add_action( 'wp_dashboard_setup', 'ni_register_custom_dashboard_support_widget' ); /////////////////// GRAVITY FORMS RELATED FUNCTIONS /////////////////// // Give Editors Full Gravity Forms Access function ni_add_grav_forms(){ $role = get_role('editor'); $role->add_cap('gform_full_access'); } add_action('admin_init','ni_add_grav_forms'); /////////////////// PODS RELATED FUNCTIONS /////////////////// // Change Pods MORE FIELDS Metabox Title to Custom add_filter('pods_meta_default_box_title','ni_change_pod_metabox_title',10,5); function ni_change_pod_metabox_title($title, $pod, $fields, $type, $name ) { // assuming we are changing the meta box titles pods named pod1, pod2, and pod3 $title = ($name=='pod1') ? __('More Info', 'plugin_lang') : $title ; $title = ($name=='pod1') ? __('Even More Info', 'plugin_lang') : $title ; $title = ($name=='pod3') ? __('Way More Info', 'plugin_lang') : $title ; return $title; } /////////////////// SHORTCODE CREATION /////////////////// // Site URL Shortcode function ni_site_url() { $siteurl = get_site_url(); return $siteurl; } add_shortcode('siteurl','ni_site_url'); //Current Year Shortcode function ni_year_shortcode() { $year = date('Y'); return $year; } add_shortcode('year', 'ni_year_shortcode'); //Anti-Spam Email Shortcode //Use this shortcode [email]nathan@ithemes.com[/email] function ni_protect_email_address( $atts , $content=null ) { for ($i = 0; $i < strlen($content); $i++) $encodedmail .= "&#" . ord($content[$i]) . ';'; return ''.$encodedmail.''; } add_shortcode('email', 'ni_protect_email_address');