Skip to content

Commit

Permalink
Merge branch 'release/1.13.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Hemberger committed Apr 25, 2022
2 parents e66df6f + 329c57f commit b7b9751
Show file tree
Hide file tree
Showing 35 changed files with 3,337 additions and 301 deletions.
6 changes: 5 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# Changelog

## 1.13.0 (4/25/22)
* Added: Admin notice about WordPress ending support for the classic editor and upgrading to Mai Theme v2.
* Changed: Update CMB2 to 2.10.1.

## 1.12.0 (6/25/21)
* Changed: Update CMB2 to 2.9.0
* Changed: Update CMB2 to 2.9.0.
* Changed: Update updater.
* Fixed: Duplicate function error in WooCommerce if another plugin calls a template a second time.

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Mai Theme Engine
The required plugin to power Mai Theme child themes.
The required plugin to power Mai Theme v1 child themes.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@

{
"name": "maithemewp/mai-theme-engine",
"description": "The required plugin to power Mai Theme child themes",
"require": {
"cmb2/cmb2": "^2.7",
"yahnis-elsts/plugin-update-checker": "^4.8.1"
"yahnis-elsts/plugin-update-checker": "^4.8.1",
"collizo4sky/persist-admin-notices-dismissal": "^1.4"
},
"autoload" : {
"files": [
Expand Down
56 changes: 49 additions & 7 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

72 changes: 72 additions & 0 deletions lib/admin/admin.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,77 @@
<?php

/**
* Add dismissible upgrade notice.
*
* @since TBD
*
* @return void
*/
add_action( 'admin_notices', 'mai_upgrade_notice', 4 );
function mai_upgrade_notice() {
$days = 14;
$dismissible = sprintf( 'mai_upgrade_notice-%s', $days );
$url = 'https://help.bizbudding.com/article/209-upgrade?utm_source=mai-theme-engine&utm_medium=link&utm_campaign=v1';

if ( class_exists( 'PAnD' ) && ! PAnD::is_admin_notice_active( $dismissible ) ) {
return;
}

printf( '<div class="notice is-dismissible mai-upgrade-notice" data-dismissible="%s">', $dismissible );
?>
<style>
.mai-upgrade-notice {
--bizbudding-green: #bcda83;
--bizbudding-green-dark: #a5ce5a;
display: grid;
gap: 24px;
grid-template-columns: 36px 1fr auto;
padding: 12px 18px;
border-left: 8px solid var(--bizbudding-green);
border-radius: 4px;
box-shadow: 0px 14px 20px -8px rgba(0,0,0,0.1);
}
.mai-upgrade-notice img {
display: block;
max-width: 36px;
margin-top: 6px;
}
.mai-upgrade-notice .button {
padding: 16px 24px !important;
background: var(--bizbudding-green) !important;
color: #181f09 !important;
line-height: 1.2;
text-transform: uppercase;
letter-spacing: 1px;
border: 0;
transition: all 150ms ease-in-out;
transform: translateY(0);
}
.mai-upgrade-notice .button:hover,
.mai-upgrade-notice .button:focus {
background: var(--bizbudding-green-dark) !important;
color: #181f09 !important;
transform: translateY(-1px);
}
.mai-notice-button {
display: grid;
place-items: center;
}
</style>
<div class="mai-notice-col">
<?php printf( '<img width="36" height="36" src="%s">', MAI_THEME_ENGINE_PLUGIN_URL . 'assets/images/icon-128x128.png' ); ?>
</div>
<div class="mai-notice-col">
<p class="notice-title"><strong>Mai Theme</strong> - Support for the <strong>Classic Editor</strong> is ending!</p>
<p><a target="_blank" href="<?php echo $url ?>">BizBudding</a> has completely rebuilt Mai Theme from the ground up, not only to support the block editor, but to fully leverage it. Mai Theme v2 is now even more powerful and flexible, easier to customize, and much faster. Interested in <a target="_blank" href="<?php echo $url ?>">learning how to upgrade</a>?</p>
</div>
<div class="mai-notice-col mai-notice-button">
<a target="_blank" href="<?php echo $url ?>" class="button">Learn More</a>
</div>
</div>
<?php
}

/**
* Enqueue an admin script, for custom editor styles and other stuff.
*
Expand Down
6 changes: 3 additions & 3 deletions mai-theme-engine.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

/**
* Plugin Name: Mai Theme Engine
* Plugin URI: https://maitheme.com/
* Plugin URI: https://bizbudding.com/mai-theme/
* Description: The Mai Theme Engine plugin
*
* Version: 1.12.0
* Version: 1.13.0
*
* GitHub URI: maithemewp/mai-theme-engine
*
Expand Down Expand Up @@ -89,7 +89,7 @@ public function __wakeup() {
private function setup_constants() {

// Plugin version.
define( 'MAI_THEME_ENGINE_VERSION', '1.12.0' );
define( 'MAI_THEME_ENGINE_VERSION', '1.13.0' );

// DB version.
define( 'MAI_THEME_ENGINE_DB_VERSION', '1600' );
Expand Down
22 changes: 20 additions & 2 deletions vendor/cmb2/cmb2/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,26 @@
All notable changes to this project will be documented in this file.

## Unreleased
*

## [2.9.0 - 2020-03-21](https://github.com/CMB2/CMB2/releases/tag/v2.9.0)
## [2.10.1 - 2022-02-22](https://github.com/CMB2/CMB2/releases/tag/v2.9.0)

### Bug Fixes
* Fix issue with date picker formatting. Fixes [#1448](https://github.com/CMB2/CMB2/issues/1448).

## [2.10.0 - 2022-02-15](https://github.com/CMB2/CMB2/releases/tag/v2.9.0)

### Enhancements
* Sanitize URLs, defaulting to `https`. Props [@paulschreiber](https://github.com/paulschreiber) ([#1413](https://github.com/CMB2/CMB2/pull/1413)).
* Establish Cypress E2E Testing. Props [@markjaquith](https://github.com/markjaquith) ([#1437](https://github.com/CMB2/CMB2/pull/1437)).
* Updated the JS `shiftRows` functionality to be simpler, and fix issues with JS initialization. Fixes [#1426](https://github.com/CMB2/CMB2/issues/1426) and [#1431](https://github.com/CMB2/CMB2/issues/1431).
* Updated various NPM dependencies for security issues.

### Bug Fixes
* Update to prevent deprecation notice:`Required parameter $i follows optional parameter $args...`. Props [@carloswph](https://github.com/carloswph) ([#1417](https://github.com/CMB2/CMB2/pull/1417)).
* Make each date field more resilient to various date/timestamp values passed in (from REST API).

## [2.9.0 - 2021-03-21](https://github.com/CMB2/CMB2/releases/tag/v2.9.0)

### Enhancements
* Added `cmb2_tab_group_tabs` filter for adding arbitrary menu page urls to the cmb2 tabs, and move tab markup output to separate method, `CMB2_Options_Hookup::options_page_tab_nav_output()`. Fixes [#1407](https://github.com/CMB2/CMB2/issues/1407).
Expand All @@ -16,7 +34,7 @@ All notable changes to this project will be documented in this file.
* Better generated array key for cached fields, fixes issue where wrong field is found. Fixes [#14053](https://github.com/CMB2/CMB2/issues/14053).
* Fix issue with options-pages being changed to register on a hook priority of `5` instead of the default `10`, causing some back-compatibility issues. Fixes [#1410](https://github.com/CMB2/CMB2/issues/1410).

## [2.8.0 - 2020-01-21](https://github.com/CMB2/CMB2/releases/tag/v2.8.0)
## [2.8.0 - 2021-01-21](https://github.com/CMB2/CMB2/releases/tag/v2.8.0)

### Enhancements
* Added [CODE_OF_CONDUCT.md](https://github.com/CMB2/CMB2/blob/develop/CODE_OF_CONDUCT.md) file to meet GitHub Community standards. Props [@RubenMartins](https://github.com/RubenMartins) ([#1331](https://github.com/CMB2/CMB2/pull/1331)).
Expand Down
5 changes: 3 additions & 2 deletions vendor/cmb2/cmb2/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@
"require-dev": {
"apigen/apigen": "4.1.2",
"nette/utils": "2.5.3",
"phpunit/phpunit": "6.5.13",
"awesomemotive/am-cli-tools": ">=1.3.1"
"phpunit/phpunit": "^6.5",
"awesomemotive/am-cli-tools": ">=1.3.1",
"yoast/phpunit-polyfills": "^1.0"
},
"repositories": [
{
Expand Down
4 changes: 2 additions & 2 deletions vendor/cmb2/cmb2/css/cmb2-display-rtl.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions vendor/cmb2/cmb2/css/cmb2-display.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions vendor/cmb2/cmb2/css/cmb2-front-rtl.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions vendor/cmb2/cmb2/css/cmb2-front.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions vendor/cmb2/cmb2/css/cmb2-rtl.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions vendor/cmb2/cmb2/css/cmb2.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion vendor/cmb2/cmb2/includes/CMB2_Field.php
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,12 @@ public function get_timestamp_format( $format = 'date_format', $meta_value = 0 )
* @return mixed Unix timestamp representing the date.
*/
public function get_timestamp_from_value( $value ) {
return CMB2_Utils::get_timestamp_from_value( $value, $this->args( 'date_format' ) );
$timestamp = CMB2_Utils::get_timestamp_from_value( $value, $this->args( 'date_format' ) );
if ( empty( $timestamp ) && CMB2_Utils::is_valid_date( $value ) ) {
$timestamp = CMB2_Utils::make_valid_time_stamp( $value );
}

return $timestamp;
}

/**
Expand Down
Loading

0 comments on commit b7b9751

Please sign in to comment.