Make WordPress Core

Changeset 51919


Ignore:
Timestamp:
10/18/2021 05:51:17 PM (5 years ago)
Author:
hellofromTonya
Message:

Coding Standards: Add public visibility to methods in src directory.

This commit adds the public visibility keyword to each method which did not have an explicit visibility keyword.

Why public?

With no visibility previously declared, these methods are implicitly public and available for use. Changing them to anything else would be a backwards-compatibility break.

Props costdev, jrf.
See #54177.

Location:
trunk/src
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-debug-data.php

    r51715 r51919  
    1414         * @since 5.2.0
    1515         */
    16         static function check_for_updates() {
     16        public static function check_for_updates() {
    1717                wp_version_check();
    1818                wp_update_plugins();
    … …  
    3333         * @return array The debug data for the site.
    3434         */
    35         static function debug_data() {
     35        public static function debug_data() {
    3636                global $wpdb;
    3737
  • trunk/src/wp-admin/includes/class-wp-site-health-auto-updates.php

    r51661 r51919  
    157157         * @return array|false The test results. False if the auto-updates failed.
    158158         */
    159         function test_if_failed_update() {
     159        public function test_if_failed_update() {
    160160                $failed = get_site_option( 'auto_core_update_failed' );
    161161
    … …  
    273273         * @return array The test results.
    274274         */
    275         function test_check_wp_filesystem_method() {
     275        public function test_check_wp_filesystem_method() {
    276276                // Make sure the `request_filesystem_credentials()` function is available during our REST API call.
    277277                if ( ! function_exists( 'request_filesystem_credentials' ) ) {
    … …  
    307307         * @return array|false The test results. False if they're not writeable.
    308308         */
    309         function test_all_files_writable() {
     309        public function test_all_files_writable() {
    310310                global $wp_filesystem;
    311311
    … …  
    392392         * @return array|false The test results. False if it isn't a development version.
    393393         */
    394         function test_accepts_dev_updates() {
     394        public function test_accepts_dev_updates() {
    395395                require ABSPATH . WPINC . '/version.php'; // $wp_version; // x.y.z
    396396                // Only for dev versions.
    … …  
    430430         * @return array The test results.
    431431         */
    432         function test_accepts_minor_updates() {
     432        public function test_accepts_minor_updates() {
    433433                if ( defined( 'WP_AUTO_UPDATE_CORE' ) && false === WP_AUTO_UPDATE_CORE ) {
    434434                        return array(
  • trunk/src/wp-admin/includes/class-wp-site-health.php

    r51898 r51919  
    27682768         * @return object The test results.
    27692769         */
    2770         function detect_plugin_theme_auto_update_issues() {
     2770        public function detect_plugin_theme_auto_update_issues() {
    27712771                $mock_plugin = (object) array(
    27722772                        'id'            => 'w.org/plugins/a-fake-plugin',
    … …  
    28512851         * @return object The test results.
    28522852         */
    2853         function can_perform_loopback() {
     2853        public function can_perform_loopback() {
    28542854                $body    = array( 'site-health' => 'loopback-test' );
    28552855                $cookies = wp_unslash( $_COOKIE );
  • trunk/src/wp-content/themes/twentyeleven/inc/widgets.php

    r47808 r51919  
    1818         * @since Twenty Eleven 2.2
    1919         */
    20         function __construct() {
     20        public function __construct() {
    2121                parent::__construct(
    2222                        'widget_twentyeleven_ephemera',
    … …  
    4141         * @deprecated Twenty Eleven 2.2
    4242         */
    43         function Twenty_Eleven_Ephemera_Widget() {
     43        public function Twenty_Eleven_Ephemera_Widget() {
    4444                self::__construct();
    4545        }
    … …  
    5353         * @param array $instance An array of settings for this widget instance.
    5454         */
    55         function widget( $args, $instance ) {
     55        public function widget( $args, $instance ) {
    5656                $cache = wp_cache_get( 'widget_twentyeleven_ephemera', 'widget' );
    5757
    … …  
    159159         * @since Twenty Eleven 1.0
    160160         */
    161         function update( $new_instance, $old_instance ) {
     161        public function update( $new_instance, $old_instance ) {
    162162                $instance           = $old_instance;
    163163                $instance['title']  = strip_tags( $new_instance['title'] );
    … …  
    178178         * @since Twenty Eleven 1.0
    179179         */
    180         function flush_widget_cache() {
     180        public function flush_widget_cache() {
    181181                wp_cache_delete( 'widget_twentyeleven_ephemera', 'widget' );
    182182        }
    … …  
    189189         * @since Twenty Eleven 1.0
    190190         */
    191         function form( $instance ) {
     191        public function form( $instance ) {
    192192                $title  = isset( $instance['title'] ) ? esc_attr( $instance['title'] ) : '';
    193193                $number = isset( $instance['number'] ) ? absint( $instance['number'] ) : 10;
  • trunk/src/wp-content/themes/twentyfourteen/inc/widgets.php

    r51789 r51919  
    270270         * @return array Updated widget instance.
    271271         */
    272         function update( $new_instance, $old_instance ) {
     272        public function update( $new_instance, $old_instance ) {
    273273                $old_instance['title']  = strip_tags( $new_instance['title'] );
    274274                $old_instance['number'] = empty( $new_instance['number'] ) ? 2 : absint( $new_instance['number'] );
    … …  
    288288         * @param array $instance
    289289         */
    290         function form( $instance ) {
     290        public function form( $instance ) {
    291291                $title  = ! empty( $instance['title'] ) ? esc_attr( $instance['title'] ) : '';
    292292                $number = ! empty( $instance['number'] ) ? absint( $instance['number'] ) : 2;
  • trunk/src/wp-includes/class-wp-customize-manager.php

    r51730 r51919  
    11861186         * @param array $starter_content Starter content. Defaults to `get_theme_starter_content()`.
    11871187         */
    1188         function import_theme_starter_content( $starter_content = array() ) {
     1188        public function import_theme_starter_content( $starter_content = array() ) {
    11891189                if ( empty( $starter_content ) ) {
    11901190                        $starter_content = get_theme_starter_content();
    … …  
    26232623         * @return array|WP_Error Returns array on success and WP_Error with array data on error.
    26242624         */
    2625         function save_changeset_post( $args = array() ) {
     2625        public function save_changeset_post( $args = array() ) {
    26262626
    26272627                $args = array_merge(
  • trunk/src/wp-includes/class-wp-customize-setting.php

    r51783 r51919  
    269269         * @ignore
    270270         */
    271         static public function reset_aggregated_multidimensionals() {
     271        public static function reset_aggregated_multidimensionals() {
    272272                self::$aggregated_multidimensionals = array();
    273273        }
  • trunk/src/wp-includes/pomo/entry.php

    r49184 r51919  
    4141                 *  - flags (array) -- flags like php-format
    4242                 */
    43                 function __construct( $args = array() ) {
     43                public function __construct( $args = array() ) {
    4444                        // If no singular -- empty object.
    4545                        if ( ! isset( $args['singular'] ) ) {
    … …  
    8181                 * @return string|bool the key or false if the entry is empty
    8282                 */
    83                 function key() {
     83                public function key() {
    8484                        if ( null === $this->singular || '' === $this->singular ) {
    8585                                return false;
    … …  
    9797                 * @param object $other
    9898                 */
    99                 function merge_with( &$other ) {
     99                public function merge_with( &$other ) {
    100100                        $this->flags      = array_unique( array_merge( $this->flags, $other->flags ) );
    101101                        $this->references = array_unique( array_merge( $this->references, $other->references ) );
  • trunk/src/wp-includes/pomo/mo.php

    r51342 r51919  
    3838                 * @return bool True if the import from file was successful, otherwise false.
    3939                 */
    40                 function import_from_file( $filename ) {
     40                public function import_from_file( $filename ) {
    4141                        $reader = new POMO_FileReader( $filename );
    4242
    … …  
    5454                 * @return bool
    5555                 */
    56                 function export_to_file( $filename ) {
     56                public function export_to_file( $filename ) {
    5757                        $fh = fopen( $filename, 'wb' );
    5858                        if ( ! $fh ) {
    … …  
    6767                 * @return string|false
    6868                 */
    69                 function export() {
     69                public function export() {
    7070                        $tmp_fh = fopen( 'php://temp', 'r+' );
    7171                        if ( ! $tmp_fh ) {
    … …  
    8181                 * @return bool
    8282                 */
    83                 function is_entry_good_for_export( $entry ) {
     83                public function is_entry_good_for_export( $entry ) {
    8484                        if ( empty( $entry->translations ) ) {
    8585                                return false;
    … …  
    9797                 * @return true
    9898                 */
    99                 function export_to_file_handle( $fh ) {
     99                public function export_to_file_handle( $fh ) {
    100100                        $entries = array_filter( $this->entries, array( $this, 'is_entry_good_for_export' ) );
    101101                        ksort( $entries );
    … …  
    158158                 * @return string
    159159                 */
    160                 function export_original( $entry ) {
     160                public function export_original( $entry ) {
    161161                        // TODO: Warnings for control characters.
    162162                        $exported = $entry->singular;
    … …  
    174174                 * @return string
    175175                 */
    176                 function export_translations( $entry ) {
     176                public function export_translations( $entry ) {
    177177                        // TODO: Warnings for control characters.
    178178                        return $entry->is_plural ? implode( "\0", $entry->translations ) : $entry->translations[0];
    … …  
    182182                 * @return string
    183183                 */
    184                 function export_headers() {
     184                public function export_headers() {
    185185                        $exported = '';
    186186                        foreach ( $this->headers as $header => $value ) {
    … …  
    194194                 * @return string|false
    195195                 */
    196                 function get_byteorder( $magic ) {
     196                public function get_byteorder( $magic ) {
    197197                        // The magic is 0x950412de.
    198198
    … …  
    215215                 * @return bool True if the import was successful, otherwise false.
    216216                 */
    217                 function import_from_reader( $reader ) {
     217                public function import_from_reader( $reader ) {
    218218                        $endian_string = MO::get_byteorder( $reader->readint32() );
    219219                        if ( false === $endian_string ) {
    … …  
    312312                 * @return Translation_Entry Entry instance.
    313313                 */
    314                 function &make_entry( $original, $translation ) {
     314                public function &make_entry( $original, $translation ) {
    315315                        $entry = new Translation_Entry();
    316316                        // Look for context, separated by \4.
    … …  
    336336                 * @return string
    337337                 */
    338                 function select_plural_form( $count ) {
     338                public function select_plural_form( $count ) {
    339339                        return $this->gettext_select_plural_form( $count );
    340340                }
    … …  
    343343                 * @return int
    344344                 */
    345                 function get_plural_forms_count() {
     345                public function get_plural_forms_count() {
    346346                        return $this->_nplurals;
    347347                }
  • trunk/src/wp-includes/pomo/po.php

    r51636 r51919  
    3737                 * @return string msgid/msgstr PO entry for this PO file headers, doesn't contain newline at the end
    3838                 */
    39                 function export_headers() {
     39                public function export_headers() {
    4040                        $header_string = '';
    4141                        foreach ( $this->headers as $header => $value ) {
    … …  
    5656                 * @return string sequence of mgsgid/msgstr PO strings, doesn't containt newline at the end
    5757                 */
    58                 function export_entries() {
     58                public function export_entries() {
    5959                        // TODO: Sorting.
    6060                        return implode( "\n\n", array_map( array( 'PO', 'export_entry' ), $this->entries ) );
    … …  
    6767                 * @return string ready for inclusion in PO file string for headers and all the enrtries
    6868                 */
    69                 function export( $include_headers = true ) {
     69                public function export( $include_headers = true ) {
    7070                        $res = '';
    7171                        if ( $include_headers ) {
    … …  
    8484                 * @return bool true on success, false on error
    8585                 */
    86                 function export_to_file( $filename, $include_headers = true ) {
     86                public function export_to_file( $filename, $include_headers = true ) {
    8787                        $fh = fopen( $filename, 'w' );
    8888                        if ( false === $fh ) {
    … …  
    104104                 * @param string $text Text to include as a comment.
    105105                 */
    106                 function set_comment_before_headers( $text ) {
     106                public function set_comment_before_headers( $text ) {
    107107                        $this->comments_before_headers = $text;
    108108                }
    … …  
    294294                 * @return bool
    295295                 */
    296                 function import_from_file( $filename ) {
     296                public function import_from_file( $filename ) {
    297297                        $f = fopen( $filename, 'r' );
    298298                        if ( ! $f ) {
    … …  
    336336                 * @return null|false|array
    337337                 */
    338                 function read_entry( $f, $lineno = 0 ) {
     338                public function read_entry( $f, $lineno = 0 ) {
    339339                        $entry = new Translation_Entry();
    340340                        // Where were we in the last step.
    … …  
    465465                 * @return bool
    466466                 */
    467                 function read_line( $f, $action = 'read' ) {
     467                public function read_line( $f, $action = 'read' ) {
    468468                        static $last_line     = '';
    469469                        static $use_last_line = false;
    … …  
    487487                 * @param string            $po_comment_line
    488488                 */
    489                 function add_comment_to_entry( &$entry, $po_comment_line ) {
     489                public function add_comment_to_entry( &$entry, $po_comment_line ) {
    490490                        $first_two = substr( $po_comment_line, 0, 2 );
    491491                        $comment   = trim( substr( $po_comment_line, 2 ) );
  • trunk/src/wp-includes/pomo/streams.php

    r51032 r51919  
    1818                 * PHP5 constructor.
    1919                 */
    20                 function __construct() {
     20                public function __construct() {
    2121                        if ( function_exists( 'mb_substr' )
    2222                                && ( (int) ini_get( 'mbstring.func_overload' ) & 2 ) // phpcs:ignore PHPCompatibility.IniDirectives.RemovedIniDirectives.mbstring_func_overloadDeprecated
    … …  
    4747                 * @param string $endian Set the endianness of the file. Accepts 'big', or 'little'.
    4848                 */
    49                 function setEndian( $endian ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid
     49                public function setEndian( $endian ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid
    5050                        $this->endian = $endian;
    5151                }
    … …  
    5757                 *  the stream of false if there are not enough bytes or on error
    5858                 */
    59                 function readint32() {
     59                public function readint32() {
    6060                        $bytes = $this->read( 4 );
    6161                        if ( 4 != $this->strlen( $bytes ) ) {
    … …  
    7474                 *  enough data or on error
    7575                 */
    76                 function readint32array( $count ) {
     76                public function readint32array( $count ) {
    7777                        $bytes = $this->read( 4 * $count );
    7878                        if ( 4 * $count != $this->strlen( $bytes ) ) {
    … …  
    8989                 * @return string
    9090                 */
    91                 function substr( $string, $start, $length ) {
     91                public function substr( $string, $start, $length ) {
    9292                        if ( $this->is_overloaded ) {
    9393                                return mb_substr( $string, $start, $length, 'ascii' );
    … …  
    101101                 * @return int
    102102                 */
    103                 function strlen( $string ) {
     103                public function strlen( $string ) {
    104104                        if ( $this->is_overloaded ) {
    105105                                return mb_strlen( $string, 'ascii' );
    … …  
    114114                 * @return array
    115115                 */
    116                 function str_split( $string, $chunk_size ) {
     116                public function str_split( $string, $chunk_size ) {
    117117                        if ( ! function_exists( 'str_split' ) ) {
    118118                                $length = $this->strlen( $string );
    … …  
    130130                 * @return int
    131131                 */
    132                 function pos() {
     132                public function pos() {
    133133                        return $this->_pos;
    134134                }
    … …  
    137137                 * @return true
    138138                 */
    139                 function is_resource() {
     139                public function is_resource() {
    140140                        return true;
    141141                }
    … …  
    144144                 * @return true
    145145                 */
    146                 function close() {
     146                public function close() {
    147147                        return true;
    148148                }
    … …  
    156156                 * @param string $filename
    157157                 */
    158                 function __construct( $filename ) {
     158                public function __construct( $filename ) {
    159159                        parent::__construct();
    160160                        $this->_f = fopen( $filename, 'rb' );
    … …  
    177177                 * @return string|false Returns read string, otherwise false.
    178178                 */
    179                 function read( $bytes ) {
     179                public function read( $bytes ) {
    180180                        return fread( $this->_f, $bytes );
    181181                }
    … …  
    185185                 * @return bool
    186186                 */
    187                 function seekto( $pos ) {
     187                public function seekto( $pos ) {
    188188                        if ( -1 == fseek( $this->_f, $pos, SEEK_SET ) ) {
    189189                                return false;
    … …  
    196196                 * @return bool
    197197                 */
    198                 function is_resource() {
     198                public function is_resource() {
    199199                        return is_resource( $this->_f );
    200200                }
    … …  
    203203                 * @return bool
    204204                 */
    205                 function feof() {
     205                public function feof() {
    206206                        return feof( $this->_f );
    207207                }
    … …  
    210210                 * @return bool
    211211                 */
    212                 function close() {
     212                public function close() {
    213213                        return fclose( $this->_f );
    214214                }
    … …  
    217217                 * @return string
    218218                 */
    219                 function read_all() {
     219                public function read_all() {
    220220                        $all = '';
    221221                        while ( ! $this->feof() ) {
    … …  
    239239                 * PHP5 constructor.
    240240                 */
    241                 function __construct( $str = '' ) {
     241                public function __construct( $str = '' ) {
    242242                        parent::__construct();
    243243                        $this->_str = $str;
    … …  
    261261                 * @return string
    262262                 */
    263                 function read( $bytes ) {
     263                public function read( $bytes ) {
    264264                        $data        = $this->substr( $this->_str, $this->_pos, $bytes );
    265265                        $this->_pos += $bytes;
    … …  
    274274                 * @return int
    275275                 */
    276                 function seekto( $pos ) {
     276                public function seekto( $pos ) {
    277277                        $this->_pos = $pos;
    278278                        if ( $this->strlen( $this->_str ) < $this->_pos ) {
    … …  
    285285                 * @return int
    286286                 */
    287                 function length() {
     287                public function length() {
    288288                        return $this->strlen( $this->_str );
    289289                }
    … …  
    292292                 * @return string
    293293                 */
    294                 function read_all() {
     294                public function read_all() {
    295295                        return $this->substr( $this->_str, $this->_pos, $this->strlen( $this->_str ) );
    296296                }
    … …  
    307307                 * PHP5 constructor.
    308308                 */
    309                 function __construct( $filename ) {
     309                public function __construct( $filename ) {
    310310                        parent::__construct();
    311311                        $this->_str = file_get_contents( $filename );
    … …  
    349349                 * @see POMO_CachedIntFileReader::__construct()
    350350                 */
    351                 function POMO_CachedIntFileReader( $filename ) {
     351                public function POMO_CachedIntFileReader( $filename ) {
    352352                        _deprecated_constructor( self::class, '5.4.0', static::class );
    353353                        self::__construct( $filename );
  • trunk/src/wp-includes/pomo/translations.php

    r49184 r51919  
    2222                 * @return bool true on success, false if the entry doesn't have a key
    2323                 */
    24                 function add_entry( $entry ) {
     24                public function add_entry( $entry ) {
    2525                        if ( is_array( $entry ) ) {
    2626                                $entry = new Translation_Entry( $entry );
    … …  
    3838                 * @return bool
    3939                 */
    40                 function add_entry_or_merge( $entry ) {
     40                public function add_entry_or_merge( $entry ) {
    4141                        if ( is_array( $entry ) ) {
    4242                                $entry = new Translation_Entry( $entry );
    … …  
    6464                 * @param string $value header value, without trailing \n
    6565                 */
    66                 function set_header( $header, $value ) {
     66                public function set_header( $header, $value ) {
    6767                        $this->headers[ $header ] = $value;
    6868                }
    … …  
    7171                 * @param array $headers
    7272                 */
    73                 function set_headers( $headers ) {
     73                public function set_headers( $headers ) {
    7474                        foreach ( $headers as $header => $value ) {
    7575                                $this->set_header( $header, $value );
    … …  
    8080                 * @param string $header
    8181                 */
    82                 function get_header( $header ) {
     82                public function get_header( $header ) {
    8383                        return isset( $this->headers[ $header ] ) ? $this->headers[ $header ] : false;
    8484                }
    … …  
    8787                 * @param Translation_Entry $entry
    8888                 */
    89                 function translate_entry( &$entry ) {
     89                public function translate_entry( &$entry ) {
    9090                        $key = $entry->key();
    9191                        return isset( $this->entries[ $key ] ) ? $this->entries[ $key ] : false;
    … …  
    9797                 * @return string
    9898                 */
    99                 function translate( $singular, $context = null ) {
     99                public function translate( $singular, $context = null ) {
    100100                        $entry      = new Translation_Entry(
    101101                                array(
    … …  
    119119                 * @param int $count number of items
    120120                 */
    121                 function select_plural_form( $count ) {
     121                public function select_plural_form( $count ) {
    122122                        return 1 == $count ? 0 : 1;
    123123                }
    … …  
    126126                 * @return int
    127127                 */
    128                 function get_plural_forms_count() {
     128                public function get_plural_forms_count() {
    129129                        return 2;
    130130                }
    … …  
    136136                 * @param string $context
    137137                 */
    138                 function translate_plural( $singular, $plural, $count, $context = null ) {
     138                public function translate_plural( $singular, $plural, $count, $context = null ) {
    139139                        $entry              = new Translation_Entry(
    140140                                array(
    … …  
    162162                 * @return void
    163163                 */
    164                 function merge_with( &$other ) {
     164                public function merge_with( &$other ) {
    165165                        foreach ( $other->entries as $entry ) {
    166166                                $this->entries[ $entry->key() ] = $entry;
    … …  
    171171                 * @param object $other
    172172                 */
    173                 function merge_originals_with( &$other ) {
     173                public function merge_originals_with( &$other ) {
    174174                        foreach ( $other->entries as $entry ) {
    175175                                if ( ! isset( $this->entries[ $entry->key() ] ) ) {
    … …  
    191191                 * @param int $count
    192192                 */
    193                 function gettext_select_plural_form( $count ) {
     193                public function gettext_select_plural_form( $count ) {
    194194                        if ( ! isset( $this->_gettext_select_plural_form ) || is_null( $this->_gettext_select_plural_form ) ) {
    195195                                list( $nplurals, $expression )     = $this->nplurals_and_expression_from_header( $this->get_header( 'Plural-Forms' ) );
    … …  
    204204                 * @return array
    205205                 */
    206                 function nplurals_and_expression_from_header( $header ) {
     206                public function nplurals_and_expression_from_header( $header ) {
    207207                        if ( preg_match( '/^\s*nplurals\s*=\s*(\d+)\s*;\s+plural\s*=\s*(.+)$/', $header, $matches ) ) {
    208208                                $nplurals   = (int) $matches[1];
    … …  
    221221                 * @param string $expression
    222222                 */
    223                 function make_plural_form_function( $nplurals, $expression ) {
     223                public function make_plural_form_function( $nplurals, $expression ) {
    224224                        try {
    225225                                $handler = new Plural_Forms( rtrim( $expression, ';' ) );
    … …  
    238238                 * @return string the expression with parentheses added
    239239                 */
    240                 function parenthesize_plural_exression( $expression ) {
     240                public function parenthesize_plural_exression( $expression ) {
    241241                        $expression .= ';';
    242242                        $res         = '';
    … …  
    267267                 * @return array
    268268                 */
    269                 function make_headers( $translation ) {
     269                public function make_headers( $translation ) {
    270270                        $headers = array();
    271271                        // Sometimes \n's are used instead of real new lines.
    … …  
    286286                 * @param string $value
    287287                 */
    288                 function set_header( $header, $value ) {
     288                public function set_header( $header, $value ) {
    289289                        parent::set_header( $header, $value );
    290290                        if ( 'Plural-Forms' === $header ) {
    … …  
    305305                public $headers = array();
    306306
    307                 function add_entry( $entry ) {
     307                public function add_entry( $entry ) {
    308308                        return true;
    309309                }
    … …  
    313313                 * @param string $value
    314314                 */
    315                 function set_header( $header, $value ) {
     315                public function set_header( $header, $value ) {
    316316                }
    317317
    … …  
    319319                 * @param array $headers
    320320                 */
    321                 function set_headers( $headers ) {
     321                public function set_headers( $headers ) {
    322322                }
    323323
    … …  
    326326                 * @return false
    327327                 */
    328                 function get_header( $header ) {
     328                public function get_header( $header ) {
    329329                        return false;
    330330                }
    … …  
    334334                 * @return false
    335335                 */
    336                 function translate_entry( &$entry ) {
     336                public function translate_entry( &$entry ) {
    337337                        return false;
    338338                }
    … …  
    342342                 * @param string $context
    343343                 */
    344                 function translate( $singular, $context = null ) {
     344                public function translate( $singular, $context = null ) {
    345345                        return $singular;
    346346                }
    … …  
    350350                 * @return bool
    351351                 */
    352                 function select_plural_form( $count ) {
     352                public function select_plural_form( $count ) {
    353353                        return 1 == $count ? 0 : 1;
    354354                }
    … …  
    357357                 * @return int
    358358                 */
    359                 function get_plural_forms_count() {
     359                public function get_plural_forms_count() {
    360360                        return 2;
    361361                }
    … …  
    367367                 * @param string $context
    368368                 */
    369                 function translate_plural( $singular, $plural, $count, $context = null ) {
     369                public function translate_plural( $singular, $plural, $count, $context = null ) {
    370370                        return 1 == $count ? $singular : $plural;
    371371                }
    … …  
    374374                 * @param object $other
    375375                 */
    376                 function merge_with( &$other ) {
     376                public function merge_with( &$other ) {
    377377                }
    378378        }
  • trunk/src/wp-includes/wp-db.php

    r51851 r51919  
    12171217         * @return string
    12181218         */
    1219         function _weak_escape( $string ) {
     1219        public function _weak_escape( $string ) {
    12201220                if ( func_num_args() === 1 && function_exists( '_deprecated_function' ) ) {
    12211221                        _deprecated_function( __METHOD__, '3.6.0', 'wpdb::prepare() or esc_sql()' );
    … …  
    12351235         * @return string Escaped string.
    12361236         */
    1237         function _real_escape( $string ) {
     1237        public function _real_escape( $string ) {
    12381238                if ( ! is_scalar( $string ) ) {
    12391239                        return '';
    … …  
    23322332         * @return int|false The number of rows affected, or false on error.
    23332333         */
    2334         function _insert_replace_helper( $table, $data, $format = null, $type = 'INSERT' ) {
     2334        public function _insert_replace_helper( $table, $data, $format = null, $type = 'INSERT' ) {
    23352335                $this->insert_id = 0;
    23362336
Note: See TracChangeset for help on using the changeset viewer.