Make WordPress Core


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/capabilities.php

    r16910 r18200  
    7474
    7575    /**
    76      * PHP4 Constructor - Call {@link WP_Roles::_init()} method.
    77      *
    78      * @since 2.0.0
    79      * @access public
    80      *
    81      * @return WP_Roles
    82      */
    83     function WP_Roles() {
     76     * Constructor
     77     *
     78     * @since 2.0.0
     79     */
     80    function __construct() {
    8481        $this->_init();
    8582    }
     
    270267
    271268    /**
    272      * PHP4 Constructor - Set up object properties.
     269     * Constructor - Set up object properties.
    273270     *
    274271     * The list of capabilities, must have the key as the name of the capability
     
    280277     * @param string $role Role name.
    281278     * @param array $capabilities List of capabilities.
    282      * @return WP_Role
    283      */
    284     function WP_Role( $role, $capabilities ) {
     279     */
     280    function __construct( $role, $capabilities ) {
    285281        $this->name = $role;
    286282        $this->capabilities = $capabilities;
     
    461457
    462458    /**
    463      * PHP4 Constructor - Sets up the object properties.
     459     * Constructor - Sets up the object properties.
    464460     *
    465461     * Retrieves the userdata and then assigns all of the data keys to direct
     
    475471     * @return WP_User
    476472     */
    477     function WP_User( $id, $name = '', $blog_id = '' ) {
     473    function __construct( $id, $name = '', $blog_id = '' ) {
    478474
    479475        if ( empty( $id ) && empty( $name ) )
     
    825821        $author_data = get_userdata( $user_id );
    826822        $post = get_post( $args[0] );
     823
     824        if ( 'revision' == $post->post_type ) {
     825            $post = get_post( $post->post_parent );
     826        }
     827
    827828        $post_type = get_post_type_object( $post->post_type );
    828829
     
    870871        $author_data = get_userdata( $user_id );
    871872        $post = get_post( $args[0] );
     873
     874        if ( 'revision' == $post->post_type ) {
     875            $post = get_post( $post->post_parent );
     876        }
     877
    872878        $post_type = get_post_type_object( $post->post_type );
    873879
     
    914920        $author_data = get_userdata( $user_id );
    915921        $post = get_post( $args[0] );
     922
     923        if ( 'revision' == $post->post_type ) {
     924            $post = get_post( $post->post_parent );
     925        }
     926
    916927        $post_type = get_post_type_object( $post->post_type );
    917928
Note: See TracChangeset for help on using the changeset viewer.