Skip to content

Commit

Permalink
inc2734/snow-monkey#1449 load_theme_textdomain() を init から後に変更
Browse files Browse the repository at this point in the history
  • Loading branch information
inc2734 committed Nov 6, 2024
1 parent 4c344e8 commit 0d6e450
Showing 1 changed file with 22 additions and 17 deletions.
39 changes: 22 additions & 17 deletions src/Bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,32 @@ class Bootstrap {
public function __construct() {
include_once __DIR__ . '/deprecated/Helper.php';

include_once __DIR__ . '/widget/widget.php';
include_once __DIR__ . '/widget/any-posts/any-posts.php';
include_once __DIR__ . '/widget/carousel-any-posts/carousel-any-posts.php';
include_once __DIR__ . '/widget/contents-outline/contents-outline.php';
include_once __DIR__ . '/widget/google-adsense/google-adsense.php';
include_once __DIR__ . '/widget/local-nav/local-nav.php';
include_once __DIR__ . '/widget/pickup-slider/pickup-slider.php';
include_once __DIR__ . '/widget/pr-box/pr-box.php';
include_once __DIR__ . '/widget/profile-box/profile-box.php';
include_once __DIR__ . '/widget/ranking/ranking.php';
include_once __DIR__ . '/widget/recent-posts/recent-posts.php';
include_once __DIR__ . '/widget/showcase/showcase.php';
include_once __DIR__ . '/widget/site-branding/site-branding.php';
include_once __DIR__ . '/widget/slider/slider.php';
include_once __DIR__ . '/widget/taxonomy-posts/taxonomy-posts.php';

add_action(
'init',
'after_setup_theme',
function () {
load_textdomain( 'inc2734-wp-awesome-widgets', __DIR__ . '/languages/inc2734-wp-awesome-widgets-' . get_locale() . '.mo' );

include_once __DIR__ . '/widget/widget.php';
include_once __DIR__ . '/widget/any-posts/any-posts.php';
include_once __DIR__ . '/widget/carousel-any-posts/carousel-any-posts.php';
include_once __DIR__ . '/widget/contents-outline/contents-outline.php';
include_once __DIR__ . '/widget/google-adsense/google-adsense.php';
include_once __DIR__ . '/widget/local-nav/local-nav.php';
include_once __DIR__ . '/widget/pickup-slider/pickup-slider.php';
include_once __DIR__ . '/widget/pr-box/pr-box.php';
include_once __DIR__ . '/widget/profile-box/profile-box.php';
include_once __DIR__ . '/widget/ranking/ranking.php';
include_once __DIR__ . '/widget/recent-posts/recent-posts.php';
include_once __DIR__ . '/widget/showcase/showcase.php';
include_once __DIR__ . '/widget/site-branding/site-branding.php';
include_once __DIR__ . '/widget/slider/slider.php';
include_once __DIR__ . '/widget/taxonomy-posts/taxonomy-posts.php';
}
);

add_action(
'init',
function () {
include_once __DIR__ . '/assets/blocks/local-nav/index.php';
include_once __DIR__ . '/assets/blocks/recent-posts/index.php';
include_once __DIR__ . '/assets/blocks/profile-box/index.php';
Expand Down

0 comments on commit 0d6e450

Please sign in to comment.