Skip to content

Commit 6413ad5

Browse files
Merge pull request #4331 from Codeinwp/revert-3813
Revert 3813
2 parents 865d40d + 94cdf48 commit 6413ad5

File tree

7 files changed

+23
-51
lines changed

7 files changed

+23
-51
lines changed

e2e-tests/specs/customizer/general/custom-global-colors.spec.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,7 @@ test.describe('Custom Global Color Control', () => {
3333
);
3434
await clearWelcome(page);
3535

36-
const iframeElement = await page.waitForSelector('iframe');
37-
const frame = await iframeElement.contentFrame();
38-
if (frame) {
39-
await frame.waitForSelector('.block-editor-rich-text__editable');
40-
await frame.locator('.block-editor-rich-text__editable').first().click();
41-
}
36+
await page.locator('.block-editor-rich-text__editable').first().click();
4237
// use Background color control to open the color picker, available since WP 6.1
4338
await page.getByRole('button', { name: 'Background' }).click();
4439
await page.getByRole('option', { name: 'Color: Custom 1' }).click();

e2e-tests/specs/customizer/hfg/hfg-menu-item-description.spec.ts

Lines changed: 5 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -28,36 +28,16 @@ test.describe('Menu item description', function () {
2828
await page.getByRole('button', { name: 'Add New Category' }).click();
2929
await page.goto('wp-admin/nav-menus.php');
3030

31-
await page.waitForSelector('.menu-name');
32-
await page.locator('.menu-name').fill('My New Menu');
33-
await page.getByLabel('Primary Menu').check();
34-
await page.locator('#save_menu_footer ').click();
35-
36-
await page.locator('#add-category h3').click();
3731
await page
38-
.locator('#taxonomy-category-tabs')
39-
.getByRole('link', { name: 'View All' })
32+
.getByRole('heading', {
33+
name: 'Categories Press return or enter to open this section ',
34+
})
4035
.click();
41-
await page.getByLabel('ADescriptionCat').check();
42-
43-
await Promise.all([
44-
page.waitForResponse(
45-
(res) =>
46-
res.url().includes('wp-admin/admin-ajax.php') &&
47-
res.status() === 200
48-
),
49-
page.getByRole('button', { name: 'Add to Menu' }).click(),
50-
]);
51-
52-
await page.keyboard.press('End');
53-
await page.waitForTimeout(500);
54-
55-
await page.locator('#add-post-type-page h3').click();
5636
await page
57-
.locator('#posttype-page-tabs')
37+
.locator('#taxonomy-category-tabs')
5838
.getByRole('link', { name: 'View All' })
5939
.click();
60-
await page.getByLabel('Sample Page').last().check();
40+
await page.getByLabel('ADescriptionCat').check();
6141

6242
await Promise.all([
6343
page.waitForResponse(

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/compatibility/web_stories.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ private function should_load() {
3737
* Load hooks.
3838
*/
3939
private function load_hooks() {
40-
add_action( 'init', array( $this, 'setup' ) );
40+
add_action( 'after_setup_theme', array( $this, 'setup' ) );
4141
add_action( 'wp_body_open', array( $this, 'embed' ) );
4242
}
4343

inc/core/core_loader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ function () {
174174
);
175175
$front_end = new Front_End();
176176
add_action( 'wp_enqueue_scripts', array( $front_end, 'enqueue_scripts' ) );
177-
add_action( 'init', array( $front_end, 'setup_theme' ) );
177+
add_action( 'after_setup_theme', array( $front_end, 'setup_theme' ) );
178178
add_action( 'widgets_init', array( $front_end, 'register_sidebars' ) );
179179
add_filter( 'load_script_translation_file', array( $front_end, 'fix_script_translation_files' ), 10, 3 );
180180
}

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';

start.php

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,7 @@ function neve_run() {
5353
}
5454

5555
$autoloader->register();
56-
}
57-
58-
neve_run();
5956

60-
/**
61-
* Load core modules.
62-
*/
63-
function neve_core_loader() {
6457
if ( class_exists( '\\Neve\\Core\\Core_Loader' ) ) {
6558
new \Neve\Core\Core_Loader();
6659
}
@@ -78,4 +71,5 @@ function neve_core_loader() {
7871
\Neve_Pro\Core\Loader::instance();
7972
}
8073
}
81-
add_action( 'after_setup_theme', 'neve_core_loader' );
74+
75+
neve_run();

0 commit comments

Comments
 (0)