Make WordPress Core


Ignore:
Timestamp:
01/08/2015 06:01:08 AM (9 years ago)
Author:
wonderboymusic
Message:

In Customizer classes:

  • public final function methods should be final public function - confusing Hack and aligns with PSR2
  • Some methods were missing access modifiers

See #30799.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-customize-section.php

    r30714 r31083  
    176176     * @return bool Whether the section is active to the current preview.
    177177     */
    178     public final function active() {
     178    final public function active() {
    179179        $section = $this;
    180180        $active = call_user_func( $this->active_callback, $this );
     
    231231     * @return bool False if theme doesn't support the section or user doesn't have the capability.
    232232     */
    233     public final function check_capabilities() {
     233    final public function check_capabilities() {
    234234        if ( $this->capability && ! call_user_func_array( 'current_user_can', (array) $this->capability ) ) {
    235235            return false;
     
    250250     * @return string Contents of the section.
    251251     */
    252     public final function get_content() {
     252    final public function get_content() {
    253253        ob_start();
    254254        $this->maybe_render();
     
    263263     * @since 3.4.0
    264264     */
    265     public final function maybe_render() {
     265    final public function maybe_render() {
    266266        if ( ! $this->check_capabilities() ) {
    267267            return;
Note: See TracChangeset for help on using the changeset viewer.