Skip to content

Commit 5b524af

Browse files
Merge pull request #4325 from Codeinwp/bugfix/4322
Fixed load textdomain issue with WP 6.7
2 parents d5a226e + 3d5670c commit 5b524af

File tree

5 files changed

+41
-10
lines changed

5 files changed

+41
-10
lines changed

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

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

36-
await page.locator('.block-editor-rich-text__editable').first().click();
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+
}
3742
// use Background color control to open the color picker, available since WP 6.1
3843
await page.getByRole('button', { name: 'Background' }).click();
3944
await page.getByRole('option', { name: 'Color: Custom 1' }).click();

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

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,12 @@ 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
32-
.getByRole('heading', {
33-
name: 'Categories Press return or enter to open this section ',
34-
})
35-
.click();
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();
3637
await page
3738
.locator('#taxonomy-category-tabs')
3839
.getByRole('link', { name: 'View All' })
@@ -51,6 +52,25 @@ test.describe('Menu item description', function () {
5152
await page.keyboard.press('End');
5253
await page.waitForTimeout(500);
5354

55+
await page.locator('#add-post-type-page h3').click();
56+
await page
57+
.locator('#posttype-page-tabs')
58+
.getByRole('link', { name: 'View All' })
59+
.click();
60+
await page.getByLabel('Sample Page').last().check();
61+
62+
await Promise.all([
63+
page.waitForResponse(
64+
(res) =>
65+
res.url().includes('wp-admin/admin-ajax.php') &&
66+
res.status() === 200
67+
),
68+
page.getByRole('button', { name: 'Add to Menu' }).click(),
69+
]);
70+
71+
await page.keyboard.press('End');
72+
await page.waitForTimeout(500);
73+
5474
await expect(
5575
page.locator('#menu-to-edit li.menu-item:last-child a.item-edit')
5676
).toBeVisible();

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( 'after_setup_theme', array( $this, 'setup' ) );
40+
add_action( 'init', 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( 'after_setup_theme', array( $front_end, 'setup_theme' ) );
177+
add_action( 'init', 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
}

start.php

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

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

60+
/**
61+
* Load core modules.
62+
*/
63+
function neve_core_loader() {
5764
if ( class_exists( '\\Neve\\Core\\Core_Loader' ) ) {
5865
new \Neve\Core\Core_Loader();
5966
}
@@ -71,5 +78,4 @@ function neve_run() {
7178
\Neve_Pro\Core\Loader::instance();
7279
}
7380
}
74-
75-
neve_run();
81+
add_action( 'after_setup_theme', 'neve_core_loader' );

0 commit comments

Comments
 (0)