From 02cf4881eff06043b2693a950880ef45bdae55fd Mon Sep 17 00:00:00 2001 From: rodineicosta Date: Sat, 8 May 2021 21:36:35 -0300 Subject: [PATCH] =?UTF-8?q?Fix:=20Substitui=C3=A7=C3=A3o=20de=20vari=C3=A1?= =?UTF-8?q?veis=20globais=20do=20WordPress?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- inc/customizer.php | 10 +++++----- template-frontpage.php | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/inc/customizer.php b/inc/customizer.php index 63f808d..36192e0 100644 --- a/inc/customizer.php +++ b/inc/customizer.php @@ -294,11 +294,11 @@ function coletivo_customize_controls_enqueue_scripts() { * @return int */ function coletivo_get_customizer_priority( $panel ) { - $panel = str_replace( array( 'coletivo_', '_panel' ), '', $panel ); - $order = get_theme_mod( 'coletivo_sections_order', 'hero,features,yourslider,featuredpage,services,portfolio,videolightbox,gallery,team,news,contact,social' ); - $index = 129; - $order = explode( ',', $order ); - foreach ( $order as $key => $value ) { + $panel = str_replace( array( 'coletivo_', '_panel' ), '', $panel ); + $section_order = get_theme_mod( 'coletivo_sections_order', 'hero,features,yourslider,featuredpage,services,portfolio,videolightbox,gallery,team,news,contact,social' ); + $index = 129; + $section_order = explode( ',', $section_order ); + foreach ( $section_order as $key => $value ) { $index++; if ( $panel === $value ) { break; diff --git a/template-frontpage.php b/template-frontpage.php index f4968db..c0806f0 100644 --- a/template-frontpage.php +++ b/template-frontpage.php @@ -18,9 +18,9 @@ if ( ! has_action( 'coletivo_frontpage_section_parts' ) ) { - $order = get_theme_mod( 'coletivo_sections_order', 'hero,features,yourslider,featuredpage,services,portfolio,videolightbox,gallery,team,news,contact,social' ); - $order = explode( ',', $order ); - $sections = apply_filters( 'coletivo_frontpage_sections_order', $order ); + $section_order = get_theme_mod( 'coletivo_sections_order', 'hero,features,yourslider,featuredpage,services,portfolio,videolightbox,gallery,team,news,contact,social' ); + $section_order = explode( ',', $section_order ); + $sections = apply_filters( 'coletivo_frontpage_sections_order', $section_order ); foreach ( $sections as $section ) {