mirror of
https://github.com/10h30/genesis-simple-sidebars.git
synced 2026-06-05 15:08:34 +09:00
fix: resolved deprecated notice for early trigger
This commit is contained in:
@@ -51,8 +51,18 @@ class Genesis_Simple_Sidebars_Admin extends Genesis_Admin_Basic {
|
|||||||
$menu_ops = array(
|
$menu_ops = array(
|
||||||
'submenu' => array(
|
'submenu' => array(
|
||||||
'parent_slug' => 'genesis',
|
'parent_slug' => 'genesis',
|
||||||
'page_title' => __( 'Genesis - Simple Sidebars', 'genesis-simple-sidebars' ),
|
|
||||||
'menu_title' => __( 'Simple Sidebars', 'genesis-simple-sidebars' ),
|
/*
|
||||||
|
* These strings intentionally avoid using the plugin text
|
||||||
|
* domain here because this method can be called before the
|
||||||
|
* `init` action (via `genesis_setup`). Using `__()` with the
|
||||||
|
* `genesis-simple-sidebars` domain at that point would cause
|
||||||
|
* WordPress 6.7+ to emit a "_load_textdomain_just_in_time
|
||||||
|
* was called incorrectly" notice. Other plugin strings remain
|
||||||
|
* fully translatable once the text domain is loaded on `init`.
|
||||||
|
*/
|
||||||
|
'page_title' => 'Genesis - Simple Sidebars',
|
||||||
|
'menu_title' => 'Simple Sidebars',
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ class Genesis_Simple_Sidebars {
|
|||||||
*/
|
*/
|
||||||
public function init() {
|
public function init() {
|
||||||
|
|
||||||
$this->load_plugin_textdomain();
|
add_action( 'init', array( $this, 'load_plugin_textdomain' ) );
|
||||||
|
|
||||||
add_action( 'admin_notices', array( $this, 'requirements_notice' ) );
|
add_action( 'admin_notices', array( $this, 'requirements_notice' ) );
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user