Make WordPress Core


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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.