-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
29 changed files
with
220 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,14 +2,14 @@ | |
# This file is distributed under the GPL-2.0-or-later. | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Mai Engine 2.27.0\n" | ||
"Project-Id-Version: Mai Engine 2.28.2\n" | ||
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/mai-engine\n" | ||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||
"Language-Team: LANGUAGE <[email protected]>\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: 8bit\n" | ||
"POT-Creation-Date: 2023-04-13T16:04:35+00:00\n" | ||
"POT-Creation-Date: 2023-06-21T15:01:02+00:00\n" | ||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | ||
"X-Generator: WP-CLI 2.7.1\n" | ||
"X-Domain: mai-engine\n" | ||
|
@@ -115,7 +115,7 @@ msgstr "" | |
#: lib/admin/admin-menu.php:28 | ||
#: lib/admin/admin-menu.php:29 | ||
#: lib/functions/deprecated.php:289 | ||
#: lib/functions/utilities.php:1743 | ||
#: lib/functions/utilities.php:1755 | ||
msgid "Mai Theme" | ||
msgstr "" | ||
|
||
|
@@ -1189,7 +1189,7 @@ msgstr "" | |
#: lib/fields/grid-display.php:568 | ||
#: lib/functions/colors.php:256 | ||
#: lib/functions/customizer.php:464 | ||
#: lib/functions/utilities.php:1672 | ||
#: lib/functions/utilities.php:1684 | ||
msgid "Link" | ||
msgstr "" | ||
|
||
|
@@ -1298,7 +1298,7 @@ msgid "Page " | |
msgstr "" | ||
|
||
#: lib/classes/class-mai-plugins.php:71 | ||
msgid "Mai Design Pack plugin is required." | ||
msgid "Mai Theme Pro Plugin plugin is required." | ||
msgstr "" | ||
|
||
#: lib/classes/class-mai-plugins.php:90 | ||
|
@@ -1315,12 +1315,17 @@ msgstr "" | |
|
||
#. translators: %s is replaced with the linked theme name. | ||
#: lib/classes/class-mai-plugins.php:152 | ||
msgid "The Mai Design Pack plugin provides everything you need to enhance your website once it's up and running on %s." | ||
msgid "The Mai Theme Pro Bundle provides everything you need to enhance your website once it's up and running on %s." | ||
msgstr "" | ||
|
||
#. translators: %s is replaced with the linked plugin name. | ||
#: lib/classes/class-mai-plugins.php:154 | ||
msgid "Learn more about pro plugins and the pattern library included with the %s." | ||
msgid "Learn more about pro plugins and the pattern library included with the %s (%s)." | ||
msgstr "" | ||
|
||
#. translators: %s is replaced with the linked plugin name. | ||
#: lib/classes/class-mai-plugins.php:154 | ||
msgid "formerly Mai Design Pack" | ||
msgstr "" | ||
|
||
#: lib/classes/class-mai-plugins.php:160 | ||
|
@@ -2096,7 +2101,7 @@ msgid "By checking this box, you allow Mai Engine to periodically check for Mai | |
msgstr "" | ||
|
||
#: lib/customize/upsell.php:30 | ||
msgid "Mai Design Pack" | ||
msgid "Mai Theme Pro Bundle" | ||
msgstr "" | ||
|
||
#: lib/customize/upsell.php:31 | ||
|
@@ -2970,27 +2975,27 @@ msgstr "" | |
msgid "Search..." | ||
msgstr "" | ||
|
||
#: lib/functions/utilities.php:1669 | ||
#: lib/functions/utilities.php:1681 | ||
msgid "Primary" | ||
msgstr "" | ||
|
||
#: lib/functions/utilities.php:1670 | ||
#: lib/functions/utilities.php:1682 | ||
msgid "Secondary" | ||
msgstr "" | ||
|
||
#: lib/functions/utilities.php:1671 | ||
#: lib/functions/utilities.php:1683 | ||
msgid "Outline" | ||
msgstr "" | ||
|
||
#: lib/functions/utilities.php:1740 | ||
#: lib/functions/utilities.php:1752 | ||
msgid "View available shortcodes from" | ||
msgstr "" | ||
|
||
#: lib/functions/utilities.php:1741 | ||
#: lib/functions/utilities.php:1753 | ||
msgid "Genesis" | ||
msgstr "" | ||
|
||
#: lib/functions/utilities.php:1742 | ||
#: lib/functions/utilities.php:1754 | ||
msgid "and" | ||
msgstr "" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
<?php | ||
/** | ||
* Mai Engine. | ||
* | ||
* @package BizBudding\MaiEngine | ||
* @link https://bizbudding.com | ||
* @author BizBudding | ||
* @copyright Copyright © 2020 BizBudding | ||
* @license GPL-2.0-or-later | ||
*/ | ||
|
||
// Prevent direct file access. | ||
defined( 'ABSPATH' ) || die; | ||
|
||
/** | ||
* Fixes WP core blocks when used outside of the loop, often via a Content Area. | ||
* | ||
* @access private | ||
*/ | ||
class Mai_Core_Blocks_In_The_Loop_Fix { | ||
protected $in_the_loop = null; | ||
|
||
/** | ||
* Get it started. | ||
*/ | ||
function __construct() { | ||
$this->hooks(); | ||
} | ||
|
||
/** | ||
* Run the hooks. | ||
* | ||
* @return void | ||
*/ | ||
function hooks() { | ||
add_filter( 'pre_render_block', [ $this, 'set_in_the_loop' ], 10, 3 ); | ||
add_filter( 'render_block_core/post-content', [ $this, 'revert_in_the_loop' ], 10, 3 ); | ||
add_filter( 'render_block_core/post-featured-image', [ $this, 'revert_in_the_loop' ], 10, 3 ); | ||
} | ||
|
||
/** | ||
* Set `$wp_query->in_the_loop` to true any time the post-featured-image block is used. | ||
* This stops the `render_block_core_post_featured_image()` and `render_block_core_post_content()` functions | ||
* from using `the_post()`, which causes other issues like empty content, in Mai Theme. | ||
* | ||
* @param string|null $pre_render The pre-rendered content. Default null. | ||
* @param array $parsed_block The block being rendered. | ||
* @param WP_Block|null $parent_block If this is a nested block, a reference to the parent block. | ||
* | ||
* @return null|string | ||
*/ | ||
function set_in_the_loop( $pre_render, $parsed_block, $parent_block ) { | ||
if ( ! isset( $parsed_block['blockName'] ) ) { | ||
return $pre_render; | ||
} | ||
|
||
if ( ! in_array( $parsed_block['blockName'], [ 'core/post-featured-image', 'core/post-content' ] ) ) { | ||
return $pre_render; | ||
} | ||
|
||
global $wp_query; | ||
|
||
if ( isset( $wp_query ) && ! in_the_loop() ) { | ||
$this->in_the_loop = in_the_loop(); | ||
$wp_query->in_the_loop = true; | ||
} | ||
|
||
return $pre_render; | ||
} | ||
|
||
/** | ||
* Revert `$wp_query->in_the_loop` to whatever its value was before `pre_render_block`. | ||
* | ||
* @param string $block_content The block content. | ||
* @param array $block The full block, including name and attributes. | ||
* @param WP_Block $instance The block instance. | ||
* @return string | ||
*/ | ||
function revert_in_the_loop( $block_content, $parsed_block, $wp_block ) { | ||
if ( is_null( $this->in_the_loop ) ) { | ||
return $block_content; | ||
} | ||
|
||
global $wp_query; | ||
|
||
if ( isset( $wp_query ) ) { | ||
$wp_query->in_the_loop = $this->in_the_loop; | ||
} | ||
|
||
return $block_content; | ||
} | ||
} | ||
|
||
new Mai_Core_Blocks_In_The_Loop_Fix; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.