@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | * @return mixed |
| 34 | 34 | */ |
| 35 | 35 | protected function get_root_value( $default = null ) { |
| 36 | - return get_site_option( $this->id_data['base'], $default ); |
|
| 36 | + return get_site_option( $this->id_data[ 'base' ], $default ); |
|
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | /** |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | * @return bool Whether the multidimensional root was updated successfully. |
| 46 | 46 | */ |
| 47 | 47 | protected function set_root_value( $value ) { |
| 48 | - return update_site_option( $this->id_data['base'], $value ); |
|
| 48 | + return update_site_option( $this->id_data[ 'base' ], $value ); |
|
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | /** |
@@ -119,7 +119,7 @@ |
||
| 119 | 119 | global $l10n; |
| 120 | 120 | if ( isset( $l10n[ $this->get_theme_textdomain() ] ) ) { |
| 121 | 121 | // @codingStandardsIgnoreLine WordPress.Variables.GlobalVariables.OverrideProhibited |
| 122 | - $l10n['kirki'] = $l10n[ $this->get_theme_textdomain() ]; |
|
| 122 | + $l10n[ 'kirki' ] = $l10n[ $this->get_theme_textdomain() ]; |
|
| 123 | 123 | } |
| 124 | 124 | |
| 125 | 125 | // Check if the domain is "kirki". |
@@ -104,7 +104,7 @@ |
||
| 104 | 104 | public static function add_module( $module ) { |
| 105 | 105 | |
| 106 | 106 | if ( ! in_array( $module, self::$modules, true ) ) { |
| 107 | - self::$modules[] = $module; |
|
| 107 | + self::$modules[ ] = $module; |
|
| 108 | 108 | } |
| 109 | 109 | |
| 110 | 110 | } |
@@ -46,12 +46,12 @@ |
||
| 46 | 46 | public function add_panel( $args ) { |
| 47 | 47 | global $wp_customize; |
| 48 | 48 | |
| 49 | - if ( ! isset( $args['type'] ) || ! array_key_exists( $args['type'], $this->panel_types ) ) { |
|
| 50 | - $args['type'] = 'default'; |
|
| 49 | + if ( ! isset( $args[ 'type' ] ) || ! array_key_exists( $args[ 'type' ], $this->panel_types ) ) { |
|
| 50 | + $args[ 'type' ] = 'default'; |
|
| 51 | 51 | } |
| 52 | - $panel_classname = $this->panel_types[ $args['type'] ]; |
|
| 52 | + $panel_classname = $this->panel_types[ $args[ 'type' ] ]; |
|
| 53 | 53 | |
| 54 | - $wp_customize->add_panel( new $panel_classname( $wp_customize, sanitize_key( $args['id'] ), $args ) ); |
|
| 54 | + $wp_customize->add_panel( new $panel_classname( $wp_customize, sanitize_key( $args[ 'id' ] ), $args ) ); |
|
| 55 | 55 | |
| 56 | 56 | } |
| 57 | 57 | } |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | // Echo the styles. |
| 21 | 21 | $configs = Kirki::$config; |
| 22 | 22 | foreach ( $configs as $config_id => $args ) { |
| 23 | - if ( true === $args['disable_output'] ) { |
|
| 23 | + if ( true === $args[ 'disable_output' ] ) { |
|
| 24 | 24 | continue; |
| 25 | 25 | } |
| 26 | 26 | |
@@ -36,8 +36,8 @@ |
||
| 36 | 36 | $css = ''; |
| 37 | 37 | if ( ! empty( Kirki::$sections ) ) { |
| 38 | 38 | foreach ( Kirki::$sections as $section_args ) { |
| 39 | - if ( isset( $section_args['id'] ) && isset( $section_args['type'] ) && 'outer' === $section_args['type'] || 'kirki-outer' === $section_args['type'] ) { |
|
| 40 | - $css .= '#customize-theme-controls li#accordion-section-' . $section_args['id'] . '{display:list-item!important;}'; |
|
| 39 | + if ( isset( $section_args[ 'id' ] ) && isset( $section_args[ 'type' ] ) && 'outer' === $section_args[ 'type' ] || 'kirki-outer' === $section_args[ 'type' ] ) { |
|
| 40 | + $css .= '#customize-theme-controls li#accordion-section-' . $section_args[ 'id' ] . '{display:list-item!important;}'; |
|
| 41 | 41 | } |
| 42 | 42 | } |
| 43 | 43 | } |
@@ -49,10 +49,10 @@ |
||
| 49 | 49 | 'panel', |
| 50 | 50 | ) ); |
| 51 | 51 | |
| 52 | - $array['title'] = html_entity_decode( $this->title, ENT_QUOTES, get_bloginfo( 'charset' ) ); |
|
| 53 | - $array['content'] = $this->get_content(); |
|
| 54 | - $array['active'] = $this->active(); |
|
| 55 | - $array['instanceNumber'] = $this->instance_number; |
|
| 52 | + $array[ 'title' ] = html_entity_decode( $this->title, ENT_QUOTES, get_bloginfo( 'charset' ) ); |
|
| 53 | + $array[ 'content' ] = $this->get_content(); |
|
| 54 | + $array[ 'active' ] = $this->active(); |
|
| 55 | + $array[ 'instanceNumber' ] = $this->instance_number; |
|
| 56 | 56 | |
| 57 | 57 | return $array; |
| 58 | 58 | } |
@@ -51,15 +51,15 @@ |
||
| 51 | 51 | 'section', |
| 52 | 52 | ) ); |
| 53 | 53 | |
| 54 | - $array['title'] = html_entity_decode( $this->title, ENT_QUOTES, get_bloginfo( 'charset' ) ); |
|
| 55 | - $array['content'] = $this->get_content(); |
|
| 56 | - $array['active'] = $this->active(); |
|
| 57 | - $array['instanceNumber'] = $this->instance_number; |
|
| 54 | + $array[ 'title' ] = html_entity_decode( $this->title, ENT_QUOTES, get_bloginfo( 'charset' ) ); |
|
| 55 | + $array[ 'content' ] = $this->get_content(); |
|
| 56 | + $array[ 'active' ] = $this->active(); |
|
| 57 | + $array[ 'instanceNumber' ] = $this->instance_number; |
|
| 58 | 58 | |
| 59 | - $array['customizeAction'] = esc_attr__( 'Customizing', 'kirki' ); |
|
| 59 | + $array[ 'customizeAction' ] = esc_attr__( 'Customizing', 'kirki' ); |
|
| 60 | 60 | if ( $this->panel ) { |
| 61 | 61 | /* translators: The title. */ |
| 62 | - $array['customizeAction'] = sprintf( esc_attr__( 'Customizing ▸ %s', 'kirki' ), esc_html( $this->manager->get_panel( $this->panel )->title ) ); |
|
| 62 | + $array[ 'customizeAction' ] = sprintf( esc_attr__( 'Customizing ▸ %s', 'kirki' ), esc_html( $this->manager->get_panel( $this->panel )->title ) ); |
|
| 63 | 63 | } |
| 64 | 64 | return $array; |
| 65 | 65 | } |
@@ -69,13 +69,13 @@ |
||
| 69 | 69 | |
| 70 | 70 | // Start parsing the fields. |
| 71 | 71 | foreach ( $fields as $field ) { |
| 72 | - if ( isset( $field['partial_refresh'] ) && ! empty( $field['partial_refresh'] ) ) { |
|
| 72 | + if ( isset( $field[ 'partial_refresh' ] ) && ! empty( $field[ 'partial_refresh' ] ) ) { |
|
| 73 | 73 | // Start going through each item in the array of partial refreshes. |
| 74 | - foreach ( $field['partial_refresh'] as $partial_refresh => $partial_refresh_args ) { |
|
| 74 | + foreach ( $field[ 'partial_refresh' ] as $partial_refresh => $partial_refresh_args ) { |
|
| 75 | 75 | // If we have all we need, create the selective refresh call. |
| 76 | - if ( isset( $partial_refresh_args['render_callback'] ) && isset( $partial_refresh_args['selector'] ) ) { |
|
| 76 | + if ( isset( $partial_refresh_args[ 'render_callback' ] ) && isset( $partial_refresh_args[ 'selector' ] ) ) { |
|
| 77 | 77 | $partial_refresh_args = wp_parse_args( $partial_refresh_args, array( |
| 78 | - 'settings' => $field['settings'], |
|
| 78 | + 'settings' => $field[ 'settings' ], |
|
| 79 | 79 | ) ); |
| 80 | 80 | $wp_customize->selective_refresh->add_partial( $partial_refresh, $partial_refresh_args ); |
| 81 | 81 | } |