Page Templater For Elementor - Version 1.2.0

Version Description

  • 2017-09-29
Download this release

Release Info

Developer themeisle
Plugin Icon wp plugin Page Templater For Elementor
Version 1.2.0
Comparing to
See all releases

Code changes from version 1.1.3 to 1.2.0

CHANGELOG.md ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ ### v1.2.0 - 2017-09-29
3
+ **Changes:**
4
+ * Added Themeisle SDK.
5
+ * Added Continuous Integration.
6
+ * Changed contributors.
7
+
8
+ ### v1.2.0 - 2017-09-29
9
+ **Changes:**
10
+ * ---
11
+ * Added Themeisle SDK.
12
+ * Added Continuous Integration.
13
+ * Changed contributors.
14
+
assets/custom.css CHANGED
@@ -1,178 +1,178 @@
1
- /*
2
- * Custom CSS specific to the Elementor Blank Template and theme agnostic.
3
- */
4
-
5
- /* Anchor Menu */
6
- .anchor-menu {
7
- background-color: #ffffff;
8
- color: #29292a;
9
- }
10
-
11
- .anchor-menu a,
12
- .anchor-menu a:visited {
13
- color: #29292a;
14
- -webkit-transition: color 0.2s;
15
- transition: color 0.2s;
16
- }
17
-
18
- .anchor-menu a:hover,
19
- .anchor-menu a:focus {
20
- color: rgba(255,255,255,0.7);
21
- }
22
-
23
- .elementor-widget-wp-widget-nav_menu {
24
- clear: both;
25
- display: block;
26
- width: 100%;
27
-
28
- }
29
-
30
- .elementor-widget-wp-widget-nav_menu h5 {
31
- width: 20%;
32
- float: left;
33
- clear: none;
34
- margin: 0;
35
- padding: 0.757em 0;
36
- font-size: 18px;
37
- text-align: left;
38
- }
39
-
40
- .elementor-widget-wp-widget-nav_menu ul {
41
- background-color: transparent;
42
- display: none;
43
- list-style: none;
44
- padding: 0 1em;
45
- margin: 0 auto;
46
- max-width: 1080px;
47
- width: 80%;
48
- float: left;
49
- }
50
-
51
- @media screen and (min-width: 60em) {
52
- .anchor-menu-fixed.elementor-widget-wp-widget-nav_menu .wrap,
53
- .site-header-hidden.elementor-widget-wp-widget-nav_menu .wrap {
54
- padding-bottom: 0.25em;
55
- padding-top: 0.25em;
56
- }
57
-
58
- .anchor-menu {
59
- left: 0;
60
- position: absolute;
61
- top: 0;
62
- width: 100%;
63
- z-index: 3;
64
- transition: transform 0.2s;
65
- }
66
-
67
- .anchor-menu-fixed.elementor-widget-wp-widget-nav_menu,
68
- .site-header-hidden.elementor-widget-wp-widget-nav_menu {
69
- position: fixed;
70
- top: 0;
71
- width: 100%;
72
- z-index: 7;
73
- }
74
-
75
- .anchor-menu-fixed.anchor-menu,
76
- .anchor-menu-fixed.elementor-widget-wp-widget-nav_menu {
77
- -webkit-animation: header-down 0.2s ease-in;
78
- animation: header-down 0.2s ease-in;
79
- -webkit-transform: translate(0);
80
- transform: translate(0);
81
- }
82
-
83
- .site-header-hidden.anchor-menu,
84
- .site-header-hidden.elementor-widget-wp-widget-nav_menu {
85
- -webkit-animation: header-up 0.5s ease-in;
86
- animation: header-up 0.5s ease-in;
87
- -webkit-transform: translate(-100%);
88
- transform: translate(-100%);
89
- }
90
-
91
- .admin-bar .anchor-menu-fixed.anchor-menu,
92
- .admin-bar .anchor-menu-fixed.elementor-widget-wp-widget-nav_menu {
93
- top: 32px;
94
- }
95
-
96
- @-webkit-keyframes header-down {
97
- from {
98
- -webkit-transform: translate(0, -100%);
99
- }
100
-
101
- to {
102
- -webkit-transform: translate(0);
103
- }
104
- }
105
-
106
- @keyframes header-down {
107
- from {
108
- transform: translate(0, -100%);
109
- }
110
-
111
- to {
112
- transform: translate(0);
113
- }
114
- }
115
-
116
- @-webkit-keyframes header-up {
117
- from {
118
- -webkit-transform: translate(0);
119
- }
120
-
121
- to {
122
- -webkit-transform: translate(0, -100%);
123
- }
124
- }
125
-
126
- @keyframes header-up {
127
- from {
128
- transform: translate(0);
129
- }
130
-
131
- to {
132
- transform: translate(0, -100%);
133
- }
134
- }
135
-
136
- .elementor-widget-wp-widget-nav_menu {
137
- width: 100%;
138
- }
139
-
140
- .elementor-widget-wp-widget-nav_menu ul {
141
- display: block;
142
- padding: 0.857em 0;
143
- }
144
-
145
- .elementor-widget-wp-widget-nav_menu li {
146
- display: inline-block;
147
- position: relative;
148
- }
149
-
150
- .elementor-widget-wp-widget-nav_menu li li {
151
- display: block;
152
- }
153
-
154
- .elementor-widget-wp-widget-nav_menu a {
155
- padding: 0.5em 1em;
156
- }
157
-
158
- .anchor-menu-fixed.anchor-menu .elementor-widget-wp-widget-nav_menu a {
159
- padding-bottom: 0.75em;
160
- padding-top: 0.75em;
161
- }
162
-
163
- .elementor-widget-wp-widget-nav_menu a:hover,
164
- .elementor-widget-wp-widget-nav_menu a:focus {
165
- color: #999;
166
- }
167
-
168
- .anchor-menu-fixed.elementor-widget-wp-widget-nav_menu h5 {
169
- text-align: right;
170
- margin-left: 3.5%;
171
- }
172
-
173
- .anchor-menu-fixed.elementor-widget-wp-widget-nav_menu ul {
174
- float: left;
175
- padding-right: 3.5%;
176
- }
177
-
178
- }
1
+ /*
2
+ * Custom CSS specific to the Elementor Blank Template and theme agnostic.
3
+ */
4
+
5
+ /* Anchor Menu */
6
+ .anchor-menu {
7
+ background-color: #ffffff;
8
+ color: #29292a;
9
+ }
10
+
11
+ .anchor-menu a,
12
+ .anchor-menu a:visited {
13
+ color: #29292a;
14
+ -webkit-transition: color 0.2s;
15
+ transition: color 0.2s;
16
+ }
17
+
18
+ .anchor-menu a:hover,
19
+ .anchor-menu a:focus {
20
+ color: rgba(255,255,255,0.7);
21
+ }
22
+
23
+ .elementor-widget-wp-widget-nav_menu {
24
+ clear: both;
25
+ display: block;
26
+ width: 100%;
27
+
28
+ }
29
+
30
+ .elementor-widget-wp-widget-nav_menu h5 {
31
+ width: 20%;
32
+ float: left;
33
+ clear: none;
34
+ margin: 0;
35
+ padding: 0.757em 0;
36
+ font-size: 18px;
37
+ text-align: left;
38
+ }
39
+
40
+ .elementor-widget-wp-widget-nav_menu ul {
41
+ background-color: transparent;
42
+ display: none;
43
+ list-style: none;
44
+ padding: 0 1em;
45
+ margin: 0 auto;
46
+ max-width: 1080px;
47
+ width: 80%;
48
+ float: left;
49
+ }
50
+
51
+ @media screen and (min-width: 60em) {
52
+ .anchor-menu-fixed.elementor-widget-wp-widget-nav_menu .wrap,
53
+ .site-header-hidden.elementor-widget-wp-widget-nav_menu .wrap {
54
+ padding-bottom: 0.25em;
55
+ padding-top: 0.25em;
56
+ }
57
+
58
+ .anchor-menu {
59
+ left: 0;
60
+ position: absolute;
61
+ top: 0;
62
+ width: 100%;
63
+ z-index: 3;
64
+ transition: transform 0.2s;
65
+ }
66
+
67
+ .anchor-menu-fixed.elementor-widget-wp-widget-nav_menu,
68
+ .site-header-hidden.elementor-widget-wp-widget-nav_menu {
69
+ position: fixed;
70
+ top: 0;
71
+ width: 100%;
72
+ z-index: 7;
73
+ }
74
+
75
+ .anchor-menu-fixed.anchor-menu,
76
+ .anchor-menu-fixed.elementor-widget-wp-widget-nav_menu {
77
+ -webkit-animation: header-down 0.2s ease-in;
78
+ animation: header-down 0.2s ease-in;
79
+ -webkit-transform: translate(0);
80
+ transform: translate(0);
81
+ }
82
+
83
+ .site-header-hidden.anchor-menu,
84
+ .site-header-hidden.elementor-widget-wp-widget-nav_menu {
85
+ -webkit-animation: header-up 0.5s ease-in;
86
+ animation: header-up 0.5s ease-in;
87
+ -webkit-transform: translate(-100%);
88
+ transform: translate(-100%);
89
+ }
90
+
91
+ .admin-bar .anchor-menu-fixed.anchor-menu,
92
+ .admin-bar .anchor-menu-fixed.elementor-widget-wp-widget-nav_menu {
93
+ top: 32px;
94
+ }
95
+
96
+ @-webkit-keyframes header-down {
97
+ from {
98
+ -webkit-transform: translate(0, -100%);
99
+ }
100
+
101
+ to {
102
+ -webkit-transform: translate(0);
103
+ }
104
+ }
105
+
106
+ @keyframes header-down {
107
+ from {
108
+ transform: translate(0, -100%);
109
+ }
110
+
111
+ to {
112
+ transform: translate(0);
113
+ }
114
+ }
115
+
116
+ @-webkit-keyframes header-up {
117
+ from {
118
+ -webkit-transform: translate(0);
119
+ }
120
+
121
+ to {
122
+ -webkit-transform: translate(0, -100%);
123
+ }
124
+ }
125
+
126
+ @keyframes header-up {
127
+ from {
128
+ transform: translate(0);
129
+ }
130
+
131
+ to {
132
+ transform: translate(0, -100%);
133
+ }
134
+ }
135
+
136
+ .elementor-widget-wp-widget-nav_menu {
137
+ width: 100%;
138
+ }
139
+
140
+ .elementor-widget-wp-widget-nav_menu ul {
141
+ display: block;
142
+ padding: 0.857em 0;
143
+ }
144
+
145
+ .elementor-widget-wp-widget-nav_menu li {
146
+ display: inline-block;
147
+ position: relative;
148
+ }
149
+
150
+ .elementor-widget-wp-widget-nav_menu li li {
151
+ display: block;
152
+ }
153
+
154
+ .elementor-widget-wp-widget-nav_menu a {
155
+ padding: 0.5em 1em;
156
+ }
157
+
158
+ .anchor-menu-fixed.anchor-menu .elementor-widget-wp-widget-nav_menu a {
159
+ padding-bottom: 0.75em;
160
+ padding-top: 0.75em;
161
+ }
162
+
163
+ .elementor-widget-wp-widget-nav_menu a:hover,
164
+ .elementor-widget-wp-widget-nav_menu a:focus {
165
+ color: #999;
166
+ }
167
+
168
+ .anchor-menu-fixed.elementor-widget-wp-widget-nav_menu h5 {
169
+ text-align: right;
170
+ margin-left: 3.5%;
171
+ }
172
+
173
+ .anchor-menu-fixed.elementor-widget-wp-widget-nav_menu ul {
174
+ float: left;
175
+ padding-right: 3.5%;
176
+ }
177
+
178
+ }
assets/custom.js CHANGED
@@ -1,14 +1,14 @@
1
- jQuery( document ).ready( function( $ ) {
2
-
3
- $(function () {
4
- var nav = $('.elementor-widget-wp-widget-nav_menu');
5
- $(window).scroll(function () {
6
- if ($(this).scrollTop() > 85) {
7
- nav.addClass("anchor-menu-fixed anchor-menu");
8
- } else {
9
- nav.removeClass("anchor-menu-fixed anchor-menu");
10
- }
11
- });
12
- });
13
-
14
  });
1
+ jQuery( document ).ready( function( $ ) {
2
+
3
+ $(function () {
4
+ var nav = $('.elementor-widget-wp-widget-nav_menu');
5
+ $(window).scroll(function () {
6
+ if ($(this).scrollTop() > 85) {
7
+ nav.addClass('anchor-menu-fixed anchor-menu');
8
+ } else {
9
+ nav.removeClass('anchor-menu-fixed anchor-menu');
10
+ }
11
+ });
12
+ });
13
+
14
  });
assets/settings.php CHANGED
@@ -1,61 +1,69 @@
1
  <?php
2
- $tcp_options = get_option('elcpt_options');
3
- $tcp_pts = isset($tcp_options['objects']) ? $tcp_options['objects'] : array();
4
  ?>
5
 
6
  <div class="wrap">
7
- <?php screen_icon('plugins'); ?>
8
- <h2><?php _e('Post Type Template Settings', 'elementemplater'); ?></h2>
9
- <?php if (isset($_GET['msg'])) : ?>
10
- <div id="message" class="updated below-h2">
11
- <?php if ($_GET['msg'] == 'update') : ?>
12
- <p><?php _e('Settings Updated.','elementemplater'); ?></p>
13
- <?php endif; ?>
14
- </div>
15
- <?php endif; ?>
16
-
17
- <form method="post">
18
-
19
- <?php if (function_exists('wp_nonce_field')) wp_nonce_field('nonce_elcpt'); ?>
20
-
21
- <div id="tcp_select_objects">
22
-
23
- <table class="form-table">
24
- <tbody>
25
- <tr valign="top">
26
- <p><?php _e('Check to Apply Templates for Custom Post Types', 'elementemplater') ?></p>
27
- </tr>
28
- <tr>
29
- <td>
30
- <?php
31
- $post_types = get_post_types(array(
32
- 'public' => true,
33
- ), 'objects');
34
-
35
- foreach ($post_types as $post_type) {
36
- if ($post_type->name == 'attachment' || $post_type->name == 'page')
37
- continue;
38
- ?>
39
- <label><input type="checkbox" name="objects[]" value="<?php echo $post_type->name; ?>" <?php
40
- if (isset($tcp_pts) && is_array($tcp_pts)) {
41
- if (in_array($post_type->name, $tcp_pts)) {
42
- echo 'checked="checked"';
43
- }
44
- }
45
- ?>>&nbsp;<?php echo $post_type->label; ?></label><br>
46
- <?php
47
- }
48
- ?>
49
- </td>
50
- </tr>
51
- </tbody>
52
- </table>
53
-
54
- </div>
55
-
56
- <p class="submit">
57
- <input id="submit" class="button button-primary" name="elcpt_submit" value="<?php _e('Save Changes', 'elementemplater'); ?>" type="submit">
58
- </p>
59
-
60
- </form>
61
- </div>
 
 
 
 
 
 
 
 
1
  <?php
