Skip to content

Commit

Permalink
Merge pull request #4136 from ahmedkaludi/1.0-deploy
Browse files Browse the repository at this point in the history
Merge 1.0.21 in master
  • Loading branch information
MohammedKaludi authored Feb 4, 2020
2 parents 4baa28c + 87856eb commit 00b79a4
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 18 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, go
Donate link: https://www.paypal.me/Kaludi/25
Requires at least: 3.0
Tested up to: 5.3.2
Stable tag: 1.0.20
Stable tag: 1.0.21
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -194,6 +194,9 @@ Device testing done through [BrowserStack](https://www.browserstack.com)

== Changelog ==

= 1.0.21 (4th February 2020) =
* Fixed: Fatal error when AMP theme framework is active #4128

= 1.0.20 (31st January 2020) =
* Improvement: Filter added to Modify the location of the theme files from plugin older. #4091
* Improvement: Cache Should auto clear when any plugin is activated/deactivated #4046
Expand Down
4 changes: 2 additions & 2 deletions accelerated-moblie-pages.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Plugin Name: Accelerated Mobile Pages
Plugin URI: https://wordpress.org/plugins/accelerated-mobile-pages/
Description: AMP for WP - Accelerated Mobile Pages for WordPress
Version: 1.0.20
Version: 1.0.21
Author: Ahmed Kaludi, Mohammed Kaludi
Author URI: https://ampforwp.com/
Donate link: https://www.paypal.me/Kaludi/25
Expand All @@ -20,7 +20,7 @@
define('AMPFORWP_DISQUS_URL',plugin_dir_url(__FILE__).'includes/disqus.html');
define('AMPFORWP_IMAGE_DIR',plugin_dir_url(__FILE__).'images');
define('AMPFORWP_MAIN_PLUGIN_DIR', plugin_dir_path( __DIR__ ) );
define('AMPFORWP_VERSION','1.0.20');
define('AMPFORWP_VERSION','1.0.21');
define('AMPFORWP_EXTENSION_DIR',plugin_dir_path(__FILE__).'includes/options/extensions');
if(!defined('AMPFROWP_HOST_NAME')){
$urlinfo = get_bloginfo('url');
Expand Down
3 changes: 3 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
== Changelog ==

= 1.0.21 (4th February 2020) =
* Fixed: Fatal error when AMP theme framework is active #4128

= 1.0.20 (31st January 2020) =
* Improvement: Filter added to Modify the location of the theme files from plugin older. #4091
* Improvement: Cache Should auto clear when any plugin is activated/deactivated #4046
Expand Down
27 changes: 13 additions & 14 deletions components/theme-loader.php
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
if ( 4 == $ampforwp_design_selector ) {

$amp_main_dir = AMPFORWP_PLUGIN_DIR . 'templates/design-manager/swift';

$amp_theme_dir = apply_filters('ampforwp_theme_dir', $amp_main_dir);

if ( ! is_dir($amp_theme_dir)) {
$amp_theme_dir = $amp_main_dir;
}
define('AMPFORWP_CUSTOM_THEME', $amp_theme_dir );
exit;
}
$amp_main_dir = AMPFORWP_PLUGIN_DIR . 'templates/design-manager/swift';
if ( 4 != $ampforwp_design_selector ) {
$amp_main_dir = ABSPATH.'wp-content/plugins/'. esc_attr($ampforwp_design_selector);
}

$amp_theme_dir = apply_filters('ampforwp_theme_dir', $amp_main_dir);
if ( ! is_dir($amp_theme_dir)) {
$amp_theme_dir = $amp_main_dir;
}
define('AMPFORWP_CUSTOM_THEME', $amp_theme_dir );
// Include functions.php
$function_file = AMPFORWP_CUSTOM_THEME . '/functions.php';
if ( ! file_exists($function_file)) {
$function_file = $amp_main_dir .'/functions.php';
}
require_once( $function_file );
if ( file_exists($function_file)){
require_once( $function_file );
}
//Filter the Template files to override previous ones
add_filter( 'amp_post_template_file', 'ampforwp_designing_custom_template', 10, 3 );

Expand Down
5 changes: 4 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, go
Donate link: https://www.paypal.me/Kaludi/25
Requires at least: 3.0
Tested up to: 5.3.2
Stable tag: 1.0.20
Stable tag: 1.0.21
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -191,6 +191,9 @@ You can contact us from [here](https://ampforwp.com/contact/)

== Changelog ==

= 1.0.21 (4th February 2020) =
* Fixed: Fatal error when AMP theme framework is active #4128

= 1.0.20 (31st January 2020) =
* Improvement: Filter added to Modify the location of the theme files from plugin older. #4091
* Improvement: Cache Should auto clear when any plugin is activated/deactivated #4046
Expand Down

0 comments on commit 00b79a4

Please sign in to comment.