Version Description
- Added: Screenshots: Services Archive Option
- Bug Fixed: Services Archive option in Customizer
- Bug Fixed: Link to Services Archive option in Dashboard
Download this release
Release Info
Developer | catchthemes |
Plugin | Essential Content Types |
Version | 1.0.6 |
Comparing to | |
See all releases |
Code changes from version 1.0.3 to 1.0.6
- README.txt +48 -9
- admin/class-essential-content-types-admin.php +15 -5
- admin/class-featured-content.php +2 -2
- admin/class-portfolio.php +1 -1
- admin/class-service.php +713 -0
- admin/class-testimonial.php +114 -4
- admin/css/essential-content-types-admin.css +15 -8
- admin/css/service-shortcode.css +131 -0
- admin/partials/dashboard-display.php +38 -6
- essential-content-types.php +1 -1
- includes/class-essential-content-types-activator.php +2 -1
- includes/class-essential-content-types.php +2 -2
- languages/essential-content-types.pot +273 -25
README.txt
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
-
===
|
2 |
Contributors: catchthemes, sakinshrestha, pratikshrestha, maheshmaharjan
|
3 |
Donate link: https://catchthemes.com/donate/
|
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
|
5 |
Requires at least: 4.5
|
6 |
Tested up to: 4.8
|
7 |
Stable tag: trunk
|
@@ -19,9 +19,10 @@ Content is at the forefront of any website. Changing the layout of your importan
|
|
19 |
Additionally, switching themes changes your website layout completely. Therefore, to keep things looking spic-and- span in your website, we bring you Essential Content.
|
20 |
|
21 |
Essential Content allows you to add up to three content/post types:
|
22 |
-
* Portfolio – Create and display your portfolio on your website
|
23 |
-
* Testimonials – Add customer testimonials to your website
|
24 |
-
* Featured Content – Display the content you want as featured content on
|
|
|
25 |
|
26 |
Features of Essential Content:
|
27 |
* Enable/Disable any content/post type as needed
|
@@ -58,7 +59,7 @@ Next, add the [portfolio] shortcode to a post or page. The shortcode will displa
|
|
58 |
* orderby: sort projects by different criteria, including author name, project title, and even rand to display in a random order. Defaults to sorting by date. (author, date, title, rand)
|
59 |
|
60 |
**Example**
|
61 |
-
[portfolio display_types=true display_tags=false include_type=grooming-tips,best-kitties columns=2 showposts=10 orderby=title]
|
62 |
The example will display up to ten portfolio projects in two columns, in ascending alphabetical order by project title. It will display Project Types, hide Project Tags, and only display projects that are assigned the “Grooming Tips” or “Best Kitties” Project Types.
|
63 |
|
64 |
|
@@ -84,7 +85,7 @@ Next, add the [featured_content] shortcode to a post or page. The shortcode will
|
|
84 |
* orderby: sort projects by different criteria, including author name, project title, and even rand to display in a random order. Defaults to sorting by date. (author, date, title, rand)
|
85 |
|
86 |
**Example**
|
87 |
-
[featured_content display_types=true display_tags=false include_type=grooming-tips,best-kitties columns=2 showposts=10 orderby=title]
|
88 |
The example will display up to ten featured content in two columns, in ascending alphabetical order by project title. It will display Content Types, hide Content Tags, and only display projects that are assigned the “Grooming Tips” or “Best Kitties” Content Types.
|
89 |
|
90 |
***Testimonials Shortcode***
|
@@ -106,9 +107,34 @@ Next, add the [testimonials] shortcode to a post or page. The shortcode will dis
|
|
106 |
|
107 |
**Example**
|
108 |
|
109 |
-
[testimonials columns=2 showposts=10 orderby=title]
|
110 |
The example will display up to ten testimonials in two columns, in ascending alphabetical order by testimonial title.
|
111 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
112 |
== Installation ==
|
113 |
|
114 |
1. Upload `essential-content-types.zip` folder to the `/wp-content/plugins/` directory
|
@@ -121,9 +147,22 @@ The example will display up to ten testimonials in two columns, in ascending alp
|
|
121 |
2. Customizer: Portfolio Archive Options
|
122 |
3. Customizer: Testimonial Archive Options
|
123 |
4. Customizer: Featured Content Archive Options
|
|
|
124 |
|
125 |
== Changelog ==
|
126 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
127 |
= 1.0.2 =
|
128 |
* Checked: Version compatibility WordPress 4.8
|
129 |
* Renamed Featured Content to ECT: Featured Content
|
@@ -133,4 +172,4 @@ The example will display up to ten testimonials in two columns, in ascending alp
|
|
133 |
* Bug Fixed: Admin CSS
|
134 |
|
135 |
= 1.0.0 =
|
136 |
-
* Initial Release
|
1 |
+
=== Essential Content Types ===
|
2 |
Contributors: catchthemes, sakinshrestha, pratikshrestha, maheshmaharjan
|
3 |
Donate link: https://catchthemes.com/donate/
|
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
|
5 |
Requires at least: 4.5
|
6 |
Tested up to: 4.8
|
7 |
Stable tag: trunk
|
19 |
Additionally, switching themes changes your website layout completely. Therefore, to keep things looking spic-and- span in your website, we bring you Essential Content.
|
20 |
|
21 |
Essential Content allows you to add up to three content/post types:
|
22 |
+
* Portfolio – Create and display your portfolio on your website
|
23 |
+
* Testimonials – Add customer testimonials to your website
|
24 |
+
* Featured Content – Display the content you want as featured content on your website to attract visitors' attention
|
25 |
+
* Services – Add your services on your website
|
26 |
|
27 |
Features of Essential Content:
|
28 |
* Enable/Disable any content/post type as needed
|
59 |
* orderby: sort projects by different criteria, including author name, project title, and even rand to display in a random order. Defaults to sorting by date. (author, date, title, rand)
|
60 |
|
61 |
**Example**
|
62 |
+
[portfolio display_types="true" display_tags="false" include_type="grooming-tips,best-kitties" columns="2" showposts="10" orderby="title"]
|
63 |
The example will display up to ten portfolio projects in two columns, in ascending alphabetical order by project title. It will display Project Types, hide Project Tags, and only display projects that are assigned the “Grooming Tips” or “Best Kitties” Project Types.
|
64 |
|
65 |
|
85 |
* orderby: sort projects by different criteria, including author name, project title, and even rand to display in a random order. Defaults to sorting by date. (author, date, title, rand)
|
86 |
|
87 |
**Example**
|
88 |
+
[featured_content display_types="true" display_tags="false" include_type="grooming-tips,best-kitties" columns="2" showposts="10" orderby="title"]
|
89 |
The example will display up to ten featured content in two columns, in ascending alphabetical order by project title. It will display Content Types, hide Content Tags, and only display projects that are assigned the “Grooming Tips” or “Best Kitties” Content Types.
|
90 |
|
91 |
***Testimonials Shortcode***
|
107 |
|
108 |
**Example**
|
109 |
|
110 |
+
[testimonials columns="2" showposts="10" orderby="title"]
|
111 |
The example will display up to ten testimonials in two columns, in ascending alphabetical order by testimonial title.
|
112 |
|
113 |
+
***Service Shortcode***
|
114 |
+
|
115 |
+
You can use shortcodes to embed service on posts and pages.
|
116 |
+
|
117 |
+
**Embedding Service Projects**
|
118 |
+
|
119 |
+
To embed service on posts and pages, first activate the Service content type on your site and add some projects to your Service.
|
120 |
+
|
121 |
+
Next, add the [services] shortcode to a post or page. The shortcode will display projects in different ways, depending on how you use the optional attributes to customize the featured content layout.
|
122 |
+
|
123 |
+
**Attributes**
|
124 |
+
* display_types: display Content Types. (true/false)
|
125 |
+
* display_tags: display Content Tags. (true/false)
|
126 |
+
* display_content: display project content. (true/false)
|
127 |
+
* include_type: display specific Content Types. Defaults to all. (comma-separated list of Content Type slugs)
|
128 |
+
* include_tag: display specific Content Tags. Defaults to all. (comma-separated list of Content Tag slugs)
|
129 |
+
* columns: number of columns in shortcode. Defaults to 2. (number, 1-6)
|
130 |
+
* showposts: number of projects to display. Defaults to all. (number)
|
131 |
+
* order: display projects in ascending or descending order. Defaults to ASC for sorting in ascending order, but you can reverse the order by using DESC to display projects in descending order instead. (ASC/DESC)
|
132 |
+
* orderby: sort projects by different criteria, including author name, project title, and even rand to display in a random order. Defaults to sorting by date. (author, date, title, rand)
|
133 |
+
|
134 |
+
**Example**
|
135 |
+
[services display_types="true" display_tags="false" include_type="grooming-tips,best-kitties" columns="2" showposts="10" orderby="title"]
|
136 |
+
The example will display up to ten featured content in two columns, in ascending alphabetical order by project title. It will display Content Types, hide Content Tags, and only display projects that are assigned the “Grooming Tips” or “Best Kitties” Content Types.
|
137 |
+
|
138 |
== Installation ==
|
139 |
|
140 |
1. Upload `essential-content-types.zip` folder to the `/wp-content/plugins/` directory
|
147 |
2. Customizer: Portfolio Archive Options
|
148 |
3. Customizer: Testimonial Archive Options
|
149 |
4. Customizer: Featured Content Archive Options
|
150 |
+
5. Customizer: Sevices Archive Options
|
151 |
|
152 |
== Changelog ==
|
153 |
|
154 |
+
= 1.0.6 =
|
155 |
+
* Added: Screenshots: Services Archive Option
|
156 |
+
* Bug Fixed: Services Archive option in Customizer
|
157 |
+
* Bug Fixed: Link to Services Archive option in Dashboard
|
158 |
+
|
159 |
+
= 1.0.5 =
|
160 |
+
* Added: Custom Post Type: Service
|
161 |
+
* Added: Position in Testimonials
|
162 |
+
|
163 |
+
= 1.0.3 & 1.0.4 =
|
164 |
+
* Shortcode instruction link added
|
165 |
+
|
166 |
= 1.0.2 =
|
167 |
* Checked: Version compatibility WordPress 4.8
|
168 |
* Renamed Featured Content to ECT: Featured Content
|
172 |
* Bug Fixed: Admin CSS
|
173 |
|
174 |
= 1.0.0 =
|
175 |
+
* Initial Release
|
admin/class-essential-content-types-admin.php
CHANGED
@@ -98,6 +98,14 @@ class Essential_Content_Types_Admin {
|
|
98 |
require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-featured-content.php';
|
99 |
}
|
100 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
}
|
102 |
|
103 |
|
@@ -112,12 +120,13 @@ class Essential_Content_Types_Admin {
|
|
112 |
'essential-content-types_page_ect-portfolio' => 1,
|
113 |
'essential-content-types_page_ect-testimonial' => 1,
|
114 |
'essential-content-types_page_ect-featured-content' => 1,
|
|
|
115 |
);
|
116 |
-
|
117 |
if ( ! isset( $allowed_pages[ $hook_suffix ] ) ){
|
118 |
return;
|
119 |
}
|
120 |
-
|
121 |
wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/essential-content-types-admin.css', array(), $this->version, 'all' );
|
122 |
|
123 |
}
|
@@ -133,8 +142,9 @@ class Essential_Content_Types_Admin {
|
|
133 |
'essential-content-types_page_ect-portfolio' => 1,
|
134 |
'essential-content-types_page_ect-testimonial' => 1,
|
135 |
'essential-content-types_page_ect-featured-content' => 1,
|
|
|
136 |
);
|
137 |
-
|
138 |
if ( ! isset( $allowed_pages[ $hook_suffix ] ) ){
|
139 |
return;
|
140 |
}
|
@@ -148,14 +158,14 @@ class Essential_Content_Types_Admin {
|
|
148 |
*/
|
149 |
function settings_menu() {
|
150 |
// Add Main Menu
|
151 |
-
add_menu_page(
|
152 |
esc_html__( 'Essential Content Types', 'essential-content-types' ), //$page_title
|
153 |
esc_html__( 'Essential Content Types', 'essential-content-types' ), //$menu_title
|
154 |
'manage_options', //$capability
|
155 |
'essential-content-types', //$menu_slug
|
156 |
array( $this, 'main_settings_display' ), //$function
|
157 |
'dashicons-layout', //$icon_url
|
158 |
-
'99.01564' //$position
|
159 |
);
|
160 |
}
|
161 |
|
98 |
require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-featured-content.php';
|
99 |
}
|
100 |
|
101 |
+
$service_options = get_option( 'ect_service' );
|
102 |
+
if ( $service_options['status'] ) {
|
103 |
+
/**
|
104 |
+
* Load Service Type
|
105 |
+
*/
|
106 |
+
require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-service.php';
|
107 |
+
}
|
108 |
+
|
109 |
}
|
110 |
|
111 |
|
120 |
'essential-content-types_page_ect-portfolio' => 1,
|
121 |
'essential-content-types_page_ect-testimonial' => 1,
|
122 |
'essential-content-types_page_ect-featured-content' => 1,
|
123 |
+
'essential-content-types_page_ect-service' => 1,
|
124 |
);
|
125 |
+
|
126 |
if ( ! isset( $allowed_pages[ $hook_suffix ] ) ){
|
127 |
return;
|
128 |
}
|
129 |
+
|
130 |
wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/essential-content-types-admin.css', array(), $this->version, 'all' );
|
131 |
|
132 |
}
|
142 |
'essential-content-types_page_ect-portfolio' => 1,
|
143 |
'essential-content-types_page_ect-testimonial' => 1,
|
144 |
'essential-content-types_page_ect-featured-content' => 1,
|
145 |
+
'essential-content-types_page_ect-service' => 1,
|
146 |
);
|
147 |
+
|
148 |
if ( ! isset( $allowed_pages[ $hook_suffix ] ) ){
|
149 |
return;
|
150 |
}
|
158 |
*/
|
159 |
function settings_menu() {
|
160 |
// Add Main Menu
|
161 |
+
add_menu_page(
|
162 |
esc_html__( 'Essential Content Types', 'essential-content-types' ), //$page_title
|
163 |
esc_html__( 'Essential Content Types', 'essential-content-types' ), //$menu_title
|
164 |
'manage_options', //$capability
|
165 |
'essential-content-types', //$menu_slug
|
166 |
array( $this, 'main_settings_display' ), //$function
|
167 |
'dashicons-layout', //$icon_url
|
168 |
+
'99.01564' //$position
|
169 |
);
|
170 |
}
|
171 |
|
admin/class-featured-content.php
CHANGED
@@ -297,7 +297,7 @@ class Essential_Content_Featured_Content {
|
|
297 |
'label' => esc_html__( 'Featured Content Archive Content', 'essential-content-types' ),
|
298 |
'type' => 'textarea',
|
299 |
) );
|
300 |
-
|
301 |
$wp_customize->add_setting( 'featured_content_featured_image', array(
|
302 |
'default' => '',
|
303 |
'type' => 'option',
|
@@ -552,7 +552,7 @@ class Essential_Content_Featured_Content {
|
|
552 |
</div><!-- close .featured-content -->
|
553 |
<?php
|
554 |
} else { ?>
|
555 |
-
<p><em><?php
|
556 |
<?php
|
557 |
}
|
558 |
$html = ob_get_clean();
|
297 |
'label' => esc_html__( 'Featured Content Archive Content', 'essential-content-types' ),
|
298 |
'type' => 'textarea',
|
299 |
) );
|
300 |
+
|
301 |
$wp_customize->add_setting( 'featured_content_featured_image', array(
|
302 |
'default' => '',
|
303 |
'type' => 'option',
|
552 |
</div><!-- close .featured-content -->
|
553 |
<?php
|
554 |
} else { ?>
|
555 |
+
<p><em><?php esc_html_e( 'Your Featured Content Archive currently has no entries. You can start creating them on your dashboard.', 'essential-content-types' ); ?></p></em>
|
556 |
<?php
|
557 |
}
|
558 |
$html = ob_get_clean();
|
admin/class-portfolio.php
CHANGED
@@ -686,7 +686,7 @@ class Essential_Content_Jetpack_Portfolio {
|
|
686 |
</div><!-- close .jetpack-portfolio -->
|
687 |
<?php
|
688 |
} else { ?>
|
689 |
-
<p><em><?php
|
690 |
<?php
|
691 |
}
|
692 |
$html = ob_get_clean();
|
686 |
</div><!-- close .jetpack-portfolio -->
|
687 |
<?php
|
688 |
} else { ?>
|
689 |
+
<p><em><?php esc_html_e( 'Your Portfolio Archive currently has no entries. You can start creating them on your dashboard.', 'essential-content-types' ); ?></p></em>
|
690 |
<?php
|
691 |
}
|
692 |
$html = ob_get_clean();
|
admin/class-service.php
ADDED
@@ -0,0 +1,713 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Support JetPack Service
|
5 |
+
*/
|
6 |
+
class Essential_Content_Service {
|
7 |
+
const CUSTOM_POST_TYPE = 'ect-service';
|
8 |
+
const CUSTOM_TAXONOMY_TYPE = 'ect-service-type';
|
9 |
+
const CUSTOM_TAXONOMY_TAG = 'ect-service-tag';
|
10 |
+
const OPTION_NAME = 'ect-service';
|
11 |
+
const OPTION_READING_SETTING = 'ect_service_posts_per_page';
|
12 |
+
|
13 |
+
public $version = '0.1';
|
14 |
+
|
15 |
+
static function init() {
|
16 |
+
static $instance = false;
|
17 |
+
|
18 |
+
if ( ! $instance ) {
|
19 |
+
$instance = new Essential_Content_Service;
|
20 |
+
}
|
21 |
+
|
22 |
+
return $instance;
|
23 |
+
}
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Conditionally hook into WordPress.
|
27 |
+
*
|
28 |
+
* Setup user option for enabling CPT
|
29 |
+
* If user has CPT enabled, show in admin
|
30 |
+
*/
|
31 |
+
function __construct() {
|
32 |
+
// Make sure the post types are loaded for imports
|
33 |
+
add_action( 'import_start', array( $this, 'register_post_types' ) );
|
34 |
+
|
35 |
+
// Add to REST API post type whitelist
|
36 |
+
add_filter( 'rest_api_allowed_post_types', array( $this, 'allow_service_rest_api_type' ) );
|
37 |
+
|
38 |
+
// CPT magic
|
39 |
+
$this->register_post_types();
|
40 |
+
add_action( sprintf( 'add_option_%s', self::OPTION_NAME ), array( $this, 'flush_rules_on_enable' ), 10 );
|
41 |
+
add_action( sprintf( 'update_option_%s', self::OPTION_NAME ), array( $this, 'flush_rules_on_enable' ), 10 );
|
42 |
+
add_action( sprintf( 'publish_%s', self::CUSTOM_POST_TYPE), array( $this, 'flush_rules_on_first_content' ) );
|
43 |
+
add_action( 'after_switch_theme', array( $this, 'flush_rules_on_switch' ) );
|
44 |
+
|
45 |
+
// Admin Customization
|
46 |
+
add_filter( 'post_updated_messages', array( $this, 'updated_messages' ) );
|
47 |
+
add_filter( sprintf( 'manage_%s_posts_columns', self::CUSTOM_POST_TYPE), array( $this, 'edit_admin_columns' ) );
|
48 |
+
add_filter( sprintf( 'manage_%s_posts_custom_column', self::CUSTOM_POST_TYPE), array( $this, 'image_column' ), 10, 2 );
|
49 |
+
add_action( 'customize_register', array( $this, 'customize_register' ) );
|
50 |
+
|
51 |
+
add_image_size( 'service-admin-thumb', 50, 50, true );
|
52 |
+
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_styles' ) );
|
53 |
+
|
54 |
+
// register service shortcode and services shortcode (legacy)
|
55 |
+
add_shortcode( 'services', array( $this, 'service_shortcode' ) );
|
56 |
+
add_shortcode( 'ect_services', array( $this, 'service_shortcode' ) );
|
57 |
+
|
58 |
+
// Adjust CPT archive and custom taxonomies to obey CPT reading setting
|
59 |
+
add_filter( 'pre_get_posts', array( $this, 'query_reading_setting' ) );
|
60 |
+
}
|
61 |
+
|
62 |
+
/*
|
63 |
+
* Flush permalinks when CPT option is turned on/off
|
64 |
+
*/
|
65 |
+
function flush_rules_on_enable() {
|
66 |
+
flush_rewrite_rules();
|
67 |
+
}
|
68 |
+
|
69 |
+
/*
|
70 |
+
* Count published contents and flush permalinks when first contents is published
|
71 |
+
*/
|
72 |
+
function flush_rules_on_first_content() {
|
73 |
+
$contents = get_transient( 'service-count-cache' );
|
74 |
+
|
75 |
+
if ( false === $contents ) {
|
76 |
+
flush_rewrite_rules();
|
77 |
+
$contents = (int) wp_count_posts( self::CUSTOM_POST_TYPE )->publish;
|
78 |
+
|
79 |
+
if ( ! empty( $contents ) ) {
|
80 |
+
set_transient( 'service-count-cache', $contents, HOUR_IN_SECONDS * 12 );
|
81 |
+
}
|
82 |
+
}
|
83 |
+
}
|
84 |
+
|
85 |
+
/*
|
86 |
+
* Flush permalinks when CPT supported theme is activated
|
87 |
+
*/
|
88 |
+
function flush_rules_on_switch() {
|
89 |
+
flush_rewrite_rules();
|
90 |
+
}
|
91 |
+
|
92 |
+
/**
|
93 |
+
* Register Post Type
|
94 |
+
*/
|
95 |
+
function register_post_types() {
|
96 |
+
if ( post_type_exists( self::CUSTOM_POST_TYPE ) ) {
|
97 |
+
return;
|
98 |
+
}
|
99 |
+
|
100 |
+
register_post_type( self::CUSTOM_POST_TYPE, array(
|
101 |
+
'description' => esc_html__( 'Service Items', 'essential-content-types' ),
|
102 |
+
'labels' => array(
|
103 |
+
'name' => esc_html__( 'Services', 'essential-content-types' ),
|
104 |
+
'singular_name' => esc_html__( 'Service', 'essential-content-types' ),
|
105 |
+
'menu_name' => esc_html__( 'Service', 'essential-content-types' ),
|
106 |
+
'all_items' => esc_html__( 'All Services', 'essential-content-types' ),
|
107 |
+
'add_new' => esc_html__( 'Add New', 'essential-content-types' ),
|
108 |
+
'add_new_item' => esc_html__( 'Add New Service', 'essential-content-types' ),
|
109 |
+
'edit_item' => esc_html__( 'Edit Service', 'essential-content-types' ),
|
110 |
+
'new_item' => esc_html__( 'New Service', 'essential-content-types' ),
|
111 |
+
'view_item' => esc_html__( 'View Service', 'essential-content-types' ),
|
112 |
+
'search_items' => esc_html__( 'Search Services', 'essential-content-types' ),
|
113 |
+
'not_found' => esc_html__( 'No Services found', 'essential-content-types' ),
|
114 |
+
'not_found_in_trash' => esc_html__( 'No Services found in Trash', 'essential-content-types' ),
|
115 |
+
'filter_items_list' => esc_html__( 'Filter contents list', 'essential-content-types' ),
|
116 |
+
'items_list_navigation' => esc_html__( 'Service list navigation', 'essential-content-types' ),
|
117 |
+
'items_list' => esc_html__( 'Services list', 'essential-content-types' ),
|
118 |
+
),
|
119 |
+
'supports' => array(
|
120 |
+
'title',
|
121 |
+
'editor',
|
122 |
+
'thumbnail',
|
123 |
+
'author',
|
124 |
+
'comments',
|
125 |
+
),
|
126 |
+
'rewrite' => array(
|
127 |
+
'slug' => 'service',
|
128 |
+
'with_front' => false,
|
129 |
+
'feeds' => true,
|
130 |
+
'pages' => true,
|
131 |
+
),
|
132 |
+
'public' => true,
|
133 |
+
'show_ui' => true,
|
134 |
+
'menu_position' => 20, // below Pages
|
135 |
+
'menu_icon' => 'dashicons-exerpt-view', // 3.8+ dashicon option
|
136 |
+
'capability_type' => 'page',
|
137 |
+
'map_meta_cap' => true,
|
138 |
+
'taxonomies' => array( self::CUSTOM_TAXONOMY_TYPE, self::CUSTOM_TAXONOMY_TAG ),
|
139 |
+
'has_archive' => true,
|
140 |
+
'query_var' => 'service',
|
141 |
+
'show_in_rest' => true,
|
142 |
+
) );
|
143 |
+
|
144 |
+
register_taxonomy( self::CUSTOM_TAXONOMY_TYPE, self::CUSTOM_POST_TYPE, array(
|
145 |
+
'hierarchical' => true,
|
146 |
+
'labels' => array(
|
147 |
+
'name' => esc_html__( 'Service Types', 'essential-content-types' ),
|
148 |
+
'singular_name' => esc_html__( 'Service Type', 'essential-content-types' ),
|
149 |
+
'menu_name' => esc_html__( 'Service Types', 'essential-content-types' ),
|
150 |
+
'all_items' => esc_html__( 'All Service Types', 'essential-content-types' ),
|
151 |
+
'edit_item' => esc_html__( 'Edit Service Type', 'essential-content-types' ),
|
152 |
+
'view_item' => esc_html__( 'View Service Type', 'essential-content-types' ),
|
153 |
+
'update_item' => esc_html__( 'Update Service Type', 'essential-content-types' ),
|
154 |
+
'add_new_item' => esc_html__( 'Add New Service Type', 'essential-content-types' ),
|
155 |
+
'new_item_name' => esc_html__( 'New Service Type Name', 'essential-content-types' ),
|
156 |
+
'parent_item' => esc_html__( 'Parent Service Type', 'essential-content-types' ),
|
157 |
+
'parent_item_colon' => esc_html__( 'Parent Service Type:', 'essential-content-types' ),
|
158 |
+
'search_items' => esc_html__( 'Search Service Types', 'essential-content-types' ),
|
159 |
+
'items_list_navigation' => esc_html__( 'Service type list navigation', 'essential-content-types' ),
|
160 |
+
'items_list' => esc_html__( 'Service type list', 'essential-content-types' ),
|
161 |
+
),
|
162 |
+
'public' => true,
|
163 |
+
'show_ui' => true,
|
164 |
+
'show_in_nav_menus' => true,
|
165 |
+
'show_in_rest' => true,
|
166 |
+
'show_admin_column' => true,
|
167 |
+
'query_var' => true,
|
168 |
+
'rewrite' => array( 'slug' => 'service-type' ),
|
169 |
+
) );
|
170 |
+
|
171 |
+
register_taxonomy( self::CUSTOM_TAXONOMY_TAG, self::CUSTOM_POST_TYPE, array(
|
172 |
+
'hierarchical' => false,
|
173 |
+
'labels' => array(
|
174 |
+
'name' => esc_html__( 'Service Tags', 'essential-content-types' ),
|
175 |
+
'singular_name' => esc_html__( 'Service Tag', 'essential-content-types' ),
|
176 |
+
'menu_name' => esc_html__( 'Service Tags', 'essential-content-types' ),
|
177 |
+
'all_items' => esc_html__( 'All Service Tags', 'essential-content-types' ),
|
178 |
+
'edit_item' => esc_html__( 'Edit Service Tag', 'essential-content-types' ),
|
179 |
+
'view_item' => esc_html__( 'View Service Tag', 'essential-content-types' ),
|
180 |
+
'update_item' => esc_html__( 'Update Service Tag', 'essential-content-types' ),
|
181 |
+
'add_new_item' => esc_html__( 'Add New Service Tag', 'essential-content-types' ),
|
182 |
+
'new_item_name' => esc_html__( 'New Service Tag Name', 'essential-content-types' ),
|
183 |
+
'search_items' => esc_html__( 'Search Service Tags', 'essential-content-types' ),
|
184 |
+
'popular_items' => esc_html__( 'Popular Service Tags', 'essential-content-types' ),
|
185 |
+
'separate_items_with_commas' => esc_html__( 'Separate tags with commas', 'essential-content-types' ),
|
186 |
+
'add_or_remove_items' => esc_html__( 'Add or remove tags', 'essential-content-types' ),
|
187 |
+
'choose_from_most_used' => esc_html__( 'Choose from the most used tags', 'essential-content-types' ),
|
188 |
+
'not_found' => esc_html__( 'No tags found.', 'essential-content-types' ),
|
189 |
+
'items_list_navigation' => esc_html__( 'Service tag list navigation', 'essential-content-types' ),
|
190 |
+
'items_list' => esc_html__( 'Service tag list', 'essential-content-types' ),
|
191 |
+
),
|
192 |
+
'public' => true,
|
193 |
+
'show_ui' => true,
|
194 |
+
'show_in_nav_menus' => true,
|
195 |
+
'show_in_rest' => true,
|
196 |
+
'show_admin_column' => true,
|
197 |
+
'query_var' => true,
|
198 |
+
'rewrite' => array( 'slug' => 'service-tag' ),
|
199 |
+
) );
|
200 |
+
}
|
201 |
+
|
202 |
+
/**
|
203 |
+
* Update messages for the Services admin.
|
204 |
+
*/
|
205 |
+
function updated_messages( $messages ) {
|
206 |
+
global $post;
|
207 |
+
|
208 |
+
$messages[self::CUSTOM_POST_TYPE] = array(
|
209 |
+
0 => '', // Unused. Messages start at index 1.
|
210 |
+
1 => sprintf( __( 'Service updated. <a href="%s">View item</a>', 'essential-content-types'), esc_url( get_permalink( $post->ID ) ) ),
|
211 |
+
2 => esc_html__( 'Custom field updated.', 'essential-content-types' ),
|
212 |
+
3 => esc_html__( 'Custom field deleted.', 'essential-content-types' ),
|
213 |
+
4 => esc_html__( 'Service updated.', 'essential-content-types' ),
|
214 |
+
/* translators: %s: date and time of the revision */
|
215 |
+
5 => isset( $_GET['revision'] ) ? sprintf( esc_html__( 'Service restored to revision from %s', 'essential-content-types'), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false,
|
216 |
+
6 => sprintf( __( 'Service published. <a href="%s">View content</a>', 'essential-content-types' ), esc_url( get_permalink( $post->ID ) ) ),
|
217 |
+
7 => esc_html__( 'Service saved.', 'essential-content-types' ),
|
218 |
+
8 => sprintf( __( 'Service submitted. <a target="_blank" href="%s">Preview content</a>', 'essential-content-types'), esc_url( add_query_arg( 'preview', 'true', get_permalink( $post->ID ) ) ) ),
|
219 |
+
9 => sprintf( __( 'Service scheduled for: <strong>%1$s</strong>. <a target="_blank" href="%2$s">Preview service</a>', 'essential-content-types' ),
|
220 |
+
// translators: Publish box date format, see http://php.net/date
|
221 |
+
date_i18n( __( 'M j, Y @ G:i', 'essential-content-types' ), strtotime( $post->post_date ) ), esc_url( get_permalink( $post->ID ) ) ),
|
222 |
+
10 => sprintf( __( 'Service item draft updated. <a target="_blank" href="%s">Preview content</a>', 'essential-content-types' ), esc_url( add_query_arg( 'preview', 'true', get_permalink( $post->ID ) ) ) ),
|
223 |
+
);
|
224 |
+
|
225 |
+
return $messages;
|
226 |
+
}
|
227 |
+
|
228 |
+
/**
|
229 |
+
* Change ‘Title’ column label
|
230 |
+
* Add Featured Image column
|
231 |
+
*/
|
232 |
+
function edit_admin_columns( $columns ) {
|
233 |
+
// change 'Title' to 'Content'
|
234 |
+
$columns['title'] = __( 'Service', 'essential-content-types' );
|
235 |
+
if ( current_theme_supports( 'post-thumbnails' ) ) {
|
236 |
+
// add featured image before 'Content'
|
237 |
+
$columns = array_slice( $columns, 0, 1, true ) + array( 'thumbnail' => '' ) + array_slice( $columns, 1, NULL, true );
|
238 |
+
}
|
239 |
+
|
240 |
+
return $columns;
|
241 |
+
}
|
242 |
+
|
243 |
+
/**
|
244 |
+
* Add featured image to column
|
245 |
+
*/
|
246 |
+
function image_column( $column, $post_id ) {
|
247 |
+
global $post;
|
248 |
+
switch ( $column ) {
|
249 |
+
case 'thumbnail':
|
250 |
+
echo get_the_post_thumbnail( $post_id, 'service-admin-thumb' );
|
251 |
+
break;
|
252 |
+
}
|
253 |
+
}
|
254 |
+
|
255 |
+
/**
|
256 |
+
* Adjust image column width
|
257 |
+
*/
|
258 |
+
function enqueue_admin_styles( $hook ) {
|
259 |
+
$screen = get_current_screen();
|
260 |
+
|
261 |
+
if ( 'edit.php' == $hook && self::CUSTOM_POST_TYPE == $screen->post_type && current_theme_supports( 'post-thumbnails' ) ) {
|
262 |
+
wp_add_inline_style( 'wp-admin', '.column-thumbnail img:nth-of-type(2) { display: none; } .manage-column.column-thumbnail { width: 50px; } @media screen and (max-width: 360px) { .column-thumbnail{ display:none; } }' );
|
263 |
+
}
|
264 |
+
}
|
265 |
+
|
266 |
+
/**
|
267 |
+
* Adds service section to the Customizer.
|
268 |
+
*/
|
269 |
+
function customize_register( $wp_customize ) {
|
270 |
+
$wp_customize->add_section( 'ect_service', array(
|
271 |
+
'title' => esc_html__( 'ECT: Service', 'essential-content-types' ),
|
272 |
+
'priority' => 130,
|
273 |
+
) );
|
274 |
+
|
275 |
+
$wp_customize->add_setting( 'ect_service_title', array(
|
276 |
+
'default' => esc_html__( 'Services', 'essential-content-types' ),
|
277 |
+
'type' => 'option',
|
278 |
+
'sanitize_callback' => 'sanitize_text_field',
|
279 |
+
'sanitize_js_callback' => 'sanitize_text_field',
|
280 |
+
) );
|
281 |
+
|
282 |
+
$wp_customize->add_control( 'ect_service_title', array(
|
283 |
+
'section' => 'ect_service',
|
284 |
+
'label' => esc_html__( 'Service Archive Title', 'essential-content-types' ),
|
285 |
+
'type' => 'text',
|
286 |
+
) );
|
287 |
+
|
288 |
+
$wp_customize->add_setting( 'ect_service_content', array(
|
289 |
+
'default' => '',
|
290 |
+
'type' => 'option',
|
291 |
+
'sanitize_callback' => 'wp_kses_post',
|
292 |
+
'sanitize_js_callback' => 'wp_kses_post',
|
293 |
+
) );
|
294 |
+
|
295 |
+
$wp_customize->add_control( 'ect_service_content', array(
|
296 |
+
'section' => 'ect_service',
|
297 |
+
'label' => esc_html__( 'Service Archive Content', 'essential-content-types' ),
|
298 |
+
'type' => 'textarea',
|
299 |
+
) );
|
300 |
+
|
301 |
+
$wp_customize->add_setting( 'ect_service_featured_image', array(
|
302 |
+
'default' => '',
|
303 |
+
'type' => 'option',
|
304 |
+
'sanitize_callback' => 'attachment_url_to_postid',
|
305 |
+
'sanitize_js_callback' => 'attachment_url_to_postid',
|
306 |
+
'theme_supports' => 'post-thumbnails',
|
307 |
+
) );
|
308 |
+
|
309 |
+
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'ect_service_featured_image', array(
|
310 |
+
'section' => 'ect_service',
|
311 |
+
'label' => esc_html__( 'Service Archive Featured Image', 'essential-content-types' ),
|
312 |
+
) ) );
|
313 |
+
}
|
314 |
+
|
315 |
+
/**
|
316 |
+
* Follow CPT reading setting on CPT archive and taxonomy pages
|
317 |
+
*/
|
318 |
+
function query_reading_setting( $query ) {
|
319 |
+
if ( ! is_admin() &&
|
320 |
+
$query->is_main_query() &&
|
321 |
+
( $query->is_post_type_archive( self::CUSTOM_POST_TYPE ) || $query->is_tax( self::CUSTOM_TAXONOMY_TYPE ) || $query->is_tax( self::CUSTOM_TAXONOMY_TAG ) )
|
322 |
+
) {
|
323 |
+
$query->set( 'posts_per_page', get_option( self::OPTION_READING_SETTING, '10' ) );
|
324 |
+
}
|
325 |
+
}
|
326 |
+
|
327 |
+
/**
|
328 |
+
* Add to REST API post type whitelist
|
329 |
+
*/
|
330 |
+
function allow_service_rest_api_type( $post_types ) {
|
331 |
+
$post_types[] = self::CUSTOM_POST_TYPE;
|
332 |
+
|
333 |
+
return $post_types;
|
334 |
+
}
|
335 |
+
|
336 |
+
/**
|
337 |
+
* Our [services] shortcode.
|
338 |
+
* Prints Service data styled to look good on *any* theme.
|
339 |
+
*
|
340 |
+
* @return service_shortcode_html
|
341 |
+
*/
|
342 |
+
static function service_shortcode( $atts ) {
|
343 |
+
// Default attributes
|
344 |
+
$atts = shortcode_atts( array(
|
345 |
+
'image' => true,
|
346 |
+
'display_types' => true,
|
347 |
+
'display_tags' => true,
|
348 |
+
'display_content' => true,
|
349 |
+
'display_author' => false,
|
350 |
+
'show_filter' => false,
|
351 |
+
'include_type' => false,
|
352 |
+
'include_tag' => false,
|
353 |
+
'columns' => 2,
|
354 |
+
'showposts' => -1,
|
355 |
+
'order' => 'asc',
|
356 |
+
'orderby' => 'date',
|
357 |
+
), $atts, 'services' );
|
358 |
+
|
359 |
+
// A little sanitization
|
360 |
+
if ( $atts['image'] && 'true' != $atts['image'] ) {
|
361 |
+
$atts['image'] = false;
|
362 |
+
}
|
363 |
+
|
364 |
+
if ( $atts['display_types'] && 'true' != $atts['display_types'] ) {
|
365 |
+
$atts['display_types'] = false;
|
366 |
+
}
|
367 |
+
|
368 |
+
if ( $atts['display_tags'] && 'true' != $atts['display_tags'] ) {
|
369 |
+
$atts['display_tags'] = false;
|
370 |
+
}
|
371 |
+
|
372 |
+
if ( $atts['display_author'] && 'true' != $atts['display_author'] ) {
|
373 |
+
$atts['display_author'] = false;
|
374 |
+
}
|
375 |
+
|
376 |
+
if ( $atts['display_content'] && 'true' != $atts['display_content'] && 'full' != $atts['display_content'] ) {
|
377 |
+
$atts['display_content'] = false;
|
378 |
+
}
|
379 |
+
|
380 |
+
if ( $atts['include_type'] ) {
|
381 |
+
$atts['include_type'] = explode( ',', str_replace( ' ', '', $atts['include_type'] ) );
|
382 |
+
}
|
383 |
+
|
384 |
+
if ( $atts['include_tag'] ) {
|
385 |
+
$atts['include_tag'] = explode( ',', str_replace( ' ', '', $atts['include_tag'] ) );
|
386 |
+
}
|
387 |
+
|
388 |
+
$atts['columns'] = absint( $atts['columns'] );
|
389 |
+
|
390 |
+
$atts['showposts'] = intval( $atts['showposts'] );
|
391 |
+
|
392 |
+
|
393 |
+
if ( $atts['order'] ) {
|
394 |
+
$atts['order'] = urldecode( $atts['order'] );
|
395 |
+
$atts['order'] = strtoupper( $atts['order'] );
|
396 |
+
if ( 'DESC' != $atts['order'] ) {
|
397 |
+
$atts['order'] = 'ASC';
|
398 |
+
}
|
399 |
+
}
|
400 |
+
|
401 |
+
if ( $atts['orderby'] ) {
|
402 |
+
$atts['orderby'] = urldecode( $atts['orderby'] );
|
403 |
+
$atts['orderby'] = strtolower( $atts['orderby'] );
|
404 |
+
$allowed_keys = array( 'author', 'date', 'title', 'rand' );
|
405 |
+
|
406 |
+
$parsed = array();
|
407 |
+
foreach ( explode( ',', $atts['orderby'] ) as $service_index_number => $orderby ) {
|
408 |
+
if ( ! in_array( $orderby, $allowed_keys ) ) {
|
409 |
+
continue;
|
410 |
+
}
|
411 |
+
$parsed[] = $orderby;
|
412 |
+
}
|
413 |
+
|
414 |
+
if ( empty( $parsed ) ) {
|
415 |
+
unset( $atts['orderby'] );
|
416 |
+
} else {
|
417 |
+
$atts['orderby'] = implode( ' ', $parsed );
|
418 |
+
}
|
419 |
+
}
|
420 |
+
|
421 |
+
// enqueue shortcode styles when shortcode is used
|
422 |
+
wp_enqueue_style( 'service-style', plugins_url( 'css/service-shortcode.css', __FILE__ ), array(), '20140326' );
|
423 |
+
|
424 |
+
return self::service_shortcode_html( $atts );
|
425 |
+
}
|
426 |
+
|
427 |
+
/**
|
428 |
+
* Query to retrieve entries from the Service post_type.
|
429 |
+
*
|
430 |
+
* @return object
|
431 |
+
*/
|
432 |
+
static function service_query( $atts ) {
|
433 |
+
// Default query arguments
|
434 |
+
$default = array(
|
435 |
+
'order' => $atts['order'],
|
436 |
+
'orderby' => $atts['orderby'],
|
437 |
+
'posts_per_page' => $atts['showposts'],
|
438 |
+
);
|
439 |
+
|
440 |
+
$args = wp_parse_args( $atts, $default );
|
441 |
+
$args['post_type'] = self::CUSTOM_POST_TYPE; // Force this post type
|
442 |
+
|
443 |
+
if ( false != $atts['include_type'] || false != $atts['include_tag'] ) {
|
444 |
+
$args['tax_query'] = array();
|
445 |
+
}
|
446 |
+
|
447 |
+
// If 'include_type' has been set use it on the main query
|
448 |
+
if ( false != $atts['include_type'] ) {
|
449 |
+
array_push( $args['tax_query'], array(
|
450 |
+
'taxonomy' => self::CUSTOM_TAXONOMY_TYPE,
|
451 |
+
'field' => 'slug',
|
452 |
+
'terms' => $atts['include_type'],
|
453 |
+
) );
|
454 |
+
}
|
455 |
+
|
456 |
+
// If 'include_tag' has been set use it on the main query
|
457 |
+
if ( false != $atts['include_tag'] ) {
|
458 |
+
array_push( $args['tax_query'], array(
|
459 |
+
'taxonomy' => self::CUSTOM_TAXONOMY_TAG,
|
460 |
+
'field' => 'slug',
|
461 |
+
'terms' => $atts['include_tag'],
|
462 |
+
) );
|
463 |
+
}
|
464 |
+
|
465 |
+
if ( false != $atts['include_type'] && false != $atts['include_tag'] ) {
|
466 |
+
$args['tax_query']['relation'] = 'AND';
|
467 |
+
}
|
468 |
+
|
469 |
+
// Run the query and return
|
470 |
+
$query = new WP_Query( $args );
|
471 |
+
return $query;
|
472 |
+
}
|
473 |
+
|
474 |
+
/**
|
475 |
+
* The Service shortcode loop.
|
476 |
+
*
|
477 |
+
* @todo add theme color styles
|
478 |
+
* @return html
|
479 |
+
*/
|
480 |
+
static function service_shortcode_html( $atts ) {
|
481 |
+
|
482 |
+
$query = self::service_query( $atts );
|
483 |
+
$service_index_number = 0;
|
484 |
+
|
485 |
+
ob_start();
|
486 |
+
|
487 |
+
// If we have posts, create the html
|
488 |
+
// with service markup
|
489 |
+
if ( $query->have_posts() ) {
|
490 |
+
|
491 |
+
// Render styles
|
492 |
+
//self::themecolor_styles();
|
493 |
+
|
494 |
+
?>
|
495 |
+
<div class="service-shortcode column-<?php echo esc_attr( $atts['columns'] ); ?>">
|
496 |
+
<?php // open .featured-content
|
497 |
+
|
498 |
+
// Construct the loop...
|
499 |
+
while ( $query->have_posts() ) {
|
500 |
+
$query->the_post();
|
501 |
+
$post_id = get_the_ID();
|
502 |
+
?>
|
503 |
+
<div class="service-entry <?php echo esc_attr( self::get_content_class( $service_index_number, $atts['columns'] ) ); ?>">
|
504 |
+
<header class="featured-content-entry-header">
|
505 |
+
<?php
|
506 |
+
// Featured image
|
507 |
+
if ( false != $atts['image'] ) {
|
508 |
+
echo self::get_service_thumbnail_link( $post_id );
|
509 |
+
}
|
510 |
+
?>
|
511 |
+
|
512 |
+
<h2 class="service-entry-title"><a href="<?php echo esc_url( get_permalink() ); ?>" title="<?php echo esc_attr( the_title_attribute( ) ); ?>"><?php the_title(); ?></a></h2>
|
513 |
+
|
514 |
+
<div class="service-entry-meta">
|
515 |
+
<?php
|
516 |
+
if ( false != $atts['display_types'] ) {
|
517 |
+
echo self::get_content_type( $post_id );
|
518 |
+
}
|
519 |
+
|
520 |
+
if ( false != $atts['display_tags'] ) {
|
521 |
+
echo self::get_content_tags( $post_id );
|
522 |
+
}
|
523 |
+
|
524 |
+
if ( false != $atts['display_author'] ) {
|
525 |
+
echo self::get_content_author( $post_id );
|
526 |
+
}
|
527 |
+
?>
|
528 |
+
</div>
|
529 |
+
|
530 |
+
</header>
|
531 |
+
|
532 |
+
<?php
|
533 |
+
// The content
|
534 |
+
if ( false !== $atts['display_content'] ) {
|
535 |
+
if ( 'full' === $atts['display_content'] ) {
|
536 |
+
?>
|
537 |
+
<div class="service-entry-content"><?php the_content(); ?></div>
|
538 |
+
<?php
|
539 |
+
} else {
|
540 |
+
?>
|
541 |
+
<div class="service-entry-content"><?php the_excerpt(); ?></div>
|
542 |
+
<?php
|
543 |
+
}
|
544 |
+
}
|
545 |
+
?>
|
546 |
+
</div><!-- close .service-entry -->
|
547 |
+
<?php $service_index_number++;
|
548 |
+
} // end of while loop
|
549 |
+
|
550 |
+
wp_reset_postdata();
|
551 |
+
?>
|
552 |
+
</div><!-- close .service -->
|
553 |
+
<?php
|
554 |
+
} else { ?>
|
555 |
+
<p><em><?php esc_html_e( 'Your Service Archive currently has no entries. You can start creating them on your dashboard.', 'essential-content-types' ); ?></p></em>
|
556 |
+
<?php
|
557 |
+
}
|
558 |
+
$html = ob_get_clean();
|
559 |
+
|
560 |
+
// If there is a [services] within a [services], remove the shortcode
|
561 |
+
if ( has_shortcode( $html, 'services' ) ){
|
562 |
+
remove_shortcode( 'services' );
|
563 |
+
}
|
564 |
+
|
565 |
+
// Return the HTML block
|
566 |
+
return $html;
|
567 |
+
}
|
568 |
+
|
569 |
+
/**
|
570 |
+
* Individual content class
|
571 |
+
*
|
572 |
+
* @return string
|
573 |
+
*/
|
574 |
+
static function get_content_class( $service_index_number, $columns ) {
|
575 |
+
$content_types = wp_get_object_terms( get_the_ID(), self::CUSTOM_TAXONOMY_TYPE, array( 'fields' => 'slugs' ) );
|
576 |
+
$class = array();
|
577 |
+
|
578 |
+
$class[] = 'service-entry-column-'.$columns;
|
579 |
+
// add a type- class for each content type
|
580 |
+
foreach ( $content_types as $content_type ) {
|
581 |
+
$class[] = 'type-' . esc_html( $content_type );
|
582 |
+
}
|
583 |
+
if( $columns > 1) {
|
584 |
+
if ( ( $service_index_number % 2 ) == 0 ) {
|
585 |
+
$class[] = 'service-entry-mobile-first-item-row';
|
586 |
+
} else {
|
587 |
+
$class[] = 'service-entry-mobile-last-item-row';
|
588 |
+
}
|
589 |
+
}
|
590 |
+
|
591 |
+
// add first and last classes to first and last items in a row
|
592 |
+
if ( ( $service_index_number % $columns ) == 0 ) {
|
593 |
+
$class[] = 'service-entry-first-item-row';
|
594 |
+
} elseif ( ( $service_index_number % $columns ) == ( $columns - 1 ) ) {
|
595 |
+
$class[] = 'service-entry-last-item-row';
|
596 |
+
}
|
597 |
+
|
598 |
+
|
599 |
+
/**
|
600 |
+
* Filter the class applied to content div in the service
|
601 |
+
*
|
602 |
+
* @module custom-content-types
|
603 |
+
*
|
604 |
+
* @since 3.1.0
|
605 |
+
*
|
606 |
+
* @param string $class class name of the div.
|
607 |
+
* @param int $service_index_number iterator count the number of columns up starting from 0.
|
608 |
+
* @param int $columns number of columns to display the content in.
|
609 |
+
*
|
610 |
+
*/
|
611 |
+
return apply_filters( 'service-content-post-class', implode( " ", $class ) , $service_index_number, $columns );
|
612 |
+
}
|
613 |
+
|
614 |
+
/**
|
615 |
+
* Displays the content type that a content belongs to.
|
616 |
+
*
|
617 |
+
* @return html
|
618 |
+
*/
|
619 |
+
static function get_content_type( $post_id ) {
|
620 |
+
$content_types = get_the_terms( $post_id, self::CUSTOM_TAXONOMY_TYPE );
|
621 |
+
|
622 |
+
// If no types, return empty string
|
623 |
+
if ( empty( $content_types ) || is_wp_error( $content_types ) ) {
|
624 |
+
return;
|
625 |
+
}
|
626 |
+
|
627 |
+
$html = '<div class="content-types"><span>' . __( 'Types', 'essential-content-types' ) . ':</span>';
|
628 |
+
$types = array();
|
629 |
+
// Loop thorugh all the types
|
630 |
+
foreach ( $content_types as $content_type ) {
|
631 |
+
$content_type_link = get_term_link( $content_type, self::CUSTOM_TAXONOMY_TYPE );
|
632 |
+
|
633 |
+
if ( is_wp_error( $content_type_link ) ) {
|
634 |
+
return $content_type_link;
|
635 |
+
}
|
636 |
+
|
637 |
+
$types[] = '<a href="' . esc_url( $content_type_link ) . '" rel="tag">' . esc_html( $content_type->name ) . '</a>';
|
638 |
+
}
|
639 |
+
$html .= ' '.implode( ', ', $types );
|
640 |
+
$html .= '</div>';
|
641 |
+
|
642 |
+
return $html;
|
643 |
+
}
|
644 |
+
|
645 |
+
/**
|
646 |
+
* Displays the content tags that a content belongs to.
|
647 |
+
*
|
648 |
+
* @return html
|
649 |
+
*/
|
650 |
+
static function get_content_tags( $post_id ) {
|
651 |
+
$content_tags = get_the_terms( $post_id, self::CUSTOM_TAXONOMY_TAG );
|
652 |
+
|
653 |
+
// If no tags, return empty string
|
654 |
+
if ( empty( $content_tags ) || is_wp_error( $content_tags ) ) {
|
655 |
+
return false;
|
656 |
+
}
|
657 |
+
|
658 |
+
$html = '<div class="content-tags"><span>' . __( 'Tags', 'essential-content-types' ) . ':</span>';
|
659 |
+
$tags = array();
|
660 |
+
// Loop thorugh all the tags
|
661 |
+
foreach ( $content_tags as $content_tag ) {
|
662 |
+
$content_tag_link = get_term_link( $content_tag, self::CUSTOM_TAXONOMY_TYPE );
|
663 |
+
|
664 |
+
if ( is_wp_error( $content_tag_link ) ) {
|
665 |
+
return $content_tag_link;
|
666 |
+
}
|
667 |
+
|
668 |
+
$tags[] = '<a href="' . esc_url( $content_tag_link ) . '" rel="tag">' . esc_html( $content_tag->name ) . '</a>';
|
669 |
+
}
|
670 |
+
$html .= ' '. implode( ', ', $tags );
|
671 |
+
$html .= '</div>';
|
672 |
+
|
673 |
+
return $html;
|
674 |
+
}
|
675 |
+
|
676 |
+
/**
|
677 |
+
* Displays the author of the current service content.
|
678 |
+
*
|
679 |
+
* @return html
|
680 |
+
*/
|
681 |
+
static function get_content_author() {
|
682 |
+
$html = '<div class="content-author">';
|
683 |
+
/* translators: %1$s is link to author posts, %2$s is author display name */
|
684 |
+
$html .= sprintf( __( '<span>Author:</span> <a href="%1$s">%2$s</a>', 'essential-content-types' ),
|
685 |
+
esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
|
686 |
+
esc_html( get_the_author() )
|
687 |
+
);
|
688 |
+
$html .= '</div>';
|
689 |
+
|
690 |
+
return $html;
|
691 |
+
}
|
692 |
+
|
693 |
+
/**
|
694 |
+
* Display the featured image if it's available
|
695 |
+
*
|
696 |
+
* @return html
|
697 |
+
*/
|
698 |
+
static function get_service_thumbnail_link( $post_id ) {
|
699 |
+
if ( has_post_thumbnail( $post_id ) ) {
|
700 |
+
/**
|
701 |
+
* Change the Service thumbnail size.
|
702 |
+
*
|
703 |
+
* @module custom-content-types
|
704 |
+
*
|
705 |
+
* @since 3.4.0
|
706 |
+
*
|
707 |
+
* @param string|array $var Either a registered size keyword or size array.
|
708 |
+
*/
|
709 |
+
return '<a class="featured-content-featured-image" href="' . esc_url( get_permalink( $post_id ) ) . '">' . get_the_post_thumbnail( $post_id, apply_filters( 'service_thumbnail_size', 'large' ) ) . '</a>';
|
710 |
+
}
|
711 |
+
}
|
712 |
+
}
|
713 |
+
add_action( 'init', array( 'Essential_Content_Service', 'init' ) );
|
admin/class-testimonial.php
CHANGED
@@ -614,7 +614,7 @@ class Essential_Content_Jetpack_Testimonial {
|
|
614 |
</div><!-- close .jetpack-testimonial-shortcode -->
|
615 |
<?php
|
616 |
} else { ?>
|
617 |
-
<p><em><?php
|
618 |
<?php
|
619 |
}
|
620 |
$html = ob_get_clean();
|
@@ -726,8 +726,6 @@ function essential_content_testimonial_custom_control_classes() {
|
|
726 |
}
|
727 |
}
|
728 |
|
729 |
-
|
730 |
-
|
731 |
/**
|
732 |
* Add Testimonial support
|
733 |
*/
|
@@ -737,4 +735,116 @@ function essential_content_testimonial_support() {
|
|
737 |
*/
|
738 |
add_theme_support( 'jetpack-testimonial' );
|
739 |
}
|
740 |
-
add_action( 'after_setup_theme', 'essential_content_testimonial_support' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
614 |
</div><!-- close .jetpack-testimonial-shortcode -->
|
615 |
<?php
|
616 |
} else { ?>
|
617 |
+
<p><em><?php esc_html_e( 'Your Testimonial Archive currently has no entries. You can start creating them on your dashboard.', 'essential-content-types' ); ?></p></em>
|
618 |
<?php
|
619 |
}
|
620 |
$html = ob_get_clean();
|
726 |
}
|
727 |
}
|
728 |
|
|
|
|
|
729 |
/**
|
730 |
* Add Testimonial support
|
731 |
*/
|
735 |
*/
|
736 |
add_theme_support( 'jetpack-testimonial' );
|
737 |
}
|
738 |
+
add_action( 'after_setup_theme', 'essential_content_testimonial_support' );
|
739 |
+
|
740 |
+
|
741 |
+
/**
|
742 |
+
* Class to Renders and save metabox options
|
743 |
+
*
|
744 |
+
*/
|
745 |
+
class Essential_Content_Jetpack_Testimonial_Metabox {
|
746 |
+
private $meta_box;
|
747 |
+
|
748 |
+
private $fields;
|
749 |
+
|
750 |
+
/**
|
751 |
+
* Constructor
|
752 |
+
*
|
753 |
+
*
|
754 |
+
* @access public
|
755 |
+
*
|
756 |
+
*/
|
757 |
+
public function __construct( $meta_box_id, $meta_box_title, $post_type ) {
|
758 |
+
|
759 |
+
$this->meta_box = array (
|
760 |
+
'id' => $meta_box_id,
|
761 |
+
'title' => $meta_box_title,
|
762 |
+
'post_type' => $post_type,
|
763 |
+
);
|
764 |
+
|
765 |
+
$this->fields = array(
|
766 |
+
'ect-testimonials',
|
767 |
+
);
|
768 |
+
|
769 |
+
|
770 |
+
// Add metaboxes
|
771 |
+
add_action( 'add_meta_boxes', array( $this, 'add' ) );
|
772 |
+
|
773 |
+
add_action( 'save_post', array( $this, 'save' ) );
|
774 |
+
}
|
775 |
+
|
776 |
+
/**
|
777 |
+
* Add Meta Box for multiple post types.
|
778 |
+
*
|
779 |
+
*
|
780 |
+
* @access public
|
781 |
+
*/
|
782 |
+
public function add($postType) {
|
783 |
+
if( in_array( $postType, $this->meta_box['post_type'] ) ) {
|
784 |
+
add_meta_box( $this->meta_box['id'], $this->meta_box['title'], array( $this, 'show' ), $postType );
|
785 |
+
}
|
786 |
+
}
|
787 |
+
|
788 |
+
/**
|
789 |
+
* Renders metabox
|
790 |
+
*
|
791 |
+
*
|
792 |
+
* @access public
|
793 |
+
*/
|
794 |
+
public function show() {
|
795 |
+
global $post;
|
796 |
+
|
797 |
+
// Use nonce for verification
|
798 |
+
wp_nonce_field( basename( __FILE__ ), 'ect_custom_meta_box_nonce' );
|
799 |
+
|
800 |
+
$position = get_post_meta( $post->ID, 'ect_testimonial_position', true );
|
801 |
+
|
802 |
+
// Begin the form table?>
|
803 |
+
<table class="form-table">
|
804 |
+
<tbody>
|
805 |
+
<tr>
|
806 |
+
<td>
|
807 |
+
<label for="ect_testimonial_position"><?php esc_html_e( 'Position', 'essential-content-types' ); ?></label>
|
808 |
+
</td>
|
809 |
+
|
810 |
+
<td>
|
811 |
+
<input type="text" class="regular-text" name="ect_testimonial_position" value="<?php echo esc_attr( $position ); ?>" />
|
812 |
+
</td>
|
813 |
+
</tr>
|
814 |
+
</tbody>
|
815 |
+
</table>
|
816 |
+
<?php
|
817 |
+
}
|
818 |
+
|
819 |
+
/**
|
820 |
+
* Save custom metabox data
|
821 |
+
*
|
822 |
+
* @action save_post
|
823 |
+
*
|
824 |
+
* @access public
|
825 |
+
*/
|
826 |
+
public function save( $post_id ) {
|
827 |
+
global $post_type;
|
828 |
+
|
829 |
+
$post_type_object = get_post_type_object( $post_type );
|
830 |
+
|
831 |
+
if ( ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) // Check Autosave
|
832 |
+
|| ( ! isset( $_POST['post_ID'] ) || $post_id != $_POST['post_ID'] ) // Check Revision
|
833 |
+
|| ( ! in_array( $post_type, $this->meta_box['post_type'] ) ) // Check if current post type is supported.
|
834 |
+
|| ( ! check_admin_referer( basename( __FILE__ ), 'ect_custom_meta_box_nonce') ) // Check nonce - Security
|
835 |
+
|| ( ! current_user_can( $post_type_object->cap->edit_post, $post_id ) ) ) // Check permission
|
836 |
+
{
|
837 |
+
return $post_id;
|
838 |
+
}
|
839 |
+
|
840 |
+
if ( ! update_post_meta ( $post_id, 'ect_testimonial_position', sanitize_text_field( $_POST['ect_testimonial_position'] ) ) ) {
|
841 |
+
add_post_meta( $post_id, 'ect_testimonial_position', sanitize_text_field( $_POST['ect_testimonial_position'] ), true );
|
842 |
+
}
|
843 |
+
}
|
844 |
+
}
|
845 |
+
|
846 |
+
$ect_metabox = new Essential_Content_Jetpack_Testimonial_Metabox(
|
847 |
+
'ect-options', //metabox id
|
848 |
+
esc_html__( 'Testmonial Options', 'essential-content-types' ), //metabox title
|
849 |
+
array( 'jetpack-testimonial' ) //metabox post types
|
850 |
+
);
|
admin/css/essential-content-types-admin.css
CHANGED
@@ -256,7 +256,7 @@
|
|
256 |
|
257 |
.ect-main .site-title {
|
258 |
font-family: "Trebuchet MS", Helvetica, sans-serif;
|
259 |
-
text-transform: capitalize;
|
260 |
}
|
261 |
|
262 |
.ect-main .site-title a {
|
@@ -313,7 +313,7 @@
|
|
313 |
margin: -2px -2px 0;
|
314 |
padding: 11px 25px;
|
315 |
position: relative;
|
316 |
-
}
|
317 |
|
318 |
.ect-main .module-header.active {
|
319 |
background-color: #0685c3;
|
@@ -339,7 +339,7 @@
|
|
339 |
text-transform: uppercase;
|
340 |
}
|
341 |
|
342 |
-
.ect-main .catch-modules {
|
343 |
background-color: #f9f9f9;
|
344 |
border-radius: 3px;
|
345 |
border: 2px solid #ccc;
|
@@ -387,7 +387,7 @@
|
|
387 |
flex-grow: 0;
|
388 |
-webkit-flex-shrink: 0;
|
389 |
-ms-flex-negative: 0;
|
390 |
-
flex-shrink: 0;
|
391 |
position: relative;
|
392 |
float: none;
|
393 |
right: 0;
|
@@ -594,8 +594,8 @@
|
|
594 |
/*--------------------------------------------------------------
|
595 |
## >= 768px
|
596 |
--------------------------------------------------------------*/
|
597 |
-
@media screen and (min-width: 48em) {
|
598 |
-
.ect-main .container {
|
599 |
padding: 30px;
|
600 |
max-width: 100%;
|
601 |
}
|
@@ -622,7 +622,7 @@
|
|
622 |
|
623 |
.ect-main .menu-footer-container {
|
624 |
padding: 10px 40px 30px;
|
625 |
-
}
|
626 |
}
|
627 |
|
628 |
/*--------------------------------------------------------------
|
@@ -668,9 +668,16 @@
|
|
668 |
margin: 0 1%;
|
669 |
}
|
670 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
671 |
.ect-main .menu-footer-container {
|
672 |
padding: 25px 40px;
|
673 |
-
}
|
674 |
|
675 |
.ect-main .footer-navigation a {
|
676 |
padding: 10px;
|
256 |
|
257 |
.ect-main .site-title {
|
258 |
font-family: "Trebuchet MS", Helvetica, sans-serif;
|
259 |
+
text-transform: capitalize;
|
260 |
}
|
261 |
|
262 |
.ect-main .site-title a {
|
313 |
margin: -2px -2px 0;
|
314 |
padding: 11px 25px;
|
315 |
position: relative;
|
316 |
+
}
|
317 |
|
318 |
.ect-main .module-header.active {
|
319 |
background-color: #0685c3;
|
339 |
text-transform: uppercase;
|
340 |
}
|
341 |
|
342 |
+
.ect-main .catch-modules {
|
343 |
background-color: #f9f9f9;
|
344 |
border-radius: 3px;
|
345 |
border: 2px solid #ccc;
|
387 |
flex-grow: 0;
|
388 |
-webkit-flex-shrink: 0;
|
389 |
-ms-flex-negative: 0;
|
390 |
+
flex-shrink: 0;
|
391 |
position: relative;
|
392 |
float: none;
|
393 |
right: 0;
|
594 |
/*--------------------------------------------------------------
|
595 |
## >= 768px
|
596 |
--------------------------------------------------------------*/
|
597 |
+
@media screen and (min-width: 48em) {
|
598 |
+
.ect-main .container {
|
599 |
padding: 30px;
|
600 |
max-width: 100%;
|
601 |
}
|
622 |
|
623 |
.ect-main .menu-footer-container {
|
624 |
padding: 10px 40px 30px;
|
625 |
+
}
|
626 |
}
|
627 |
|
628 |
/*--------------------------------------------------------------
|
668 |
margin: 0 1%;
|
669 |
}
|
670 |
|
671 |
+
.ect-main #dashboard .catch-modules {
|
672 |
+
-ms-flex: 48%;
|
673 |
+
-webkit-flex: 48%;
|
674 |
+
flex: 0 1 48%;
|
675 |
+
margin: 10px 1%;
|
676 |
+
}
|
677 |
+
|
678 |
.ect-main .menu-footer-container {
|
679 |
padding: 25px 40px;
|
680 |
+
}
|
681 |
|
682 |
.ect-main .footer-navigation a {
|
683 |
padding: 10px;
|
admin/css/service-shortcode.css
ADDED
@@ -0,0 +1,131 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.ect-service-shortcode {
|
2 |
+
clear: both;
|
3 |
+
margin: 0;
|
4 |
+
overflow: hidden;
|
5 |
+
padding: 0;
|
6 |
+
}
|
7 |
+
|
8 |
+
.service-entry {
|
9 |
+
float: left;
|
10 |
+
margin: 0 0 3em;
|
11 |
+
padding: 0;
|
12 |
+
width: 100%;
|
13 |
+
}
|
14 |
+
|
15 |
+
/* Column setting */
|
16 |
+
.service-entry-column-1 {
|
17 |
+
width: 100%;
|
18 |
+
}
|
19 |
+
|
20 |
+
.service-entry-column-2 {
|
21 |
+
margin-right: 4%;
|
22 |
+
width: 48%;
|
23 |
+
}
|
24 |
+
|
25 |
+
.service-entry-column-3 {
|
26 |
+
margin-right: 3.5%;
|
27 |
+
width: 31%;
|
28 |
+
}
|
29 |
+
|
30 |
+
.service-entry-column-4 {
|
31 |
+
margin-right: 3%;
|
32 |
+
width: 22%;
|
33 |
+
}
|
34 |
+
|
35 |
+
.service-entry-column-5 {
|
36 |
+
margin-right: 2.5%;
|
37 |
+
width: 18%;
|
38 |
+
}
|
39 |
+
|
40 |
+
.service-entry-column-6 {
|
41 |
+
margin-right: 2%;
|
42 |
+
width: 15%;
|
43 |
+
}
|
44 |
+
.service-entry-first-item-row {
|
45 |
+
clear: both;
|
46 |
+
}
|
47 |
+
.service-entry-last-item-row {
|
48 |
+
margin-right: 0;
|
49 |
+
}
|
50 |
+
|
51 |
+
@media screen and (max-width:768px) {
|
52 |
+
.service-entry-mobile-first-item-row{
|
53 |
+
margin-right: 4%;
|
54 |
+
width: 48%;
|
55 |
+
clear:both;
|
56 |
+
}
|
57 |
+
.service-entry-first-item-row {
|
58 |
+
clear:none;
|
59 |
+
}
|
60 |
+
.service-entry-mobile-last-item-row{
|
61 |
+
width: 48%;
|
62 |
+
margin-right: 0;
|
63 |
+
}
|
64 |
+
}
|
65 |
+
/* Entry Header */
|
66 |
+
.service-entry-header {
|
67 |
+
border: 0;
|
68 |
+
margin: 0;
|
69 |
+
padding: 0;
|
70 |
+
}
|
71 |
+
|
72 |
+
.service-featured-image {
|
73 |
+
margin: 0;
|
74 |
+
padding: 0;
|
75 |
+
}
|
76 |
+
|
77 |
+
.service-featured-image img {
|
78 |
+
border: 0;
|
79 |
+
height: auto;
|
80 |
+
max-width: 100%;
|
81 |
+
vertical-align: middle;
|
82 |
+
}
|
83 |
+
|
84 |
+
.service-entry-title {
|
85 |
+
font-weight: 700;
|
86 |
+
margin: 0;
|
87 |
+
padding: 0;
|
88 |
+
}
|
89 |
+
|
90 |
+
.service-featured-image + .service-entry-title {
|
91 |
+
margin-top: 1.0em;
|
92 |
+
}
|
93 |
+
|
94 |
+
.service-entry-title a {
|
95 |
+
border: 0;
|
96 |
+
text-decoration: none;
|
97 |
+
}
|
98 |
+
|
99 |
+
/* Entry Meta */
|
100 |
+
.service-entry-meta {
|
101 |
+
margin: 0;
|
102 |
+
padding: 0;
|
103 |
+
}
|
104 |
+
|
105 |
+
.service-entry-title + .service-entry-meta {
|
106 |
+
margin-top: 0.75em;
|
107 |
+
}
|
108 |
+
|
109 |
+
.service-entry-title + .service-entry-meta:empty {
|
110 |
+
margin: 0;
|
111 |
+
}
|
112 |
+
|
113 |
+
.service-entry-meta span,
|
114 |
+
.service-entry-meta a {
|
115 |
+
font-size: 0.9em;
|
116 |
+
padding: 0;
|
117 |
+
}
|
118 |
+
|
119 |
+
.service-entry-meta a {
|
120 |
+
border: 0;
|
121 |
+
text-decoration: none;
|
122 |
+
}
|
123 |
+
/* Entry Content */
|
124 |
+
.service-entry-content {
|
125 |
+
margin: 0.75em 0 0;
|
126 |
+
padding: 0;
|
127 |
+
}
|
128 |
+
|
129 |
+
.service-entry-content > :last-child {
|
130 |
+
margin: 0;
|
131 |
+
}
|
admin/partials/dashboard-display.php
CHANGED
@@ -25,7 +25,7 @@
|
|
25 |
<p><?php esc_html_e( '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.', 'essential-content-types' ); ?></p>
|
26 |
</div>
|
27 |
|
28 |
-
<div class="module-container">
|
29 |
<div id="module-portfolio" class="catch-modules">
|
30 |
<?php
|
31 |
$portfolio_options = get_option( 'ect_portfolio' );
|
@@ -45,8 +45,10 @@
|
|
45 |
|
46 |
<p><?php esc_html_e( 'Once enabled, Portfolio Post Type options will appear on Dashboard Menu', 'essential-content-types' ); ?></p>
|
47 |
|
48 |
-
<p><?php printf( esc_html__( '%1$sClick here%2$s to view Portfolio Archive Options.', 'essential-content-types' ) , '<a href ="' . esc_url( admin_url( 'customize.php?autofocus[control]=jetpack_portfolio_title' ) ) . '" target="_blank">', '</a>' ); ?></p>
|
49 |
-
|
|
|
|
|
50 |
</div><!-- #module-portfolio -->
|
51 |
|
52 |
<div id="module-testimonial" class="catch-modules">
|
@@ -68,8 +70,10 @@
|
|
68 |
|
69 |
<p><?php esc_html_e( 'Once enabled, Testimonials Post Type options will appear on Dashboard Menu', 'essential-content-types' ); ?></p>
|
70 |
|
71 |
-
<p><?php printf( esc_html__( '%1$sClick here%2$s to view Testimonial Achive Options.', 'essential-content-types' ) , '<a href ="' . esc_url( admin_url( 'customize.php?autofocus[control]=jetpack_testimonials[page-title]' ) ) . '" target="_blank">', '</a>' ); ?></p>
|
72 |
-
|
|
|
|
|
73 |
</div><!-- #module-testimonial -->
|
74 |
|
75 |
<div id="module-featured-content" class="catch-modules">
|
@@ -93,8 +97,36 @@
|
|
93 |
<p><?php esc_html_e( 'Once enabled, Featured Content Post Type options will appear on Dashboard Menu', 'essential-content-types' ); ?></p>
|
94 |
|
95 |
<p><?php printf( esc_html__( '%1$sClick here%2$s to view Featured Content Archive Options.', 'essential-content-types' ) , '<a href ="' . esc_url( admin_url( 'customize.php?autofocus[control]=featured_content_title' ) ) . '" target="_blank">', '</a>' ); ?></p>
|
96 |
-
|
|
|
|
|
97 |
</div><!-- #module-featured-content -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
98 |
</div><!-- .module-container -->
|
99 |
</div><!-- .container -->
|
100 |
</div> <!-- #dashboard -->
|
25 |
<p><?php esc_html_e( '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.', 'essential-content-types' ); ?></p>
|
26 |
</div>
|
27 |
|
28 |
+
<div class="module-container">
|
29 |
<div id="module-portfolio" class="catch-modules">
|
30 |
<?php
|
31 |
$portfolio_options = get_option( 'ect_portfolio' );
|
45 |
|
46 |
<p><?php esc_html_e( 'Once enabled, Portfolio Post Type options will appear on Dashboard Menu', 'essential-content-types' ); ?></p>
|
47 |
|
48 |
+
<p><?php printf( esc_html__( '%1$sClick here%2$s to view Portfolio Archive Options.', 'essential-content-types' ) , '<a href ="' . esc_url( admin_url( 'customize.php?autofocus[control]=jetpack_portfolio_title' ) ) . '" target="_blank">', '</a>' ); ?></p>
|
49 |
+
|
50 |
+
<p>For more information on <strong>How to use Portfolio Shortcodes</strong>, <a href="https://catchthemes.com/blog/essential-content-types-plugin/#Portfolio" title="Essential Content Type: Portfolio Shortcode" target="_blank">Click here</a></p>
|
51 |
+
</div>
|
52 |
</div><!-- #module-portfolio -->
|
53 |
|
54 |
<div id="module-testimonial" class="catch-modules">
|
70 |
|
71 |
<p><?php esc_html_e( 'Once enabled, Testimonials Post Type options will appear on Dashboard Menu', 'essential-content-types' ); ?></p>
|
72 |
|
73 |
+
<p><?php printf( esc_html__( '%1$sClick here%2$s to view Testimonial Achive Options.', 'essential-content-types' ) , '<a href ="' . esc_url( admin_url( 'customize.php?autofocus[control]=jetpack_testimonials[page-title]' ) ) . '" target="_blank">', '</a>' ); ?></p>
|
74 |
+
|
75 |
+
<p>For more information on <strong>How to use Testimonials Shortcodes</strong>, <a href="https://catchthemes.com/blog/essential-content-types-plugin/#Testimonial" title="Essential Content Type: Testimonial Shortcode" target="_blank">Click here</a></p>
|
76 |
+
</div>
|
77 |
</div><!-- #module-testimonial -->
|
78 |
|
79 |
<div id="module-featured-content" class="catch-modules">
|
97 |
<p><?php esc_html_e( 'Once enabled, Featured Content Post Type options will appear on Dashboard Menu', 'essential-content-types' ); ?></p>
|
98 |
|
99 |
<p><?php printf( esc_html__( '%1$sClick here%2$s to view Featured Content Archive Options.', 'essential-content-types' ) , '<a href ="' . esc_url( admin_url( 'customize.php?autofocus[control]=featured_content_title' ) ) . '" target="_blank">', '</a>' ); ?></p>
|
100 |
+
|
101 |
+
<p>For more information on <strong>How to use Featured Content Shortcodes</strong>, <a href="https://catchthemes.com/blog/essential-content-types-plugin/#FeaturedContent" title="Essential Content Type: Featured Content Shortcode" target="_blank">Click here</a></p>
|
102 |
+
</div>
|
103 |
</div><!-- #module-featured-content -->
|
104 |
+
|
105 |
+
<div id="module-service" class="catch-modules">
|
106 |
+
<?php
|
107 |
+
$service_options = get_option( 'ect_service' );
|
108 |
+
?>
|
109 |
+
<div class="module-header <?php echo $service_options['status'] ? 'active' : 'inactive'; ?>">
|
110 |
+
<h3 class="module-title"><?php esc_html_e( 'Services', 'essential-content-types' ); ?></h3>
|
111 |
+
|
112 |
+
<div class="switch">
|
113 |
+
<input type="checkbox" id="ect_service" class="input-switch" rel="ect_service" <?php checked( true, $service_options['status'] ); ?> >
|
114 |
+
<label for="ect_service"></label>
|
115 |
+
</div>
|
116 |
+
|
117 |
+
<div class="loader"></div>
|
118 |
+
</div>
|
119 |
+
|
120 |
+
<div class="module-content">
|
121 |
+
<p><?php esc_html_e( 'Service – Create and display your service on your website.', 'essential-content-types' ); ?></p>
|
122 |
+
|
123 |
+
<p><?php esc_html_e( 'Once enabled, Service Post Type options will appear on Dashboard Menu', 'essential-content-types' ); ?></p>
|
124 |
+
|
125 |
+
<p><?php printf( esc_html__( '%1$sClick here%2$s to view Service Archive Options.', 'essential-content-types' ) , '<a href ="' . esc_url( admin_url( 'customize.php?autofocus[control]=ect_service_title' ) ) . '" target="_blank">', '</a>' ); ?></p>
|
126 |
+
|
127 |
+
<p>For more information on <strong>How to use Service Shortcodes</strong>, <a href="https://catchthemes.com/blog/essential-content-types-plugin/#Service" title="Essential Content Type: Service Shortcode" target="_blank">Click here</a></p>
|
128 |
+
</div>
|
129 |
+
</div><!-- #module-service -->
|
130 |
</div><!-- .module-container -->
|
131 |
</div><!-- .container -->
|
132 |
</div> <!-- #dashboard -->
|
essential-content-types.php
CHANGED
@@ -16,7 +16,7 @@
|
|
16 |
* Plugin Name: Essential Content Types
|
17 |
* Plugin URI: https://catchthemes.com/wp-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.0.
|
20 |
* Author: Catch Themes
|
21 |
* Author URI: https://catchthemes.com
|
22 |
* License: GPL-3.0+
|
16 |
* Plugin Name: Essential Content Types
|
17 |
* Plugin URI: https://catchthemes.com/wp-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.0.6
|
20 |
* Author: Catch Themes
|
21 |
* Author URI: https://catchthemes.com
|
22 |
* License: GPL-3.0+
|
includes/class-essential-content-types-activator.php
CHANGED
@@ -35,7 +35,8 @@ class Essential_Content_Types_Activator {
|
|
35 |
$options = array(
|
36 |
'ect_portfolio',
|
37 |
'ect_testimonial',
|
38 |
-
'ect_featured_content'
|
|
|
39 |
);
|
40 |
|
41 |
$value = array( 'status' => 1 );
|
35 |
$options = array(
|
36 |
'ect_portfolio',
|
37 |
'ect_testimonial',
|
38 |
+
'ect_featured_content',
|
39 |
+
'ect_service'
|
40 |
);
|
41 |
|
42 |
$value = array( 'status' => 1 );
|
includes/class-essential-content-types.php
CHANGED
@@ -74,7 +74,7 @@ class Essential_Content_Types {
|
|
74 |
$this->load_dependencies();
|
75 |
$this->set_locale();
|
76 |
$this->define_admin_hooks();
|
77 |
-
|
78 |
}
|
79 |
|
80 |
/**
|
@@ -148,7 +148,7 @@ class Essential_Content_Types {
|
|
148 |
$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' );
|
149 |
|
150 |
$this->loader->add_action( 'admin_menu', $plugin_admin, 'settings_menu' );
|
151 |
-
|
152 |
////Add ajax request handler for dashbaoard switch
|
153 |
$this->loader->add_action( 'wp_ajax_ect_dashboard_switch', $plugin_admin, 'dashboard_switch' );
|
154 |
}
|
74 |
$this->load_dependencies();
|
75 |
$this->set_locale();
|
76 |
$this->define_admin_hooks();
|
77 |
+
|
78 |
}
|
79 |
|
80 |
/**
|
148 |
$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' );
|
149 |
|
150 |
$this->loader->add_action( 'admin_menu', $plugin_admin, 'settings_menu' );
|
151 |
+
|
152 |
////Add ajax request handler for dashbaoard switch
|
153 |
$this->loader->add_action( 'wp_ajax_ect_dashboard_switch', $plugin_admin, 'dashboard_switch' );
|
154 |
}
|
languages/essential-content-types.pot
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
# Copyright (C) 2017 Catch Themes
|
2 |
-
# This file is distributed under the GNU General Public License
|
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: 2017-
|
9 |
-
"PO-Revision-Date: 2016-12-
|
10 |
"Last-Translator: Sakin Shrestha <info@catchthemes.com>\n"
|
11 |
"Language-Team: Catch Themes <info@catchthemes.com>\n"
|
12 |
"Language: en_US\n"
|
@@ -14,23 +14,24 @@ 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.0.
|
18 |
-
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;esc_attr_e;esc_attr__;_nx;"
|
19 |
-
"esc_html__;
|
|
|
20 |
"X-Poedit-Basepath: .\n"
|
21 |
"X-Poedit-SourceCharset: UTF-8\n"
|
22 |
"X-Poedit-SearchPath-0: ..\n"
|
23 |
|
24 |
-
#: ../admin/class-essential-content-types-admin.php:
|
25 |
-
#: ../admin/class-essential-content-types-admin.php:
|
26 |
msgid "Essential Content Types"
|
27 |
msgstr ""
|
28 |
|
29 |
-
#: ../admin/class-essential-content-types-admin.php:
|
30 |
msgid "You do not have sufficient permissions to access this page."
|
31 |
msgstr ""
|
32 |
|
33 |
-
#: ../admin/class-essential-content-types-admin.php:
|
34 |
msgid "Connection Error. Please try again."
|
35 |
msgstr ""
|
36 |
|
@@ -44,7 +45,7 @@ msgstr ""
|
|
44 |
|
45 |
#: ../admin/class-featured-content.php:104
|
46 |
#: ../admin/class-featured-content.php:105
|
47 |
-
#: ../admin/partials/dashboard-display.php:
|
48 |
msgid "Featured Content"
|
49 |
msgstr ""
|
50 |
|
@@ -53,7 +54,7 @@ msgid "All Contents"
|
|
53 |
msgstr ""
|
54 |
|
55 |
#: ../admin/class-featured-content.php:107 ../admin/class-portfolio.php:234
|
56 |
-
#: ../admin/class-testimonial.php:267
|
57 |
msgid "Add New"
|
58 |
msgstr ""
|
59 |
|
@@ -85,7 +86,7 @@ msgstr ""
|
|
85 |
msgid "No Contents found in Trash"
|
86 |
msgstr ""
|
87 |
|
88 |
-
#: ../admin/class-featured-content.php:115
|
89 |
msgid "Filter contents list"
|
90 |
msgstr ""
|
91 |
|
@@ -192,18 +193,22 @@ msgid "Popular Content Tags"
|
|
192 |
msgstr ""
|
193 |
|
194 |
#: ../admin/class-featured-content.php:185 ../admin/class-portfolio.php:313
|
|
|
195 |
msgid "Separate tags with commas"
|
196 |
msgstr ""
|
197 |
|
198 |
#: ../admin/class-featured-content.php:186 ../admin/class-portfolio.php:314
|
|
|
199 |
msgid "Add or remove tags"
|
200 |
msgstr ""
|
201 |
|
202 |
#: ../admin/class-featured-content.php:187 ../admin/class-portfolio.php:315
|
|
|
203 |
msgid "Choose from the most used tags"
|
204 |
msgstr ""
|
205 |
|
206 |
#: ../admin/class-featured-content.php:188 ../admin/class-portfolio.php:316
|
|
|
207 |
msgid "No tags found."
|
208 |
msgstr ""
|
209 |
|
@@ -221,12 +226,12 @@ msgid "Content updated. <a href=\"%s\">View item</a>"
|
|
221 |
msgstr ""
|
222 |
|
223 |
#: ../admin/class-featured-content.php:211 ../admin/class-portfolio.php:339
|
224 |
-
#: ../admin/class-testimonial.php:313
|
225 |
msgid "Custom field updated."
|
226 |
msgstr ""
|
227 |
|
228 |
#: ../admin/class-featured-content.php:212 ../admin/class-portfolio.php:340
|
229 |
-
#: ../admin/class-testimonial.php:314
|
230 |
msgid "Custom field deleted."
|
231 |
msgstr ""
|
232 |
|
@@ -262,7 +267,7 @@ msgid ""
|
|
262 |
msgstr ""
|
263 |
|
264 |
#: ../admin/class-featured-content.php:221 ../admin/class-portfolio.php:349
|
265 |
-
#: ../admin/class-testimonial.php:323
|
266 |
msgid "M j, Y @ G:i"
|
267 |
msgstr ""
|
268 |
|
@@ -304,14 +309,17 @@ msgid ""
|
|
304 |
msgstr ""
|
305 |
|
306 |
#: ../admin/class-featured-content.php:627 ../admin/class-portfolio.php:761
|
|
|
307 |
msgid "Types"
|
308 |
msgstr ""
|
309 |
|
310 |
#: ../admin/class-featured-content.php:658 ../admin/class-portfolio.php:792
|
|
|
311 |
msgid "Tags"
|
312 |
msgstr ""
|
313 |
|
314 |
#: ../admin/class-featured-content.php:684 ../admin/class-portfolio.php:818
|
|
|
315 |
#, php-format
|
316 |
msgid "<span>Author:</span> <a href=\"%1$s\">%2$s</a>"
|
317 |
msgstr ""
|
@@ -559,10 +567,229 @@ msgid ""
|
|
559 |
"them on your dashboard."
|
560 |
msgstr ""
|
561 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
562 |
#: ../admin/class-testimonial.php:118 ../admin/class-testimonial.php:263
|
563 |
#: ../admin/class-testimonial.php:265 ../admin/class-testimonial.php:429
|
564 |
#: ../admin/class-testimonial.php:435
|
565 |
-
#: ../admin/partials/dashboard-display.php:
|
566 |
msgid "Testimonials"
|
567 |
msgstr ""
|
568 |
|
@@ -664,8 +891,8 @@ msgstr ""
|
|
664 |
#: ../admin/class-testimonial.php:321
|
665 |
#, php-format
|
666 |
msgid ""
|
667 |
-
"Testimonial scheduled for: <strong>%1$s</strong>. <a target=\"_blank\" "
|
668 |
-
"
|
669 |
msgstr ""
|
670 |
|
671 |
#: ../admin/class-testimonial.php:324
|
@@ -709,6 +936,14 @@ msgid ""
|
|
709 |
"them on your dashboard."
|
710 |
msgstr ""
|
711 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
712 |
#: ../admin/partials/dashboard-display.php:25
|
713 |
msgid ""
|
714 |
"Essential Content Types allows you to feature the impressive content "
|
@@ -735,37 +970,50 @@ msgstr ""
|
|
735 |
msgid "%1$sClick here%2$s to view Portfolio Archive Options."
|
736 |
msgstr ""
|
737 |
|
738 |
-
#: ../admin/partials/dashboard-display.php:
|
739 |
msgid "Testimonials – Add customer testimonials to your website."
|
740 |
msgstr ""
|
741 |
|
742 |
-
#: ../admin/partials/dashboard-display.php:
|
743 |
msgid ""
|
744 |
"Once enabled, Testimonials Post Type options will appear on Dashboard Menu"
|
745 |
msgstr ""
|
746 |
|
747 |
-
#: ../admin/partials/dashboard-display.php:
|
748 |
#, php-format
|
749 |
msgid "%1$sClick here%2$s to view Testimonial Achive Options."
|
750 |
msgstr ""
|
751 |
|
752 |
-
#: ../admin/partials/dashboard-display.php:
|
753 |
msgid ""
|
754 |
"Featured Content – Display the content you want as featured content to "
|
755 |
"attract visitors' attention."
|
756 |
msgstr ""
|
757 |
|
758 |
-
#: ../admin/partials/dashboard-display.php:
|
759 |
msgid ""
|
760 |
"Once enabled, Featured Content Post Type options will appear on Dashboard "
|
761 |
"Menu"
|
762 |
msgstr ""
|
763 |
|
764 |
-
#: ../admin/partials/dashboard-display.php:
|
765 |
#, php-format
|
766 |
msgid "%1$sClick here%2$s to view Featured Content Archive Options."
|
767 |
msgstr ""
|
768 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
769 |
#: ../admin/partials/footer.php:22
|
770 |
msgid "Donate"
|
771 |
msgstr ""
|
1 |
# Copyright (C) 2017 Catch Themes
|
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: 2017-08-24 17:14+0545\n"
|
9 |
+
"PO-Revision-Date: 2016-12-12 09:23-0500\n"
|
10 |
"Last-Translator: Sakin Shrestha <info@catchthemes.com>\n"
|
11 |
"Language-Team: Catch Themes <info@catchthemes.com>\n"
|
12 |
"Language: en_US\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.0.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"
|
21 |
"X-Poedit-Basepath: .\n"
|
22 |
"X-Poedit-SourceCharset: UTF-8\n"
|
23 |
"X-Poedit-SearchPath-0: ..\n"
|
24 |
|
25 |
+
#: ../admin/class-essential-content-types-admin.php:162
|
26 |
+
#: ../admin/class-essential-content-types-admin.php:163
|
27 |
msgid "Essential Content Types"
|
28 |
msgstr ""
|
29 |
|
30 |
+
#: ../admin/class-essential-content-types-admin.php:177
|
31 |
msgid "You do not have sufficient permissions to access this page."
|
32 |
msgstr ""
|
33 |
|
34 |
+
#: ../admin/class-essential-content-types-admin.php:195
|
35 |
msgid "Connection Error. Please try again."
|
36 |
msgstr ""
|
37 |
|
45 |
|
46 |
#: ../admin/class-featured-content.php:104
|
47 |
#: ../admin/class-featured-content.php:105
|
48 |
+
#: ../admin/partials/dashboard-display.php:84
|
49 |
msgid "Featured Content"
|
50 |
msgstr ""
|
51 |
|
54 |
msgstr ""
|
55 |
|
56 |
#: ../admin/class-featured-content.php:107 ../admin/class-portfolio.php:234
|
57 |
+
#: ../admin/class-service.php:107 ../admin/class-testimonial.php:267
|
58 |
msgid "Add New"
|
59 |
msgstr ""
|
60 |
|
86 |
msgid "No Contents found in Trash"
|
87 |
msgstr ""
|
88 |
|
89 |
+
#: ../admin/class-featured-content.php:115 ../admin/class-service.php:115
|
90 |
msgid "Filter contents list"
|
91 |
msgstr ""
|
92 |
|
193 |
msgstr ""
|
194 |
|
195 |
#: ../admin/class-featured-content.php:185 ../admin/class-portfolio.php:313
|
196 |
+
#: ../admin/class-service.php:185
|
197 |
msgid "Separate tags with commas"
|
198 |
msgstr ""
|
199 |
|
200 |
#: ../admin/class-featured-content.php:186 ../admin/class-portfolio.php:314
|
201 |
+
#: ../admin/class-service.php:186
|
202 |
msgid "Add or remove tags"
|
203 |
msgstr ""
|
204 |
|
205 |
#: ../admin/class-featured-content.php:187 ../admin/class-portfolio.php:315
|
206 |
+
#: ../admin/class-service.php:187
|
207 |
msgid "Choose from the most used tags"
|
208 |
msgstr ""
|
209 |
|
210 |
#: ../admin/class-featured-content.php:188 ../admin/class-portfolio.php:316
|
211 |
+
#: ../admin/class-service.php:188
|
212 |
msgid "No tags found."
|
213 |
msgstr ""
|
214 |
|
226 |
msgstr ""
|
227 |
|
228 |
#: ../admin/class-featured-content.php:211 ../admin/class-portfolio.php:339
|
229 |
+
#: ../admin/class-service.php:211 ../admin/class-testimonial.php:313
|
230 |
msgid "Custom field updated."
|
231 |
msgstr ""
|
232 |
|
233 |
#: ../admin/class-featured-content.php:212 ../admin/class-portfolio.php:340
|
234 |
+
#: ../admin/class-service.php:212 ../admin/class-testimonial.php:314
|
235 |
msgid "Custom field deleted."
|
236 |
msgstr ""
|
237 |
|
267 |
msgstr ""
|
268 |
|
269 |
#: ../admin/class-featured-content.php:221 ../admin/class-portfolio.php:349
|
270 |
+
#: ../admin/class-service.php:221 ../admin/class-testimonial.php:323
|
271 |
msgid "M j, Y @ G:i"
|
272 |
msgstr ""
|
273 |
|
309 |
msgstr ""
|
310 |
|
311 |
#: ../admin/class-featured-content.php:627 ../admin/class-portfolio.php:761
|
312 |
+
#: ../admin/class-service.php:627
|
313 |
msgid "Types"
|
314 |
msgstr ""
|
315 |
|
316 |
#: ../admin/class-featured-content.php:658 ../admin/class-portfolio.php:792
|
317 |
+
#: ../admin/class-service.php:658
|
318 |
msgid "Tags"
|
319 |
msgstr ""
|
320 |
|
321 |
#: ../admin/class-featured-content.php:684 ../admin/class-portfolio.php:818
|
322 |
+
#: ../admin/class-service.php:684
|
323 |
#, php-format
|
324 |
msgid "<span>Author:</span> <a href=\"%1$s\">%2$s</a>"
|
325 |
msgstr ""
|
567 |
"them on your dashboard."
|
568 |
msgstr ""
|
569 |
|
570 |
+
#: ../admin/class-service.php:101
|
571 |
+
msgid "Service Items"
|
572 |
+
msgstr ""
|
573 |
+
|
574 |
+
#: ../admin/class-service.php:103 ../admin/class-service.php:276
|
575 |
+
#: ../admin/partials/dashboard-display.php:110
|
576 |
+
msgid "Services"
|
577 |
+
msgstr ""
|
578 |
+
|
579 |
+
#: ../admin/class-service.php:104 ../admin/class-service.php:105
|
580 |
+
#: ../admin/class-service.php:234
|
581 |
+
msgid "Service"
|
582 |
+
msgstr ""
|
583 |
+
|
584 |
+
#: ../admin/class-service.php:106
|
585 |
+
msgid "All Services"
|
586 |
+
msgstr ""
|
587 |
+
|
588 |
+
#: ../admin/class-service.php:108
|
589 |
+
msgid "Add New Service"
|
590 |
+
msgstr ""
|
591 |
+
|
592 |
+
#: ../admin/class-service.php:109
|
593 |
+
msgid "Edit Service"
|
594 |
+
msgstr ""
|
595 |
+
|
596 |
+
#: ../admin/class-service.php:110
|
597 |
+
msgid "New Service"
|
598 |
+
msgstr ""
|
599 |
+
|
600 |
+
#: ../admin/class-service.php:111
|
601 |
+
msgid "View Service"
|
602 |
+
msgstr ""
|
603 |
+
|
604 |
+
#: ../admin/class-service.php:112
|
605 |
+
msgid "Search Services"
|
606 |
+
msgstr ""
|
607 |
+
|
608 |
+
#: ../admin/class-service.php:113
|
609 |
+
msgid "No Services found"
|
610 |
+
msgstr ""
|
611 |
+
|
612 |
+
#: ../admin/class-service.php:114
|
613 |
+
msgid "No Services found in Trash"
|
614 |
+
msgstr ""
|
615 |
+
|
616 |
+
#: ../admin/class-service.php:116
|
617 |
+
msgid "Service list navigation"
|
618 |
+
msgstr ""
|
619 |
+
|
620 |
+
#: ../admin/class-service.php:117
|
621 |
+
msgid "Services list"
|
622 |
+
msgstr ""
|
623 |
+
|
624 |
+
#: ../admin/class-service.php:147 ../admin/class-service.php:149
|
625 |
+
msgid "Service Types"
|
626 |
+
msgstr ""
|
627 |
+
|
628 |
+
#: ../admin/class-service.php:148
|
629 |
+
msgid "Service Type"
|
630 |
+
msgstr ""
|
631 |
+
|
632 |
+
#: ../admin/class-service.php:150
|
633 |
+
msgid "All Service Types"
|
634 |
+
msgstr ""
|
635 |
+
|
636 |
+
#: ../admin/class-service.php:151
|
637 |
+
msgid "Edit Service Type"
|
638 |
+
msgstr ""
|
639 |
+
|
640 |
+
#: ../admin/class-service.php:152
|
641 |
+
msgid "View Service Type"
|
642 |
+
msgstr ""
|
643 |
+
|
644 |
+
#: ../admin/class-service.php:153
|
645 |
+
msgid "Update Service Type"
|
646 |
+
msgstr ""
|
647 |
+
|
648 |
+
#: ../admin/class-service.php:154
|
649 |
+
msgid "Add New Service Type"
|
650 |
+
msgstr ""
|
651 |
+
|
652 |
+
#: ../admin/class-service.php:155
|
653 |
+
msgid "New Service Type Name"
|
654 |
+
msgstr ""
|
655 |
+
|
656 |
+
#: ../admin/class-service.php:156
|
657 |
+
msgid "Parent Service Type"
|
658 |
+
msgstr ""
|
659 |
+
|
660 |
+
#: ../admin/class-service.php:157
|
661 |
+
msgid "Parent Service Type:"
|
662 |
+
msgstr ""
|
663 |
+
|
664 |
+
#: ../admin/class-service.php:158
|
665 |
+
msgid "Search Service Types"
|
666 |
+
msgstr ""
|
667 |
+
|
668 |
+
#: ../admin/class-service.php:159
|
669 |
+
msgid "Service type list navigation"
|
670 |
+
msgstr ""
|
671 |
+
|
672 |
+
#: ../admin/class-service.php:160
|
673 |
+
msgid "Service type list"
|
674 |
+
msgstr ""
|
675 |
+
|
676 |
+
#: ../admin/class-service.php:174 ../admin/class-service.php:176
|
677 |
+
msgid "Service Tags"
|
678 |
+
msgstr ""
|
679 |
+
|
680 |
+
#: ../admin/class-service.php:175
|
681 |
+
msgid "Service Tag"
|
682 |
+
msgstr ""
|
683 |
+
|
684 |
+
#: ../admin/class-service.php:177
|
685 |
+
msgid "All Service Tags"
|
686 |
+
msgstr ""
|
687 |
+
|
688 |
+
#: ../admin/class-service.php:178
|
689 |
+
msgid "Edit Service Tag"
|
690 |
+
msgstr ""
|
691 |
+
|
692 |
+
#: ../admin/class-service.php:179
|
693 |
+
msgid "View Service Tag"
|
694 |
+
msgstr ""
|
695 |
+
|
696 |
+
#: ../admin/class-service.php:180
|
697 |
+
msgid "Update Service Tag"
|
698 |
+
msgstr ""
|
699 |
+
|
700 |
+
#: ../admin/class-service.php:181
|
701 |
+
msgid "Add New Service Tag"
|
702 |
+
msgstr ""
|
703 |
+
|
704 |
+
#: ../admin/class-service.php:182
|
705 |
+
msgid "New Service Tag Name"
|
706 |
+
msgstr ""
|
707 |
+
|
708 |
+
#: ../admin/class-service.php:183
|
709 |
+
msgid "Search Service Tags"
|
710 |
+
msgstr ""
|
711 |
+
|
712 |
+
#: ../admin/class-service.php:184
|
713 |
+
msgid "Popular Service Tags"
|
714 |
+
msgstr ""
|
715 |
+
|
716 |
+
#: ../admin/class-service.php:189
|
717 |
+
msgid "Service tag list navigation"
|
718 |
+
msgstr ""
|
719 |
+
|
720 |
+
#: ../admin/class-service.php:190
|
721 |
+
msgid "Service tag list"
|
722 |
+
msgstr ""
|
723 |
+
|
724 |
+
#: ../admin/class-service.php:210
|
725 |
+
#, php-format
|
726 |
+
msgid "Service updated. <a href=\"%s\">View item</a>"
|
727 |
+
msgstr ""
|
728 |
+
|
729 |
+
#: ../admin/class-service.php:213
|
730 |
+
msgid "Service updated."
|
731 |
+
msgstr ""
|
732 |
+
|
733 |
+
#: ../admin/class-service.php:215
|
734 |
+
#, php-format
|
735 |
+
msgid "Service restored to revision from %s"
|
736 |
+
msgstr ""
|
737 |
+
|
738 |
+
#: ../admin/class-service.php:216
|
739 |
+
#, php-format
|
740 |
+
msgid "Service published. <a href=\"%s\">View content</a>"
|
741 |
+
msgstr ""
|
742 |
+
|
743 |
+
#: ../admin/class-service.php:217
|
744 |
+
msgid "Service saved."
|
745 |
+
msgstr ""
|
746 |
+
|
747 |
+
#: ../admin/class-service.php:218
|
748 |
+
#, php-format
|
749 |
+
msgid ""
|
750 |
+
"Service submitted. <a target=\"_blank\" href=\"%s\">Preview content</a>"
|
751 |
+
msgstr ""
|
752 |
+
|
753 |
+
#: ../admin/class-service.php:219
|
754 |
+
#, php-format
|
755 |
+
msgid ""
|
756 |
+
"Service scheduled for: <strong>%1$s</strong>. <a target=\"_blank\" href="
|
757 |
+
"\"%2$s\">Preview service</a>"
|
758 |
+
msgstr ""
|
759 |
+
|
760 |
+
#: ../admin/class-service.php:222
|
761 |
+
#, php-format
|
762 |
+
msgid ""
|
763 |
+
"Service item draft updated. <a target=\"_blank\" href=\"%s\">Preview "
|
764 |
+
"content</a>"
|
765 |
+
msgstr ""
|
766 |
+
|
767 |
+
#: ../admin/class-service.php:271
|
768 |
+
msgid "ECT: Service"
|
769 |
+
msgstr ""
|
770 |
+
|
771 |
+
#: ../admin/class-service.php:284
|
772 |
+
msgid "Service Archive Title"
|
773 |
+
msgstr ""
|
774 |
+
|
775 |
+
#: ../admin/class-service.php:297
|
776 |
+
msgid "Service Archive Content"
|
777 |
+
msgstr ""
|
778 |
+
|
779 |
+
#: ../admin/class-service.php:311
|
780 |
+
msgid "Service Archive Featured Image"
|
781 |
+
msgstr ""
|
782 |
+
|
783 |
+
#: ../admin/class-service.php:555
|
784 |
+
msgid ""
|
785 |
+
"Your Service Archive currently has no entries. You can start creating them "
|
786 |
+
"on your dashboard."
|
787 |
+
msgstr ""
|
788 |
+
|
789 |
#: ../admin/class-testimonial.php:118 ../admin/class-testimonial.php:263
|
790 |
#: ../admin/class-testimonial.php:265 ../admin/class-testimonial.php:429
|
791 |
#: ../admin/class-testimonial.php:435
|
792 |
+
#: ../admin/partials/dashboard-display.php:59
|
793 |
msgid "Testimonials"
|
794 |
msgstr ""
|
795 |
|
891 |
#: ../admin/class-testimonial.php:321
|
892 |
#, php-format
|
893 |
msgid ""
|
894 |
+
"Testimonial scheduled for: <strong>%1$s</strong>. <a target=\"_blank\" href="
|
895 |
+
"\"%2$s\">Preview testimonial</a>"
|
896 |
msgstr ""
|
897 |
|
898 |
#: ../admin/class-testimonial.php:324
|
936 |
"them on your dashboard."
|
937 |
msgstr ""
|
938 |
|
939 |
+
#: ../admin/class-testimonial.php:807
|
940 |
+
msgid "Position"
|
941 |
+
msgstr ""
|
942 |
+
|
943 |
+
#: ../admin/class-testimonial.php:848
|
944 |
+
msgid "Testmonial Options"
|
945 |
+
msgstr ""
|
946 |
+
|
947 |
#: ../admin/partials/dashboard-display.php:25
|
948 |
msgid ""
|
949 |
"Essential Content Types allows you to feature the impressive content "
|
970 |
msgid "%1$sClick here%2$s to view Portfolio Archive Options."
|
971 |
msgstr ""
|
972 |
|
973 |
+
#: ../admin/partials/dashboard-display.php:69
|
974 |
msgid "Testimonials – Add customer testimonials to your website."
|
975 |
msgstr ""
|
976 |
|
977 |
+
#: ../admin/partials/dashboard-display.php:71
|
978 |
msgid ""
|
979 |
"Once enabled, Testimonials Post Type options will appear on Dashboard Menu"
|
980 |
msgstr ""
|
981 |
|
982 |
+
#: ../admin/partials/dashboard-display.php:73
|
983 |
#, php-format
|
984 |
msgid "%1$sClick here%2$s to view Testimonial Achive Options."
|
985 |
msgstr ""
|
986 |
|
987 |
+
#: ../admin/partials/dashboard-display.php:95
|
988 |
msgid ""
|
989 |
"Featured Content – Display the content you want as featured content to "
|
990 |
"attract visitors' attention."
|
991 |
msgstr ""
|
992 |
|
993 |
+
#: ../admin/partials/dashboard-display.php:97
|
994 |
msgid ""
|
995 |
"Once enabled, Featured Content Post Type options will appear on Dashboard "
|
996 |
"Menu"
|
997 |
msgstr ""
|
998 |
|
999 |
+
#: ../admin/partials/dashboard-display.php:99
|
1000 |
#, php-format
|
1001 |
msgid "%1$sClick here%2$s to view Featured Content Archive Options."
|
1002 |
msgstr ""
|
1003 |
|
1004 |
+
#: ../admin/partials/dashboard-display.php:121
|
1005 |
+
msgid "Service – Create and display your service on your website."
|
1006 |
+
msgstr ""
|
1007 |
+
|
1008 |
+
#: ../admin/partials/dashboard-display.php:123
|
1009 |
+
msgid "Once enabled, Service Post Type options will appear on Dashboard Menu"
|
1010 |
+
msgstr ""
|
1011 |
+
|
1012 |
+
#: ../admin/partials/dashboard-display.php:125
|
1013 |
+
#, php-format
|
1014 |
+
msgid "%1$sClick here%2$s to view Service Archive Options."
|
1015 |
+
msgstr ""
|
1016 |
+
|
1017 |
#: ../admin/partials/footer.php:22
|
1018 |
msgid "Donate"
|
1019 |
msgstr ""
|