Header Footer Elementor - Version 1.0.9

Version Description

  • Add Support for WPML.
  • Updated the missing strings from the translations template.
Download this release

Release Info

Developer Nikschavan
Plugin Icon Header Footer Elementor
Version 1.0.9
Comparing to
See all releases

Code changes from version 1.0.8 to 1.0.9

admin/class-hfe-admin.php CHANGED
@@ -129,11 +129,11 @@ class HFE_Admin {
129
  wp_nonce_field( 'ehf_meta_nounce', 'ehf_meta_nounce' );
130
  ?>
131
  <p>
132
- <label for="ehf_template_type">Select the type of template this is</label>
133
  <select name="ehf_template_type" id="ehf_template_type">
134
- <option value="" <?php selected( $template_type, '' ); ?>>Select Option</option>
135
- <option value="type_header" <?php selected( $template_type, 'type_header' ); ?>>Header</option>
136
- <option value="type_footer" <?php selected( $template_type, 'type_footer' ); ?>>Footer</option>
137
  </select>
138
  </p>
139
  <p>
129
  wp_nonce_field( 'ehf_meta_nounce', 'ehf_meta_nounce' );
130
  ?>
131
  <p>
132
+ <label for="ehf_template_type"><?php _e( 'Select the type of template this is', 'header-footer-elementor' ); ?></label>
133
  <select name="ehf_template_type" id="ehf_template_type">
134
+ <option value="" <?php selected( $template_type, '' ); ?>><?php _e( 'Select Option', 'header-footer-elementor' ); ?></option>
135
+ <option value="type_header" <?php selected( $template_type, 'type_header' ); ?>><?php _e( 'Header', 'header-footer-elementor' ); ?></option>
136
+ <option value="type_footer" <?php selected( $template_type, 'type_footer' ); ?>><?php _e( 'Footer', 'header-footer-elementor' ); ?></option>
137
  </select>
138
  </p>
139
  <p>
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.0.8
11
  *
12
  * @package header-footer-elementor
13
  */
14
 
15
- define( 'HFE_VER', '1.0.8' );
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.0.9
11
  *
12
  * @package header-footer-elementor
13
  */
14
 
15
+ define( 'HFE_VER', '1.0.9' );
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
@@ -96,6 +96,11 @@ class Header_Footer_Elementor {
96
  // Load Elementor Canvas Compatibility.
97
  require_once HFE_DIR . 'inc/class-hfe-elementor-canvas-compat.php';
98
 
 
 
 
 
 
99
  // Load the Admin Notice Class.
100
  // Stop loading the comments class until it is required the next time.
101
  // require_once HFE_DIR . 'inc/class-hfe-notices.php';.
@@ -199,7 +204,10 @@ class Header_Footer_Elementor {
199
  if ( 'type_header' == $setting || 'type_footer' == $setting ) {
200
  $templates = self::get_template_id( $setting );
201
 
202
- return is_array( $templates ) ? $templates[0] : '';
 
 
 
203
  }
204
  }
205
 
96
  // Load Elementor Canvas Compatibility.
97
  require_once HFE_DIR . 'inc/class-hfe-elementor-canvas-compat.php';
98
 
99
+ // Load WPML Compatibility if WPML is installed and activated.
100
+ if ( defined( 'ICL_SITEPRESS_VERSION' ) ) {
101
+ require_once HFE_DIR . 'inc/compatibility/class-hfe-wpml-compatibility.php';
102
+ }
103
+
104
  // Load the Admin Notice Class.
105
  // Stop loading the comments class until it is required the next time.
106
  // require_once HFE_DIR . 'inc/class-hfe-notices.php';.
204
  if ( 'type_header' == $setting || 'type_footer' == $setting ) {
205
  $templates = self::get_template_id( $setting );
206
 
207
+ $template = is_array( $templates ) ? $templates[0] : '';
208
+ $template = apply_filters( "hfe_get_settings_{$setting}", $template );
209
+
210
+ return $template;
211
  }
212
  }
213
 
inc/compatibility/class-hfe-wpml-compatibility.php ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * WPML Compatibility for Header Footer Elementor.
4
+ *
5
+ * @package HFE
6
+ * @author HFE
7
+ * @copyright Copyright (c) 2018, HFE
8
+ * @link http://brainstormforce.com/
9
+ * @since HFE 1.0.9
10
+ */
11
+
12
+ defined( 'ABSPATH' ) or exit;
13
+
14
+ /**
15
+ * Set up WPML Compatibiblity Class.
16
+ */
17
+ class HFE_WPML_Compatibility {
18
+
19
+ /**
20
+ * Instance of HFE_WPML_Compatibility.
21
+ *
22
+ * @since 1.0.9
23
+ * @var null
24
+ */
25
+ private static $_instance = null;
26
+
27
+ /**
28
+ * Get instance of HFE_WPML_Compatibility
29
+ *
30
+ * @since 1.0.9
31
+ * @return HFE_WPML_Compatibility
32
+ */
33
+ public static function instance() {
34
+ if ( ! isset( self::$_instance ) ) {
35
+ self::$_instance = new self;
36
+ }
37
+
38
+ return self::$_instance;
39
+ }
40
+
41
+ /**
42
+ * Setup actions and filters.
43
+ *
44
+ * @since 1.0.9
45
+ */
46
+ private function __construct() {
47
+ add_filter( 'hfe_get_settings_type_header', array( $this, 'get_wpml_object' ) );
48
+ add_filter( 'hfe_get_settings_type_footer', array( $this, 'get_wpml_object' ) );
49
+ }
50
+
51
+ /**
52
+ * Pass the final header and footer ID from the WPML's object filter to allow strings to be translated.
53
+ *
54
+ * @since 1.0.9
55
+ * @param Int $id Post ID of the template being rendered.
56
+ * @return Int $id Post ID of the template being rendered, Passed through the `wpml_object_id` id.
57
+ */
58
+ public function get_wpml_object( $id ) {
59
+ return apply_filters( 'wpml_object_id', $id );
60
+ }
61
+
62
+ }
63
+
64
+ /**
65
+ * Initiate the class.
66
+ */
67
+ HFE_WPML_Compatibility::instance();
languages/header-footer-elementor.pot CHANGED
@@ -1,15 +1,15 @@
1
- # Copyright (C) 2017 Brainstorm Force, Nikhil Chavan
2
  # This file is distributed under the same license as the Header Footer Elementor package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Header Footer Elementor 1.0.7\n"
6
  "Report-Msgid-Bugs-To: "
7
  "https://wordpress.org/support/plugin/header-footer-elementor\n"
8
- "POT-Creation-Date: 2017-11-25 02:05:59+00:00\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=utf-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "PO-Revision-Date: 2017-MO-DA HO:MI+ZONE\n"
13
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
  "Language-Team: LANGUAGE <LL@li.org>\n"
15
  "X-Generator: grunt-wp-i18n 0.5.4\n"
@@ -81,6 +81,22 @@ msgstr ""
81
  msgid "Elementor Header Footer options"
82
  msgstr ""
83
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
84
  #: admin/class-hfe-admin.php:142
85
  msgid "Display Layout on Elementor Canvas Template?"
86
  msgstr ""
@@ -96,7 +112,7 @@ msgstr ""
96
  msgid "Template %1$s is already assigned to the location %2$s"
97
  msgstr ""
98
 
99
- #: inc/class-header-footer-elementor.php:85
100
  #. Translators: URL to install or activate Elementor plugin.
101
  msgid ""
102
  "The <strong>Header Footer Elementor</strong> plugin requires <strong><a "
@@ -111,14 +127,6 @@ msgid ""
111
  "are-supported-by-this-plugin\">here</a> to check out the supported themes."
112
  msgstr ""
113
 
114
- #: inc/class-header-footer-elementor.php:194
115
- #. translators: 1: Link to the blackfriday deals
116
- msgid ""
117
- "Thanks for updating Header Footer Elementor. Black Friday is here with huge "
118
- "savings! See our hand curated list of <a href=\"%1$s\">Best WordPress "
119
- "Deals</a>!"
120
- msgstr ""
121
-
122
  #. Plugin Name of the plugin/theme
123
  msgid "Header Footer Elementor"
124
  msgstr ""
1
+ # Copyright (C) 2018 Brainstorm Force, Nikhil Chavan
2
  # This file is distributed under the same license as the Header Footer Elementor package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Header Footer Elementor 1.0.8\n"
6
  "Report-Msgid-Bugs-To: "
7
  "https://wordpress.org/support/plugin/header-footer-elementor\n"
8
+ "POT-Creation-Date: 2018-01-23 14:52:07+00:00\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=utf-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "PO-Revision-Date: 2018-MO-DA HO:MI+ZONE\n"
13
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
  "Language-Team: LANGUAGE <LL@li.org>\n"
15
  "X-Generator: grunt-wp-i18n 0.5.4\n"
81
  msgid "Elementor Header Footer options"
82
  msgstr ""
83
 
84
+ #: admin/class-hfe-admin.php:132
85
+ msgid "Select the type of template this is"
86
+ msgstr ""
87
+
88
+ #: admin/class-hfe-admin.php:134
89
+ msgid "Select Option"
90
+ msgstr ""
91
+
92
+ #: admin/class-hfe-admin.php:135
93
+ msgid "Header"
94
+ msgstr ""
95
+
96
+ #: admin/class-hfe-admin.php:136
97
+ msgid "Footer"
98
+ msgstr ""
99
+
100
  #: admin/class-hfe-admin.php:142
101
  msgid "Display Layout on Elementor Canvas Template?"
102
  msgstr ""
112
  msgid "Template %1$s is already assigned to the location %2$s"
113
  msgstr ""
114
 
115
+ #: inc/class-header-footer-elementor.php:84
116
  #. Translators: URL to install or activate Elementor plugin.
117
  msgid ""
118
  "The <strong>Header Footer Elementor</strong> plugin requires <strong><a "
127
  "are-supported-by-this-plugin\">here</a> to check out the supported themes."
128
  msgstr ""
129
 
 
 
 
 
 
 
 
 
130
  #. Plugin Name of the plugin/theme
131
  msgid "Header Footer Elementor"
132
  msgstr ""
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: brainstormforce, Nikschavan
3
  Tags: elementor, header footer builder, header, footer, page builder, template builder, landing page builder, front-end editor
4
  Donate link: https://www.paypal.me/BrainstormForce
5
  Requires at least: 4.4
6
- Tested up to: 4.9.1
7
- Stable tag: 1.0.8
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -72,6 +72,10 @@ If you are a theme developer <a href="https://github.com/Nikschavan/header-foote
72
 
73
  == Changelog ==
74
 
 
 
 
 
75
  = 1.0.8 =
76
  - Allow filters to override the WP_Query parameters when retreiving the Header / Footer template id.
77
 
3
  Tags: elementor, header footer builder, header, footer, page builder, template builder, landing page builder, front-end editor
4
  Donate link: https://www.paypal.me/BrainstormForce
5
  Requires at least: 4.4
6
+ Tested up to: 4.9.2
7
+ Stable tag: 1.0.9
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
72
 
73
  == Changelog ==
74
 
75
+ = 1.0.9 =
76
+ - Add Support for WPML.
77
+ - Updated the missing strings from the translations template.
78
+
79
  = 1.0.8 =
80
  - Allow filters to override the WP_Query parameters when retreiving the Header / Footer template id.
81