~canonical-sysadmins/wordpress/4.7.2

« back to all changes in this revision

Viewing changes to wp-includes/admin-bar.php

  • Committer: Barry Price
  • Date: 2016-08-17 04:50:12 UTC
  • mfrom: (1.1.18 upstream)
  • Revision ID: barry.price@canonical.com-20160817045012-qfui81zhqnqv2ba9
Merge WP4.6 from upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
 * Instantiate the admin bar object and set it up as a global for access elsewhere.
12
12
 *
13
13
 * UNHOOKING THIS FUNCTION WILL NOT PROPERLY REMOVE THE ADMIN BAR.
14
 
 * For that, use show_admin_bar(false) or the 'show_admin_bar' filter.
 
14
 * For that, use show_admin_bar(false) or the {@see 'show_admin_bar'} filter.
15
15
 *
16
16
 * @since 3.1.0
17
17
 * @access private
32
32
        /* Instantiate the admin bar */
33
33
 
34
34
        /**
35
 
         * Filter the admin bar class to instantiate.
 
35
         * Filters the admin bar class to instantiate.
36
36
         *
37
37
         * @since 3.1.0
38
38
         *
51
51
}
52
52
 
53
53
/**
54
 
 * Render the admin bar to the page based on the $wp_admin_bar->menu member var.
55
 
 * This is called very late on the footer actions so that it will render after anything else being
56
 
 * added to the footer.
57
 
 *
58
 
 * It includes the action "admin_bar_menu" which should be used to hook in and
59
 
 * add new menus to the admin bar. That way you can be sure that you are adding at most optimal point,
60
 
 * right before the admin bar is rendered. This also gives you access to the $post global, among others.
 
54
 * Renders the admin bar to the page based on the $wp_admin_bar->menu member var.
 
55
 *
 
56
 * This is called very late on the footer actions so that it will render after
 
57
 * anything else being added to the footer.
 
58
 *
 
59
 * It includes the {@see 'admin_bar_menu'} action which should be used to hook in and
 
60
 * add new menus to the admin bar. That way you can be sure that you are adding at most
 
61
 * optimal point, right before the admin bar is rendered. This also gives you access to
 
62
 * the `$post` global, among others.
61
63
 *
62
64
 * @since 3.1.0
63
65
 *
872
874
}
873
875
 
874
876
/**
875
 
 * Set the display status of the admin bar.
 
877
 * Sets the display status of the admin bar.
876
878
 *
877
 
 * This can be called immediately upon plugin load. It does not need to be called from a function hooked to the init action.
 
879
 * This can be called immediately upon plugin load. It does not need to be called
 
880
 * from a function hooked to the {@see 'init'} action.
878
881
 *
879
882
 * @since 3.1.0
880
883
 *
921
924
        }
922
925
 
923
926
        /**
924
 
         * Filter whether to show the admin bar.
 
927
         * Filters whether to show the admin bar.
925
928
         *
926
929
         * Returning false to this hook is the recommended way to hide the admin bar.
927
930
         * The user's display preference is used for logged in users.