Skip to content

Commit 04f2277

Browse files
committed
fix early translation
1 parent 26e9255 commit 04f2277

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

inc/admin/dashboard/main.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ public function __construct() {
8181
*/
8282
public function init() {
8383

84-
$this->setup_config();
8584
add_action( 'init', [ $this, 'setup_config' ] );
8685
add_action( 'admin_menu', [ $this, 'register' ] );
8786
add_action( 'admin_enqueue_scripts', [ $this, 'enqueue' ] );

inc/customizer/options/layout_sidebar.php

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,7 @@ class Layout_Sidebar extends Base_Customizer {
3636
*/
3737
public function __construct() {
3838

39-
$this->advanced_controls = [
40-
'blog_archive' => __( 'Blog / Archive', 'neve' ),
41-
'single_post' => __( 'Single Post', 'neve' ),
42-
];
4339

44-
$this->add_woocommerce_controls();
45-
46-
$this->advanced_controls['other_pages'] = __( 'Others', 'neve' );
4740
}
4841

4942
/**
@@ -190,6 +183,17 @@ private function sidebar_layout_choices( $control_id ) {
190183
return $options;
191184
}
192185

186+
public function get_advanced_controls() {
187+
if ( empty( $this->advanced_controls ) ) {
188+
$this->advanced_controls = [
189+
'blog_archive' => __( 'Blog / Archive', 'neve' ),
190+
'single_post' => __( 'Single Post', 'neve' ),
191+
];
192+
$this->add_woocommerce_controls();
193+
$this->advanced_controls['other_pages'] = __( 'Others', 'neve' );
194+
}
195+
return $this->advanced_controls;
196+
}
193197
/**
194198
* Advanced controls.
195199
*/
@@ -203,8 +207,8 @@ private function add_advanced_controls() {
203207
*
204208
* @since 3.1.0
205209
*/
206-
$this->advanced_controls = apply_filters( 'neve_sidebar_controls_filter', $this->advanced_controls );
207-
foreach ( $this->advanced_controls as $id => $heading_label ) {
210+
$advanced_controls = apply_filters( 'neve_sidebar_controls_filter', $this->get_advanced_controls() );
211+
foreach ( $advanced_controls as $id => $heading_label ) {
208212
$heading_id = 'neve_' . $id . '_heading';
209213
$layout_id = 'neve_' . $id . '_sidebar_layout';
210214
$width_id = 'neve_' . $id . '_content_width';

0 commit comments

Comments
 (0)