Make WordPress Core

Changeset 28519


Ignore:
Timestamp:
05/19/2014 06:18:51 AM (10 years ago)
Author:
wonderboymusic
Message:

Add missing access modifiers to methods in WP_Comment_Query. Add a magic __call() method for BC.

See #27881, #22234.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/comment.php

    r28460 r28519  
    210210     * @var object WP_Meta_Query
    211211     */
    212     var $meta_query = false;
     212    public $meta_query = false;
    213213
    214214    /**
     
    219219     * @var object WP_Date_Query
    220220     */
    221     var $date_query = false;
     221    public $date_query = false;
     222
     223    /**
     224     * Make private/protected methods readable for backwards compatibility
     225     *
     226     * @since 4.0.0
     227     * @param string $name
     228     * @param array $arguments
     229     * @return mixed
     230     */
     231    public function __call( $name, $arguments ) {
     232        return call_user_func_array( array( $this, $name ), $arguments );
     233    }
    222234
    223235    /**
     
    229241     * @return int|array
    230242     */
    231     function query( $query_vars ) {
     243    public function query( $query_vars ) {
    232244        global $wpdb;
    233245
     
    469481     * @return string
    470482     */
    471     function get_search_sql( $string, $cols ) {
     483    protected function get_search_sql( $string, $cols ) {
    472484        $string = esc_sql( like_escape( $string ) );
    473485
Note: See TracChangeset for help on using the changeset viewer.