Essential Content Types - Version 1.8

Version Description

(Released: March 17, 2020) = * Compatibility check up to version 5.4

Download this release

Release Info

Developer catchthemes
Plugin Icon Essential Content Types
Version 1.8
Comparing to
See all releases

Code changes from version 1.7 to 1.8

README.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: catchplugins, catchthemes, sakinshrestha, pratikshrestha, maheshma
3
  Donate link: https://catchplugins.com/plugins/essential-content-types-pro/
4
  Tags: custom post types, CPT, CMS, post, types, post type, taxonomy, tax, custom, content types, post types, custom content types, testimonial, portfolio, featured content, service
5
  Requires at least: 4.8
6
- Tested up to: 5.3
7
  Stable tag: trunk
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
@@ -194,6 +194,9 @@ Not so easy way (via FTP) :
194
  5. Customizer: Services Archive Options
195
 
196
  == Changelog ==
 
 
 
197
  = 1.7 (Released: November 12, 2019) =
198
  * Compatibility check up to version 5.3
199
 
3
  Donate link: https://catchplugins.com/plugins/essential-content-types-pro/
4
  Tags: custom post types, CPT, CMS, post, types, post type, taxonomy, tax, custom, content types, post types, custom content types, testimonial, portfolio, featured content, service
5
  Requires at least: 4.8
6
+ Tested up to: 5.4
7
  Stable tag: trunk
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
194
  5. Customizer: Services Archive Options
195
 
196
  == Changelog ==
197
+ = 1.8 (Released: March 17, 2020) =
198
+ * Compatibility check up to version 5.4
199
+
200
  = 1.7 (Released: November 12, 2019) =
201
  * Compatibility check up to version 5.3
202
 
essential-content-types.php CHANGED
@@ -16,7 +16,7 @@
16
  * Plugin Name: Essential Content Types
17
  * Plugin URI: https://catchplugins.com/plugins/essential-content-types/
18
  * Description: Essential Content Types allows you to feature the impressive content through different content/post types on your website just the way you want it. These content/post types are missed by the themes in WordPress Theme Directory as the feature falls more towards the plugins’ territory.
19
- * Version: 1.7
20
  * Author: Catch Plugins
21
  * Author URI: https://catchplugins.com
22
  * License: GPL-3.0+
@@ -31,25 +31,28 @@ if ( ! defined( 'WPINC' ) ) {
31
  }
32
 
33
  // Define Version
34
- define( 'ESSENTIAL_CONTENT_TYPES_VERSION', '1.7' );
35
 
36
  /**
37
  * The code that runs during plugin activation.
38
  * This action is documented in includes/class-essential-content-types-activator.php
39
  */
40
  // The URL of the directory that contains the plugin
41
- if ( !defined( 'ESSENTIAL_CONTENT_TYPES_URL' ) )
42
  define( 'ESSENTIAL_CONTENT_TYPES_URL', plugin_dir_url( __FILE__ ) );
 
43
 
44
 
45
  // The absolute path of the directory that contains the file
46
- if ( !defined( 'ESSENTIAL_CONTENT_TYPES_PATH' ) )
47
  define( 'ESSENTIAL_CONTENT_TYPES_PATH', plugin_dir_path( __FILE__ ) );
 
48
 
49
 
50
  // Gets the path to a plugin file or directory, relative to the plugins directory, without the leading and trailing slashes.
51
- if ( !defined( 'ESSENTIAL_CONTENT_TYPES_BASENAME' ) )
52
  define( 'ESSENTIAL_CONTENT_TYPES_BASENAME', plugin_basename( __FILE__ ) );
 
53
 
