Version Description
Download this release
Release Info
Developer | Nikschavan |
Plugin | Header Footer Elementor |
Version | v1.1.4 |
Comparing to | |
See all releases |
Code changes from version v1.1.3 to v1.1.4
- header-footer-elementor.php +2 -2
- inc/class-header-footer-elementor.php +3 -0
- inc/class-hfe-update.php +97 -0
- readme.txt +6 -3
header-footer-elementor.php
CHANGED
@@ -7,12 +7,12 @@
|
|
7 |
* Author URI: https://www.brainstormforce.com/
|
8 |
* Text Domain: header-footer-elementor
|
9 |
* Domain Path: /languages
|
10 |
-
* Version: 1.1.
|
11 |
*
|
12 |
* @package header-footer-elementor
|
13 |
*/
|
14 |
|
15 |
-
define( 'HFE_VER', '1.1.
|
16 |
define( 'HFE_DIR', plugin_dir_path( __FILE__ ) );
|
17 |
define( 'HFE_URL', plugins_url( '/', __FILE__ ) );
|
18 |
define( 'HFE_PATH', plugin_basename( __FILE__ ) );
|
7 |
* Author URI: https://www.brainstormforce.com/
|
8 |
* Text Domain: header-footer-elementor
|
9 |
* Domain Path: /languages
|
10 |
+
* Version: 1.1.4
|
11 |
*
|
12 |
* @package header-footer-elementor
|
13 |
*/
|
14 |
|
15 |
+
define( 'HFE_VER', '1.1.4' );
|
16 |
define( 'HFE_DIR', plugin_dir_path( __FILE__ ) );
|
17 |
define( 'HFE_URL', plugins_url( '/', __FILE__ ) );
|
18 |
define( 'HFE_PATH', plugin_basename( __FILE__ ) );
|
inc/class-header-footer-elementor.php
CHANGED
@@ -120,6 +120,9 @@ class Header_Footer_Elementor {
|
|
120 |
|
121 |
// Load the Admin Notice Class.
|
122 |
require_once HFE_DIR . 'inc/class-hfe-notices.php';
|
|
|
|
|
|
|
123 |
}
|
124 |
|
125 |
/**
|
120 |
|
121 |
// Load the Admin Notice Class.
|
122 |
require_once HFE_DIR . 'inc/class-hfe-notices.php';
|
123 |
+
|
124 |
+
// Setup upgrade routines.
|
125 |
+
require_once HFE_DIR . 'inc/class-hfe-update.php';
|
126 |
}
|
127 |
|
128 |
/**
|
inc/class-hfe-update.php
ADDED
@@ -0,0 +1,97 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Theme Update
|
4 |
+
*
|
5 |
+
* @package Header Footer Elementor
|
6 |
+
* @author Nikhil Chavan <email@nikhilchavan.com>
|
7 |
+
* @copyright Copyright (c) 2019, Header Footer Elementor
|
8 |
+
* @link https://github.com/Nikschavan/header-footer-elementor/
|
9 |
+
* @since HFE 1.1.4
|
10 |
+
*/
|
11 |
+
|
12 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
13 |
+
exit; // Exit if accessed directly.
|
14 |
+
}
|
15 |
+
|
16 |
+
if ( ! class_exists( 'HFE_Update' ) ) {
|
17 |
+
|
18 |
+
/**
|
19 |
+
* HFE_Update initial setup
|
20 |
+
*
|
21 |
+
* @since 1.1.4
|
22 |
+
*/
|
23 |
+
class HFE_Update {
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Option key for stored version number.
|
27 |
+
*
|
28 |
+
* @since 1.1.4
|
29 |
+
* @var string
|
30 |
+
*/
|
31 |
+
private $db_option_key = '_hfe_db_version';
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Constructor
|
35 |
+
*
|
36 |
+
* @since 1.1.4
|
37 |
+
*/
|
38 |
+
public function __construct() {
|
39 |
+
|
40 |
+
// Theme Updates.
|
41 |
+
if ( is_admin() ) {
|
42 |
+
add_action( 'admin_init', array( $this, 'init' ), 5 );
|
43 |
+
} else {
|
44 |
+
add_action( 'wp', array( $this, 'init' ), 5 );
|
45 |
+
}
|
46 |
+
}
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Implement theme update logic.
|
50 |
+
*
|
51 |
+
* @since 1.1.4
|
52 |
+
*/
|
53 |
+
public function init() {
|
54 |
+
do_action( 'hfe_update_before' );
|
55 |
+
|
56 |
+
if ( ! $this->needs_db_update() ) {
|
57 |
+
return;
|
58 |
+
}
|
59 |
+
|
60 |
+
// flush rewrite rules on plugin update.
|
61 |
+
flush_rewrite_rules();
|
62 |
+
|
63 |
+
$this->update_db_version();
|
64 |
+
|
65 |
+
do_action( 'hfe_update_after' );
|
66 |
+
}
|
67 |
+
|
68 |
+
/**
|
69 |
+
* Check if db upgrade is required.
|
70 |
+
*
|
71 |
+
* @since 1.1.4
|
72 |
+
* @return true|false True if stored database version is lower than constant; false if otherwise.
|
73 |
+
*/
|
74 |
+
private function needs_db_update() {
|
75 |
+
$db_version = get_option( $this->db_option_key, false );
|
76 |
+
|
77 |
+
if ( false === $db_version || version_compare( $db_version, HFE_VER ) ) {
|
78 |
+
return true;
|
79 |
+
}
|
80 |
+
|
81 |
+
return false;
|
82 |
+
}
|
83 |
+
|
84 |
+
/**
|
85 |
+
* Update DB version.
|
86 |
+
*
|
87 |
+
* @since 1.1.4
|
88 |
+
* @return void
|
89 |
+
*/
|
90 |
+
private function update_db_version() {
|
91 |
+
update_option( $this->db_option_key, HFE_VER );
|
92 |
+
}
|
93 |
+
|
94 |
+
}
|
95 |
+
}
|
96 |
+
|
97 |
+
new HFE_Update();
|
readme.txt
CHANGED
@@ -4,8 +4,8 @@ Tags: elementor, header footer builder, header, footer, page builder, template b
|
|
4 |
Donate link: https://www.paypal.me/BrainstormForce
|
5 |
Requires at least: 4.4
|
6 |
Requires PHP: 5.4
|
7 |
-
Tested up to: 5.
|
8 |
-
Stable tag: 1.1.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -61,7 +61,7 @@ Powering over 400,000+ WordPress websites, Astra is loved for the performance an
|
|
61 |
|
62 |
**Deeper Integrations** - Astra works seamlessly with all WooCommerce plugins, LifterLMS, LearnDash, etc. Therefore, you can now build online stores or websites offering online courses with Astra and Elementor!
|
63 |
|
64 |
-
**Ready-to-use complete website demos** - Astra offers free ready-made website demos built with Elementor. You can
|
65 |
|
66 |
= SUPPORTED & ACTIVELY DEVELOPED =
|
67 |
Need help with something? Have an issue to report? [Get in touch](https://github.com/Nikschavan/header-footer-elementor "Header Footer elementor on GitHub"). with us on GitHub.
|
@@ -115,6 +115,9 @@ If the above is nnot possible, You can also add support for the plugin from your
|
|
115 |
|
116 |
== Changelog ==
|
117 |
|
|
|
|
|
|
|
118 |
= 1.1.3 =
|
119 |
- Improvement: Allow changing the permalinks for the hfe templates (<a href="https://github.com/Nikschavan/header-footer-elementor/pull/162/">#162</a>)
|
120 |
- Fix: WPML Translations do not work when using the Elementor Template as a shortcode. (<a href="https://github.com/Nikschavan/header-footer-elementor/pull/159/">#159</a>)
|
4 |
Donate link: https://www.paypal.me/BrainstormForce
|
5 |
Requires at least: 4.4
|
6 |
Requires PHP: 5.4
|
7 |
+
Tested up to: 5.2
|
8 |
+
Stable tag: 1.1.4
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
61 |
|
62 |
**Deeper Integrations** - Astra works seamlessly with all WooCommerce plugins, LifterLMS, LearnDash, etc. Therefore, you can now build online stores or websites offering online courses with Astra and Elementor!
|
63 |
|
64 |
+
**Ready-to-use complete website demos** - Astra offers free ready-made website demos built with Elementor. You can choose any of the Elementor templates <a href="https://wpastra.com/elementor-templates-free-downloads/">Elementor Templates</a>, tweak them as you want and go live in minutes!
|
65 |
|
66 |
= SUPPORTED & ACTIVELY DEVELOPED =
|
67 |
Need help with something? Have an issue to report? [Get in touch](https://github.com/Nikschavan/header-footer-elementor "Header Footer elementor on GitHub"). with us on GitHub.
|
115 |
|
116 |
== Changelog ==
|
117 |
|
118 |
+
= 1.1.4 =
|
119 |
+
- Fix: Flush permalinks on plugin update to Elementor error when trying to edit the Header/Footer.
|
120 |
+
|
121 |
= 1.1.3 =
|
122 |
- Improvement: Allow changing the permalinks for the hfe templates (<a href="https://github.com/Nikschavan/header-footer-elementor/pull/162/">#162</a>)
|
123 |
- Fix: WPML Translations do not work when using the Elementor Template as a shortcode. (<a href="https://github.com/Nikschavan/header-footer-elementor/pull/159/">#159</a>)
|