Skip to:
Content

bbPress.org


Ignore:
Timestamp:
08/11/2015 08:17:53 PM (11 years ago)
Author:
johnjamesjacoby
Message:

Sniffer: Whitespace around variables in arrays.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/core/theme-compat.php

    r5829 r5908  
    6969         */
    7070        public function __set( $property, $value ) {
    71                 return $this->_data[$property] = $value;
     71                return $this->_data[ $property ] = $value;
    7272        }
    7373
    … …  
    8181         */
    8282        public function __get( $property ) {
    83                 return array_key_exists( $property, $this->_data ) ? $this->_data[$property] : '';
     83                return array_key_exists( $property, $this->_data )
     84                        ? $this->_data[ $property ]
     85                        : '';
    8486        }
    8587}
    … …  
    9799
    98100        // Make sure theme package is available, set to default if not
    99         if ( ! isset( $bbp->theme_compat->packages[$theme] ) || ! is_a( $bbp->theme_compat->packages[$theme], 'BBP_Theme_Compat' ) ) {
     101        if ( ! isset( $bbp->theme_compat->packages[ $theme ] ) || ! is_a( $bbp->theme_compat->packages[ $theme ], 'BBP_Theme_Compat' ) ) {
    100102                $theme = 'default';
    101103        }
    … …  
    103105        // Try to set the active theme compat theme. If it's not in the registered
    104106        // packages array, it doesn't exist, so do nothing with it.
    105         if ( isset( $bbp->theme_compat->packages[$theme] ) ) {
    106                 $bbp->theme_compat->theme = $bbp->theme_compat->packages[$theme];
     107        if ( isset( $bbp->theme_compat->packages[ $theme ] ) ) {
     108                $bbp->theme_compat->theme = $bbp->theme_compat->packages[ $theme ];
    107109        }
    108110}
    … …  
    289291
    290292        // Only override if the flag is set and not previously registered
    291         if ( empty( $bbp->theme_compat->packages[$theme->id] ) || ( true === $override ) ) {
    292                 $bbp->theme_compat->packages[$theme->id] = $theme;
     293        if ( empty( $bbp->theme_compat->packages[ $theme->id ] ) || ( true === $override ) ) {
     294                $bbp->theme_compat->packages[ $theme->id ] = $theme;
    293295        }
    294296}
    … …  
    874876
    875877        // Filters exist
    876         if ( isset( $wp_filter[$tag] ) ) {
     878        if ( isset( $wp_filter[ $tag ] ) ) {
    877879
    878880                // Filters exist in this priority
    879                 if ( ! empty( $priority ) && isset( $wp_filter[$tag][$priority] ) ) {
     881                if ( ! empty( $priority ) && isset( $wp_filter[ $tag ][ $priority ] ) ) {
    880882
    881883                        // Store filters in a backup
    882                         $bbp->filters->wp_filter[$tag][$priority] = $wp_filter[$tag][$priority];
     884                        $bbp->filters->wp_filter[ $tag ][ $priority ] = $wp_filter[ $tag ][ $priority ];
    883885
    884886                        // Unset the filters
    885                         unset( $wp_filter[$tag][$priority] );
     887                        unset( $wp_filter[ $tag ][ $priority ] );
    886888
    887889                // Priority is empty
    … …  
    889891
    890892                        // Store filters in a backup
    891                         $bbp->filters->wp_filter[$tag] = $wp_filter[$tag];
     893                        $bbp->filters->wp_filter[ $tag ] = $wp_filter[ $tag ];
    892894
    893895                        // Unset the filters
    894                         unset( $wp_filter[$tag] );
     896                        unset( $wp_filter[ $tag ] );
    895897                }
    896898        }
    897899
    898900        // Check merged filters
    899         if ( isset( $merged_filters[$tag] ) ) {
     901        if ( isset( $merged_filters[ $tag ] ) ) {
    900902
    901903                // Store filters in a backup
    902                 $bbp->filters->merged_filters[$tag] = $merged_filters[$tag];
     904                $bbp->filters->merged_filters[ $tag ] = $merged_filters[ $tag ];
    903905
    904906                // Unset the filters
    905                 unset( $merged_filters[$tag] );
     907                unset( $merged_filters[ $tag ] );
    906908        }
    907909
    … …  
    926928
    927929        // Filters exist
    928         if ( isset( $bbp->filters->wp_filter[$tag] ) ) {
     930        if ( isset( $bbp->filters->wp_filter[ $tag ] ) ) {
    929931
    930932                // Filters exist in this priority
    931                 if ( ! empty( $priority ) && isset( $bbp->filters->wp_filter[$tag][$priority] ) ) {
     933                if ( ! empty( $priority ) && isset( $bbp->filters->wp_filter[ $tag ][ $priority  ] ) ) {
    932934
    933935                        // Store filters in a backup
    934                         $wp_filter[$tag][$priority] = $bbp->filters->wp_filter[$tag][$priority];
     936                        $wp_filter[ $tag ][ $priority ] = $bbp->filters->wp_filter[ $tag ][ $priority ];
    935937
    936938                        // Unset the filters
    937                         unset( $bbp->filters->wp_filter[$tag][$priority] );
     939                        unset( $bbp->filters->wp_filter[ $tag ][ $priority ] );
    938940
    939941                // Priority is empty
    … …  
    941943
    942944                        // Store filters in a backup
    943                         $wp_filter[$tag] = $bbp->filters->wp_filter[$tag];
     945                        $wp_filter[ $tag ] = $bbp->filters->wp_filter[ $tag ];
    944946
    945947                        // Unset the filters
    946                         unset( $bbp->filters->wp_filter[$tag] );
     948                        unset( $bbp->filters->wp_filter[ $tag ] );
    947949                }
    948950        }
    949951
    950952        // Check merged filters
    951         if ( isset( $bbp->filters->merged_filters[$tag] ) ) {
     953        if ( isset( $bbp->filters->merged_filters[ $tag ] ) ) {
    952954
    953955                // Store filters in a backup
    954                 $merged_filters[$tag] = $bbp->filters->merged_filters[$tag];
     956                $merged_filters[ $tag ] = $bbp->filters->merged_filters[ $tag ];
    955957
    956958                // Unset the filters
    957                 unset( $bbp->filters->merged_filters[$tag] );
     959                unset( $bbp->filters->merged_filters[ $tag ] );
    958960        }
    959961
Note: See TracChangeset for help on using the changeset viewer.