54
  /**
55
  * Make plugin available for translation
@@ -102,7 +105,7 @@ function run_essential_content_types() {
102
  run_essential_content_types();
103
 
104
 
105
- if( ! function_exists( 'ect_get_layout' ) ) :
106
  function ect_get_layout() {
107
  $layout = array(
108
  '1' => 'layout-one',
@@ -117,70 +120,70 @@ if( ! function_exists( 'ect_get_layout' ) ) :
117
  endif;
118
 
119
 
120
- if( ! function_exists( 'ect_plugin_path' ) ) :
121
- /**
122
- * Get the plugin path.
123
- *
124
- * @return string
125
- */
126
- function ect_plugin_path() {
127
- return untrailingslashit( plugin_dir_path( __FILE__ ) );
128
- }
129
  endif;
130
 
131
 
132
- if( ! function_exists( 'ect_template_path' ) ) :
133
- /**
134
- * Get the template path.
135
- *
136
- * @return string
137
- */
138
- function ect_template_path() {
139
- return apply_filters( 'ect_template_path', 'ect-templates/' );
140
- }
141
  endif;
142
 
143
 
144
- if( ! function_exists( 'ect_get_template_part' ) ) :
145
- /**
146
- * Get template part (for templates like the shop-loop).
147
- *
148
- *
149
- * @access public
150
- * @param mixed $slug Template slug.
151
- * @param string $name Template name (default: '').
152
- * @param array $atts Options to pass into template.
153
- */
154
- function ect_get_template_part( $slug, $name = '', $atts ) {
155
-
156
- $template = '';
157
- set_query_var( 'atts', $atts );
158
-
159
- // Look in yourtheme/slug-name.php and yourtheme/ect-templates/slug-name.php.
160
- if ( $name ) {
161
- $template = locate_template( array( "{$slug}-{$name}.php", ect_template_path() . "{$slug}-{$name}.php" ) );
162
- }
163
-
164
- // Get default slug-name.php.
165
- if ( empty( $template ) && $name && file_exists( ect_plugin_path() . '/' . ect_template_path() ."{$slug}-{$name}.php" ) ) {
166
- $template = ect_plugin_path() . '/' . ect_template_path() . "{$slug}-{$name}.php";
167
- }
168
-
169
- // If template file doesn't exist, look in yourtheme/slug.php and yourtheme/ect-templates/slug.php.
170
- if ( ! $template ) {
171
- $template = locate_template( array( "{$slug}.php", ect_template_path() . "{$slug}.php" ) );
172
- }
173
-
174
- // Allow 3rd party plugins to filter template file from their plugin.
175
- $template = apply_filters( 'ect_get_template_part', $template, $slug, $name );
176
-
177
- if ( $template ) {
178
- load_template( $template, false, 'atts' );
179
- }
180
- }
181
  endif;
182
 
183
- function ect_body_classes( $classes ){
184
  $classes[] = 'ect-post';
185
  return $classes;
186
  }
@@ -189,9 +192,9 @@ add_filter( 'body_class', 'ect_body_classes' );
189
  require plugin_dir_path( __FILE__ ) . '/includes/ctp-tabs-removal.php';
190
 
191
  $ctp_options = ctp_get_options();
192
- if( 1 == $ctp_options['theme_plugin_tabs'] ) {
193
  /* Adds Catch Themes tab in Add theme page and Themes by Catch Themes in Customizer's change theme option. */
194
- if( ! class_exists( 'CatchThemesThemePlugin' ) && ! function_exists( 'add_our_plugins_tab' ) ) {
195
  require plugin_dir_path( __FILE__ ) . '/includes/CatchThemesThemePlugin.php';
196
  }
197
- }
16
  * Plugin Name: Essential Content Types
17
  * Plugin URI: https://catchplugins.com/plugins/essential-content-types/
18
  * Description: Essential Content Types allows you to feature the impressive content through different content/post types on your website just the way you want it. These content/post types are missed by the themes in WordPress Theme Directory as the feature falls more towards the plugins’ territory.
19
+ * Version: 1.8
20
  * Author: Catch Plugins
21
  * Author URI: https://catchplugins.com
22
  * License: GPL-3.0+
31
  }
32
 
33
  // Define Version
