Make WordPress Core


Ignore:
Timestamp:
01/08/2015 06:01:08 AM (10 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-control.php

    r30991 r31083  
    184184     * @return bool Whether the control is active to the current preview.
    185185     */
    186     public final function active() {
     186    final public function active() {
    187187        $control = $this;
    188188        $active = call_user_func( $this->active_callback, $this );
     
    225225     * @return mixed The requested setting's value, if the setting exists.
    226226     */
    227     public final function value( $setting_key = 'default' ) {
     227    final public function value( $setting_key = 'default' ) {
    228228        if ( isset( $this->settings[ $setting_key ] ) ) {
    229229            return $this->settings[ $setting_key ]->value();
     
    271271     * @return bool False if theme doesn't support the control or user doesn't have the required permissions, otherwise true.
    272272     */
    273     public final function check_capabilities() {
     273    final public function check_capabilities() {
    274274        foreach ( $this->settings as $setting ) {
    275275            if ( ! $setting->check_capabilities() )
     
    291291     * @return string Contents of the control.
    292292     */
    293     public final function get_content() {
     293    final public function get_content() {
    294294        ob_start();
    295295        $this->maybe_render();
     
    305305     * @uses WP_Customize_Control::render()
    306306     */
    307     public final function maybe_render() {
     307    final public function maybe_render() {
    308308        if ( ! $this->check_capabilities() )
    309309            return;
     
    976976    }
    977977
    978     function print_header_image_template() {
     978    public function print_header_image_template() {
    979979        ?>
    980980        <script type="text/template" id="tmpl-header-choice">
     
    11861186     * @return bool Whether the widget is rendered.
    11871187     */
    1188     function active_callback() {
     1188    public function active_callback() {
    11891189        return $this->manager->widgets->is_widget_rendered( $this->widget_id );
    11901190    }
Note: See TracChangeset for help on using the changeset viewer.