2
+ $tcp_options = get_option( 'elcpt_options' );
3
+ $tcp_pts = isset( $tcp_options['objects'] ) ? $tcp_options['objects'] : array();
4
  ?>
5
 
6
  <div class="wrap">
7
+ <?php screen_icon( 'plugins' ); ?>
8
+ <h2><?php _e( 'Post Type Template Settings', 'elementor-templater' ); ?></h2>
9
+ <?php if ( isset( $_GET['msg'] ) ) : ?>
10
+ <div id="message" class="updated below-h2">
11
+ <?php if ( $_GET['msg'] == 'update' ) : ?>
12
+ <p><?php _e( 'Settings Updated.','elementor-templater' ); ?></p>
13
+ <?php endif; ?>
14
+ </div>
15
+ <?php endif; ?>
16
+
17
+ <form method="post">
18
+
19
+ <?php
20
+ if ( function_exists( 'wp_nonce_field' ) ) {
21
+ wp_nonce_field( 'nonce_elcpt' );}
22
+ ?>
23
+
24
+ <div id="tcp_select_objects">
25
+
26
+ <table class="form-table">
27
+ <tbody>
28
+ <tr valign="top">
29
+ <p><?php _e( 'Check to Apply Templates for Custom Post Types', 'elementor-templater' ); ?></p>
30
+ </tr>
31
+ <tr>
32
+ <td>
33
+ <?php
34
+ $post_types = get_post_types(
35
+ array(
36
+ 'public' => true,
37
+ ), 'objects'
38
+ );
39
+
40
+ foreach ( $post_types as $post_type ) {
41
+ if ( $post_type->name == 'attachment' || $post_type->name == 'page' ) {
42
+ continue;
43
+ }
44
+ ?>
45
+ <label><input type="checkbox" name="objects[]" value="<?php echo $post_type->name; ?>"
46
+ <?php
47
+ if ( isset( $tcp_pts ) && is_array( $tcp_pts ) ) {
48
+ if ( in_array( $post_type->name, $tcp_pts ) ) {
49
+ echo 'checked="checked"';
50
+ }
51
+ }
52
+ ?>
53
+ >&nbsp;<?php echo $post_type->label; ?></label><br>
54
+ <?php
55
+ }
56
+ ?>
57
+ </td>
58
+ </tr>
59
+ </tbody>
60
+ </table>
61
+
62
+ </div>
63
+
64
+ <p class="submit">
65
+ <input id="submit" class="button button-primary" name="elcpt_submit" value="<?php _e( 'Save Changes', 'elementor-templater' ); ?>" type="submit">
66
+ </p>
67
+
68
+ </form>
69
+ </div>
custom-posttype-class.php CHANGED
@@ -1,48 +1,48 @@
1
  <?php
2
 
3
  class EL_CustomTemplates {
4
-
5
  private $elcpt_meta;
6
  private $post_ID;
7
-
8
  function __construct() {
9
  $this->elcpt_meta = 'elcpt_template_name';
10
- add_action( 'admin_menu', array($this,'elcpt_admin_menu') );
11
- add_action('admin_init', array($this, 'elcpt_admin_init'));
12
- add_action('admin_init', array($this, 'elcpt_update_options'));
13
- add_action('save_post', array($this, 'elcpt_save_post'));
14
- add_filter('body_class', array($this, 'elcpt_body_class'));
15
- add_filter( 'single_template', array($this, 'elcpt_load_single_template'));
16
- register_deactivation_hook( __FILE__, array($this, 'elcpt_uninstall'));
17
  }
18
-
19
  function elcpt_admin_menu() {
20
- add_options_page(__('Post Type Template', 'elementemplater'), __('Post Type Template', 'elementemplater'), 'manage_options', 'elcpt-settings', array($this, 'elcpt_admin_page'));
21
- }
22
-
23
- function elcpt_admin_page() {
24
- require ET_PATH . 'inc/settings.php';
25
- }
26
-
27
- function elcpt_admin_init() {
28
- $cpt_options = get_option('elcpt_options');
29
-
30
- if( isset($cpt_options['objects']) ) {
31
- $post_types = apply_filters( 'elcpt_post_types', $cpt_options['objects'] );
32
- foreach ( $post_types as $post_type )
33
- add_meta_box(
34
- 'postparentdiv',
35
- __( 'Custom Template', 'elementemplater' ),
36
- array( $this, 'elcpt_post_template'),
37
- $post_type,
38
- 'side',
39
  'high'
40
  );
 
41
  }
42
- }
43
-
44
- function elcpt_post_template( $post )
45
- {
46
  $this->post_ID = $post->ID;
47
 
48
  $template_vars = array();
@@ -50,115 +50,118 @@ class EL_CustomTemplates {
50
  $custom_template = $this->elcpt_get_custom_post_template();
51
 
52
  if ( $templates ) { ?>
53
- <label class="hidden" for="page_template"><?php _e( 'Choose Template', 'elementemplater' ); ?></label>
54
  <input type="hidden" name="cpt_current_template" value="1" />
55
  <select name="custom_post_template" id="custom_post_template">
56
  <option
57
  value='default'
58
  <?php
59
- if ( ! $custom_template ) {
60
- echo "selected='selected'";
61
- }
62
- ?>><?php _e( 'Default Template' ); ?></option>
63
- <?php foreach( $templates AS $filename => $name ) { ?>
 
64
  <option
65
  value='<?php echo $filename; ?>'
66
  <?php
67
- if ( $custom_template == $filename ) {
68
- echo "selected='selected'";
69
- }
70
- ?>><?php echo $name; ?></option>
 
71
  <?php } ?>
72
  </select>
73
  <?php
74
- }
75
- else {
76
  echo '<p>No Custom Templates Found!</p>';
77
  }
78
  }
79
-
80
- function elcpt_get_post_templates()
81
- {
82
  $theme = wp_get_theme();
83
  $post_templates = array();
84
  $files = (array) $theme->get_files( 'php', 1 );
85
  foreach ( $files as $file => $full_path ) {
86
  $headers = @get_file_data( $full_path, array( 'Post Template Name' => 'Post Template Name' ) );
87
- if ( empty( $headers['Post Template Name'] ) )
88
  continue;
 
89
  $post_templates[ $file ] = $headers['Post Template Name'];
90
  }
91
  return $post_templates;
92
  }
93
-
94
- function elcpt_get_custom_post_template()
95
- {
96
  $custom_template = get_post_meta( $this->post_ID, $this->elcpt_meta, true );
97
  return $custom_template;
98
  }
99
-
100
- function elcpt_set_custom_post_template( $template )
101
- {
102
  delete_post_meta( $this->post_ID, $this->elcpt_meta );
103
- if ( ! $template || $template == 'default' ) return;
 
 
104
  add_post_meta( $this->post_ID, $this->elcpt_meta, $template );
105
  }
106
-
107
- function elcpt_save_post( $post_ID )
108
- {
109
- $action_needed = (bool) @ $_POST[ 'cpt_current_template' ];
110
- if ( ! $action_needed ) return;
 
111
 
112
  $this->post_ID = $post_ID;
113
- $template = (string) @ $_POST[ 'custom_post_template' ];
114
- $template = stripslashes_deep($template);
115
  $this->elcpt_set_custom_post_template( $template );
116
  }
117
-
118
- function elcpt_load_single_template( $template )
119
- {
120
  global $wp_query;
121
  $this->post_ID = $wp_query->post->ID;
122
  $template_file = $this->elcpt_get_custom_post_template();
123
 
124
- if ( ! $template_file )
125
  return $template;
 
126
 
127
- if ( file_exists( trailingslashit( STYLESHEETPATH ) . $template_file ) )
128
  return STYLESHEETPATH . DIRECTORY_SEPARATOR . $template_file;
129
- else if ( file_exists( TEMPLATEPATH . DIRECTORY_SEPARATOR . $template_file ) )
130
  return TEMPLATEPATH . DIRECTORY_SEPARATOR . $template_file;
 
131
 
132
  return $template;
133
  }
134
-
135
  function elcpt_body_class( $classes ) {
136
- if (!is_single()) {
137
  return $classes;
138
  }
139
  $post_template = get_post_meta( get_the_ID(), 'elcpt_template_name', true );
140
- if( !empty( $post_template) ) {
141
  $classes[] = 'page-template';
142
  $classes[] = 'page-template-' . str_replace( '.php', '-php', $post_template );
143
  }
144
  return $classes;
145
  }
146
-
147
- function elcpt_update_options() {
148
- global $wpdb;
149
- if (!isset($_POST['elcpt_submit']))
150
- return false;
151
-
152
- check_admin_referer('nonce_elcpt');
153
- $input_options = array();
154
- $input_options['objects'] = isset($_POST['objects']) ? $_POST['objects'] : '';
155
- update_option('elcpt_options', $input_options);
156
- wp_redirect('options-general.php?page=elcpt-settings&msg=update');
157
- }
158
-
159
- function elcpt_uninstall()
160
- {
161
- delete_option('elcpt_options');
162
  }
163
  }
164
 
@@ -166,6 +169,6 @@ class EL_CustomTemplates {
166
  * Instantiate the plugin
167
  *
168
  * @global
169
- **/
170
  $cpt_obj = new EL_CustomTemplates();
171
- ?>
1
  <?php
2
 
3
  class EL_CustomTemplates {
4
+
5
  private $elcpt_meta;
6
  private $post_ID;
7
+
8
  function __construct() {
9
  $this->elcpt_meta = 'elcpt_template_name';
10
+ add_action( 'admin_menu', array($this, 'elcpt_admin_menu') );
11
+ add_action( 'admin_init', array($this, 'elcpt_admin_init') );
12
+ add_action( 'admin_init', array($this, 'elcpt_update_options') );
13
+ add_action( 'save_post', array($this, 'elcpt_save_post') );
14
+ add_filter( 'body_class', array($this, 'elcpt_body_class') );
15
+ add_filter( 'single_template', array($this, 'elcpt_load_single_template') );
16
+ register_deactivation_hook( __FILE__, array($this, 'elcpt_uninstall') );
17
  }
18
+
19
  function elcpt_admin_menu() {
20
+ add_options_page( __( 'Post Type Template', 'elementor-templater' ), __( 'Post Type Template', 'elementor-templater' ), 'manage_options', 'elcpt-settings', array($this, 'elcpt_admin_page') );
21
+ }
22
+
23
+ function elcpt_admin_page() {
24
+ require ET_PATH . 'inc/settings.php';
25
+ }
26
+
27
+ function elcpt_admin_init() {
28
+ $cpt_options = get_option( 'elcpt_options' );
29
+
30
+ if ( isset( $cpt_options['objects'] ) ) {
31
+ $post_types = apply_filters( 'elcpt_post_types', $cpt_options['objects'] );
32
+ foreach ( $post_types as $post_type ) {
33
+ add_meta_box(
34
+ 'postparentdiv',
35
+ __( 'Custom Template', 'elementor-templater' ),
36
+ array( $this, 'elcpt_post_template'),
37
+ $post_type,
38
+ 'side',
39
  'high'
40
  );
41
+ }
42
  }
43
+ }
44
+
45
+ function elcpt_post_template( $post ) {
 
46
  $this->post_ID = $post->ID;
47
 
48
  $template_vars = array();
50
  $custom_template = $this->elcpt_get_custom_post_template();
51
 
52
  if ( $templates ) { ?>
53
+ <label class="hidden" for="page_template"><?php _e( 'Choose Template', 'elementor-templater' ); ?></label>
54
  <input type="hidden" name="cpt_current_template" value="1" />
55
  <select name="custom_post_template" id="custom_post_template">
56
  <option
57
  value='default'
58
  <?php
59
+ if ( ! $custom_template ) {
60
+ echo "selected='selected'";
61
+ }
62
+ ?>
63
+ ><?php _e( 'Default Template', 'elementor-templater' ); ?></option>
64
+ <?php foreach ( $templates as $filename => $name ) { ?>
65
  <option
66
  value='<?php echo $filename; ?>'
67
  <?php
68
+ if ( $custom_template == $filename ) {
69
+ echo "selected='selected'";
70
+ }
71
+ ?>
72
+ ><?php echo $name; ?></option>
73
  <?php } ?>
74
  </select>
75
  <?php
76
+ } else {
 
77
  echo '<p>No Custom Templates Found!</p>';
78
  }
79
  }
80
+
81
+ function elcpt_get_post_templates() {
 
82
  $theme = wp_get_theme();
83
  $post_templates = array();
84
  $files = (array) $theme->get_files( 'php', 1 );
85
  foreach ( $files as $file => $full_path ) {
86
  $headers = @get_file_data( $full_path, array( 'Post Template Name' => 'Post Template Name' ) );
87
+ if ( empty( $headers['Post Template Name'] ) ) {
88
  continue;
89
+ }
90
  $post_templates[ $file ] = $headers['Post Template Name'];
91
  }
92
  return $post_templates;
93
  }
94
+
95
+ function elcpt_get_custom_post_template() {
 
96
  $custom_template = get_post_meta( $this->post_ID, $this->elcpt_meta, true );
97
  return $custom_template;
98
  }
99
+
100
+ function elcpt_set_custom_post_template( $template ) {
 
101
  delete_post_meta( $this->post_ID, $this->elcpt_meta );
102
+ if ( ! $template || $template == 'default' ) {
103
+ return;
104
+ }
105
  add_post_meta( $this->post_ID, $this->elcpt_meta, $template );
106
  }
107
+
108
+ function elcpt_save_post( $post_ID ) {
109
+ $action_needed = (bool) @ $_POST['cpt_current_template'];
110
+ if ( ! $action_needed ) {
111
+ return;
112
+ }
113
 
114
  $this->post_ID = $post_ID;
115
+ $template = (string) @ $_POST['custom_post_template'];
116
+ $template = stripslashes_deep( $template );
117
  $this->elcpt_set_custom_post_template( $template );
118
  }
119
+
120
+ function elcpt_load_single_template( $template ) {
 
121
  global $wp_query;
122
  $this->post_ID = $wp_query->post->ID;
123
  $template_file = $this->elcpt_get_custom_post_template();
124
 
125
+ if ( ! $template_file ) {
126
  return $template;
127
+ }
128
 
129
+ if ( file_exists( trailingslashit( STYLESHEETPATH ) . $template_file ) ) {
130
  return STYLESHEETPATH . DIRECTORY_SEPARATOR . $template_file;
131
+ } elseif ( file_exists( TEMPLATEPATH . DIRECTORY_SEPARATOR . $template_file ) ) {
132
  return TEMPLATEPATH . DIRECTORY_SEPARATOR . $template_file;
133
+ }
134
 
135
  return $template;
136
  }
137
+
138
  function elcpt_body_class( $classes ) {
139
+ if ( ! is_single() ) {
140
  return $classes;
141
  }
142
  $post_template = get_post_meta( get_the_ID(), 'elcpt_template_name', true );
143
+ if ( ! empty( $post_template ) ) {
144
  $classes[] = 'page-template';
145
  $classes[] = 'page-template-' . str_replace( '.php', '-php', $post_template );
146
  }
147
  return $classes;
148
  }
149
+
150
+ function elcpt_update_options() {
151
+ global $wpdb;
152
+ if ( ! isset( $_POST['elcpt_submit'] ) ) {
153
+ return false;
154
+ }
155
+
156
+ check_admin_referer( 'nonce_elcpt' );
157
+ $input_options = array();
158
+ $input_options['objects'] = isset( $_POST['objects'] ) ? $_POST['objects'] : '';
159
+ update_option( 'elcpt_options', $input_options );
160
+ wp_redirect( 'options-general.php?page=elcpt-settings&msg=update' );
161
+ }
162
+
163
+ function elcpt_uninstall() {
164
+ delete_option( 'elcpt_options' );
165
  }
166
  }
167
 
169
  * Instantiate the plugin
170
  *
171
  * @global
172
+ */
173
  $cpt_obj = new EL_CustomTemplates();
174
+ ?>
elementemplater-class.php CHANGED
@@ -1,181 +1,182 @@
1
- <?php
2
-
3
- class ElemenTemplater {
4
-
5
- /**
6
- * A reference to an instance of this class.
7
- */
8
- private static $instance;
9
-
10
- /**
11
- * The array of templates that this plugin tracks.
12
- */
13
- protected $templates;
14
-
15
- /**
16
- * Returns an instance of this class.
17
- */
18
- public static function get_instance() {
19
-
20
- if( null == self::$instance ) {
21
- self::$instance = new ElemenTemplater();
22
- }
23
-
24
- return self::$instance;
25
-
26
- }
27
-
28
- public function elementemplater_load_plugin_textdomain() {
29
- load_plugin_textdomain( 'elementemplater' );
30
- }
31
-
32
- /**
33
- * Initializes the plugin by setting filters and administration functions.
34
- */
35
- private function __construct() {
36
-
37
- $this->templates = array();
38
-
39
- add_action( 'init', array( $this, 'elementemplater_load_plugin_textdomain' ) );
40
-
41
- add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_styles' ), 998 );
42
- add_action( 'wp_enqueue_scripts', array( $this, 'elementemplater_styles' ), 999 );
43
- add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ), 9999 );
44
-
45
- // Add a filter to the attributes metabox to inject template into the cache.
46
- if ( version_compare( floatval($GLOBALS['wp_version']), '4.7', '<' ) ) { // 4.6.1 and older
47
- add_filter(
48
- 'page_attributes_dropdown_pages_args',
49
- array( $this, 'register_project_templates' )
50
- );
51
- } else { // Add a filter to the wp 4.7 version attributes metabox
52
- add_filter(
53
- 'theme_page_templates', array( $this, 'add_new_template' )
54
- );
55
- }
56
-
57
- // Add a filter to the save post to inject out template into the page cache
58
- add_filter(
59
- 'wp_insert_post_data',
60
- array( $this, 'register_project_templates' )
61
- );
62
-
63
-
64
- // Add a filter to the template include to determine if the page has our
65
- // template assigned and return it's path
66
- add_filter(
67
- 'template_include',
68
- array( $this, 'view_project_template')
69
- );
70
-
71
- // Add your templates to this array.
72
- $this->templates = array(
73
- 'templates/builder-fullwidth.php' => __( 'Elementor Fullwidth Blank', 'elementemplater' ),
74
- 'templates/builder-fullwidth-std.php' => __( 'Elementor Fullwidth Standard', 'elementemplater' ),
75
- );
76
- }
77
-
78
- /**
79
- * Adds our template to the page dropdown for v4.7+
80
- *
81
- */
82
- public function add_new_template( $posts_templates ) {
83
- $posts_templates = array_merge( $posts_templates, $this->templates );
84
- return $posts_templates;
85
- }
86
-
87
- /**
88
- * Adds our template to the pages cache in order to trick WordPress
89
- * into thinking the template file exists where it doens't really exist.
90
- *
91
- */
92
-
93
- public function register_project_templates( $atts ) {
94
-
95
- // Create the key used for the themes cache
96
- $cache_key = 'page_templates-' . md5( get_theme_root() . '/' . get_stylesheet() );
97
-
98
- // Retrieve the cache list.
99
- // If it doesn't exist, or it's empty prepare an array
100
- $templates = wp_get_theme()->get_page_templates();
101
- if ( empty( $templates ) ) {
102
- $templates = array();
103
- }
104
-
105
- // New cache, therefore remove the old one
106
- wp_cache_delete( $cache_key , 'themes');
107
-
108
- // Now add our template to the list of templates by merging our templates
109
- // with the existing templates array from the cache.
110
- $templates = array_merge( $templates, $this->templates );
111
-
112
- // Add the modified cache to allow WordPress to pick it up for listing
113
- // available templates
114
- wp_cache_add( $cache_key, $templates, 'themes', 1800 );
115
-
116
- return $atts;
117
-
118
- }
119
-
120
- /**
121
- * Checks if the template is assigned to the page
122
- */
123
- public function view_project_template( $template ) {
124
-
125
- global $post;
126
-
127
- if (!isset($this->templates[get_post_meta(
128
- $post->ID, '_wp_page_template', true
129
- )] ) ) {
130
-
131
- return $template;
132
-
133
- }
134
-
135
- $file = plugin_dir_path(__FILE__). get_post_meta(
136
- $post->ID, '_wp_page_template', true
137
- );
138
-
139
- // Just to be safe, we check if the file exist first
140
- if( file_exists( $file ) ) {
141
- return $file;
142
- }
143
- else { echo $file; }
144
-
145
- return $template;
146
-
147
- }
148
-
149
- /**
150
- * Enqueue Custom CSS - theme agnostic.
151
- * @since 1.0.1
152
- * @return void
153
- */
154
- public function enqueue_styles() {
155
- if ( is_page_template( 'templates/builder-fullwidth.php' ) ) {
156
- wp_register_style( 'builder-fullwidth-style', plugins_url( 'assets/custom.css', __FILE__ ) );
157
- wp_enqueue_style( 'builder-fullwidth-style' );
158
- }
159
- }
160
-
161
- public function enqueue_scripts() {
162
- if ( is_page_template( 'templates/builder-fullwidth.php' ) ) {
163
- wp_enqueue_script( 'builder-fullwidth-js', plugins_url( 'assets/custom.js', __FILE__ ), array( 'jquery' ), '', true );
164
- }
165
- }
166
-
167
- /**
168
- * Enqueue CSS for active theme.
169
- * @since 1.0.0
170
- * @return void
171
- */
172
- public function elementemplater_styles() {
173
- $theme = get_option( 'template' );
174
- $filename = plugin_dir_path( __FILE__ ) . 'inc/themes/' . $theme . '.php';
175
- if (file_exists($filename)) {
176
- include_once( $filename );
177
- }
178
- }
179
- }
180
-
181
- add_action( 'plugins_loaded', array( 'ElemenTemplater', 'get_instance' ) );
 
