Make WordPress Core

Changeset 25499


Ignore:
Timestamp:
09/19/2013 04:32:29 PM (11 years ago)
Author:
DrewAPicture
Message:

Inline documentation for hooks in wp-admin/admin-header.php.

props ericlewis. Fixes #25353.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/admin-header.php

    r25124 r25499  
    3434    $admin_title = sprintf( __( '%1$s ‹ %2$s — WordPress' ), $title, $admin_title );
    3535
     36/**
     37 * Filter the <title> content for an admin page.
     38 *
     39 * @since 3.1.0
     40 *
     41 * @param string $admin_title The page title, with extra context added.
     42 * @param string $title       The original page title.
     43 */
    3644$admin_title = apply_filters( 'admin_title', $admin_title, $title );
    3745
     
    6169<?php
    6270
    63 do_action('admin_enqueue_scripts', $hook_suffix);
    64 do_action("admin_print_styles-$hook_suffix");
    65 do_action('admin_print_styles');
    66 do_action("admin_print_scripts-$hook_suffix");
    67 do_action('admin_print_scripts');
    68 do_action("admin_head-$hook_suffix");
    69 do_action('admin_head');
     71/**
     72 * Enqueue scripts for all admin pages.
     73 *
     74 * @since 2.8.0
     75 *
     76 * @param string $hook_suffix The current admin page.
     77 */
     78do_action( 'admin_enqueue_scripts', $hook_suffix );
     79
     80/**
     81 * Print styles for a specific admin page based on $hook_suffix.
     82 *
     83 * @since 2.6.0
     84 */
     85do_action( "admin_print_styles-$hook_suffix" );
     86
     87/**
     88 * Print styles for all admin pages.
     89 *
     90 * @since 2.6.0
     91 */
     92do_action( 'admin_print_styles' );
     93
     94/**
     95 * Print scripts for a specific admin page based on $hook_suffix.
     96 *
     97 * @since 2.1.0
     98 */
     99do_action( "admin_print_scripts-$hook_suffix" );
     100
     101/**
     102 * Print scripts for all admin pages.
     103 *
     104 * @since 2.1.0
     105 */
     106do_action( 'admin_print_scripts' );
     107
     108/**
     109 * Fires in <head> for a specific admin page based on $hook_suffix.
     110 *
     111 * @since 2.1.0
     112 */
     113do_action( "admin_head-$hook_suffix" );
     114
     115/**
     116 * Fires in <head> for all admin pages.
     117 *
     118 * @since 2.1.0
     119 */
     120do_action( 'admin_head' );
    70121
    71122if ( get_user_setting('mfold') == 'f' )
     
    99150?>
    100151</head>
     152<?php
     153/**
     154 * Filter the admin <body> CSS classes.
     155 *
     156 * This filter differs from the post_class or body_class filters in two important ways:
     157 * 1. $classes is a space-separated string of class names instead of an array.
     158 * 2. Not all core admin classes are filterable, notably: wp-admin, wp-core-ui, and no-js cannot be removed.
     159 *
     160 * @since 2.3.0
     161 *
     162 * @param string $classes Space-separated string of CSS classes.
     163 */
     164?>
    101165<body class="wp-admin wp-core-ui no-js <?php echo apply_filters( 'admin_body_class', '' ) . " $admin_body_class"; ?>">
    102166<script type="text/javascript">
     
    116180
    117181<?php
    118 do_action('in_admin_header');
     182/**
     183 * Fires at the beginning of the content section in an admin page.
     184 *
     185 * @since 3.0.0
     186 */
     187do_action( 'in_admin_header' );
    119188?>
    120189
     
    132201$current_screen->render_screen_meta();
    133202
    134 if ( is_network_admin() )
    135     do_action('network_admin_notices');
    136 elseif ( is_user_admin() )
    137     do_action('user_admin_notices');
    138 else
    139     do_action('admin_notices');
    140 
    141 do_action('all_admin_notices');
     203if ( is_network_admin() ) {
     204    /**
     205     * Print network admin screen notices.
     206     *
     207     * @since 3.1.0
     208     */
     209    do_action( 'network_admin_notices' );
     210} elseif ( is_user_admin() ) {
     211    /**
     212     * Print user admin screen notices.
     213     *
     214     * @since 3.1.0
     215     */
     216    do_action( 'user_admin_notices' );
     217} else {
     218    /**
     219     * Print admin screen notices.
     220     *
     221     * @since 3.1.0
     222     */
     223    do_action( 'admin_notices' );
     224}
     225
     226/**
     227 * Print generic admin screen notices.
     228 *
     229 * @since 3.1.0
     230 */
     231do_action( 'all_admin_notices' );
    142232
    143233if ( $parent_file == 'options-general.php' )
Note: See TracChangeset for help on using the changeset viewer.