34
+ define( 'ESSENTIAL_CONTENT_TYPES_VERSION', '1.8' );
35
 
36
  /**
37
  * The code that runs during plugin activation.
38
  * This action is documented in includes/class-essential-content-types-activator.php
39
  */
40
  // The URL of the directory that contains the plugin
41
+ if ( ! defined( 'ESSENTIAL_CONTENT_TYPES_URL' ) ) {
42
  define( 'ESSENTIAL_CONTENT_TYPES_URL', plugin_dir_url( __FILE__ ) );
43
+ }
44
 
45
 
46
  // The absolute path of the directory that contains the file
47
+ if ( ! defined( 'ESSENTIAL_CONTENT_TYPES_PATH' ) ) {
48
  define( 'ESSENTIAL_CONTENT_TYPES_PATH', plugin_dir_path( __FILE__ ) );
49
+ }
50
 
51
 
52
  // Gets the path to a plugin file or directory, relative to the plugins directory, without the leading and trailing slashes.
53
+ if ( ! defined( 'ESSENTIAL_CONTENT_TYPES_BASENAME' ) ) {
54
  define( 'ESSENTIAL_CONTENT_TYPES_BASENAME', plugin_basename( __FILE__ ) );
55
+ }
56
 
57
  /**
58
  * Make plugin available for translation
105
  run_essential_content_types();
106
 
107
 
108
+ if ( ! function_exists( 'ect_get_layout' ) ) :
109
  function ect_get_layout() {
110
  $layout = array(
111
  '1' => 'layout-one',
120
  endif;
121
 
122
 
123
+ if ( ! function_exists( 'ect_plugin_path' ) ) :
124
+ /**
125
+ * Get the plugin path.
126
+ *
127
+ * @return string
128
+ */
129
+ function ect_plugin_path() {
130
+ return untrailingslashit( plugin_dir_path( __FILE__ ) );
131
+ }
132
  endif;
133
 
134
 
135
+ if ( ! function_exists( 'ect_template_path' ) ) :
136
+ /**
137
+ * Get the template path.
138
+ *
139
+ * @return string
140
+ */
141
+ function ect_template_path() {
142
+ return apply_filters( 'ect_template_path', 'ect-templates/' );
143
+ }
144
  endif;
145
 
146
 
147
+ if ( ! function_exists( 'ect_get_template_part' ) ) :
148
+ /**
149
+ * Get template part (for templates like the shop-loop).
150
+ *
151
+ *
152
+ * @access public
153
+ * @param mixed $slug Template slug.
154
+ * @param string $name Template name (default: '').
155
+ * @param array $atts Options to pass into template.
156
+ */
157
+ function ect_get_template_part( $slug, $name = '', $atts ) {
158
+
159
+ $template = '';
160
+ set_query_var( 'atts', $atts );
161
+
162
+ // Look in yourtheme/slug-name.php and yourtheme/ect-templates/slug-name.php.
163
+ if ( $name ) {
164
+ $template = locate_template( array( "{$slug}-{$name}.php", ect_template_path() . "{$slug}-{$name}.php" ) );
165
+ }
166
+
167
+ // Get default slug-name.php.
168
+ if ( empty( $template ) && $name && file_exists( ect_plugin_path() . '/' . ect_template_path() . "{$slug}-{$name}.php" ) ) {
169
+ $template = ect_plugin_path() . '/' . ect_template_path() . "{$slug}-{$name}.php";
170
+ }
171
+
172
+ // If template file doesn't exist, look in yourtheme/slug.php and yourtheme/ect-templates/slug.php.
173
+ if ( ! $template ) {
174
+ $template = locate_template( array( "{$slug}.php", ect_template_path() . "{$slug}.php" ) );
175
+ }
176
+
177
+ // Allow 3rd party plugins to filter template file from their plugin.
178
+ $template = apply_filters( 'ect_get_template_part', $template, $slug, $name );
179
+
180
+ if ( $template ) {
181
+ load_template( $template, false, 'atts' );
182
+ }
183
+ }
184
  endif;