1
+ <?php
2
+
3
+ class ElemenTemplater {
4
+
5
+ /**
6
+ * A reference to an instance of this class.
7
+ */
8
+ private static $instance;
9
+
10
+ /**
11
+ * The array of templates that this plugin tracks.
12
+ */
13
+ protected $templates;
14
+
15
+ /**
16
+ * Returns an instance of this class.
17
+ */
18
+ public static function get_instance() {
19
+
20
+ if ( null == self::$instance ) {
21
+ self::$instance = new ElemenTemplater();
22
+ }
23
+
24
+ return self::$instance;
25
+
26
+ }
27
+
28
+ public function elementemplater_load_plugin_textdomain() {
29
+ load_plugin_textdomain( 'elementor-templater' );
30
+ }
31
+
32
+ /**
33
+ * Initializes the plugin by setting filters and administration functions.
34
+ */
35
+ private function __construct() {
36
+
37
+ $this->templates = array();
38
+
39
+ add_action( 'init', array( $this, 'elementemplater_load_plugin_textdomain' ) );
40
+
41
+ add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_styles' ), 998 );
42
+ add_action( 'wp_enqueue_scripts', array( $this, 'elementemplater_styles' ), 999 );
43
+ add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ), 9999 );
44
+
45
+ // Add a filter to the attributes metabox to inject template into the cache.
46
+ if ( version_compare( floatval( $GLOBALS['wp_version'] ), '4.7', '<' ) ) { // 4.6.1 and older
47
+ add_filter(
48
+ 'page_attributes_dropdown_pages_args',
49
+ array( $this, 'register_project_templates' )
50
+ );
51
+ } else { // Add a filter to the wp 4.7 version attributes metabox
52
+ add_filter(
53
+ 'theme_page_templates', array( $this, 'add_new_template' )
54
+ );
55
+ }
56
+
57
+ // Add a filter to the save post to inject out template into the page cache
58
+ add_filter(
59
+ 'wp_insert_post_data',
60
+ array( $this, 'register_project_templates' )
61
+ );
62
+
63
+ // Add a filter to the template include to determine if the page has our
64
+ // template assigned and return it's path
65
+ add_filter(
66
+ 'template_include',
67
+ array( $this, 'view_project_template')
68
+ );
69
+
70
+ // Add your templates to this array.
71
+ $this->templates = array(
72
+ 'templates/builder-fullwidth.php' => __( 'Elementor Fullwidth Blank', 'elementor-templater' ),
73
+ 'templates/builder-fullwidth-std.php' => __( 'Elementor Fullwidth Standard', 'elementor-templater' ),
74
+ );
75
+ }
76
+
77
+ /**
78
+ * Adds our template to the page dropdown for v4.7+
79
+ */
80
+ public function add_new_template( $posts_templates ) {
81
+ $posts_templates = array_merge( $posts_templates, $this->templates );
82
+ return $posts_templates;
83
+ }
84
+
85
+ /**
86
+ * Adds our template to the pages cache in order to trick WordPress
87
+ * into thinking the template file exists where it doens't really exist.
88
+ */
89
+
90
+ public function register_project_templates( $atts ) {
91
+
92
+ // Create the key used for the themes cache
93
+ $cache_key = 'page_templates-' . md5( get_theme_root() . '/' . get_stylesheet() );
94
+
95
+ // Retrieve the cache list.
96
+ // If it doesn't exist, or it's empty prepare an array
97
+ $templates = wp_get_theme()->get_page_templates();
98
+ if ( empty( $templates ) ) {
99
+ $templates = array();
100
+ }
101
+
102
+ // New cache, therefore remove the old one
103
+ wp_cache_delete( $cache_key , 'themes' );
104
+
105
+ // Now add our template to the list of templates by merging our templates
106
+ // with the existing templates array from the cache.
107
+ $templates = array_merge( $templates, $this->templates );
108
+
109
+ // Add the modified cache to allow WordPress to pick it up for listing
110
+ // available templates
111
+ wp_cache_add( $cache_key, $templates, 'themes', 1800 );
112
+
113
+ return $atts;
114
+
115
+ }
116
+
117
+ /**
118
+ * Checks if the template is assigned to the page
119
+ */
120
+ public function view_project_template( $template ) {
121
+
122
+ global $post;
123
+
124
+ if ( ! isset(
125
+ $this->templates[ get_post_meta(
126
+ $post->ID, '_wp_page_template', true
127
+ ) ]
128
+ ) ) {
129
+
130
+ return $template;
131
+
132
+ }
133
+
134
+ $file = plugin_dir_path( __FILE__ ) . get_post_meta(
135
+ $post->ID, '_wp_page_template', true
136
+ );
137
+
138
+ // Just to be safe, we check if the file exist first
139
+ if ( file_exists( $file ) ) {
140
+ return $file;
141
+ } else {
142
+ echo $file; }
143
+
144
+ return $template;
145
+
146
+ }
147
+
148
+ /**
149
+ * Enqueue Custom CSS - theme agnostic.
150
+ *
151
+ * @since 1.0.1
152
+ * @return void
153
+ */
154
+ public function enqueue_styles() {
155
+ if ( is_page_template( 'templates/builder-fullwidth.php' ) ) {
156
+ wp_register_style( 'builder-fullwidth-style', plugins_url( 'assets/custom.css', __FILE__ ) );
157
+ wp_enqueue_style( 'builder-fullwidth-style' );
158
+ }
159
+ }
160
+
161
+ public function enqueue_scripts() {
162
+ if ( is_page_template( 'templates/builder-fullwidth.php' ) ) {
163
+ wp_enqueue_script( 'builder-fullwidth-js', plugins_url( 'assets/custom.js', __FILE__ ), array( 'jquery' ), '', true );
164
+ }
165
+ }
166
+
167
+ /**
168
+ * Enqueue CSS for active theme.
169
+ *
170
+ * @since 1.0.0
171
+ * @return void
172
+ */
173
+ public function elementemplater_styles() {
174
+ $theme = get_option( 'template' );
175
+ $filename = plugin_dir_path( __FILE__ ) . 'inc/themes/' . $theme . '.php';
176
+ if ( file_exists( $filename ) ) {
177
+ include_once( $filename );
178
+ }
179
+ }
180
+ }
181
+
182
+ add_action( 'plugins_loaded', array( 'ElemenTemplater', 'get_instance' ) );
elementemplator.php CHANGED
@@ -1,26 +1,31 @@
1
  <?php
