Skip to content

Commit

Permalink
Merge pull request #4332 from Codeinwp/fix/translation
Browse files Browse the repository at this point in the history
fix early translation
  • Loading branch information
vytisbulkevicius authored Nov 22, 2024
2 parents 12196f3 + 04f2277 commit 94cdf48
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
1 change: 0 additions & 1 deletion inc/admin/dashboard/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ public function __construct() {
*/
public function init() {

$this->setup_config();
add_action( 'init', [ $this, 'setup_config' ] );
add_action( 'admin_menu', [ $this, 'register' ] );
add_action( 'admin_enqueue_scripts', [ $this, 'enqueue' ] );
Expand Down
22 changes: 13 additions & 9 deletions inc/customizer/options/layout_sidebar.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,7 @@ class Layout_Sidebar extends Base_Customizer {
*/
public function __construct() {

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

$this->add_woocommerce_controls();

$this->advanced_controls['other_pages'] = __( 'Others', 'neve' );
}

/**
Expand Down Expand Up @@ -190,6 +183,17 @@ private function sidebar_layout_choices( $control_id ) {
return $options;
}

public function get_advanced_controls() {
if ( empty( $this->advanced_controls ) ) {
$this->advanced_controls = [
'blog_archive' => __( 'Blog / Archive', 'neve' ),
'single_post' => __( 'Single Post', 'neve' ),
];
$this->add_woocommerce_controls();
$this->advanced_controls['other_pages'] = __( 'Others', 'neve' );
}
return $this->advanced_controls;
}
/**
* Advanced controls.
*/
Expand All @@ -203,8 +207,8 @@ private function add_advanced_controls() {
*
* @since 3.1.0
*/
$this->advanced_controls = apply_filters( 'neve_sidebar_controls_filter', $this->advanced_controls );
foreach ( $this->advanced_controls as $id => $heading_label ) {
$advanced_controls = apply_filters( 'neve_sidebar_controls_filter', $this->get_advanced_controls() );
foreach ( $advanced_controls as $id => $heading_label ) {
$heading_id = 'neve_' . $id . '_heading';
$layout_id = 'neve_' . $id . '_sidebar_layout';
$width_id = 'neve_' . $id . '_content_width';
Expand Down

0 comments on commit 94cdf48

Please sign in to comment.