Make WordPress Core


Ignore:
Timestamp:
10/18/2021 05:51:17 PM (3 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-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;
Note: See TracChangeset for help on using the changeset viewer.