2
  /*
3
  * Plugin Name: Page Templater For Elementor
4
- * Plugin URI: https://wpdevhq.com/plugins/page-templater-for-elementor
5
  * Description: A helper plugin for users of Elementor Pagebuilder. Adds 2 new templates for complete full width experience while using the page builder - support for a number of popular themes is built-in.
6
- * Version: 1.1.3
7
- * Author: WPDevHQ
8
- * Author URI: https://wpdevhq.com/
9
  * Requires at least: 4.4
10
- * Tested up to: 4.7.3
 
 
 
11
  */
12
 
13
  /* Do not access this file directly */
14
- if ( ! defined( 'WPINC' ) ) { die; }
 
15
 
16
- /* Constants
 
17
  ------------------------------------------ */
18
 
19
  /* Set plugin version constant. */
20
- define( 'ET_VERSION', '1.1.0' );
21
 
22
  /* Set constant path to the plugin directory. */
23
- define( 'ET_PATH', trailingslashit( plugin_dir_path(__FILE__) ) );
24
 
25
  /* Set the constant path to the plugin directory URI. */
26
  define( 'ET_URI', trailingslashit( plugin_dir_url( __FILE__ ) ) );
@@ -29,9 +34,29 @@ define( 'ET_URI', trailingslashit( plugin_dir_url( __FILE__ ) ) );
29
  require_once( ET_PATH . 'elementemplater-class.php' );
30
 
31
  /* Custom Post Template Class */
32
- if ( version_compare( floatval($GLOBALS['wp_version']), '4.7', '<' ) ) { // 4.6.1 and older
33
  require_once( ET_PATH . 'custom-posttype-class.php' );
34
  }
35
 
36
  /* Template Functions */
