WordPress.org

Make WordPress Core

Ticket #10758: 10758.2.patch

File 10758.2.patch, 3.5 KB (added by hakre, 8 years ago)

Updated against current head

  • wp-admin/admin-footer.php

     
    2929<?php
    3030do_action('admin_footer', '');
    3131do_action('admin_print_footer_scripts');
    32 do_action("admin_footer-$hook_suffix");
     32if (isset($hook_suffix))
     33        do_action("admin_footer-$hook_suffix");
     34else
     35        do_action("admin_footer-");
    3336
    3437// get_site_option() won't exist when auto upgrading from <= 2.7
    3538if ( function_exists('get_site_option') ) {
  • wp-includes/capabilities.php

     
    860860                $post_author_data = get_userdata( $post->post_author );
    861861                //echo "current user id : $user_id, post author id: " . $post_author_data->ID . "<br />";
    862862                // If the user is the author...
    863                 if ( $user_id == $post_author_data->ID ) {
     863                if ( is_object($post_author_data) && $user_id == $post_author_data->ID ) {
    864864                        // If the post is published...
    865865                        if ( 'publish' == $post->post_status ) {
    866866                                $caps[] = 'edit_published_posts';
  • wp-includes/functions.wp-styles.php

     
    1111 *
    1212 * @since r79
    1313 * @uses do_action() Calls 'wp_print_styles' hook.
    14  * @global object $wp_styles The WP_Styles object for printing styles.
     14 * @global WP_Styles $wp_styles The WP_Styles object for printing styles.
    1515 *
    1616 * @param array $handles (optional) Styles to be printed.  (void) prints queue, (string) prints that style, (array of strings) prints those styles.
    1717 * @return bool True on success, false on failure.
     
    2121        if ( '' === $handles ) // for wp_head
    2222                $handles = false;
    2323
     24        /* @var $wp_styles WP_Styles */
    2425        global $wp_styles;
    2526        if ( !is_a($wp_styles, 'WP_Styles') ) {
    2627                if ( !$handles )
     
    3738 *
    3839 * @since r79
    3940 * @see WP_Styles::add() For parameter and additional information.
     41 * @global WP_Styles $wp_styles
     42 * @return void
    4043 */
    4144function wp_register_style( $handle, $src, $deps = array(), $ver = false, $media = 'all' ) {
     45        /* @var $wp_styles WP_Styles */
    4246        global $wp_styles;
    4347        if ( !is_a($wp_styles, 'WP_Styles') )
    4448                $wp_styles = new WP_Styles();
     
    5155 *
    5256 * @since r79
    5357 * @see WP_Styles::remove() For parameter and additional information.
     58 * @global WP_Styles $wp_styles
    5459 */
    5560function wp_deregister_style( $handle ) {
     61        /* @var $wp_styles WP_Styles */
    5662        global $wp_styles;
    5763        if ( !is_a($wp_styles, 'WP_Styles') )
    5864                $wp_styles = new WP_Styles();
     
    6571 *
    6672 * @since r79
    6773 * @see WP_Styles::add(), WP_Styles::enqueue()
     74 * @global WP_Styles $wp_styles
    6875 */
    6976function wp_enqueue_style( $handle, $src = false, $deps = array(), $ver = false, $media = false ) {
     77        /* @var $wp_styles WP_Styles */
    7078        global $wp_styles;
    7179        if ( !is_a($wp_styles, 'WP_Styles') )
    7280                $wp_styles = new WP_Styles();
     
    8997 * @param string $handle Handle used to add style.
    9098 * @param string $list Optional, defaults to 'queue'. Others values are 'registered', 'queue', 'done', 'to_do'
    9199 * @return bool
     100 * @global WP_Styles $wp_styles
    92101 */
    93102function wp_style_is( $handle, $list = 'queue' ) {
     103        /* @var $wp_styles WP_Styles */
    94104        global $wp_styles;
    95105        if ( !is_a($wp_styles, 'WP_Styles') )
    96106                $wp_styles = new WP_Styles();