Header Footer Elementor - Version 1.0.10

Version Description

  • Load the header layout correctly in the in Elementor canvas template.
  • Load the Elementor Pro CSS/JS files in .
  • Provide more filters for the helper functions.
Download this release

Release Info

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

Code changes from version 1.0.9 to 1.0.10

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.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__ ) );
7
  * Author URI: https://www.brainstormforce.com/
8
  * Text Domain: header-footer-elementor
9
  * Domain Path: /languages
10
+ * Version: 1.0.10
11
  *
12
  * @package header-footer-elementor
13
  */
14
 
15
+ define( 'HFE_VER', '1.0.10' );
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
@@ -121,6 +121,16 @@ class Header_Footer_Elementor {
121
 
122
  if ( class_exists( '\Elementor\Post_CSS_File' ) ) {
123
 
 
 
 
 
 
 
 
 
 
 
124
  if ( hfe_header_enabled() ) {
125
  $css_file = new \Elementor\Post_CSS_File( get_hfe_header_id() );
126
  $css_file->enqueue();
121
 
122
  if ( class_exists( '\Elementor\Post_CSS_File' ) ) {
123
 
124
+ if ( class_exists( '\Elementor\Plugin' ) ) {
125
+ $elementor = \Elementor\Plugin::instance();
126
+ $elementor->frontend->enqueue_styles();
127
+ }
128
+
129
+ if ( class_exists( '\ElementorPro\Plugin' ) ) {
130
+ $elementor_pro = \ElementorPro\Plugin::instance();
131
+ $elementor_pro->enqueue_styles();
132
+ }
133
+
134
  if ( hfe_header_enabled() ) {
135
  $css_file = new \Elementor\Post_CSS_File( get_hfe_header_id() );
136
  $css_file->enqueue();
inc/class-hfe-elementor-canvas-compat.php CHANGED
@@ -37,11 +37,23 @@ class HFE_Elementor_Canvas_Compat {
37
  public function hooks() {
38
 
39
  if ( hfe_header_enabled() ) {
40
- add_action( 'wp_head', array( $this, 'render_header' ) );
 
 
 
 
 
 
41
  }
42
 
43
  if ( hfe_footer_enabled() ) {
44
- add_action( 'wp_footer', array( $this, 'render_footer' ) );
 
 
 
 
 
 
45
  }
46
 
47
  }
37
  public function hooks() {
38
 
39
  if ( hfe_header_enabled() ) {
40
+
41
+ // Action `elementor/page_templates/canvas/before_content` is introduced in Elementor Version 1.4.1.
42
+ if ( version_compare( ELEMENTOR_VERSION, '1.4.1', '>=' ) ) {
43
+ add_action( 'elementor/page_templates/canvas/before_content', array( $this, 'render_header' ) );
44
+ } else {
45
+ add_action( 'wp_head', array( $this, 'render_header' ) );
46
+ }
47
  }
48
 
49
  if ( hfe_footer_enabled() ) {
50
+
51
+ // Action `elementor/page_templates/canvas/after_content` is introduced in Elementor Version 1.9.0.
52
+ if ( version_compare( ELEMENTOR_VERSION, '1.9.0', '>=' ) ) {
53
+ add_action( 'elementor/page_templates/canvas/after_content', array( $this, 'render_footer' ) );
54
+ } else {
55
+ add_action( 'wp_footer', array( $this, 'render_footer' ) );
56
+ }
57
  }
58
 
59
  }
inc/hfe-functions.php CHANGED
@@ -13,12 +13,13 @@
13
  */
14
  function hfe_header_enabled() {
15
  $header_id = Header_Footer_Elementor::get_settings( 'type_header', '' );
 
16
 
17
  if ( '' !== $header_id ) {
18
- return true;
19
  }
20
 
21
- return false;
22
  }
23
 
24
  /**
@@ -29,12 +30,13 @@ function hfe_header_enabled() {
29
  */
30
  function hfe_footer_enabled() {
31
  $footer_id = Header_Footer_Elementor::get_settings( 'type_footer', '' );
 
32
 
33
  if ( '' !== $footer_id ) {
34
- return true;
35
  }
36
 
37
- return false;
38
  }
39
 
40
  /**
@@ -46,11 +48,11 @@ function hfe_footer_enabled() {
46
  function get_hfe_header_id() {
47
  $header_id = Header_Footer_Elementor::get_settings( 'type_header', '' );
48
 
49
- if ( '' !== $header_id ) {
50
- return $header_id;
51
  }
52
 
53
- return false;
54
  }
55
 
56
  /**
@@ -62,11 +64,11 @@ function get_hfe_header_id() {
62
  function get_hfe_footer_id() {
63
  $footer_id = Header_Footer_Elementor::get_settings( 'type_footer', '' );
64
 
65
- if ( '' !== $footer_id ) {
66
- return $footer_id;
67
  }
68
 
69
- return false;
70
  }
71
 
72
  /**
@@ -76,7 +78,7 @@ function get_hfe_footer_id() {
76
  */
77
  function hfe_render_header() {
78
 
79
- if ( false == apply_filters( 'enable_hfe_render_header', '__return_true' ) ) {
80
  return;
81
  }
82
 
@@ -97,7 +99,7 @@ function hfe_render_header() {
97
  */
98
  function hfe_render_footer() {
99
 
100
- if ( false == apply_filters( 'enable_hfe_render_footer', '__return_true' ) ) {
101
  return;
102
  }
103
 
13
  */
14
  function hfe_header_enabled() {
15
  $header_id = Header_Footer_Elementor::get_settings( 'type_header', '' );
16
+ $status = false;
17
 
18
  if ( '' !== $header_id ) {
19
+ $status = true;
20
  }
21
 
22
+ return apply_filters( 'hfe_footer_enabled', $status );
23
  }
24
 
25
  /**
30
  */
31
  function hfe_footer_enabled() {
32
  $footer_id = Header_Footer_Elementor::get_settings( 'type_footer', '' );
33
+ $status = false;
34
 
35
  if ( '' !== $footer_id ) {
36
+ $status = true;
37
  }
38
 
39
+ return apply_filters( 'hfe_footer_enabled', $status );
40
  }
41
 
42
  /**
48
  function get_hfe_header_id() {
49
  $header_id = Header_Footer_Elementor::get_settings( 'type_header', '' );
50
 
51
+ if ( '' === $header_id ) {
52
+ $header_id = false;
53
  }
54
 
55
+ return apply_filters( 'get_hfe_header_id', $header_id );
56
  }
57
 
58
  /**
64
  function get_hfe_footer_id() {
65
  $footer_id = Header_Footer_Elementor::get_settings( 'type_footer', '' );
66
 
67
+ if ( '' === $footer_id ) {
68
+ $footer_id = false;
69
  }
70
 
71
+ return apply_filters( 'get_hfe_footer_id', $footer_id );
72
  }
73
 
74
  /**
78
  */
79
  function hfe_render_header() {
80
 
81
+ if ( false == apply_filters( 'enable_hfe_render_header', true ) ) {
82
  return;
83
  }
84
 
99
  */
100
  function hfe_render_footer() {
101
 
102
+ if ( false == apply_filters( 'enable_hfe_render_footer', true ) ) {
103
  return;
104
  }
105
 
languages/header-footer-elementor.pot CHANGED
@@ -2,10 +2,10 @@
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"
@@ -119,7 +119,7 @@ msgid ""
119
  "href=\"%s\">Elementor</strong></a> plugin installed & activated."
120
  msgstr ""
121
 
122
- #: inc/class-header-footer-elementor.php:168
123
  msgid ""
124
  "Hey, your current theme is not supported by Header Footer Elementor, click "
125
  "<a "
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.10\n"
6
  "Report-Msgid-Bugs-To: "
7
  "https://wordpress.org/support/plugin/header-footer-elementor\n"
8
+ "POT-Creation-Date: 2018-02-01 09:46:02+00:00\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=utf-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
119
  "href=\"%s\">Elementor</strong></a> plugin installed & activated."
120
  msgstr ""
121
 
122
+ #: inc/class-header-footer-elementor.php:183
123
  msgid ""
124
  "Hey, your current theme is not supported by Header Footer Elementor, click "
125
  "<a "
readme.txt CHANGED
@@ -3,8 +3,9 @@ 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.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
 
@@ -65,6 +66,23 @@ If you are a theme developer <a href="https://github.com/Nikschavan/header-foote
65
  1. Go to `Appearance -> Header Footer Builder` to build a header or footer layout using elementor.
66
  1. After the layout is ready assign the layout as header or footer using the option `Select the type of template this is` (<a href="https://cloudup.com/clK2sPg9nXK+">screenshot</a>)
67
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
68
  == Screenshots ==
69
 
70
  1. Go to Appearane -> Header Footer Builder to create a new template.
@@ -72,6 +90,11 @@ If you are a theme developer <a href="https://github.com/Nikschavan/header-foote
72
 
73
  == Changelog ==
74
 
 
 
 
 
 
75
  = 1.0.9 =
76
  - Add Support for WPML.
77
  - Updated the missing strings from the translations template.
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
+ Requires PHP: 5.4
7
+ Tested up to: 4.9.3
8
+ Stable tag: 1.0.10
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
66
  1. Go to `Appearance -> Header Footer Builder` to build a header or footer layout using elementor.
67
  1. After the layout is ready assign the layout as header or footer using the option `Select the type of template this is` (<a href="https://cloudup.com/clK2sPg9nXK+">screenshot</a>)
68
 
69
+ = Can you create Mobile Responsive Header/Footer using this plugin? =
70
+
71
+ Yes, You can create the mobile responsive layout of your header using the plugin.
72
+
73
+ The Header-Footer Elementor plugin just gives you a container where you can completely design the header using Elementor Page Builder, So the process of creating the mobile responsive layout is exactly same as you would create a responsive layout of your page.
74
+
75
+ Here is a documentation by Elementor Page builder which explains how you can create mobile responsive layouts using Elementor - <a href="https://elementor.com/introducing-mobile-editing/">https://elementor.com/introducing-mobile-editing/</a>
76
+ This same applies when you are creating your Header/Footer using this plugin.
77
+
78
+ = How Can I add support for Heade/Footer Plugin from my theme? =
79
+
80
+ If you are a theme developer <a href="https://github.com/Nikschavan/header-footer-elementor/wiki/Adding-Header-Footer-Elementor-support-for-your-theme">here</a> is a quick tutorial on how you can add support for the Header Footer Elementor from your theme.
81
+
82
+ If you are using a pre-made theme, The best approach would be to contact yoru theme developer and provide them link to the <a href="https://github.com/Nikschavan/header-footer-elementor/wiki/Adding-Header-Footer-Elementor-support-for-your-theme">Wiki article</a> on how they can add support for the plugin.
83
+ If the above is nnot possible, You can also add support for the plugin from your child theme. Just follow <a href="https://github.com/Nikschavan/header-footer-elementor/wiki/Add-support-to-Header-Footer-Elementor-from-the-Child-Theme">this article</a>
84
+
85
+
86
  == Screenshots ==
87
 
88
  1. Go to Appearane -> Header Footer Builder to create a new template.
90
 
91
  == Changelog ==
92
 
93
+ = 1.0.10 =
94
+ - Load the header layout correctly in the <body> in Elementor canvas template.
95
+ - Load the Elementor Pro CSS/JS files in <head>.
96
+ - Provide more filters for the helper functions.
97
+
98
  = 1.0.9 =
99
  - Add Support for WPML.
100
  - Updated the missing strings from the translations template.