37
- require_once( ET_PATH . 'inc/elementemplater-functions.php' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  <?php
2
  /*
3
  * Plugin Name: Page Templater For Elementor
4
+ * Plugin URI: https://themeisle.com/
5
  * Description: A helper plugin for users of Elementor Pagebuilder. Adds 2 new templates for complete full width experience while using the page builder - support for a number of popular themes is built-in.
6
+ * Version: 1.2.0
7
+ * Author: ThemeIsle
8
+ * Author URI: https://themeisle.com/
9
  * Requires at least: 4.4
10
+ * Tested up to: 4.8
11
+ *
12
+ * Requires License: no
13
+ * WordPress Available: yes
14
  */
15
 
16
  /* Do not access this file directly */
17
+ if ( ! defined( 'WPINC' ) ) {
18
+ die; }
19
 
20
+ /*
21
+ Constants
22
  ------------------------------------------ */
23
 
24
  /* Set plugin version constant. */
25
+ define( 'ET_VERSION', '1.2.0' );
26
 
27
  /* Set constant path to the plugin directory. */
28
+ define( 'ET_PATH', trailingslashit( plugin_dir_path( __FILE__ ) ) );
29
 
30
  /* Set the constant path to the plugin directory URI. */
31
  define( 'ET_URI', trailingslashit( plugin_dir_url( __FILE__ ) ) );
34
  require_once( ET_PATH . 'elementemplater-class.php' );
35
 
36
  /* Custom Post Template Class */
37
+ if ( version_compare( floatval( $GLOBALS['wp_version'] ), '4.7', '<' ) ) { // 4.6.1 and older
38
  require_once( ET_PATH . 'custom-posttype-class.php' );
39
  }
40
 
41
  /* Template Functions */
42
+ require_once( ET_PATH . 'inc/elementemplater-functions.php' );
43
+
44
+ /* Require vendor file. */
45
+ $vendor_file = ET_PATH . 'vendor/autoload.php';
46
+ if ( is_readable( $vendor_file ) ) {
47
+ require_once $vendor_file;
48
+ }
49
+
50
+ /**
51
+ * Register SDK.
52
+ *
53
+ * @param $products
54
+ *
55
+ * @return array
56
+ */
57
+ function elementor_templater_register_sdk( $products ) {
58
+ $products[] = __FILE__;
59
+ return $products;
60
+ }
61
+
62
+ add_filter( 'themeisle_sdk_products', 'elementor_templater_register_sdk', 10, 1 );
inc/custom-posttype-class.php CHANGED
@@ -1,48 +1,48 @@
1
  <?php
2
 
3
  class WP_CustomTemplates {
4
-
5
  private $wptcp_meta;
6
  private $post_ID;
7
-
8
  function __construct() {
9
  $this->wptcp_meta = 'wptcp_template_name';
10
- add_action( 'admin_menu', array($this,'wptcp_admin_menu') );
11
- add_action('admin_init', array($this, 'wptcp_admin_init'));
12
- add_action('admin_init', array($this, 'wptcp_update_options'));
13
- add_action('save_post', array($this, 'wptcp_save_post'));
14
- add_filter('body_class', array($this, 'wptcp_body_class'));
15
- add_filter( 'single_template', array($this, 'wptcp_load_single_template'));
16
- register_deactivation_hook( __FILE__, array($this, 'wptcp_uninstall'));
17
  }
18
-
19
  function wptcp_admin_menu() {
20
- add_options_page(__('Post Type Template', 'elementemplater'), __('Post Type Template', 'elementemplater'), 'manage_options', 'wptcp-settings', array($this, 'wptcp_admin_page'));
21
- }
22
-
23
- function wptcp_admin_page() {
24
- require ET_PATH . 'inc/settings.php';
25
- }
26
-
27
- function wptcp_admin_init() {
28
- $tcp_options = get_option('wptcp_options');
29
-
30
- if( isset($tcp_options['objects']) ) {
31
- $post_types = apply_filters( 'wptcp_post_types', $tcp_options['objects'] );
32
- foreach ( $post_types as $post_type )
33
- add_meta_box(
34
- 'postparentdiv',
35
- __( 'Custom Template', 'elementemplater' ),
36
- array( $this, 'wptcp_post_template'),
37
- $post_type,
38
- 'side',
39
  'high'
40
  );
 
41
  }
42
- }
43
-
44
- function wptcp_post_template( $post )
45
- {
46
  $this->post_ID = $post->ID;
47
 
48
  $template_vars = array();
@@ -50,115 +50,118 @@ class WP_CustomTemplates {
50
  $custom_template = $this->wptcp_get_custom_post_template();
51
 
52
  if ( $templates ) { ?>
53
- <label class="hidden" for="page_template"><?php _e( 'Choose Template', 'elementemplater' ); ?></label>
54
  <input type="hidden" name="tcp_current_template" value="1" />
55
  <select name="custom_post_template" id="custom_post_template">
56
  <option
57
  value='default'
58
  <?php
59
- if ( ! $custom_template ) {
60
- echo "selected='selected'";
61
- }
62
- ?>><?php _e( 'Default Template' ); ?></option>
63
- <?php foreach( $templates AS $filename => $name ) { ?>
 
64
  <option
65
  value='<?php echo $filename; ?>'
66
  <?php
67
- if ( $custom_template == $filename ) {
68
- echo "selected='selected'";
69
- }
70
- ?>><?php echo $name; ?></option>
 
71
  <?php } ?>
72
  </select>
73
  <?php
74
- }
75
- else {
76
  echo '<p>No Custom Templates Found!</p>';
77
  }
78
  }
79
-
80
- function wptcp_get_post_templates()
81
- {
82
  $theme = wp_get_theme();
83
  $post_templates = array();
84
  $files = (array) $theme->get_files( 'php', 1 );
85
  foreach ( $files as $file => $full_path ) {
86
  $headers = @get_file_data( $full_path, array( 'Post Template Name' => 'Post Template Name' ) );
87
- if ( empty( $headers['Post Template Name'] ) )
88
  continue;
 
89
  $post_templates[ $file ] = $headers['Post Template Name'];
90
  }
91
  return $post_templates;
92
  }
93
-
94
- function wptcp_get_custom_post_template()
95
- {
96
  $custom_template = get_post_meta( $this->post_ID, $this->wptcp_meta, true );
97
  return $custom_template;
98
  }
99
-
100
- function wptcp_set_custom_post_template( $template )
101
- {
102
  delete_post_meta( $this->post_ID, $this->wptcp_meta );
103
- if ( ! $template || $template == 'default' ) return;
 
 
104
  add_post_meta( $this->post_ID, $this->wptcp_meta, $template );
105
  }
106
-
107
- function wptcp_save_post( $post_ID )
108
- {
109
- $action_needed = (bool) @ $_POST[ 'tcp_current_template' ];
110
- if ( ! $action_needed ) return;
 
111
 
112
  $this->post_ID = $post_ID;
113
- $template = (string) @ $_POST[ 'custom_post_template' ];
114
- $template = stripslashes_deep($template);
115
  $this->wptcp_set_custom_post_template( $template );
116
  }
117
-
118
- function wptcp_load_single_template( $template )
119
- {
120
  global $wp_query;
121
  $this->post_ID = $wp_query->post->ID;
122
  $template_file = $this->wptcp_get_custom_post_template();
123
 
124
- if ( ! $template_file )
125
  return $template;
 
126
 
127
- if ( file_exists( trailingslashit( STYLESHEETPATH ) . $template_file ) )
128
  return STYLESHEETPATH . DIRECTORY_SEPARATOR . $template_file;
129
- else if ( file_exists( TEMPLATEPATH . DIRECTORY_SEPARATOR . $template_file ) )
130
  return TEMPLATEPATH . DIRECTORY_SEPARATOR . $template_file;
 
131
 
132
  return $template;
133
  }
134
-
135
  function wptcp_body_class( $classes ) {
136
- if (!is_single()) {
137
  return $classes;
138
  }
139
  $post_template = get_post_meta( get_the_ID(), 'wptcp_template_name', true );
140
- if( !empty( $post_template) ) {
141
  $classes[] = 'page-template';
142
  $classes[] = 'page-template-' . str_replace( '.php', '-php', $post_template );
143
  }
144
  return $classes;
145
  }
146
-
147
- function wptcp_update_options() {
148
- global $wpdb;
149
- if (!isset($_POST['wptcp_submit']))
150
- return false;
151
-
152
- check_admin_referer('nonce_wptcp');
153
- $input_options = array();
154
- $input_options['objects'] = isset($_POST['objects']) ? $_POST['objects'] : '';
155
- update_option('wptcp_options', $input_options);
156
- wp_redirect('options-general.php?page=wptcp-settings&msg=update');
157
- }
158
-
159
- function wptcp_uninstall()
160
- {
161
- delete_option('wptcp_options');
162
  }
163
  }
164
 
@@ -166,6 +169,6 @@ class WP_CustomTemplates {
166
  * Instantiate the plugin
167
  *
168
  * @global
169
- **/
170
  $tcp_obj = new WP_CustomTemplates();
171
- ?>
1
  <?php
2
 
3
  class WP_CustomTemplates {
4
+
5
  private $wptcp_meta;
6
  private $post_ID;
7
+
8
  function __construct() {
9
  $this->wptcp_meta = 'wptcp_template_name';
10
+ add_action( 'admin_menu', array($this, 'wptcp_admin_menu') );
11
+ add_action( 'admin_init', array($this, 'wptcp_admin_init') );
12
+ add_action( 'admin_init', array($this, 'wptcp_update_options') );
13
+ add_action( 'save_post', array($this, 'wptcp_save_post') );
14
+ add_filter( 'body_class', array($this, 'wptcp_body_class') );
15
+ add_filter( 'single_template', array($this, 'wptcp_load_single_template') );
16
+ register_deactivation_hook( __FILE__, array($this, 'wptcp_uninstall') );
17
  }
18
+
19
  function wptcp_admin_menu() {
20
+ add_options_page( __( 'Post Type Template', 'elementor-templater' ), __( 'Post Type Template', 'elementor-templater' ), 'manage_options', 'wptcp-settings', array($this, 'wptcp_admin_page') );
21
+ }
22
+
23
+ function wptcp_admin_page() {
24
+ require ET_PATH . 'inc/settings.php';
25
+ }
26
+
27
+ function wptcp_admin_init() {
28
+ $tcp_options = get_option( 'wptcp_options' );
29
+
30
+ if ( isset( $tcp_options['objects'] ) ) {
31
+ $post_types = apply_filters( 'wptcp_post_types', $tcp_options['objects'] );
32
+ foreach ( $post_types as $post_type ) {
33
+ add_meta_box(
34
+ 'postparentdiv',
35
+ __( 'Custom Template', 'elementor-templater' ),
36
+ array( $this, 'wptcp_post_template'),
37
+ $post_type,
38
+ 'side',
39
  'high'
40
  );
41
+ }
42
  }
43
+ }
44
+
45
+ function wptcp_post_template( $post ) {
 
46
  $this->post_ID = $post->ID;
47
 
48
  $template_vars = array();
50
  $custom_template = $this->wptcp_get_custom_post_template();
51
 
52
  if ( $templates ) { ?>
53
+ <label class="hidden" for="page_template"><?php _e( 'Choose Template', 'elementor-templater' ); ?></label>
54
  <input type="hidden" name="tcp_current_template" value="1" />
55
  <select name="custom_post_template" id="custom_post_template">
56
  <option
57
  value='default'
58
  <?php
59
+ if ( ! $custom_template ) {
60
+ echo "selected='selected'";
61
+ }
62
+ ?>
63
+ ><?php _e( 'Default Template', 'elementor-templater' ); ?></option>
64
+ <?php foreach ( $templates as $filename => $name ) { ?>
65
  <option
66
  value='<?php echo $filename; ?>'
67
  <?php
68
+ if ( $custom_template == $filename ) {
69
+ echo "selected='selected'";
70
+ }
71
+ ?>
72
+ ><?php echo $name; ?></option>
73
  <?php } ?>
74
  </select>
75
  <?php
76
+ } else {
 
77
  echo '<p>No Custom Templates Found!</p>';
78
  }
79
  }
80
+
81
+ function wptcp_get_post_templates() {
 
82
  $theme = wp_get_theme();
83
  $post_templates = array();
84
  $files = (array) $theme->get_files( 'php', 1 );
85
  foreach ( $files as $file => $full_path ) {
86
  $headers = @get_file_data( $full_path, array( 'Post Template Name' => 'Post Template Name' ) );
87
+ if ( empty( $headers['Post Template Name'] ) ) {
88
  continue;
89
+ }
90
  $post_templates[ $file ] = $headers['Post Template Name'];
91
  }
92
  return $post_templates;
93
  }
94
+
95
+ function wptcp_get_custom_post_template() {
 
96
  $custom_template = get_post_meta( $this->post_ID, $this->wptcp_meta, true );
97
  return $custom_template;
98
  }
99
+
100
+ function wptcp_set_custom_post_template( $template ) {
 
101
  delete_post_meta( $this->post_ID, $this->wptcp_meta );
102
+ if ( ! $template || $template == 'default' ) {
103
+ return;
104
+ }
105
  add_post_meta( $this->post_ID, $this->wptcp_meta, $template );
106
  }
107
+
108
+ function wptcp_save_post( $post_ID ) {
109
+ $action_needed = (bool) @ $_POST['tcp_current_template'];
110
+ if ( ! $action_needed ) {
111
+ return;
112
+ }
113
 
114
  $this->post_ID = $post_ID;
115
+ $template = (string) @ $_POST['custom_post_template'];
116
+ $template = stripslashes_deep( $template );
117
  $this->wptcp_set_custom_post_template( $template );
118
  }
119
+
120
+ function wptcp_load_single_template( $template ) {
 
121
  global $wp_query;
122
  $this->post_ID = $wp_query->post->ID;
123
  $template_file = $this->wptcp_get_custom_post_template();
124
 
125
+ if ( ! $template_file ) {
126
  return $template;
127
+ }
128
 
129
+ if ( file_exists( trailingslashit( STYLESHEETPATH ) . $template_file ) ) {
130
  return STYLESHEETPATH . DIRECTORY_SEPARATOR . $template_file;
131
+ } elseif ( file_exists( TEMPLATEPATH . DIRECTORY_SEPARATOR . $template_file ) ) {
132
  return TEMPLATEPATH . DIRECTORY_SEPARATOR . $template_file;
133
+ }
134
 
135
  return $template;
136
  }
137
+
138
  function wptcp_body_class( $classes ) {
139
+ if ( ! is_single() ) {
140
  return $classes;
141
  }
142
  $post_template = get_post_meta( get_the_ID(), 'wptcp_template_name', true );
143
+ if ( ! empty( $post_template ) ) {
144
  $classes[] = 'page-template';
145
  $classes[] = 'page-template-' . str_replace( '.php', '-php', $post_template );
146
  }
147
  return $classes;
148
  }
149
+
150
+ function wptcp_update_options() {
151
+ global $wpdb;
152
+ if ( ! isset( $_POST['wptcp_submit'] ) ) {
153
+ return false;
154
+ }
155
+
156
+ check_admin_referer( 'nonce_wptcp' );
157
+ $input_options = array();
158
+ $input_options['objects'] = isset( $_POST['objects'] ) ? $_POST['objects'] : '';
159
+ update_option( 'wptcp_options', $input_options );
160
+ wp_redirect( 'options-general.php?page=wptcp-settings&msg=update' );
161
+ }
162
+
163
+ function wptcp_uninstall() {
164
+ delete_option( 'wptcp_options' );
165
  }
166
  }
167
 
169
  * Instantiate the plugin
170
  *
171
  * @global
172
+ */
173
  $tcp_obj = new WP_CustomTemplates();
174
+ ?>
inc/elementemplater-functions.php CHANGED
@@ -6,46 +6,48 @@
6
  */
7
 
8
  if ( ! function_exists( 'elementor_pagebuilder' ) ) {
9
- /*
10
- * Setup default page template Actions
11
- */
12
- function elementor_pagebuilder() {
13
- get_header();
14
-
15
- do_action( 'elementor_before_content_wrapper' );
16
-
17
- while ( have_posts() ) : the_post();
18
- do_action( 'elementor_page_elements' ); // Give your elements priorities so that they hook in the right place.
19
- endwhile;
20
-
21
- do_action( 'elementor_after_content_wrapper' );
22
-
23
- get_footer();
24
- }
 
25
  }
26
 
27
  if ( ! function_exists( 'elementor_blankpb' ) ) {
28
- /*
29
- * Setup default page template Actions
30
- */
31
- function elementor_blankpb() {
32
- elementor_blankpb_header();
33
-
34
- do_action( 'elementor_before_content_wrapper' );
35
-
36
- while ( have_posts() ) : the_post();
37
- do_action( 'elementor_page_elements' ); // Give your elements priorities so that they hook in the right place.
38
- endwhile;
39
-
40
- do_action( 'elementor_after_content_wrapper' );
41
-
42
- elementor_blankpb_footer();
43
- }
 
44
  }
45
 
46
  function elementor_blankpb_header() {
47
 
48
- /**
49
  * The header for our theme.
50
  *
51
  * This is the template that displays all of the <head> section and everything up until <div id="content">
@@ -63,40 +65,44 @@ function elementor_blankpb_header() {
63
  </head>
64
 
65
  <body <?php body_class(); ?>>
66
- <?php
67
  do_action( 'elementor_content_body_before' );
68
  }
69
 
70
  function elementor_blankpb_footer() {
71
  do_action( 'elementor_content_body_after' );
72
- wp_footer();
73
  ?>
74
  </body>
75
  </html>
76
- <?php }
 
77
 
78
  if ( ! function_exists( 'elementor_page_content' ) ) {
79
-
80
  function elementor_page_content() {
81
  the_content();
82
  }
83
  }
84
- add_action( 'elementor_page_elements', 'elementor_page_content', 20 );
85
 
86
  $theme = get_option( 'template' );
87
  if ( 'GeneratePress' == $theme || 'generatepress' == $theme ) {
88
- if ( ! function_exists( 'elementor_generate_title' ) ) {
89
-
90
- function elementor_generate_title() {
91
- if ( generate_show_title() ) : ?>
92
- <header class="entry-header">
93
- <div class="grid-container">
94
- <?php the_title( '<h1 class="entry-title" itemprop="headline">', '</h1>' ); ?>
95
- </div>
96
- </header><!-- .entry-header -->
 
 
97
 
98
- <?php endif;
 
 
99
  }
 
100
  }
101
- add_action( 'elementor_page_elements', 'elementor_generate_title', 10 );
102
- }
6
  */
7
 
8
  if ( ! function_exists( 'elementor_pagebuilder' ) ) {
9
+ /*
10
+ * Setup default page template Actions
11
+ */
12
+ function elementor_pagebuilder() {
13
+ get_header();
14
+
15
+ do_action( 'elementor_before_content_wrapper' );
16
+
17
+ while ( have_posts() ) :
18
+ the_post();
19
+ do_action( 'elementor_page_elements' ); // Give your elements priorities so that they hook in the right place.
20
+ endwhile;
21
+
22
+ do_action( 'elementor_after_content_wrapper' );
23
+
24
+ get_footer();
25
+ }
26
  }
27
 
28
  if ( ! function_exists( 'elementor_blankpb' ) ) {
29
+ /*
30
+ * Setup default page template Actions
31
+ */
32
+ function elementor_blankpb() {
33
+ elementor_blankpb_header();
34
+
35
+ do_action( 'elementor_before_content_wrapper' );
36
+
37
+ while ( have_posts() ) :
38
+ the_post();
39
+ do_action( 'elementor_page_elements' ); // Give your elements priorities so that they hook in the right place.
40
+ endwhile;
41
+
42
+ do_action( 'elementor_after_content_wrapper' );
43
+
44
+ elementor_blankpb_footer();
45
+ }
46
  }
47
 
48
  function elementor_blankpb_header() {
49
 
50
+ /**
51
  * The header for our theme.
52
  *
53
  * This is the template that displays all of the <head> section and everything up until <div id="content">
65
  </head>
66
 
67
  <body <?php body_class(); ?>>
68
+ <?php
69
  do_action( 'elementor_content_body_before' );
70
  }
71
 
72
  function elementor_blankpb_footer() {
73
  do_action( 'elementor_content_body_after' );
74
+ wp_footer();
75
  ?>
76
  </body>
77
  </html>
78
+ <?php
79
+ }
80
 
81
  if ( ! function_exists( 'elementor_page_content' ) ) {
82
+
83
  function elementor_page_content() {
84
  the_content();
85
  }
86
  }
87
+ add_action( 'elementor_page_elements', 'elementor_page_content', 20 );
88
 
89
  $theme = get_option( 'template' );
90
  if ( 'GeneratePress' == $theme || 'generatepress' == $theme ) {
91
+ if ( ! function_exists( 'elementor_generate_title' ) ) {
92
+
93
+ function elementor_generate_title() {
94
+ if ( generate_show_title() ) :
95
+ ?>
96
+
97
+ <header class="entry-header">
98
+ <div class="grid-container">
99
+ <?php the_title( '<h1 class="entry-title" itemprop="headline">', '</h1>' ); ?>
100
+ </div>
101
+ </header><!-- .entry-header -->
102
 
103
+ <?php
104
+ endif;
105
+ }
106
  }
107
+ add_action( 'elementor_page_elements', 'elementor_generate_title', 10 );
108
  }
 
 
inc/settings.php CHANGED
@@ -1,61 +1,69 @@
1
  <?php
2
- $cpt_options = get_option('elcpt_options');
3
- $cpt_pts = isset($cpt_options['objects']) ? $cpt_options['objects'] : array();
4
  ?>
5
 
6
  <div class="wrap">
7
- <?php screen_icon('plugins'); ?>
8
- <h2><?php _e('Post Type Template Settings', 'elementemplater'); ?></h2>
9
- <?php if (isset($_GET['msg'])) : ?>
10
- <div id="message" class="updated below-h2">
11
- <?php if ($_GET['msg'] == 'update') : ?>
12
- <p><?php _e('Settings Updated.','elementemplater'); ?></p>
13
- <?php endif; ?>
14
- </div>
15
- <?php endif; ?>
16
-
17
- <form method="post">
18
-
19
- <?php if (function_exists('wp_nonce_field')) wp_nonce_field('nonce_elcpt'); ?>
20
-
21
- <div id="cpt_select_objects">
22
-
23
- <table class="form-table">
24
- <tbody>
25
- <tr valign="top">
26
- <p><?php _e('Check to Apply Templates to Custom Post Types', 'elementemplater') ?></p>
27
- </tr>
28
- <tr>
29
- <td>
30
- <?php
31
- $post_types = get_post_types(array(
32
- 'public' => true,
33
- ), 'objects');
34
-
35
- foreach ($post_types as $post_type) {
36
- if ($post_type->name == 'attachment' || $post_type->name == 'page')
37
- continue;
38
- ?>
39
- <label><input type="checkbox" name="objects[]" value="<?php echo $post_type->name; ?>" <?php
40
- if (isset($cpt_pts) && is_array($cpt_pts)) {
41
- if (in_array($post_type->name, $cpt_pts)) {
42
- echo 'checked="checked"';
43
- }
44
- }
45
- ?>>&nbsp;<?php echo $post_type->label; ?></label><br>
46
- <?php
47
- }
48
- ?>
49
- </td>
50
- </tr>
51
- </tbody>
52
- </table>
53
-
54
- </div>
55
-
56
- <p class="submit">
57
- <input id="submit" class="button button-primary" name="elcpt_submit" value="<?php _e('Save Changes', 'elementemplater'); ?>" type="submit">
58
- </p>
59
-
60
- </form>
61
- </div>
 
 
 
 
 
 
 
 
1
  <?php
2
+ $cpt_options = get_option( 'elcpt_options' );
3
+ $cpt_pts = isset( $cpt_options['objects'] ) ? $cpt_options['objects'] : array();
4
  ?>
5
 
6
  <div class="wrap">
7
+ <?php screen_icon( 'plugins' ); ?>
8
+ <h2><?php _e( 'Post Type Template Settings', 'elementor-templater' ); ?></h2>
9
+ <?php if ( isset( $_GET['msg'] ) ) : ?>
10
+ <div id="message" class="updated below-h2">
11
+ <?php if ( $_GET['msg'] == 'update' ) : ?>
12
+ <p><?php _e( 'Settings Updated.','elementor-templater' ); ?></p>
13
+ <?php endif; ?>
14
+ </div>
15
+ <?php endif; ?>
16
+
17
+ <form method="post">
18
+
19
+ <?php
20
+ if ( function_exists( 'wp_nonce_field' ) ) {
21
+ wp_nonce_field( 'nonce_elcpt' );}
22
+ ?>
23
+
24
+ <div id="cpt_select_objects">
25
+
26
+ <table class="form-table">
27
+ <tbody>
28
+ <tr valign="top">
29
+ <p><?php _e( 'Check to Apply Templates to Custom Post Types', 'elementor-templater' ); ?></p>
30
+ </tr>
31
+ <tr>
32
+ <td>
33
+ <?php
34
+ $post_types = get_post_types(
35
+ array(
36
+ 'public' => true,
37
+ ), 'objects'
38
+ );
39
+
40
+ foreach ( $post_types as $post_type ) {
41
+ if ( $post_type->name == 'attachment' || $post_type->name == 'page' ) {
42
+ continue;
43
+ }
44
+ ?>
45
+ <label><input type="checkbox" name="objects[]" value="<?php echo $post_type->name; ?>"
46
+ <?php
47
+ if ( isset( $cpt_pts ) && is_array( $cpt_pts ) ) {
48
+ if ( in_array( $post_type->name, $cpt_pts ) ) {
49
+ echo 'checked="checked"';
50
+ }
51
+ }
52
+ ?>
53
+ >&nbsp;<?php echo $post_type->label; ?></label><br>
54
+ <?php
55
+ }
56
+ ?>
57
+ </td>
58
+ </tr>
59
+ </tbody>
60
+ </table>
61
+
62
+ </div>
63
+
64
+ <p class="submit">
65
+ <input id="submit" class="button button-primary" name="elcpt_submit" value="<?php _e( 'Save Changes', 'elementor-templater' ); ?>" type="submit">
66
+ </p>
67
+
68
+ </form>
69
+ </div>
inc/themes/actions.php CHANGED
@@ -1,15 +1,15 @@
1
- <?php
2
- /* Support for the Actions theme */
3
- $style = '
4
- .page-template-builder-fullwidth .main-content-area .main,
5
- .page-template-builder-fullwidth-std .main-content-area .main {
6
- margin: 0 auto;
7
- width: 100%;
8
- max-width: 100%;
9
- }
10
- ';
11
- if ( is_child_theme() || !is_admin() ) {
12
- wp_add_inline_style( 'actions-child-style', $style );
13
- } else {
14
- wp_add_inline_style( 'actions-style', $style );
15
- }
1
+ <?php
2
+ /* Support for the Actions theme */
3
+ $style = '
4
+ .page-template-builder-fullwidth .main-content-area .main,
5
+ .page-template-builder-fullwidth-std .main-content-area .main {
6
+ margin: 0 auto;
7
+ width: 100%;
8
+ max-width: 100%;
9
+ }
10
+ ';
11
+ if ( is_child_theme() || ! is_admin() ) {
12
+ wp_add_inline_style( 'actions-child-style', $style );
13
+ } else {
14
+ wp_add_inline_style( 'actions-style', $style );
15
+ }
inc/themes/edge.php CHANGED
@@ -1,19 +1,19 @@
1
- <?php
2
- /* Support for the Virtue theme */
3
- $edge = '
4
- .page-template-builder-fullwidth-std #content {
5
- padding: 0;
6
- }
7
- .page-template-builder-fullwidth-std #content .container {
8
- max-width: 100%;
9
- }
10
- .page-template-builder-fullwidth-std .page-header {
11
- display: none;
12
- }
13
- @media only screen and (max-width: 1023px) {
14
- .page-template-builder-fullwidth-std #content .container {
15
- width: 100%;
16
- }
17
- }
18
- ';
19
- wp_add_inline_style( 'edge-style', $edge );
1
+ <?php
2
+ /* Support for the Virtue theme */
3
+ $edge = '
4
+ .page-template-builder-fullwidth-std #content {
5
+ padding: 0;
6
+ }
7
+ .page-template-builder-fullwidth-std #content .container {
8
+ max-width: 100%;
9
+ }
10
+ .page-template-builder-fullwidth-std .page-header {
11
+ display: none;
12
+ }
13
+ @media only screen and (max-width: 1023px) {
14
+ .page-template-builder-fullwidth-std #content .container {
15
+ width: 100%;
16
+ }
17
+ }
18
+ ';
19
+ wp_add_inline_style( 'edge-style', $edge );
inc/themes/enlightenment.php CHANGED
@@ -1,11 +1,11 @@
1
- <?php
2
- /* Support for the Actions theme */
3
- $style = '
4
- .elementor-body .site {
5
- overflow-x: visible;
6
- }
7
- .elementor-body .navbar-fixed-top {
8
- z-index: 1;
9
- }
10
- ';
11
- wp_add_inline_style( 'elementor-frontend', $style );
1
+ <?php
2
+ /* Support for the Actions theme */
3
+ $style = '
4
+ .elementor-body .site {
5
+ overflow-x: visible;
6
+ }
7
+ .elementor-body .navbar-fixed-top {
8
+ z-index: 1;
9
+ }
10
+ ';
11
+ wp_add_inline_style( 'elementor-frontend', $style );
inc/themes/experon.php CHANGED
@@ -1,14 +1,14 @@
1
- <?php
2
- /* Support for the Virtue theme */
3
- $experon = '
4
- .page-template-builder-fullwidth-std #content {
5
- padding: 0;
6
- }
7
- .page-template-builder-fullwidth-std #content-core {
8
- max-width: 100%;
9
- }
10
- .page-template-builder-fullwidth-std #intro {
11
- display: none;
12
- }
13
- ';
14
- wp_add_inline_style( 'thinkup-style', $experon );
1
+ <?php
2
+ /* Support for the Virtue theme */
3
+ $experon = '
4
+ .page-template-builder-fullwidth-std #content {
5
+ padding: 0;
6
+ }
7
+ .page-template-builder-fullwidth-std #content-core {
8
+ max-width: 100%;
9
+ }
10
+ .page-template-builder-fullwidth-std #intro {
11
+ display: none;
12
+ }
13
+ ';
14
+ wp_add_inline_style( 'thinkup-style', $experon );
inc/themes/generatepress.php CHANGED
@@ -1,11 +1,11 @@
1
- <?php
2
- /* Support for the GeneratePress theme */
3
- $style = '
4
- .entry-header {
5
- background-color: #fff;
6
- }
7
- .entry-header .grid-container {
8
- padding: 10px 10px;
9
- }
10
- ';
11
- wp_add_inline_style( 'generate-style', $style );
1
+ <?php
2
+ /* Support for the GeneratePress theme */
3
+ $style = '
4
+ .entry-header {
5
+ background-color: #fff;
6
+ }
7
+ .entry-header .grid-container {
8
+ padding: 10px 10px;
9
+ }
10
+ ';
11
+ wp_add_inline_style( 'generate-style', $style );
inc/themes/genesis.php CHANGED
@@ -1,24 +1,24 @@
1
- <?php
2
- /* Support for the Genesis theme */
3
- $genesis = '
4
- .page-template-builder-fullwidth .site-inner,
5
- .page-template-builder-fullwidth-std .site-inner {
6
- max-width: 100%;
7
- width: 100%;
8
- padding: 0;
9
- margin: 0;
10
- }
11
- .page-template-builder-fullwidth .elementor-page,
12
- .page-template-builder-fullwidth-std .elementor-page .site-inner {
13
- padding-top: 0;
14
- max-width: 100%;
15
- width: 100%;
16
- overflow: hidden;
17
- }
18
- @media only screen and (max-width: 860px) {
19
- .page-template-builder-fullwidth-std .site-inner {
20
- padding: 0;
21
- }
22
- }
23
- ';
24
- wp_add_inline_style( 'elementor-frontend', $genesis );
1
+ <?php
2
+ /* Support for the Genesis theme */
3
+ $genesis = '
4
+ .page-template-builder-fullwidth .site-inner,
5
+ .page-template-builder-fullwidth-std .site-inner {
6
+ max-width: 100%;
7
+ width: 100%;
8
+ padding: 0;
9
+ margin: 0;
10
+ }
11
+ .page-template-builder-fullwidth .elementor-page,
12
+ .page-template-builder-fullwidth-std .elementor-page .site-inner {
13
+ padding-top: 0;
14
+ max-width: 100%;
15
+ width: 100%;
16
+ overflow: hidden;
17
+ }
18
+ @media only screen and (max-width: 860px) {
19
+ .page-template-builder-fullwidth-std .site-inner {
20
+ padding: 0;
21
+ }
22
+ }
23
+ ';
24
+ wp_add_inline_style( 'elementor-frontend', $genesis );
inc/themes/storefront.php CHANGED
@@ -1,14 +1,14 @@
1
- <?php
2
- /* Support for the Storefront theme */
3
- $css = '
4
- .page-template-builder-fullwidth-std .site-content .col-full {
5
- max-width: 100%;
6
- padding: 0;
7
- margin: 0;
8
- }
9
-
10
- .page-template-builder-fullwidth-std .site-header {
11
- margin-bottom: 0;
12
- }
13
- ';
14
- wp_add_inline_style( 'storefront-style', $css );
1
+ <?php
2
+ /* Support for the Storefront theme */
3
+ $css = '
4
+ .page-template-builder-fullwidth-std .site-content .col-full {
5
+ max-width: 100%;
6
+ padding: 0;
7
+ margin: 0;
8
+ }
9
+
10
+ .page-template-builder-fullwidth-std .site-header {
11
+ margin-bottom: 0;
12
+ }
13
+ ';
14
+ wp_add_inline_style( 'storefront-style', $css );
inc/themes/sydney.php CHANGED
@@ -1,18 +1,18 @@
1
- <?php
2
- /* Support for the Storefront theme */
3
- $sydney = '
4
- .page-template-builder-fullwidth-std .page-wrap,
5
- .page-template-builder-fullwidth-std .page-wrap .content-wrapper {
6
- padding: 0;
7
- margin: 0;
8
- }
9
- .page-template-builder-fullwidth-std .elementor-page .page-wrap .container {
10
- width: 100%;
11
- overflow: hidden;
12
- }
13
- .page-template-builder-fullwidth-std .page .entry-header,
14
- .page-template-builder-fullwidth-std .page .entry-footer {
15
- display: none;
16
- }
17
- ';
18
- wp_add_inline_style( 'sydney-style', $sydney );
1
+ <?php
2
+ /* Support for the Storefront theme */
3
+ $sydney = '
4
+ .page-template-builder-fullwidth-std .page-wrap,
5
+ .page-template-builder-fullwidth-std .page-wrap .content-wrapper {
6
+ padding: 0;
7
+ margin: 0;
8
+ }
9
+ .page-template-builder-fullwidth-std .elementor-page .page-wrap .container {
10
+ width: 100%;
11
+ overflow: hidden;
12
+ }
13
+ .page-template-builder-fullwidth-std .page .entry-header,
14
+ .page-template-builder-fullwidth-std .page .entry-footer {
15
+ display: none;
16
+ }
17
+ ';
18
+ wp_add_inline_style( 'sydney-style', $sydney );
inc/themes/twentyfifteen.php CHANGED
@@ -1,23 +1,23 @@
1
- <?php
2
- /* Support for the Twenty Fifteen theme */
3
- $style = '
4
- body.page-template-builder-fullwidth:before {
5
- display: none;
6
- }
7
- .page-template-builder-fullwidth .site,
8
- .page-template-builder-fullwidth-std .site {
9
- max-width: 100%;
10
- margin: 0;
11
- }
12
- .page-template-builder-fullwidth .elementor-page {
13
- overflow: hidden;
14
- }
15
- body.page-template-builder-fullwidth-std:before {
16
- width: 29.4118%;
17
- }
18
- .page-template-builder-fullwidth-std .site-footer {
19
- width: 71%;
20
- margin-left: 29%;
21
- }
22
- ';
23
- wp_add_inline_style( 'twentyfifteen-style', $style );
1
+ <?php
2
+ /* Support for the Twenty Fifteen theme */
3
+ $style = '
4
+ body.page-template-builder-fullwidth:before {
5
+ display: none;
6
+ }
7
+ .page-template-builder-fullwidth .site,
8
+ .page-template-builder-fullwidth-std .site {
9
+ max-width: 100%;
10
+ margin: 0;
11
+ }
12
+ .page-template-builder-fullwidth .elementor-page {
13
+ overflow: hidden;
14
+ }
15
+ body.page-template-builder-fullwidth-std:before {
16
+ width: 29.4118%;
17
+ }
18
+ .page-template-builder-fullwidth-std .site-footer {
19
+ width: 71%;
20
+ margin-left: 29%;
21
+ }
22
+ ';
23
+ wp_add_inline_style( 'twentyfifteen-style', $style );
inc/themes/twentyfourteen.php CHANGED
@@ -1,15 +1,15 @@
1
- <?php
2
- /* Support for the Twenty Fourteen theme */
3
- $style = '
4
- .page-template-builder-fullwidth-std .elementor-page .site {
5
- max-width: 100%;
6
- overflow: hidden;
7
- }
8
- .page-template-builder-fullwidth-std .site::before {
9
- display: none;
10
- }
11
- .page-template-builder-fullwidth-std .site-header {
12
- max-width: 100%;
13
- }
14
- ';
15
- wp_add_inline_style( 'twentyfourteen-style', $style );
1
+ <?php
2
+ /* Support for the Twenty Fourteen theme */
3
+ $style = '
4
+ .page-template-builder-fullwidth-std .elementor-page .site {
5
+ max-width: 100%;
6
+ overflow: hidden;
7
+ }
8
+ .page-template-builder-fullwidth-std .site::before {
9
+ display: none;
10
+ }
11
+ .page-template-builder-fullwidth-std .site-header {
12
+ max-width: 100%;
13
+ }
14
+ ';
15
+ wp_add_inline_style( 'twentyfourteen-style', $style );
inc/themes/twentyseventeen.php CHANGED
@@ -1,17 +1,17 @@
1
- <?php
2
- /* Support for the Twenty Seventeen theme */
3
- $style = '
4
- .elementor-editor-active .site-content {
5
- padding: 2.5em 0 0;
6
- }
7
- .elementor-page .site-content {
8
- padding: 0;
9
- }
10
- .elementor-page.page:not(.home) #content {
11
- padding-bottom: 0;
12
- }
13
- .elementor-page .site-footer {
14
- margin-top: 0;
15
- }
16
- ';
17
- wp_add_inline_style( 'twentyseventeen-style', $style );
1
+ <?php
2
+ /* Support for the Twenty Seventeen theme */
3
+ $style = '
4
+ .elementor-editor-active .site-content {
5
+ padding: 2.5em 0 0;
6
+ }
7
+ .elementor-page .site-content {
8
+ padding: 0;
9
+ }
10
+ .elementor-page.page:not(.home) #content {
11
+ padding-bottom: 0;
12
+ }
13
+ .elementor-page .site-footer {
14
+ margin-top: 0;
15
+ }
16
+ ';
17
+ wp_add_inline_style( 'twentyseventeen-style', $style );
inc/themes/twentysixteen.php CHANGED
@@ -1,59 +1,59 @@
1
- <?php
2
- /* Support for the Twenty Sixteen theme */
3
- $style = '
4
- body.page-template-builder-fullwidth.elementor-page,
5
- body.page-template-builder-fullwidth-std.elementor-page {
6
- background: transparent;
7
- }
8
- .page-template-builder-fullwidth-std .site {
9
- margin: 0;
10
- }
11
- .page-template-builder-fullwidth .elementor-page,
12
- .page-template-builder-fullwidth-std .elementor-page {
13
- overflow: hidden;
14
- }
15
- .page-template-builder-fullwidth .full-width,
16
- .page-template-builder-fullwidth-std .full-width {
17
- width: 100%;
18
- }
19
- .page-template-builder-fullwidth .site-inner,
20
- .page-template-builder-fullwidth-std .site-inner {
21
- max-width: 100%;
22
- }
23
- .page-template-builder-fullwidth .site-content,
24
- .page-template-builder-fullwidth-std .site-content {
25
- padding: 0;
26
- }
27
- .page-template-builder-fullwidth header#masthead,
28
- .page-template-builder-fullwidth footer#colophon,
29
- .page-template-builder-fullwidth-std header#masthead,
30
- .page-template-builder-fullwidth-std footer#colophon {
31
- margin: 0 auto;
32
- max-width: 1320px;
33
- }
34
- .page-template-builder-fullwidth .entry-content,
35
- .page-template-builder-fullwidth-std .entry-content {
36
- margin-right: auto;
37
- margin-left: auto;
38
- }
39
- @media screen and (min-width: 56.875em) {
40
- .admin-bar .anchor-menu {
41
- top: 20px;
42
- }
43
- .admin-bar .anchor-menu-fixed.anchor-menu, .admin-bar .anchor-menu-fixed.elementor-widget-wp-widget-nav_menu {
44
- top: 54px !important;
45
- }
46
- .page-template-builder-fullwidth .entry-content,
47
- .page-template-builder-fullwidth-std .entry-content {
48
- margin-right: auto;
49
- margin-left: auto;
50
- }
51
- }
52
- @media screen and (min-width: 44.375em) {
53
- .page-template-builder-fullwidth .entry-content,
54
- .page-template-builder-fullwidth-std .entry-content {
55
- margin-right: auto;;
56
- }
57
- }
58
- ';
59
- wp_add_inline_style( 'twentysixteen-style', $style );
1
+ <?php
2
+ /* Support for the Twenty Sixteen theme */
3
+ $style = '
4
+ body.page-template-builder-fullwidth.elementor-page,
5
+ body.page-template-builder-fullwidth-std.elementor-page {
6
+ background: transparent;
7
+ }
8
+ .page-template-builder-fullwidth-std .site {
9
+ margin: 0;
10
+ }
11
+ .page-template-builder-fullwidth .elementor-page,
12
+ .page-template-builder-fullwidth-std .elementor-page {
13
+ overflow: hidden;
14
+ }
15
+ .page-template-builder-fullwidth .full-width,
16
+ .page-template-builder-fullwidth-std .full-width {
17
+ width: 100%;
18
+ }
19
+ .page-template-builder-fullwidth .site-inner,
20
+ .page-template-builder-fullwidth-std .site-inner {
21
+ max-width: 100%;
22
+ }
23
+ .page-template-builder-fullwidth .site-content,
24
+ .page-template-builder-fullwidth-std .site-content {
25
+ padding: 0;
26
+ }
27
+ .page-template-builder-fullwidth header#masthead,
28
+ .page-template-builder-fullwidth footer#colophon,
29
+ .page-template-builder-fullwidth-std header#masthead,
30
+ .page-template-builder-fullwidth-std footer#colophon {
31
+ margin: 0 auto;
32
+ max-width: 1320px;
33
+ }
34
+ .page-template-builder-fullwidth .entry-content,
35
+ .page-template-builder-fullwidth-std .entry-content {
36
+ margin-right: auto;
37
+ margin-left: auto;
38
+ }
39
+ @media screen and (min-width: 56.875em) {
40
+ .admin-bar .anchor-menu {
41
+ top: 20px;
42
+ }
43
+ .admin-bar .anchor-menu-fixed.anchor-menu, .admin-bar .anchor-menu-fixed.elementor-widget-wp-widget-nav_menu {
44
+ top: 54px !important;
45
+ }
46
+ .page-template-builder-fullwidth .entry-content,
47
+ .page-template-builder-fullwidth-std .entry-content {
48
+ margin-right: auto;
49
+ margin-left: auto;
50
+ }
51
+ }
52
+ @media screen and (min-width: 44.375em) {
53
+ .page-template-builder-fullwidth .entry-content,
54
+ .page-template-builder-fullwidth-std .entry-content {
55
+ margin-right: auto;;
56
+ }
57
+ }
58
+ ';
59
+ wp_add_inline_style( 'twentysixteen-style', $style );
inc/themes/twentythirteen.php CHANGED
@@ -1,17 +1,17 @@
1
- <?php
2
- /* Support for the Twenty Thirteen theme */
3
- $thirteen = '
4
- .page-template-builder-fullwidth-std .elementor-page .site {
5
- max-width: 100%;
6
- overflow: hidden;
7
- }
8
- .page-template-builder-fullwidth-std .site-header {
9
- max-width: 100%;
10
- background-size: 3200px auto;
11
- }
12
- .page-template-builder-fullwidth-std .navbar {
13
- max-width: 100%;
14
- width: 100%;
15
- }
16
- ';
17
- wp_add_inline_style( 'twentythirteen-style', $thirteen );
1
+ <?php
2
+ /* Support for the Twenty Thirteen theme */
3
+ $thirteen = '
4
+ .page-template-builder-fullwidth-std .elementor-page .site {
5
+ max-width: 100%;
6
+ overflow: hidden;
7
+ }
8
+ .page-template-builder-fullwidth-std .site-header {
9
+ max-width: 100%;
10
+ background-size: 3200px auto;
11
+ }
12
+ .page-template-builder-fullwidth-std .navbar {
13
+ max-width: 100%;
14
+ width: 100%;
15
+ }
16
+ ';
17
+ wp_add_inline_style( 'twentythirteen-style', $thirteen );
inc/themes/vantage.php CHANGED
@@ -1,15 +1,15 @@
1
- <?php
2
- /* Support for the Vantage theme */
3
- $vantage = '
4
- .page-template-builder-fullwidth-std #main {
5
- padding: 0;
6
- max-width: 100%;
7
- }
8
-
9
- .page-template-builder-fullwidth-std.responsive.layout-full #main .full-container {
10
- max-width: 100%;
11
- margin-left: auto;
12
- margin-right: auto;
13
- }
14
- ';
15
- wp_add_inline_style( 'vantage-style', $vantage );
1
+ <?php
2
+ /* Support for the Vantage theme */
3
+ $vantage = '
4
+ .page-template-builder-fullwidth-std #main {
5
+ padding: 0;
6
+ max-width: 100%;
7
+ }
8
+
9
+ .page-template-builder-fullwidth-std.responsive.layout-full #main .full-container {
10
+ max-width: 100%;
11
+ margin-left: auto;
12
+ margin-right: auto;
13
+ }
14
+ ';
15
+ wp_add_inline_style( 'vantage-style', $vantage );
inc/themes/virtue.php CHANGED
@@ -1,16 +1,16 @@
1
- <?php
2
- /* Support for the Virtue theme */
3
- $virtue = '
4
- .page-template-builder-fullwidth .headerclass,
5
- .page-template-builder-fullwidth .footerclass {
6
- display: none;
7
- }
8
- .page-template-builder-fullwidth .contentclass,
9
- .page-template-builder-fullwidth-std .contentclass {
10
- padding-bottom: 0;
11
- }
12
- .page-template-builder-fullwidth .contentclass {
13
- padding-top: 0;
14
- }
15
- ';
16
- wp_add_inline_style( 'kadence_theme', $virtue );
1
+ <?php
2
+ /* Support for the Virtue theme */
3
+ $virtue = '
4
+ .page-template-builder-fullwidth .headerclass,
5
+ .page-template-builder-fullwidth .footerclass {
6
+ display: none;
7
+ }
8
+ .page-template-builder-fullwidth .contentclass,
9
+ .page-template-builder-fullwidth-std .contentclass {
10
+ padding-bottom: 0;
11
+ }
12
+ .page-template-builder-fullwidth .contentclass {
13
+ padding-top: 0;
14
+ }
15
+ ';
16
+ wp_add_inline_style( 'kadence_theme', $virtue );
readme.md ADDED
@@ -0,0 +1,147 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Page Templater For Elementor #
2
+ **Contributors:** [themeisle](https://profiles.wordpress.org/themeisle), [codeinwp](https://profiles.wordpress.org/codeinwp)
3
+ **Tags:** elementor, pagebuilder, page builder, page builder template, page builder templates, actions, storefront, twentysixteen, genesis, template builder, builder templates
4
+ **Requires at least:** 4.4
5
+ **Tested up to:** 4.7.3
6
+ **License:** GPLv2 or later
7
+ **License URI:** http://www.gnu.org/licenses/gpl-2.0.html
8
+
9
+ A helper plugin for users of Elementor Page Builder
10
+
11
+ ## Description ##
12
+ This plugin does one and one thing only - adds page templates (plus css) to any theme for use with the [Elementor Page Builder](https://wordpress.org/plugins/elementor/)
13
+
14
+ Now includes support for custom menu to be used for anchor points on the full width blank template.
15
+
16
+ NEW: Support for custom post templates now included. Your theme/child theme must have custom post templates with in it for this function to work.
17
+
18
+ See the [FAQ](https://wordpress.org/plugins/elementor-templater/faq/) for details and a download link for an Actions Elementor ready child theme.
19
+
20
+ Adds 2 new templates for complete full width experience while using the page builder - support for a number of popular themes is built-in
21
+ - Template 1: Full width with header and footer : Builder Fullwidth Standard
22
+ - Template 2: Full width and no header or footer : Builder Fullwidth Blank
23
+
24
+ ## Supported Themes ##
25
+ The following themes are currently supported out of the box - if your desired theme is not list you may need to add some custom css.
26
+
27
+ * [Hestia](https://wordpress.org/themes/hestia/) - by ThemeIsle
28
+ * [Hestia Pro](https://themeisle.com/themes/hestia-pro/) - by Themeisle
29
+ * [Edge](https://wordpress.org/themes/edge/) - By themefreesia
30
+ * [Experon](https://wordpress.org/themes/experon/) - ThinkUpThemes
31
+ * [Genesis](http://my.studiopress.com/themes/genesis/) - By StudioPress
32
+ * [GeneratePress](https://wordpress.org/themes/generatepress/) - By Tom Usborne
33
+ * [Storefront](https://wordpress.org/themes/storefront/) - by WooThemes/Automattic
34
+ * [TwentyFourteen](https://wordpress.org/themes/twentyfourteen/) - by WordPress.org
35
+ * [TwentyFifteen](https://wordpress.org/themes/twentyfifteen/) - by WordPress.org
36
+ * [TwentySixteen](https://wordpress.org/themes/twentysixteen/) - by WordPress.org
37
+ * [TwentyThirteen](https://wordpress.org/themes/twentythirteen/) - by WordPress.org
38
+ * [TwentySeventeen](https://wordpress.org/themes/twentyseventeen/) - by WordPress.org
39
+ * [Vantage](https://wordpress.org/themes/vantage/) - by Greg Priday
40
+ * [Virtue](https://wordpress.org/themes/virtue/) - by Kadence Themes
41
+ * [Enlightenment](https://wordpress.org/themes/enlightenment/) - by Daniel Tara
42
+ * [Actions](https://wordpress.org/themes/actions/) - by WPDevHQ
43
+ * [ActionsPro](https://wpdevhq.com/themes/actions-pro/) - by WPDevHQ
44
+
45
+ If you are a theme author and would like to have your theme added to our supported list please provide details and we'll see what we can do.
46
+
47
+ If you find any issues with your particular theme not playing nice with the templates please let us know so that we can do our best
48
+ to accommodate you.
49
+
50
+ ## Installation ##
51
+ * These instructions assumes you already have a WordPress site and the Elementor plugin installed and activated.
52
+
53
+ 1. Install using the WordPress built-in Plugin installer, or Extract the zip file and drop the contents in the `wp-content/plugins/` directory of your WordPress installation.
54
+ 2. Activate the plugin through the 'Plugins' menu in WordPress.
55
+ 3. Go to Pages > Add New
56
+ 4. Select the desired template from the Page Attributes section
57
+ 4. Press the 'Edit with Elementor' button.
58
+ 5. Now you can drag and drop widgets from the left panel onto the content area, as well as add new sections and columns that make up the page structure which will be render in a full width layout.
59
+
60
+ ## Frequently Asked Questions ##
61
+
62
+ **With this plugin do I still need Elementor and a theme?**
63
+
64
+ Yes. This plugin acts as a helper or go between the Elementor Page builder and your current theme (including child themes) by facilitating the missing true full width templates.
65
+
66
+ **Will the templates work with any theme?**
67
+ Yes and No. The short answer is yes, you will be able to select the included templates. However, not all themes are supported in terms of the required styling and you may therefore need to add some custom css for your desired theme.
68
+
69
+ **Why a blank template?**
70
+ Ever wanted to build Landing pages, sales pages or display specific pages without the clutter and distraction of header items, sidebar widgets and footer items? Now you can.
71
+
72
+ **I see that support for anchor menu has been added, what is this?**
73
+ Anchors a point on a template that are attached to a specific menu item - upon click on the menu item the anchor position will scroll in to the viewport.
74
+
75
+ **How do I use this new feature?**
76
+ Please visit [Build With Elementor: Anchor Menus](http://buildwithelementor.com/custom-menu/) to get an over view of how it all works.
77
+
78
+ ** I've update to version 1.0.2 but don't see the templates for posts, why?**
79
+ As with the current state of WordPress, custom post templates are only supported via themes and not plugins.
80
+ To be able to use the new feature your theme needs to have a template with the tag "Post Template Name: TemplateName".
81
+ If your theme does not have any templates you can copy the sample templates provided in the folder templates/sample-post-templates in this plugin.
82
+ To understand how this works please download the free child theme for Actions from here: [Actions Child](http://buildwithelementor.com/blog/actions-elementor-child-theme/) - this can be used out of the box if desired.
83
+
84
+ Further details will be available near the time of the release.
85
+
86
+ ## Screenshots ##
87
+
88
+ 1. Fullwidth with Header and Footer
89
+
90
+ 2. Fullwidth no Header no Footer
91
+
92
+ ## Changelog ##
93
+ ### 1.2.0 - 2017-09-29 ###
94
+
95
+ * ---
96
+ * Added Themeisle SDK.
97
+ * Added Continuous Integration.
98
+ * Changed contributors.
99
+
100
+
101
+ ### 1.1.3 ###
102
+ * Enabled support for Elementor Library Post Type on the sample post templates.
103
+
104
+ ### 1.1.2 ###
105
+ * FIXED: JS Bug where the mobile menu toggle was not working for certain themes
106
+
107
+ ### 1.1.1 ###
108
+ * Plugin name change due to a stipulation on Elementor's Terms & Conditions
109
+ * Added GeneratePress to the supported themes list
110
+
111
+ ### 1.1.0 ###
112
+ * CSS adjustment to support for Hello Pro - Genesis child theme.
113
+
114
+ ### 1.0.9 ###
115
+ * Adjustments to Genesis CSS full width support
116
+ * Adjustments to TwentySeventeen CSS full width support
117
+
118
+ ### 1.0.8 ###
119
+ * Fixed issue with template loading for WordPress 4.7 due to functional changes to accommodate the new template for post types.
120
+ * Added support for the Enlightenment theme.
121
+ * Fixed: Appearance of site border
122
+ caused by .site {margin:21px} in TwentySixteen theme after updating to Elementor 0.11.1 [Topic: 8450675](https://wordpress.org/support/topic/elementor-fullwidth-standard-padding-errer/)
123
+ * Wrapped custom post type function with a conditional check on WP version due to the upcoming post type template support - support to be deprecated!
124
+
125
+ ### 1.0.7 ###
126
+ * Further CSS enhancement for TwentySixteen - resolve the issue with top/bottom background showing through on both templates
127
+
128
+ ### 1.0.6 ###
129
+ * Added strict check for GeneratePress as the active theme for previous update in order to avoid fatal error on title check
130
+
131
+ ### 1.0.5 ###
132
+ * NEW: Added support for GeneratePress page title options - title is now shown by default on the full width template and can be disabled via GeneratePress page options.
133
+
134
+ ### 1.0.4 ###
135
+ * FIXED: Bug on hidden Elementor section selector tabs while in edit mode [See This Forum Topic](https://wordpress.org/support/topic/column-and-section-tabs-missing/)
136
+
137
+ ### 1.0.3 ###
138
+ * FIXED: Class clash with the Template for Custom Post Types plugin
139
+
140
+ ### 1.0.2 ###
141
+ * NEW: Added support for custom post templates - supports all custom post types including Elementor Library.
142
+
143
+ ### 1.0.1 ###
144
+ * NEW: Added support to use the custom menu widget on full width blank template - ideal for anchor menus
145
+
146
+ ### 1.0.0 ###
147
+ * Initial release.
readme.txt CHANGED
@@ -1,9 +1,8 @@
1
  === Page Templater For Elementor ===
2
- Contributors: WPDevHQ
3
  Tags: elementor, pagebuilder, page builder, page builder template, page builder templates, actions, storefront, twentysixteen, genesis, template builder, builder templates
4
  Requires at least: 4.4
5
  Tested up to: 4.7.3
6
- Stable tag: 1.1.3
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -24,8 +23,9 @@ Adds 2 new templates for complete full width experience while using the page bui
24
 
25
  == Supported Themes ==
26
  The following themes are currently supported out of the box - if your desired theme is not list you may need to add some custom css.
27
- * [Actions](https://wordpress.org/themes/actions/) - by WPDevHQ
28
- * [ActionsPro](https://wpdevhq.com/themes/actions-pro/) - by WPDevHQ
 
29
  * [Edge](https://wordpress.org/themes/edge/) - By themefreesia
30
  * [Experon](https://wordpress.org/themes/experon/) - ThinkUpThemes
31
  * [Genesis](http://my.studiopress.com/themes/genesis/) - By StudioPress
@@ -38,11 +38,13 @@ The following themes are currently supported out of the box - if your desired th
38
  * [TwentySeventeen](https://wordpress.org/themes/twentyseventeen/) - by WordPress.org
39
  * [Vantage](https://wordpress.org/themes/vantage/) - by Greg Priday
40
  * [Virtue](https://wordpress.org/themes/virtue/) - by Kadence Themes
41
- * [Enlightenment](https://wordpress.org/themes/enlightenment/) - by Daniel Tara
 
 
42
 
43
  If you are a theme author and would like to have your theme added to our supported list please provide details and we'll see what we can do.
44
 
45
- If you find any issues with your particula theme not playing nice with the templates please let us know so that we can do our best
46
  to accommodate you.
47
 
48
  == Installation ==
@@ -65,7 +67,7 @@ Yes. This plugin acts as a helper or go between the Elementor Page builder and y
65
  Yes and No. The short answer is yes, you will be able to select the included templates. However, not all themes are supported in terms of the required styling and you may therefore need to add some custom css for your desired theme.
66
 
67
  **Why a blank template?**
68
- Ever wanted to build Landing pages, sales pages or display specific pages without the clutter and distruction of header items, sidebar widgets and footer items? Now you can.
69
 
70
  **I see that support for anchor menu has been added, what is this?**
71
  Anchors a point on a template that are attached to a specific menu item - upon click on the menu item the anchor position will scroll in to the viewport.
@@ -88,6 +90,14 @@ Further details will be available near the time of the release.
88
  2. Fullwidth no Header no Footer
89
 
90
  == Changelog ==
 
 
 
 
 
 
 
 
91
  = 1.1.3 =
92
  * Enabled support for Elementor Library Post Type on the sample post templates.
93
 
@@ -106,13 +116,14 @@ Further details will be available near the time of the release.
106
  * Adjustments to TwentySeventeen CSS full width support
107
 
108
  = 1.0.8 =
109
- * Fixed issue with template loading for WordPress 4.7 due to functional changes to accomodate the new template for post types.
110
- * Added support for the Enlightenmen theme.
111
- * Fixed: Appearance of site boder caused by .site {margin:21px} in TwentySixteen theme after updating to Elementor 0.11.1 [Topic: 8450675](https://wordpress.org/support/topic/elementor-fullwidth-standard-padding-errer/)
 
112
  * Wrapped custom post type function with a conditional check on WP version due to the upcoming post type template support - support to be deprecated!
113
 
114
  = 1.0.7 =
115
- * Further CSS enhancement for TwentySixteen - resolve the issue with top/bottom baground showing through on both templates
116
 
117
  = 1.0.6 =
118
  * Added strict check for GeneratePress as the active theme for previous update in order to avoid fatal error on title check
@@ -121,7 +132,7 @@ Further details will be available near the time of the release.
121
  * NEW: Added support for GeneratePress page title options - title is now shown by default on the full width template and can be disabled via GeneratePress page options.
122
 
123
  = 1.0.4 =
124
- * FIXED: Bug on hidden Elementor section seletor tabs while in edit mode [See This Forum Topic](https://wordpress.org/support/topic/column-and-section-tabs-missing/)
125
 
126
  = 1.0.3 =
127
  * FIXED: Class clash with the Template for Custom Post Types plugin
1
  === Page Templater For Elementor ===
2
+ Contributors: themeisle, codeinwp
3
  Tags: elementor, pagebuilder, page builder, page builder template, page builder templates, actions, storefront, twentysixteen, genesis, template builder, builder templates
4
  Requires at least: 4.4
5
  Tested up to: 4.7.3
 
6
  License: GPLv2 or later
7
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
8
 
23
 
24
  == Supported Themes ==
25
  The following themes are currently supported out of the box - if your desired theme is not list you may need to add some custom css.
26
+
27
+ * [Hestia](https://wordpress.org/themes/hestia/) - by ThemeIsle
28
+ * [Hestia Pro](https://themeisle.com/themes/hestia-pro/) - by Themeisle
29
  * [Edge](https://wordpress.org/themes/edge/) - By themefreesia
30
  * [Experon](https://wordpress.org/themes/experon/) - ThinkUpThemes
31
  * [Genesis](http://my.studiopress.com/themes/genesis/) - By StudioPress
38
  * [TwentySeventeen](https://wordpress.org/themes/twentyseventeen/) - by WordPress.org
39
  * [Vantage](https://wordpress.org/themes/vantage/) - by Greg Priday
40
  * [Virtue](https://wordpress.org/themes/virtue/) - by Kadence Themes
41
+ * [Enlightenment](https://wordpress.org/themes/enlightenment/) - by Daniel Tara
42
+ * [Actions](https://wordpress.org/themes/actions/) - by WPDevHQ
43
+ * [ActionsPro](https://wpdevhq.com/themes/actions-pro/) - by WPDevHQ
44
 
45
  If you are a theme author and would like to have your theme added to our supported list please provide details and we'll see what we can do.
46
 
47
+ If you find any issues with your particular theme not playing nice with the templates please let us know so that we can do our best
48
  to accommodate you.
49
 
50
  == Installation ==
67
  Yes and No. The short answer is yes, you will be able to select the included templates. However, not all themes are supported in terms of the required styling and you may therefore need to add some custom css for your desired theme.
68
 
69
  **Why a blank template?**
70
+ Ever wanted to build Landing pages, sales pages or display specific pages without the clutter and distraction of header items, sidebar widgets and footer items? Now you can.
71
 
72
  **I see that support for anchor menu has been added, what is this?**
73
  Anchors a point on a template that are attached to a specific menu item - upon click on the menu item the anchor position will scroll in to the viewport.
90
  2. Fullwidth no Header no Footer
91
 
92
  == Changelog ==
93
+ = 1.2.0 - 2017-09-29 =
94
+
95
+ * ---
96
+ * Added Themeisle SDK.
97
+ * Added Continuous Integration.
98
+ * Changed contributors.
99
+
100
+
101
  = 1.1.3 =
102
  * Enabled support for Elementor Library Post Type on the sample post templates.
103
 
116
  * Adjustments to TwentySeventeen CSS full width support
117
 
118
  = 1.0.8 =
119
+ * Fixed issue with template loading for WordPress 4.7 due to functional changes to accommodate the new template for post types.
120
+ * Added support for the Enlightenment theme.
121
+ * Fixed: Appearance of site border
122
+ caused by .site {margin:21px} in TwentySixteen theme after updating to Elementor 0.11.1 [Topic: 8450675](https://wordpress.org/support/topic/elementor-fullwidth-standard-padding-errer/)
123
  * Wrapped custom post type function with a conditional check on WP version due to the upcoming post type template support - support to be deprecated!
124
 
125
  = 1.0.7 =
126
+ * Further CSS enhancement for TwentySixteen - resolve the issue with top/bottom background showing through on both templates
127
 
128
  = 1.0.6 =
129
  * Added strict check for GeneratePress as the active theme for previous update in order to avoid fatal error on title check
132
  * NEW: Added support for GeneratePress page title options - title is now shown by default on the full width template and can be disabled via GeneratePress page options.
133
 
134
  = 1.0.4 =
135
+ * FIXED: Bug on hidden Elementor section selector tabs while in edit mode [See This Forum Topic](https://wordpress.org/support/topic/column-and-section-tabs-missing/)
136
 
137
  = 1.0.3 =
138
  * FIXED: Class clash with the Template for Custom Post Types plugin
templates/builder-fullwidth-std.php CHANGED
@@ -7,8 +7,8 @@
7
  * using this plugin.
8
  *
9
  * @package ET
10
- * @since 1.0.0
11
- * @version 1.0.0
12
  */
13
 
14
- elementor_pagebuilder();
7
  * using this plugin.
8
  *
9
  * @package ET
10
+ * @since 1.0.0
11
+ * @version 1.0.0
12
  */
13
 
14
+ elementor_pagebuilder();
templates/builder-fullwidth.php CHANGED
@@ -7,8 +7,8 @@
7
  * using this plugin.
8
  *
9
  * @package ET
10
- * @since 1.0.0
11
- * @version 1.0.0
12
  */
13
-
14
- elementor_blankpb();
7
  * using this plugin.
8
  *
9
  * @package ET
10
+ * @since 1.0.0
11
+ * @version 1.0.0
12
  */
13
+
14
+ elementor_blankpb();
templates/sample-post-templates/fullwidth-single.php CHANGED
@@ -7,8 +7,8 @@
7
  * using this plugin.
8
  *
9
  * @package ET
10
- * @since 1.0.0
11
- * @version 1.0.0
12
  */
13
-
14
- elementor_blankpb();
7
  * using this plugin.
8
  *
9
  * @package ET
10
+ * @since 1.0.0
11
+ * @version 1.0.0
12
  */
13
+
14
+ elementor_blankpb();
templates/sample-post-templates/fullwidth-std-single.php CHANGED
@@ -7,8 +7,8 @@
7
  * using this plugin.
8
  *
9
  * @package ET
10
- * @since 1.0.0
11
- * @version 1.0.0
12
  */
13
 
14
- elementor_pagebuilder();
7
  * using this plugin.
8
  *
9
  * @package ET
10
+ * @since 1.0.0
11
+ * @version 1.0.0
12
  */
13
 
14
+ elementor_pagebuilder();