185
 
186
+ function ect_body_classes( $classes ) {
187
  $classes[] = 'ect-post';
188
  return $classes;
189
  }
192
  require plugin_dir_path( __FILE__ ) . '/includes/ctp-tabs-removal.php';
193
 
194
  $ctp_options = ctp_get_options();
195
+ if ( 1 == $ctp_options['theme_plugin_tabs'] ) {
196
  /* Adds Catch Themes tab in Add theme page and Themes by Catch Themes in Customizer's change theme option. */
197
+ if ( ! class_exists( 'CatchThemesThemePlugin' ) && ! function_exists( 'add_our_plugins_tab' ) ) {
198
  require plugin_dir_path( __FILE__ ) . '/includes/CatchThemesThemePlugin.php';
199
  }
200
+ }
languages/essential-content-types.pot CHANGED
@@ -1,11 +1,11 @@
1
- # Copyright (C) 2018 Catch Plugins
2
  # This file is distributed under the GNU General Public License v2 or later.
3
  #, fuzzy
4
  msgid ""
5
  msgstr ""
6
  "Project-Id-Version: Essential Content Types\n"
7
  "Report-Msgid-Bugs-To: https://wordpress.org/tags/_s\n"
8
- "POT-Creation-Date: 2019-11-12 00:44-0800\n"
9
  "PO-Revision-Date: 2016-12-12 09:23-0500\n"
10
  "Last-Translator: Sakin Shrestha <info@catchplugins.com>\n"
11
  "Language-Team: Catch Plugins <info@catchplugins.com>\n"
@@ -14,7 +14,7 @@ msgstr ""
14
  "Content-Type: text/plain; charset=UTF-8\n"
15
  "Content-Transfer-Encoding: 8bit\n"
16
  "Plural-Forms: nplurals=2; plural=n != 1;\n"
17
- "X-Generator: Poedit 2.2.4\n"
18
  "X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;esc_attr_e;esc_attr__;_nx;_x;"
19
  "esc_html_e;esc_html__;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_n_noop:1,2;"
20
  "__ngettext_noop:1,2;_c,_nc:4c,1,2\n"
@@ -1799,7 +1799,7 @@ msgstr ""
1799
  msgid "check our free plugins."
1800
  msgstr ""
1801
 
1802
- #: ../essential-content-types.php:61
1803
  #, php-format
1804
  msgid ""
1805
  "Sorry, Pro plugin is already active. No need to activate Free version. "
1
+ # Copyright (C) 2018-2020 Catch Plugins
2
  # This file is distributed under the GNU General Public License v2 or later.
3
  #, fuzzy
4
  msgid ""
5
  msgstr ""
6
  "Project-Id-Version: Essential Content Types\n"
7
  "Report-Msgid-Bugs-To: https://wordpress.org/tags/_s\n"
8
+ "POT-Creation-Date: 2020-03-17 19:17-0700\n"
9
  "PO-Revision-Date: 2016-12-12 09:23-0500\n"
10
  "Last-Translator: Sakin Shrestha <info@catchplugins.com>\n"
11
  "Language-Team: Catch Plugins <info@catchplugins.com>\n"
14
  "Content-Type: text/plain; charset=UTF-8\n"
15
  "Content-Transfer-Encoding: 8bit\n"
16
  "Plural-Forms: nplurals=2; plural=n != 1;\n"
17
+ "X-Generator: Poedit 2.3\n"
18
  "X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;esc_attr_e;esc_attr__;_nx;_x;"
19
  "esc_html_e;esc_html__;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_n_noop:1,2;"
20
  "__ngettext_noop:1,2;_c,_nc:4c,1,2\n"
1799
  msgid "check our free plugins."
1800
  msgstr ""
1801
 
1802
+ #: ../essential-content-types.php:64
1803
  #, php-format
1804
  msgid ""
1805
  "Sorry, Pro plugin is already active. No need to activate Free version. "