Cherry Testimonials - Version 1.1.0

Version Description

Download this release

Release Info

Developer TemplateMonster 2002
Plugin Icon 128x128 Cherry Testimonials
Version 1.1.0
Comparing to
See all releases

Code changes from version 1.0.1 to 1.1.0

Files changed (84) hide show
  1. admin/assets/css/admin.css +1 -1
  2. admin/assets/js/admin.js +81 -81
  3. admin/assets/scss/admin.scss +36 -36
  4. admin/includes/class-tm-testimonials-admin.php +261 -261
  5. admin/includes/class-tm-testimonials-ajax.php +109 -109
  6. admin/includes/index.php +9 -9
  7. admin/index.php +9 -9
  8. admin/views/shortcode-settings.php +27 -27
  9. cherry-framework/cherry-core.php +469 -496
  10. cherry-framework/config.json +196 -174
  11. cherry-framework/languages/cherry-framework.pot +119 -69
  12. cherry-framework/modules/cherry-breadcrumbs/cherry-breadcrumbs.php +1597 -0
  13. cherry-framework/modules/cherry-customizer/assets/fonts/google.json +15622 -0
  14. cherry-framework/modules/cherry-customizer/assets/fonts/standard.json +209 -0
  15. cherry-framework/modules/cherry-customizer/cherry-customizer.php +1173 -0
  16. cherry-framework/modules/cherry-customizer/inc/class-cherry-wp-customize-iconpicker.php +105 -0
  17. cherry-framework/modules/cherry-db-updater/cherry-db-updater.php +379 -0
  18. cherry-framework/modules/cherry-dynamic-css/assets/cherry-css-collector.js +24 -0
  19. cherry-framework/modules/cherry-dynamic-css/assets/min/cherry-css-collector.min.js +1 -0
  20. cherry-framework/modules/cherry-dynamic-css/cherry-dynamic-css.php +543 -0
  21. cherry-framework/modules/cherry-dynamic-css/inc/class-cherry-dynamic-css-collector.php +281 -0
  22. cherry-framework/modules/cherry-dynamic-css/inc/class-cherry-dynamic-css-utilities.php +858 -0
  23. cherry-framework/modules/cherry-google-fonts-loader/cherry-google-fonts-loader.php +365 -0
  24. cherry-framework/modules/cherry-handler/assets/css/cherry-handler-styles.min.css +1 -1
  25. cherry-framework/modules/cherry-handler/assets/js/cherry-handler.js +309 -287
  26. cherry-framework/modules/cherry-handler/assets/js/min/cherry-handler.min.js +1 -1
  27. cherry-framework/modules/cherry-handler/assets/scss/cherry-handler-styles.scss +65 -65
  28. cherry-framework/modules/cherry-handler/cherry-handler.php +246 -233
  29. cherry-framework/modules/cherry-interface-builder/cherry-interface-builder.php +495 -471
  30. cherry-framework/modules/cherry-interface-builder/inc/assets/_use-in-js.scss +17 -17
  31. cherry-framework/modules/cherry-interface-builder/inc/assets/cherry-interface-builder.js +193 -189
  32. cherry-framework/modules/cherry-interface-builder/inc/assets/cherry-interface-builder.scss +503 -463
  33. cherry-framework/modules/cherry-interface-builder/inc/assets/min/cherry-interface-builder.min.css +1 -1
  34. cherry-framework/modules/cherry-interface-builder/inc/assets/min/cherry-interface-builder.min.js +1 -1
  35. cherry-framework/modules/cherry-interface-builder/inc/views/component-accordion.php +30 -30
  36. cherry-framework/modules/cherry-interface-builder/inc/views/component-repeater.php +30 -30
  37. cherry-framework/modules/cherry-interface-builder/inc/views/component-tab-horizontal.php +35 -35
  38. cherry-framework/modules/cherry-interface-builder/inc/views/component-tab-vertical.php +35 -35
  39. cherry-framework/modules/cherry-interface-builder/inc/views/component-toggle.php +30 -30
  40. cherry-framework/modules/cherry-interface-builder/inc/views/control.php +34 -34
  41. cherry-framework/modules/cherry-interface-builder/inc/views/form.php +24 -24
  42. cherry-framework/modules/cherry-interface-builder/inc/views/html.php +24 -24
  43. cherry-framework/modules/cherry-interface-builder/inc/views/section.php +36 -36
  44. cherry-framework/modules/cherry-interface-builder/inc/views/settings-children-title.php +18 -18
  45. cherry-framework/modules/cherry-interface-builder/inc/views/settings.php +32 -32
  46. cherry-framework/modules/cherry-interface-builder/inc/views/tab-children-title.php +20 -20
  47. cherry-framework/modules/cherry-interface-builder/inc/views/toggle-children-title.php +22 -22
  48. cherry-framework/modules/cherry-js-core/assets/js/cherry-js-core.js +100 -100
  49. cherry-framework/modules/cherry-js-core/assets/js/min/cherry-js-core.min.js +1 -1
  50. cherry-framework/modules/cherry-js-core/cherry-js-core.php +200 -184
  51. cherry-framework/modules/cherry-post-formats-api/assets/js/cherry-post-formats.js +68 -0
  52. cherry-framework/modules/cherry-post-formats-api/assets/js/min/cherry-post-formats.min.js +1 -0
  53. cherry-framework/modules/cherry-post-formats-api/cherry-post-formats-api.php +1121 -0
  54. cherry-framework/modules/cherry-post-formats-api/inc/class-cherry-facebook-embed.php +81 -0
  55. cherry-framework/modules/cherry-post-meta/cherry-post-meta.php +545 -547
  56. cherry-framework/modules/cherry-template-manager/cherry-template-manager.php +112 -0
  57. cherry-framework/modules/cherry-template-manager/inc/cherry-template-loader.php +193 -0
  58. cherry-framework/modules/cherry-template-manager/inc/cherry-template-parser.php +196 -0
  59. cherry-framework/modules/cherry-term-meta/cherry-term-meta.php +301 -0
  60. cherry-framework/modules/cherry-toolkit/cherry-toolkit.php +217 -219
  61. cherry-framework/modules/cherry-ui-elements/assets/sass/_lock.scss +110 -0
  62. cherry-framework/modules/cherry-ui-elements/cherry-ui-elements.php +170 -154
  63. cherry-framework/modules/cherry-ui-elements/i-ui.php +45 -45
  64. cherry-framework/modules/cherry-ui-elements/inc/class-cherry-lock-element.php +128 -0
  65. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-button/assets/min/ui-button.min.css +1 -1
  66. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-button/assets/ui-button.scss +66 -52
  67. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-button/assets/ui-kit/_mixins.scss +42 -182
  68. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-button/assets/ui-kit/_variables.scss +46 -25
  69. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-button/ui-button.php +86 -87
  70. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-button/view/button-view.php +37 -31
  71. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-checkbox/assets/min/ui-checkbox.min.css +1 -1
  72. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-checkbox/assets/min/ui-checkbox.min.js +1 -1
  73. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-checkbox/assets/ui-checkbox.js +58 -58
  74. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-checkbox/assets/ui-checkbox.scss +65 -58
  75. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-checkbox/assets/ui-kit/_mixins.scss +184 -182
  76. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-checkbox/assets/ui-kit/_variables.scss +22 -22
  77. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-checkbox/ui-checkbox.php +154 -131
  78. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-colorpicker/assets/min/ui-colorpicker.min.css +1 -1
  79. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-colorpicker/assets/ui-colorpicker.js +26 -26
  80. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-colorpicker/assets/ui-colorpicker.scss +98 -53
  81. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-colorpicker/assets/ui-kit/_mixins.scss +184 -182
  82. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-colorpicker/assets/ui-kit/_variables.scss +22 -22
  83. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-colorpicker/ui-colorpicker.php +114 -98
  84. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-iconpicker/assets/jquery-iconpicker.js +0 -445
admin/assets/css/admin.css CHANGED
@@ -1 +1 @@
1
- .cherry-testi-option-form__buttons{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end;padding:15px 30px}.cherry-testi-option-form__buttons button{position:relative;margin-left:15px}.cherry-testi-option-form__buttons svg{position:absolute;right:10px;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);display:inline;width:16px;height:16px;opacity:0;visibility:hidden;-webkit-transition:opacity .2s linear .1s, visibility .1s linear .2s;transition:opacity .2s linear .1s, visibility .1s linear .2s}.cherry-testi-option-form__buttons button[disabled] svg{opacity:1;visibility:visible}.cherry-testi-option-form__buttons circle{stroke:#fff}.cherry-testi-shortcode-title{color:initial}
1
+ .cherry-testi-option-form__buttons{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end;padding:15px 30px}.cherry-testi-option-form__buttons button{position:relative;margin-left:15px}.cherry-testi-option-form__buttons svg{position:absolute;right:10px;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);display:inline;width:16px;height:16px;opacity:0;visibility:hidden;-webkit-transition:opacity .2s linear .1s, visibility .1s linear .2s;transition:opacity .2s linear .1s, visibility .1s linear .2s}.cherry-testi-option-form__buttons button[disabled] svg{opacity:1;visibility:visible}.cherry-testi-option-form__buttons circle{stroke:#fff}.cherry-testi-shortcode-title{color:initial}
admin/assets/js/admin.js CHANGED
@@ -1,81 +1,81 @@
1
- ( function( $, CherryJsCore ) {
2
- 'use strict';
3
-
4
- CherryJsCore.utilites.namespace( 'cherryTestiAdminScripts' );
5
-
6
- CherryJsCore.cherryTestiAdminScripts = {
7
- saveHandlerId: 'cherry_testi_save_setting',
8
- resetHandlerId: 'cherry_testi_reset_setting',
9
- saveButtonId: '#cherry-testi-option-form__save',
10
- resetButtonId: '#cherry-testi-option-form__reset',
11
- formId: '#cherry-testi-option-form',
12
- saveOptionsInstance: null,
13
- resetOptionsInstance: null,
14
-
15
- init: function() {
16
- this.saveOptionsInstance = new CherryJsCore.CherryAjaxHandler(
17
- {
18
- handlerId: this.saveHandlerId,
19
- successCallback: this.saveSuccessCallback.bind( this )
20
- }
21
- );
22
-
23
- this.resetOptionsInstance = new CherryJsCore.CherryAjaxHandler(
24
- {
25
- handlerId: this.resetHandlerId,
26
- successCallback: this.resetSuccessCallback.bind( this )
27
- }
28
- );
29
-
30
- this.addEvents();
31
- },
32
-
33
- addEvents: function() {
34
- $( 'body' )
35
- .on( 'click', this.saveButtonId, this.saveOptionsHandler.bind( this ) )
36
- .on( 'click', this.resetButtonId, this.resetOptionsHandler.bind( this ) );
37
- },
38
-
39
- saveOptionsHandler: function( event ) {
40
- this.disableButton( event.target );
41
- this.saveOptionsInstance.sendFormData( this.formId );
42
- },
43
-
44
- resetOptionsHandler: function( event ) {
45
- this.disableButton( event.target );
46
- this.resetOptionsInstance.send();
47
- },
48
-
49
- resetSuccessCallback: function() {
50
- this.enableButton( this.resetButtonId );
51
- },
52
-
53
- saveSuccessCallback: function() {
54
- this.enableButton( this.saveButtonId );
55
- },
56
-
57
- disableButton: function( button ) {
58
- $( button )
59
- .attr( 'disabled', 'disabled' );
60
- },
61
-
62
- enableButton: function( button ) {
63
- var timer = null;
64
-
65
- $( button )
66
- .removeAttr( 'disabled' )
67
- .addClass( 'success' );
68
-
69
- timer = setTimeout(
70
- function() {
71
- $( button ).removeClass( 'success' );
72
- clearTimeout( timer );
73
- },
74
- 1000
75
- );
76
- }
77
- };
78
-
79
- CherryJsCore.cherryTestiAdminScripts.init();
80
-
81
- }( jQuery, window.CherryJsCore ) );
1
+ ( function( $, CherryJsCore ) {
2
+ 'use strict';
3
+
4
+ CherryJsCore.utilites.namespace( 'cherryTestiAdminScripts' );
5
+
6
+ CherryJsCore.cherryTestiAdminScripts = {
7
+ saveHandlerId: 'cherry_testi_save_setting',
8
+ resetHandlerId: 'cherry_testi_reset_setting',
9
+ saveButtonId: '#cherry-testi-option-form__save',
10
+ resetButtonId: '#cherry-testi-option-form__reset',
11
+ formId: '#cherry-testi-option-form',
12
+ saveOptionsInstance: null,
13
+ resetOptionsInstance: null,
14
+
15
+ init: function() {
16
+ this.saveOptionsInstance = new CherryJsCore.CherryAjaxHandler(
17
+ {
18
+ handlerId: this.saveHandlerId,
19
+ successCallback: this.saveSuccessCallback.bind( this )
20
+ }
21
+ );
22
+
23
+ this.resetOptionsInstance = new CherryJsCore.CherryAjaxHandler(
24
+ {
25
+ handlerId: this.resetHandlerId,
26
+ successCallback: this.resetSuccessCallback.bind( this )
27
+ }
28
+ );
29
+
30
+ this.addEvents();
31
+ },
32
+
33
+ addEvents: function() {
34
+ $( 'body' )
35
+ .on( 'click', this.saveButtonId, this.saveOptionsHandler.bind( this ) )
36
+ .on( 'click', this.resetButtonId, this.resetOptionsHandler.bind( this ) );
37
+ },
38
+
39
+ saveOptionsHandler: function( event ) {
40
+ this.disableButton( event.target );
41
+ this.saveOptionsInstance.sendFormData( this.formId );
42
+ },
43
+
44
+ resetOptionsHandler: function( event ) {
45
+ this.disableButton( event.target );
46
+ this.resetOptionsInstance.send();
47
+ },
48
+
49
+ resetSuccessCallback: function() {
50
+ this.enableButton( this.resetButtonId );
51
+ },
52
+
53
+ saveSuccessCallback: function() {
54
+ this.enableButton( this.saveButtonId );
55
+ },
56
+
57
+ disableButton: function( button ) {
58
+ $( button )
59
+ .attr( 'disabled', 'disabled' );
60
+ },
61
+
62
+ enableButton: function( button ) {
63
+ var timer = null;
64
+
65
+ $( button )
66
+ .removeAttr( 'disabled' )
67
+ .addClass( 'success' );
68
+
69
+ timer = setTimeout(
70
+ function() {
71
+ $( button ).removeClass( 'success' );
72
+ clearTimeout( timer );
73
+ },
74
+ 1000
75
+ );
76
+ }
77
+ };
78
+
79
+ CherryJsCore.cherryTestiAdminScripts.init();
80
+
81
+ }( jQuery, window.CherryJsCore ) );
admin/assets/scss/admin.scss CHANGED
@@ -1,37 +1,37 @@
1
- .cherry-testi-option-form__buttons {
2
- display: flex;
3
- justify-content: flex-end;
4
- padding: 15px 30px;
5
- }
6
-
7
- .cherry-testi-option-form__buttons button {
8
- position: relative;
9
- margin-left: 15px;
10
- }
11
-
12
- .cherry-testi-option-form__buttons svg {
13
- position: absolute;
14
- right: 10px;
15
- top: 50%;
16
- transform: translateY(-50%);
17
- display: inline;
18
- width: 16px;
19
- height: 16px;
20
- opacity: 0;
21
- visibility: hidden;
22
- transition: opacity .2s linear .1s,
23
- visibility .1s linear .2s;
24
- }
25
-
26
- .cherry-testi-option-form__buttons button[disabled] svg {
27
- opacity: 1;
28
- visibility: visible;
29
- }
30
-
31
- .cherry-testi-option-form__buttons circle {
32
- stroke: #fff;
33
- }
34
-
35
- .cherry-testi-shortcode-title {
36
- color: initial;
37
  }
1
+ .cherry-testi-option-form__buttons {
2
+ display: flex;
3
+ justify-content: flex-end;
4
+ padding: 15px 30px;
5
+ }
6
+
7
+ .cherry-testi-option-form__buttons button {
8
+ position: relative;
9
+ margin-left: 15px;
10
+ }
11
+
12
+ .cherry-testi-option-form__buttons svg {
13
+ position: absolute;
14
+ right: 10px;
15
+ top: 50%;
16
+ transform: translateY(-50%);
17
+ display: inline;
18
+ width: 16px;
19
+ height: 16px;
20
+ opacity: 0;
21
+ visibility: hidden;
22
+ transition: opacity .2s linear .1s,
23
+ visibility .1s linear .2s;
24
+ }
25
+
26
+ .cherry-testi-option-form__buttons button[disabled] svg {
27
+ opacity: 1;
28
+ visibility: visible;
29
+ }
30
+
31
+ .cherry-testi-option-form__buttons circle {
32
+ stroke: #fff;
33
+ }
34
+
35
+ .cherry-testi-shortcode-title {
36
+ color: initial;
37
  }
admin/includes/class-tm-testimonials-admin.php CHANGED
@@ -1,261 +1,261 @@
1
- <?php
2
- /**
3
- * Sets up the admin functionality for the plugin.
4
- *
5
- * @package Cherry_Testi
6
- * @subpackage Admin
7
- * @author Template Monster
8
- * @license GPL-3.0+
9
- * @copyright 2002-2016, Template Monster
10
- */
11
-
12
- /**
13
- * Class for Testimonials admin functionality.
14
- *
15
- * @since 1.0.0
16
- */
17
- class TM_Testimonials_Admin {
18
-
19
- /**
20
- * Holds the instances of this class.
21
- *
22
- * @since 1.0.0
23
- * @var object
24
- */
25
- private static $instance = null;
26
-
27
- /**
28
- * Sets up needed actions/filters for the admin to initialize.
29
- *
30
- * @since 1.0.0
31
- * @return void
32
- */
33
- public function __construct() {
34
- $this->plugin = tm_testimonials_plugin();
35
- $this->post_type = $this->plugin->get_post_type_name();
36
-
37
- // Load post meta boxes on the post editing screen.
38
- add_action( 'load-post.php', array( $this, 'metabox' ) );
39
- add_action( 'load-post-new.php', array( $this, 'metabox' ) );
40
-
41
- // Only run our customization on the 'edit.php' page in the admin.
42
- add_action( 'load-edit.php', array( $this, 'manage_columns' ) );
43
-
44
- // Modify the quick links in admin table list.
45
- add_filter( 'post_row_actions', array( $this, 'modify_row_actions' ), 10, 2 );
46
- }
47
-
48
- /**
49
- * Init `cherry-post-meta` module on the `Add New Testimonial` and `Edit Testimonial` screens.
50
- *
51
- * @since 1.0.0
52
- */
53
- public function metabox() {
54
- $screen = get_current_screen();
55
-
56
- if ( empty( $screen->post_type ) || $this->post_type !== $screen->post_type ) {
57
- return;
58
- }
59
-
60
- // Print custom styles.
61
- add_action( 'admin_head', array( $this, 'print_styles' ) );
62
-
63
- /**
64
- * Filter the array of metabox's fields.
65
- *
66
- * @since 1.0.0
67
- */
68
- $metabox_args = apply_filters( 'tm_testimonials_metabox_args', array(
69
- 'id' => 'tm-testi-options',
70
- 'title' => esc_html__( 'Testimonial Options', 'cherry-testi' ),
71
- 'page' => $this->post_type,
72
- 'context' => 'side',
73
- 'priority' => 'core',
74
- 'callback_args' => false,
75
- 'single' => array( 'key' => TM_TESTI_POSTMETA ),
76
- 'fields' => array(
77
- 'email' => array(
78
- 'id' => TM_TESTI_POSTMETA . 'email',
79
- 'name' => TM_TESTI_POSTMETA . '[email]',
80
- 'type' => 'text',
81
- 'label' => esc_html__( 'Email:', 'cherry-testi' ),
82
- 'placeholder' => esc_html__( 'email@demolink.org', 'cherry-testi' ),
83
- 'value' => '',
84
- 'master' => 'tm-testi-ui-container',
85
- ),
86
- 'url' => array(
87
- 'id' => TM_TESTI_POSTMETA . 'url',
88
- 'name' => TM_TESTI_POSTMETA . '[url]',
89
- 'type' => 'text',
90
- 'label' => esc_html__( 'URL:', 'cherry-testi' ),
91
- 'placeholder' => esc_html__( 'http://demolink.org', 'cherry-testi' ),
92
- 'value' => '',
93
- 'master' => 'tm-testi-ui-container',
94
- ),
95
- 'position' => array(
96
- 'id' => TM_TESTI_POSTMETA . 'position',
97
- 'name' => TM_TESTI_POSTMETA . '[position]',
98
- 'type' => 'text',
99
- 'label' => esc_html__( 'Position:', 'cherry-testi' ),
100
- 'placeholder' => esc_html__( 'CEO/Founder', 'cherry-testi' ),
101
- 'value' => '',
102
- 'master' => 'tm-testi-ui-container',
103
- ),
104
- 'company' => array(
105
- 'id' => TM_TESTI_POSTMETA . 'company',
106
- 'name' => TM_TESTI_POSTMETA . '[company]',
107
- 'type' => 'text',
108
- 'label' => esc_html__( 'Company Name:', 'cherry-testi' ),
109
- 'placeholder' => esc_html__( 'Demo &amp; Co', 'cherry-testi' ),
110
- 'value' => '',
111
- 'master' => 'tm-testi-ui-container',
112
- ),
113
- ),
114
- ) );
115
-
116
- $this->plugin->get_core()->init_module( 'cherry-post-meta', $metabox_args );
117
- }
118
-
119
- /**
120
- * Adds a custom filter on 'request' when viewing the `Testimonials` screen in the admin.
121
- *
122
- * @since 1.0.0
123
- */
124
- public function manage_columns() {
125
- $screen = get_current_screen();
126
-
127
- if ( empty( $screen->post_type ) || $this->post_type !== $screen->post_type ) {
128
- return;
129
- }
130
-
131
- // Modify the columns on the `Testimonials` screen.
132
- add_filter( "manage_edit-{$this->post_type}_columns", array( $this, 'columns' ) );
133
- add_action( "manage_{$this->post_type}_posts_custom_column", array( $this, 'custom_column' ), 10, 2 );
134
- }
135
-
136
- /**
137
- * Filters the columns on the `Testimonials` screen.
138
- *
139
- * @since 1.0.0
140
- * @param array $post_columns An array of column name => label.
141
- * @return array
142
- */
143
- public function columns( $post_columns ) {
144
-
145
- unset(
146
- $post_columns['author'],
147
- $post_columns[ 'taxonomy-' . $this->post_type . '_category' ],
148
- $post_columns['date']
149
- );
150
-
151
- // Add custom columns and overwrite the 'date' column.
152
- $post_columns['thumbnail'] = esc_html__( 'Avatar', 'cherry-testi' );
153
- $post_columns['author_name'] = esc_html__( 'Author Name', 'cherry-testi' );
154
- $post_columns['position'] = esc_html__( 'Position', 'cherry-testi' );
155
- $post_columns['company_name'] = esc_html__( 'Company Name', 'cherry-testi' );
156
- $post_columns[ 'taxonomy-' . $this->post_type . '_category' ] = esc_html__( 'Category', 'cherry-testi' );
157
- $post_columns['shortcode'] = esc_html__( 'Shortcode', 'cherry-testi' );
158
-
159
- // Return the columns.
160
- return $post_columns;
161
- }
162
-
163
- /**
164
- * Add output for custom columns on the "menu items" screen.
165
- *
166
- * @since 1.0.0
167
- * @param string $column The name of the column to display.
168
- * @param int $post_id The ID of the current post.
169
- */
170
- public function custom_column( $column, $post_id ) {
171
- static $prefix = '';
172
-
173
- if ( '' === $prefix ) {
174
- $shortcode = TM_Testimonials_Shortcode::get_instance();
175
- $prefix = $shortcode->get_prefix();
176
- }
177
-
178
- require_once( TM_TESTI_DIR . 'public/includes/class-tm-testimonials-template-callbacks.php' );
179
-
180
- $callbacks = new TM_Testimonials_Template_Callbacks( array( 'size' => 50 ) );
181
-
182
- switch ( $column ) {
183
- case 'author_name':
184
- $name = $callbacks->get_name();
185
- echo empty( $name ) ? '&mdash;' : $name;
186
- break;
187
-
188
- case 'thumbnail':
189
- $avatar = $callbacks->get_avatar();
190
- echo empty( $avatar ) ? '&mdash;' : $avatar;
191
- break;
192
-
193
- case 'position':
194
- $position = $callbacks->get_position();
195
- echo empty( $position ) ? '&mdash;' : $position;
196
- break;
197
-
198
- case 'company_name':
199
- $company_name = $callbacks->get_company();
200
- echo empty( $company_name ) ? '&mdash;' : $company_name;
201
- break;
202
-
203
- case 'shortcode':
204
- echo '<input style="width:100%" type="text" onfocus="this.select();" readonly="readonly" value="[' . $prefix . 'testimonials ids=&quot;' . $post_id . '&quot;]">';
205
- break;
206
-
207
- default :
208
- break;
209
- }
210
- }
211
-
212
- /**
213
- * Modify the quick links.
214
- *
215
- * @since 1.0.1
216
- * @param array $actions An array of row action links.
217
- * @param WP_Post $post The post object.
218
- * @return array
219
- */
220
- public function modify_row_actions( $actions, $post ) {
221
-
222
- if ( $post->post_type == $this->post_type && isset( $actions['inline hide-if-no-js'] ) ) {
223
-
224
- // Remove `Quick Edit`.
225
- unset( $actions['inline hide-if-no-js'] );
226
- }
227
-
228
- return $actions;
229
- }
230
-
231
- /**
232
- * Print styles.
233
- *
234
- * @since 1.0.0
235
- */
236
- public function print_styles() {
237
- ?>
238
- <style type="text/css">
239
- .tm-testi-ui-container { padding-right: 0; padding-left: 0; }
240
- .tm-testi-ui-container .cherry-control__content { flex: auto; }
241
- </style>
242
- <?php }
243
-
244
- /**
245
- * Returns the instance.
246
- *
247
- * @since 1.0.0
248
- * @return object
249
- */
250
- public static function get_instance() {
251
-
252
- // If the single instance hasn't been set, set it now.
253
- if ( null == self::$instance ) {
254
- self::$instance = new self;
255
- }
256
-
257
- return self::$instance;
258
- }
259
- }
260
-
261
- TM_Testimonials_Admin::get_instance();
1
+ <?php
2
+ /**
3
+ * Sets up the admin functionality for the plugin.
4
+ *
5
+ * @package Cherry_Testi
6
+ * @subpackage Admin
7
+ * @author Template Monster
8
+ * @license GPL-3.0+
9
+ * @copyright 2002-2016, Template Monster
10
+ */
11
+
12
+ /**
13
+ * Class for Testimonials admin functionality.
14
+ *
15
+ * @since 1.0.0
16
+ */
17
+ class TM_Testimonials_Admin {
18
+
19
+ /**
20
+ * Holds the instances of this class.
21
+ *
22
+ * @since 1.0.0
23
+ * @var object
24
+ */
25
+ private static $instance = null;
26
+
27
+ /**
28
+ * Sets up needed actions/filters for the admin to initialize.
29
+ *
30
+ * @since 1.0.0
31
+ * @return void
32
+ */
33
+ public function __construct() {
34
+ $this->plugin = tm_testimonials_plugin();
35
+ $this->post_type = $this->plugin->get_post_type_name();
36
+
37
+ // Load post meta boxes on the post editing screen.
38
+ add_action( 'load-post.php', array( $this, 'metabox' ) );
39
+ add_action( 'load-post-new.php', array( $this, 'metabox' ) );
40
+
41
+ // Only run our customization on the 'edit.php' page in the admin.
42
+ add_action( 'load-edit.php', array( $this, 'manage_columns' ) );
43
+
44
+ // Modify the quick links in admin table list.
45
+ add_filter( 'post_row_actions', array( $this, 'modify_row_actions' ), 10, 2 );
46
+ }
47
+
48
+ /**
49
+ * Init `cherry-post-meta` module on the `Add New Testimonial` and `Edit Testimonial` screens.
50
+ *
51
+ * @since 1.0.0
52
+ */
53
+ public function metabox() {
54
+ $screen = get_current_screen();
55
+
56
+ if ( empty( $screen->post_type ) || $this->post_type !== $screen->post_type ) {
57
+ return;
58
+ }
59
+
60
+ // Print custom styles.
61
+ add_action( 'admin_head', array( $this, 'print_styles' ) );
62
+
63
+ /**
64
+ * Filter the array of metabox's fields.
65
+ *
66
+ * @since 1.0.0
67
+ */
68
+ $metabox_args = apply_filters( 'tm_testimonials_metabox_args', array(
69
+ 'id' => 'tm-testi-options',
70
+ 'title' => esc_html__( 'Testimonial Options', 'cherry-testi' ),
71
+ 'page' => $this->post_type,
72
+ 'context' => 'side',
73
+ 'priority' => 'core',
74
+ 'callback_args' => false,
75
+ 'single' => array( 'key' => TM_TESTI_POSTMETA ),
76
+ 'fields' => array(
77
+ 'email' => array(
78
+ 'id' => TM_TESTI_POSTMETA . 'email',
79
+ 'name' => TM_TESTI_POSTMETA . '[email]',
80
+ 'type' => 'text',
81
+ 'label' => esc_html__( 'Email:', 'cherry-testi' ),
82
+ 'placeholder' => esc_html__( 'email@demolink.org', 'cherry-testi' ),
83
+ 'value' => '',
84
+ 'master' => 'tm-testi-ui-container',
85
+ ),
86
+ 'url' => array(
87
+ 'id' => TM_TESTI_POSTMETA . 'url',
88
+ 'name' => TM_TESTI_POSTMETA . '[url]',
89
+ 'type' => 'text',
90
+ 'label' => esc_html__( 'URL:', 'cherry-testi' ),
91
+ 'placeholder' => esc_html__( 'http://demolink.org', 'cherry-testi' ),
92
+ 'value' => '',
93
+ 'master' => 'tm-testi-ui-container',
94
+ ),
95
+ 'position' => array(
96
+ 'id' => TM_TESTI_POSTMETA . 'position',
97
+ 'name' => TM_TESTI_POSTMETA . '[position]',
98
+ 'type' => 'text',
99
+ 'label' => esc_html__( 'Position:', 'cherry-testi' ),
100
+ 'placeholder' => esc_html__( 'CEO/Founder', 'cherry-testi' ),
101
+ 'value' => '',
102
+ 'master' => 'tm-testi-ui-container',
103
+ ),
104
+ 'company' => array(
105
+ 'id' => TM_TESTI_POSTMETA . 'company',
106
+ 'name' => TM_TESTI_POSTMETA . '[company]',
107
+ 'type' => 'text',
108
+ 'label' => esc_html__( 'Company Name:', 'cherry-testi' ),
109
+ 'placeholder' => esc_html__( 'Demo &amp; Co', 'cherry-testi' ),
110
+ 'value' => '',
111
+ 'master' => 'tm-testi-ui-container',
112
+ ),
113
+ ),
114
+ ) );
115
+
116
+ $this->plugin->get_core()->init_module( 'cherry-post-meta', $metabox_args );
117
+ }
118
+
119
+ /**
120
+ * Adds a custom filter on 'request' when viewing the `Testimonials` screen in the admin.
121
+ *
122
+ * @since 1.0.0
123
+ */
124
+ public function manage_columns() {
125
+ $screen = get_current_screen();
126
+
127
+ if ( empty( $screen->post_type ) || $this->post_type !== $screen->post_type ) {
128
+ return;
129
+ }
130
+
131
+ // Modify the columns on the `Testimonials` screen.
132
+ add_filter( "manage_edit-{$this->post_type}_columns", array( $this, 'columns' ) );
133
+ add_action( "manage_{$this->post_type}_posts_custom_column", array( $this, 'custom_column' ), 10, 2 );
134
+ }
135
+
136
+ /**
137
+ * Filters the columns on the `Testimonials` screen.
138
+ *
139
+ * @since 1.0.0
140
+ * @param array $post_columns An array of column name => label.
141
+ * @return array
142
+ */
143
+ public function columns( $post_columns ) {
144
+
145
+ unset(
146
+ $post_columns['author'],
147
+ $post_columns[ 'taxonomy-' . $this->post_type . '_category' ],
148
+ $post_columns['date']
149
+ );
150
+
151
+ // Add custom columns and overwrite the 'date' column.
152
+ $post_columns['thumbnail'] = esc_html__( 'Avatar', 'cherry-testi' );
153
+ $post_columns['author_name'] = esc_html__( 'Author Name', 'cherry-testi' );
154
+ $post_columns['position'] = esc_html__( 'Position', 'cherry-testi' );
155
+ $post_columns['company_name'] = esc_html__( 'Company Name', 'cherry-testi' );
156
+ $post_columns[ 'taxonomy-' . $this->post_type . '_category' ] = esc_html__( 'Category', 'cherry-testi' );
157
+ $post_columns['shortcode'] = esc_html__( 'Shortcode', 'cherry-testi' );
158
+
159
+ // Return the columns.
160
+ return $post_columns;
161
+ }
162
+
163
+ /**
164
+ * Add output for custom columns on the "menu items" screen.
165
+ *
166
+ * @since 1.0.0
167
+ * @param string $column The name of the column to display.
168
+ * @param int $post_id The ID of the current post.
169
+ */
170
+ public function custom_column( $column, $post_id ) {
171
+ static $prefix = '';
172
+
173
+ if ( '' === $prefix ) {
174
+ $shortcode = TM_Testimonials_Shortcode::get_instance();
175
+ $prefix = $shortcode->get_prefix();
176
+ }
177
+
178
+ require_once( TM_TESTI_DIR . 'public/includes/class-tm-testimonials-template-callbacks.php' );
179
+
180
+ $callbacks = new TM_Testimonials_Template_Callbacks( array( 'size' => 50 ) );
181
+
182
+ switch ( $column ) {
183
+ case 'author_name':
184
+ $name = $callbacks->get_name();
185
+ echo empty( $name ) ? '&mdash;' : $name;
186
+ break;
187
+
188
+ case 'thumbnail':
189
+ $avatar = $callbacks->get_avatar();
190
+ echo empty( $avatar ) ? '&mdash;' : $avatar;
191
+ break;
192
+
193
+ case 'position':
194
+ $position = $callbacks->get_position();
195
+ echo empty( $position ) ? '&mdash;' : $position;
196
+ break;
197
+
198
+ case 'company_name':
199
+ $company_name = $callbacks->get_company();
200
+ echo empty( $company_name ) ? '&mdash;' : $company_name;
201
+ break;
202
+
203
+ case 'shortcode':
204
+ echo '<input style="width:100%" type="text" onfocus="this.select();" readonly="readonly" value="[' . $prefix . 'testimonials ids=&quot;' . $post_id . '&quot;]">';
205
+ break;
206
+
207
+ default :
208
+ break;
209
+ }
210
+ }
211
+
212
+ /**
213
+ * Modify the quick links.
214
+ *
215
+ * @since 1.0.1
216
+ * @param array $actions An array of row action links.
217
+ * @param WP_Post $post The post object.
218
+ * @return array
219
+ */
220
+ public function modify_row_actions( $actions, $post ) {
221
+
222
+ if ( $post->post_type == $this->post_type && isset( $actions['inline hide-if-no-js'] ) ) {
223
+
224
+ // Remove `Quick Edit`.
225
+ unset( $actions['inline hide-if-no-js'] );
226
+ }
227
+
228
+ return $actions;
229
+ }
230
+
231
+ /**
232
+ * Print styles.
233
+ *
234
+ * @since 1.0.0
235
+ */
236
+ public function print_styles() {
237
+ ?>
238
+ <style type="text/css">
239
+ .tm-testi-ui-container { padding-right: 0; padding-left: 0; }
240
+ .tm-testi-ui-container .cherry-control__content { flex: auto; }
241
+ </style>
242
+ <?php }
243
+
244
+ /**
245
+ * Returns the instance.
246
+ *
247
+ * @since 1.0.0
248
+ * @return object
249
+ */
250
+ public static function get_instance() {
251
+
252
+ // If the single instance hasn't been set, set it now.
253
+ if ( null == self::$instance ) {
254
+ self::$instance = new self;
255
+ }
256
+
257
+ return self::$instance;
258
+ }
259
+ }
260
+
261
+ TM_Testimonials_Admin::get_instance();
admin/includes/class-tm-testimonials-ajax.php CHANGED
@@ -1,109 +1,109 @@
1
- <?php
2
- /**
3
- * Ajax-handlers for page settings.
4
- *
5
- * @package Cherry_Testi
6
- * @subpackage Admin
7
- * @author Template Monster
8
- * @license GPL-3.0+
9
- * @copyright 2002-2016, Template Monster
10
- */
11
-
12
- // If class `TM_Testimonials_Ajax_Handler` doesn't exists yet.
13
- if ( ! class_exists( 'TM_Testimonials_Ajax_Handler' ) ) {
14
-
15
- /**
16
- * TM_Testimonials_Ajax_Handler class.
17
- */
18
- class TM_Testimonials_Ajax_Handler {
19
-
20
- /**
21
- * A reference to an instance of this class.
22
- *
23
- * @since 1.0.0
24
- * @var object
25
- */
26
- private static $instance = null;
27
-
28
- /**
29
- * Constructor.
30
- *
31
- * @since 1.0.0
32
- */
33
- public function __construct() {
34
- $this->init();
35
- }
36
-
37
- /**
38
- * Init `cherry-handler` module.
39
- *
40
- * @since 1.0.0
41
- */
42
- public function init() {
43
- tm_testimonials_plugin()->get_core()->init_module( 'cherry-handler', array(
44
- 'id' => 'cherry_testi_save_setting',
45
- 'action' => 'cherry_testi_save_setting',
46
- 'capability' => 'manage_options',
47
- 'callback' => array( $this, 'save_handler' ),
48
- 'sys_messages' => array(
49
- 'invalid_base_data' => esc_html__( 'Unable to process the request without nonce or server error', 'cherry-testi' ),
50
- 'no_right' => esc_html__( 'No capabilities for this action', 'cherry-testi' ),
51
- 'invalid_nonce' => esc_html__( 'Sorry, you are not allowed to save settings', 'cherry-testi' ),
52
- 'access_is_allowed' => esc_html__( 'Settings save successfully','cherry-testi' ),
53
- ),
54
- ) );
55
-
56
- tm_testimonials_plugin()->get_core()->init_module( 'cherry-handler', array(
57
- 'id' => 'cherry_testi_reset_setting',
58
- 'action' => 'cherry_testi_reset_setting',
59
- 'capability' => 'manage_options',
60
- 'callback' => array( $this, 'reset_handler' ),
61
- 'sys_messages' => array(
62
- 'invalid_base_data' => esc_html__( 'Unable to process the request without nonce or server error', 'cherry-testi' ),
63
- 'no_right' => esc_html__( 'No capabilities for this action', 'cherry-testi' ),
64
- 'invalid_nonce' => esc_html__( 'Sorry, you are not allowed to save settings', 'cherry-testi' ),
65
- 'access_is_allowed' => esc_html__( 'Settings reset successfully','cherry-testi' ),
66
- ),
67
- ) );
68
- }
69
-
70
- /**
71
- * Handler for save settings option.
72
- *
73
- * @since 1.0.0
74
- */
75
- public function save_handler() {
76
-
77
- if ( ! empty( $_REQUEST['data'] ) ) {
78
- update_option( 'cherry-testi', $_REQUEST['data'] );
79
- }
80
- }
81
-
82
- /**
83
- * Handler for reset settings option to default.
84
- *
85
- * @since 1.0.0
86
- */
87
- public function reset_handler() {
88
- delete_option( 'cherry-testi' );
89
- }
90
-
91
- /**
92
- * Returns the instance.
93
- *
94
- * @since 1.0.0
95
- * @return object
96
- */
97
- public static function get_instance() {
98
-
99
- // If the single instance hasn't been set, set it now.
100
- if ( null == self::$instance ) {
101
- self::$instance = new self;
102
- }
103
-
104
- return self::$instance;
105
- }
106
- }
107
- }
108
-
109
- TM_Testimonials_Ajax_Handler::get_instance();
1
+ <?php
2
+ /**
3
+ * Ajax-handlers for page settings.
4
+ *
5
+ * @package Cherry_Testi
6
+ * @subpackage Admin
7
+ * @author Template Monster
8
+ * @license GPL-3.0+
9
+ * @copyright 2002-2016, Template Monster
10
+ */
11
+
12
+ // If class `TM_Testimonials_Ajax_Handler` doesn't exists yet.
13
+ if ( ! class_exists( 'TM_Testimonials_Ajax_Handler' ) ) {
14
+
15
+ /**
16
+ * TM_Testimonials_Ajax_Handler class.
17
+ */
18
+ class TM_Testimonials_Ajax_Handler {
19
+
20
+ /**
21
+ * A reference to an instance of this class.
22
+ *
23
+ * @since 1.0.0
24
+ * @var object
25
+ */
26
+ private static $instance = null;
27
+
28
+ /**
29
+ * Constructor.
30
+ *
31
+ * @since 1.0.0
32
+ */
33
+ public function __construct() {
34
+ $this->init();
35
+ }
36
+
37
+ /**
38
+ * Init `cherry-handler` module.
39
+ *
40
+ * @since 1.0.0
41
+ */
42
+ public function init() {
43
+ tm_testimonials_plugin()->get_core()->init_module( 'cherry-handler', array(
44
+ 'id' => 'cherry_testi_save_setting',
45
+ 'action' => 'cherry_testi_save_setting',
46
+ 'capability' => 'manage_options',
47
+ 'callback' => array( $this, 'save_handler' ),
48
+ 'sys_messages' => array(
49
+ 'invalid_base_data' => esc_html__( 'Unable to process the request without nonce or server error', 'cherry-testi' ),
50
+ 'no_right' => esc_html__( 'No capabilities for this action', 'cherry-testi' ),
51
+ 'invalid_nonce' => esc_html__( 'Sorry, you are not allowed to save settings', 'cherry-testi' ),
52
+ 'access_is_allowed' => esc_html__( 'Settings save successfully','cherry-testi' ),
53
+ ),
54
+ ) );
55
+
56
+ tm_testimonials_plugin()->get_core()->init_module( 'cherry-handler', array(
57
+ 'id' => 'cherry_testi_reset_setting',
58
+ 'action' => 'cherry_testi_reset_setting',
59
+ 'capability' => 'manage_options',
60
+ 'callback' => array( $this, 'reset_handler' ),
61
+ 'sys_messages' => array(
62
+ 'invalid_base_data' => esc_html__( 'Unable to process the request without nonce or server error', 'cherry-testi' ),
63
+ 'no_right' => esc_html__( 'No capabilities for this action', 'cherry-testi' ),
64
+ 'invalid_nonce' => esc_html__( 'Sorry, you are not allowed to save settings', 'cherry-testi' ),
65
+ 'access_is_allowed' => esc_html__( 'Settings reset successfully','cherry-testi' ),
66
+ ),
67
+ ) );
68
+ }
69
+
70
+ /**
71
+ * Handler for save settings option.
72
+ *
73
+ * @since 1.0.0
74
+ */
75
+ public function save_handler() {
76
+
77
+ if ( ! empty( $_REQUEST['data'] ) ) {
78
+ update_option( 'cherry-testi', $_REQUEST['data'] );
79
+ }
80
+ }
81
+
82
+ /**
83
+ * Handler for reset settings option to default.
84
+ *
85
+ * @since 1.0.0
86
+ */
87
+ public function reset_handler() {
88
+ delete_option( 'cherry-testi' );
89
+ }
90
+
91
+ /**
92
+ * Returns the instance.
93
+ *
94
+ * @since 1.0.0
95
+ * @return object
96
+ */
97
+ public static function get_instance() {
98
+
99
+ // If the single instance hasn't been set, set it now.
100
+ if ( null == self::$instance ) {
101
+ self::$instance = new self;
102
+ }
103
+
104
+ return self::$instance;
105
+ }
106
+ }
107
+ }
108
+
109
+ TM_Testimonials_Ajax_Handler::get_instance();
admin/includes/index.php CHANGED
@@ -1,9 +1,9 @@
1
- <?php
2
- /**
3
- * Silence is golden
4
- *
5
- * @package Cherry_Testi
6
- * @author Template Monster
7
- * @license GPL-3.0+
8
- * @copyright 2002-2016, Template Monster
9
- */
1
+ <?php
2
+ /**
3
+ * Silence is golden
4
+ *
5
+ * @package Cherry_Testi
6
+ * @author Template Monster
7
+ * @license GPL-3.0+
8
+ * @copyright 2002-2016, Template Monster
9
+ */
admin/index.php CHANGED
@@ -1,9 +1,9 @@
1
- <?php
2
- /**
3
- * Silence is golden
4
- *
5
- * @package Cherry_Testi
6
- * @author Template Monster
7
- * @license GPL-3.0+
8
- * @copyright 2002-2016, Template Monster
9
- */
1
+ <?php
2
+ /**
3
+ * Silence is golden
4
+ *
5
+ * @package Cherry_Testi
6
+ * @author Template Monster
7
+ * @license GPL-3.0+
8
+ * @copyright 2002-2016, Template Monster
9
+ */
admin/views/shortcode-settings.php CHANGED
@@ -1,27 +1,27 @@
1
- <?php
2
- /**
3
- * Shortcode settings view.
4
- *
5
- * @package Cherry_Testi
6
- * @subpackage Views
7
- * @author Template Monster
8
- * @license GPL-3.0+
9
- * @copyright 2002-2016, Template Monster
10
- */
11
-
12
- $shortcode = TM_Testimonials_Shortcode::get_instance();
13
- $atts = $shortcode->get_shortcode_atts();
14
-
15
- if ( empty( $atts ) || ! is_array( $atts ) ) {
16
- return;
17
- }
18
-
19
- $code_text = $list = '';
20
-
21
- foreach ( $atts as $key => $att ) {
22
- $code_text .= sprintf( ' %s="%s"', esc_html( $key ), $att['default'] );
23
- $list .= sprintf( '<li><strong class="cherry-testi-shortcode-params__name">%s</strong> - %s</li>', esc_html( $key ), $att['desc'] );
24
- }
25
-
26
- printf( '<code>[%1$s%2$s%3$s]</code>', $shortcode->get_prefix(), $shortcode::$name, $code_text );
27
- printf( '<h4 class="cherry-testi-shortcode-title">%s</h4><ul class="cherry-testi-shortcode-params">%s</ul>', esc_html__( 'Parameters list:', 'cherry_testi' ), $list );
1
+ <?php
2
+ /**
3
+ * Shortcode settings view.
4
+ *
5
+ * @package Cherry_Testi
6
+ * @subpackage Views
7
+ * @author Template Monster
8
+ * @license GPL-3.0+
9
+ * @copyright 2002-2016, Template Monster
10
+ */
11
+
12
+ $atts = tm_testimonials_shortcode()->get_shortcode_atts();
13
+
14
+ if ( empty( $atts ) || ! is_array( $atts ) ) {
15
+ return;
16
+ }
17
+
18
+ $code_text = $list = '';
19
+
20
+ foreach ( $atts as $key => $attr ) {
21
+ $default = isset( $attr['default'] ) ? $attr['default'] : $attr['value'];
22
+ $code_text .= sprintf( ' %s="%s"', esc_html( $key ), $default );
23
+ $list .= sprintf( '<li><strong class="cherry-testi-shortcode-params__name">%s</strong> - %s</li>', esc_html( $key ), $attr['description'] );
24
+ }
25
+
26
+ printf( '<code>[%1$s%2$s%]</code>', tm_testimonials_shortcode()->get_tag(), $code_text );
27
+ printf( '<h4 class="cherry-testi-shortcode-title">%s</h4><ul class="cherry-testi-shortcode-params">%s</ul>', esc_html__( 'Parameters list:', 'cherry-testi' ), $list );
cherry-framework/cherry-core.php CHANGED
@@ -1,496 +1,469 @@
1
- <?php
2
- /**
3
- * Class Cherry Core
4
- * Version: 1.3.1
5
- *
6
- * @package Cherry_Framework
7
- * @subpackage Class
8
- * @author Cherry Team <cherryframework@gmail.com>
9
- * @copyright Copyright (c) 2012 - 2016, Cherry Team
10
- * @link http://www.cherryframework.com/
11
- * @license http://www.gnu.org/licenses/old-licenses/gpl-3.0.html
12
- */
13
-
14
- // If this file is called directly, abort.
15
- if ( ! defined( 'WPINC' ) ) {
16
- die;
17
- }
18
-
19
- if ( ! class_exists( 'Cherry_Core' ) ) {
20
-
21
- /**
22
- * Class Cherry Core.
23
- */
24
- class Cherry_Core {
25
-
26
- /**
27
- * A reference to an instance of this class.
28
- *
29
- * @since 1.0.0
30
- * @var object
31
- */
32
- private static $instance = null;
33
-
34
- /**
35
- * Core settings.
36
- *
37
- * @since 1.0.0
38
- * @var array
39
- */
40
- public $settings = array();
41
-
42
- /**
43
- * Holder for all registered modules for current core instance.
44
- *
45
- * @since 1.0.0
46
- * @var array
47
- */
48
- public $modules = array();
49
-
50
- /**
51
- * Holder for all modules.
52
- *
53
- * @since 1.1.0
54
- * @var array
55
- */
56
- public static $all_modules = array();
57
-
58
- /**
59
- * Constructor.
60
- *
61
- * @since 1.0.0
62
- * @since 1.1.1 Using dirname( __FILE__ ) instead of __DIR__.
63
- */
64
- public function __construct( $settings = array() ) {
65
- $base_dir = trailingslashit( dirname( __FILE__ ) );
66
- $base_url = trailingslashit( $this->base_url( '', __FILE__ ) );
67
-
68
- $defaults = array(
69
- 'framework_path' => 'cherry-framework',
70
- 'modules' => array(),
71
- 'base_dir' => $base_dir,
72
- 'base_url' => $base_url,
73
- 'extra_base_dir' => '',
74
- );
75
-
76
- $this->settings = array_merge( $defaults, $settings );
77
-
78
- $this->settings['extra_base_dir'] = trailingslashit( $this->settings['base_dir'] );
79
- $this->settings['base_dir'] = $base_dir;
80
- $this->settings['base_url'] = $base_url;
81
-
82
- $this->run_collector();
83
-
84
- /**
85
- * In this hooks priority parameter are very important.
86
- */
87
- add_action( 'after_setup_theme', array( 'Cherry_Core', 'load_all_modules' ), 2 );
88
- add_action( 'after_setup_theme', array( $this, 'init_required_modules' ), 2 );
89
-
90
- // Load the framework textdomain.
91
- add_action( 'after_setup_theme', array( $this, 'load_textdomain' ), 10 );
92
-
93
- // Init modules with autoload seted up into true.
94
- add_action( 'after_setup_theme', array( $this, 'init_autoload_modules' ), 9999 );
95
-
96
- // Backward compatibility for `cherry-widget-factory` module.
97
- remove_all_filters( 'cherry_widget_factory_core', 10 );
98
- add_filter( 'cherry_widget_factory_core', array( $this, 'pass_core_to_widgets' ), 11, 2 );
99
- }
100
-
101
- /**
102
- * Fire collector for modules.
103
- *
104
- * @since 1.0.0
105
- * @return bool
106
- */
107
- private function run_collector() {
108
-
109
- if ( ! is_array( $this->settings['modules'] ) || empty( $this->settings['modules'] ) ) {
110
- return false;
111
- }
112
-
113
- // Cherry_Toolkit module should be loaded by default.
114
- if ( ! isset( $this->settings['modules']['cherry-toolkit'] ) ) {
115
- $this->settings['modules']['cherry-toolkit'] = array(
116
- 'autoload' => true,
117
- );
118
- }
119
-
120
- foreach ( $this->settings['modules'] as $module => $settings ) {
121
- $priority = $this->get_module_priority( $module );
122
- $path = $this->get_module_path( $module );
123
-
124
- if ( ! array_key_exists( $module, self::$all_modules ) ) {
125
- self::$all_modules[ $module ] = array( $priority => $path );
126
- } else {
127
-
128
- $old_priority = array_keys( self::$all_modules[ $module ] );
129
-
130
- if ( ! is_array( $old_priority ) || ! isset( $old_priority[0] ) ) {
131
- continue;
132
- }
133
-
134
- $compare = version_compare( $old_priority[0], $priority, '<' );
135
-
136
- if ( $compare ) {
137
- continue;
138
- }
139
-
140
- self::$all_modules[ $module ] = array( $priority => $path );
141
- }
142
- }
143
-
144
- /**
145
- * Filter a holder for all modules.
146
- *
147
- * @since 1.1.0
148
- * @var array
149
- */
150
- self::$all_modules = apply_filters( 'cherry_core_all_modules', self::$all_modules, $this );
151
- }
152
-
153
- /**
154
- * Loaded all modules.
155
- *
156
- * @since 1.1.0
157
- */
158
- public static function load_all_modules() {
159
-
160
- foreach ( self::$all_modules as $module => $data ) {
161
-
162
- $path = current( $data );
163
- $loaded = self::load_module( $module, $path );
164
-
165
- if ( ! $loaded ) {
166
- continue;
167
- }
168
- }
169
- }
170
-
171
- /**
172
- * Load the framework textdomain.
173
- *
174
- * @since 1.3.2
175
- */
176
- public function load_textdomain() {
177
- $mo_file_path = dirname( __FILE__ ) . '/languages/' . get_locale() . '.mo';
178
-
179
- load_textdomain( 'cherry-framework', $mo_file_path );
180
- }
181
-
182
- /**
183
- * Init a required modules.
184
- *
185
- * @since 1.1.0
186
- */
187
- public function init_required_modules() {
188
- $required_modules = apply_filters( 'cherry_core_required_modules', array(
189
- 'cherry-toolkit',
190
- 'cherry-widget-factory',
191
- ), $this );
192
-
193
- foreach ( $required_modules as $module ) {
194
-
195
- if ( ! array_key_exists( $module, $this->settings['modules'] ) ) {
196
- continue;
197
- }
198
-
199
- $settings = $this->settings['modules'][ $module ];
200
- $args = ! empty( $settings['args'] ) ? $settings['args'] : array();
201
-
202
- $this->init_module( $module, $args );
203
- }
204
- }
205
-
206
- /**
207
- * Init autoload modules.
208
- *
209
- * @since 1.1.0
210
- */
211
- public function init_autoload_modules() {
212
-
213
- if ( empty( $this->modules ) ) {
214
- return;
215
- }
216
-
217
- foreach ( $this->settings['modules'] as $module => $settings ) {
218
-
219
- if ( ! $this->is_module_autoload( $module ) ) {
220
- continue;
221
- }
222
-
223
- if ( ! empty( $this->modules[ $module ] ) ) {
224
- continue;
225
- }
226
-
227
- $args = ! empty( $settings['args'] ) ? $settings['args'] : array();
228
- $this->init_module( $module, $args );
229
- }
230
- }
231
-
232
- /**
233
- * Init single module.
234
- *
235
- * @since 1.0.0
236
- * @param string $module Module slug.
237
- * @param array $args Module arguments array.
238
- * @return mixed
239
- */
240
- public function init_module( $module, $args = array() ) {
241
- $this->modules[ $module ] = $this->get_module_instance( $module, $args );
242
-
243
- /**
244
- * Filter a single module after initialization.
245
- *
246
- * @since 1.1.0
247
- */
248
- return apply_filters( 'cherry_core_init_module', $this->modules[ $module ], $module, $args, $this );
249
- }
250
-
251
- /**
252
- * Check module autoload.
253
- *
254
- * @since 1.0.0
255
- * @param string $module Module slug.
256
- * @return bool
257
- */
258
- public function is_module_autoload( $module ) {
259
-
260
- if ( empty( $this->settings['modules'][ $module ]['autoload'] ) ) {
261
- return false;
262
- }
263
-
264
- return $this->settings['modules'][ $module ]['autoload'];
265
- }
266
-
267
- /**
268
- * Include module.
269
- *
270
- * @since 1.0.0
271
- * @param string $module Module slug.
272
- * @param string $path Module path.
273
- * @return bool
274
- */
275
- public static function load_module( $module, $path ) {
276
- $class_name = self::get_class_name( $module );
277
-
278
- if ( class_exists( $class_name ) ) {
279
- return true;
280
- }
281
-
282
- if ( ! $path ) {
283
- return false;
284
- }
285
-
286
- require_once( $path );
287
-
288
- return true;
289
- }
290
-
291
- /**
292
- * Get module instance.
293
- *
294
- * @since 1.0.0
295
- * @param string $module Module slug.
296
- * @param array $args Module arguments.
297
- * @return object
298
- */
299
- public function get_module_instance( $module, $args = array() ) {
300
- $class_name = self::get_class_name( $module );
301
-
302
- if ( ! class_exists( $class_name ) ) {
303
- echo '<p>Class <b>' . esc_html( $class_name ) . '</b> not exist!</p>';
304
- return false;
305
- }
306
-
307
- return $this->modules[ $module ] = call_user_func( array( $class_name, 'get_instance' ), $this, $args );
308
- }
309
-
310
- /**
311
- * Get class name by module slug.
312
- *
313
- * @since 1.0.0
314
- * @param string $slug Module slug.
315
- * @return string
316
- */
317
- public static function get_class_name( $slug = '' ) {
318
- $slug = str_replace( '-', ' ', $slug );
319
- $class = str_replace( ' ', '_', ucwords( $slug ) );
320
-
321
- return $class;
322
- }
323
-
324
- /**
325
- * Get path to main file for passed module.
326
- *
327
- * @since 1.0.1
328
- * @param string $module Module slug.
329
- * @return string
330
- */
331
- public function get_module_path( $module ) {
332
- $abs_path = false;
333
- $rel_path = 'modules/' . $module . '/' . $module . '.php';
334
-
335
- if ( file_exists( $this->settings['extra_base_dir'] . $rel_path ) ) {
336
- $abs_path = $this->settings['extra_base_dir'] . $rel_path;
337
- } else if ( file_exists( $this->settings['base_dir'] . $rel_path ) ) {
338
- $abs_path = $this->settings['base_dir'] . $rel_path;
339
- }
340
-
341
- return $abs_path;
342
- }
343
-
344
- /**
345
- * Get module priority from it's version.
346
- * Version information should be provided as a value stored in the header notation.
347
- *
348
- * @link https://developer.wordpress.org/reference/functions/get_file_data/
349
- * @since 1.0.0
350
- * @param string $module Module slug or path.
351
- * @param bool $is_path Set this as true, if `$module` contains a path.
352
- * @return int
353
- */
354
- public function get_module_priority( $module, $is_path = false ) {
355
-
356
- // Default phpDoc headers.
357
- $default_headers = array(
358
- 'version' => 'Version',
359
- );
360
-
361
- // Maximum version number (major, minor, patch).
362
- $max_version = array(
363
- 99,
364
- 99,
365
- 999,
366
- );
367
-
368
- // If `$module` is a slug, get module path.
369
- if ( ! $is_path ) {
370
- $module = $this->get_module_path( $module );
371
- }
372
-
373
- $version = '1.0.0';
374
-
375
- /* @TODO: Add smart check */
376
- if ( ! $module ) {
377
- return $version;
378
- }
379
-
380
- $data = get_file_data( $module , $default_headers );
381
-
382
- // Check if version string has a valid value.
383
- if ( isset( $data['version'] ) && false !== strpos( $data['version'], '.' ) ) {
384
-
385
- // Clean the version string.
386
- preg_match( '/[\d\.]+/', $data['version'], $version );
387
- $version = $version[0];
388
- }
389
-
390
- // Convert version into integer.
391
- $parts = explode( '.', $version );
392
-
393
- // Calculate priority.
394
- foreach ( $parts as $index => $part ) {
395
- $parts[ $index ] = $max_version[ $index ] - (int) $part;
396
- }
397
-
398
- return (int) join( '', $parts );
399
- }
400
-
401
- /**
402
- * Retrieves the absolute URL to the current file.
403
- * Like a WordPress function `plugins_url`.
404
- *
405
- * @link https://codex.wordpress.org/Function_Reference/plugins_url
406
- * @since 1.0.1
407
- * @param string $file_path Optional. Extra path appended to the end of the URL.
408
- * @param string $module_path A full path to the core or module file.
409
- * @return string
410
- */
411
- public static function base_url( $file_path = '', $module_path ) {
412
- $module_path = wp_normalize_path( $module_path );
413
- $module_dir = dirname( $module_path );
414
-
415
- $plugin_dir = wp_normalize_path( WP_PLUGIN_DIR );
416
- $stylesheet = get_stylesheet();
417
- $theme_root = get_raw_theme_root( $stylesheet );
418
- $theme_dir = "$theme_root/$stylesheet";
419
-
420
- if ( 0 === strpos( $module_path, $plugin_dir ) ) {
421
- $url = plugin_dir_url( $module_path );
422
- } else if ( false !== strpos( $module_path, $theme_dir ) ) {
423
- $explode = explode( $theme_dir, $module_dir );
424
- $url = get_stylesheet_directory_uri() . end( $explode );
425
- } else {
426
- $site_url = site_url();
427
- $abs_path = wp_normalize_path( ABSPATH );
428
- $url = str_replace( untrailingslashit( $abs_path ), $site_url, $module_dir );
429
- }
430
-
431
- if ( $file_path && is_string( $file_path ) ) {
432
- $url = trailingslashit( $url );
433
- $url .= ltrim( $file_path, '/' );
434
- }
435
-
436
- return apply_filters( 'cherry_core_base_url', $url, $file_path, $module_path );
437
- }
438
-
439
- /**
440
- * Pass core instance into widget.
441
- *
442
- * @since 1.1.0
443
- * @param mixed $core Current core object.
444
- * @param string $path Abstract widget file path.
445
- * @return mixed
446
- */
447
- public function pass_core_to_widgets( $core, $path ) {
448
- $path = str_replace( '\\', '/', $path );
449
- $current_core = str_replace( '\\', '/', $this->settings['extra_base_dir'] );
450
-
451
- if ( false !== strpos( $path, $current_core ) ) {
452
- return self::get_instance();
453
- }
454
-
455
- return $core;
456
- }
457
-
458
- /**
459
- * Get path to the core directory.
460
- *
461
- * @since 1.0.0
462
- * @deprecated 1.1.0 Use constant `dirname( __FILE__ )`
463
- * @return string
464
- */
465
- public function get_core_dir() {
466
- return trailingslashit( $this->settings['base_dir'] );
467
- }
468
-
469
- /**
470
- * Get URI to the core directory.
471
- *
472
- * @since 1.0.0
473
- * @deprecated 1.1.0 Use `base_url()` method
474
- * @return string
475
- */
476
- public function get_core_url() {
477
- return trailingslashit( $this->settings['base_url'] );
478
- }
479
-
480
- /**
481
- * Returns the instance.
482
- *
483
- * @since 1.0.0
484
- * @return object
485
- */
486
- public static function get_instance() {
487
-
488
- // If the single instance hasn't been set, set it now.
489
- if ( null == self::$instance ) {
490
- self::$instance = new self;
491
- }
492
-
493
- return self::$instance;
494
- }
495
- }
496
- }
1
+ <?php
2
+ /**
3
+ * Class Cherry Core
4
+ * Version: 1.5.3
5
+ *
6
+ * @package Cherry_Framework
7
+ * @subpackage Class
8
+ * @author Cherry Team <cherryframework@gmail.com>
9
+ * @copyright Copyright (c) 2012 - 2016, Cherry Team
10
+ * @link http://www.cherryframework.com/
11
+ * @license http://www.gnu.org/licenses/gpl-3.0.en.html
12
+ */
13
+
14
+ // If this file is called directly, abort.
15
+ if ( ! defined( 'WPINC' ) ) {
16
+ die;
17
+ }
18
+
19
+ if ( ! class_exists( 'Cherry_Core' ) ) {
20
+
21
+ /**
22
+ * Class Cherry Core.
23
+ */
24
+ class Cherry_Core {
25
+
26
+ /**
27
+ * A reference to an instance of this class.
28
+ *
29
+ * @since 1.0.0
30
+ * @var object
31
+ */
32
+ private static $instance = null;
33
+
34
+ /**
35
+ * Core settings.
36
+ *
37
+ * @since 1.0.0
38
+ * @var array
39
+ */
40
+ public $settings = array();
41
+
42
+ /**
43
+ * Holder for all registered modules for current core instance.
44
+ *
45
+ * @since 1.0.0
46
+ * @var array
47
+ */
48
+ public $modules = array();
49
+
50
+ /**
51
+ * Holder for all modules.
52
+ *
53
+ * @since 1.1.0
54
+ * @var array
55
+ */
56
+ public static $all_modules = array();
57
+
58
+ /**
59
+ * Constructor.
60
+ *
61
+ * @since 1.0.0
62
+ */
63
+ public function __construct( $settings = array() ) {
64
+ global $chery_core_version;
65
+
66
+ $defaults = array(
67
+ 'framework_path' => 'cherry-framework',
68
+ 'modules' => array(),
69
+ 'base_dir' => '',
70
+ 'base_url' => '',
71
+ );
72
+
73
+ $this->settings = array_merge( $defaults, $settings );
74
+
75
+ if ( isset( $chery_core_version ) && 0 < sizeof( $chery_core_version ) ) {
76
+ $core_paths = array_values( $chery_core_version );
77
+ $path_parts = pathinfo( $core_paths[0] );
78
+ $this->settings['base_dir'] = trailingslashit( $path_parts['dirname'] );
79
+ } else {
80
+ // This condition and the using of the function dirname is due to core backwards compatibility with old framework versions
81
+ $this->settings['base_dir'] = trailingslashit( dirname( __FILE__ ) );
82
+ }
83
+
84
+ $this->settings['base_url'] = trailingslashit( $this->base_url( '', $this->settings['base_dir'] ) );
85
+
86
+ $this->run_collector();
87
+
88
+ /**
89
+ * In this hooks priority parameter are very important.
90
+ */
91
+ add_action( 'after_setup_theme', array( 'Cherry_Core', 'load_all_modules' ), 2 );
92
+ add_action( 'after_setup_theme', array( $this, 'init_required_modules' ), 2 );
93
+
94
+ // Load the framework textdomain.
95
+ add_action( 'after_setup_theme', array( $this, 'load_textdomain' ), 10 );
96
+
97
+ // Init modules with autoload seted up into true.
98
+ add_action( 'after_setup_theme', array( $this, 'init_autoload_modules' ), 9999 );
99
+
100
+ // Backward compatibility for `cherry-widget-factory` module.
101
+ remove_all_filters( 'cherry_widget_factory_core', 10 );
102
+ add_filter( 'cherry_widget_factory_core', array( $this, 'pass_core_to_widgets' ), 11, 2 );
103
+ }
104
+
105
+ /**
106
+ * Fire collector for modules.
107
+ *
108
+ * @since 1.0.0
109
+ * @return bool
110
+ */
111
+ private function run_collector() {
112
+
113
+ if ( ! is_array( $this->settings['modules'] ) || empty( $this->settings['modules'] ) ) {
114
+ return false;
115
+ }
116
+
117
+ // Cherry_Toolkit module should be loaded by default.
118
+ if ( ! isset( $this->settings['modules']['cherry-toolkit'] ) ) {
119
+ $this->settings['modules']['cherry-toolkit'] = array(
120
+ 'autoload' => true,
121
+ );
122
+ }
123
+
124
+ foreach ( $this->settings['modules'] as $module => $settings ) {
125
+ $file_path = $this->get_module_file( $module );
126
+
127
+ if ( ! array_key_exists( $module, self::$all_modules ) ) {
128
+ self::$all_modules[ $module ] = $file_path;
129
+ }
130
+ }
131
+
132
+ /**
133
+ * Filter a holder for all modules.
134
+ *
135
+ * @since 1.1.0
136
+ * @var array
137
+ */
138
+ self::$all_modules = apply_filters( 'cherry_core_all_modules', self::$all_modules, $this );
139
+ }
140
+
141
+ /**
142
+ * Loaded all modules.
143
+ *
144
+ * @since 1.1.0
145
+ */
146
+ public static function load_all_modules() {
147
+ foreach ( self::$all_modules as $module => $path ) {
148
+
149
+ $loaded = self::load_module( $module, $path );
150
+
151
+ if ( ! $loaded ) {
152
+ continue;
153
+ }
154
+ }
155
+ }
156
+
157
+ /**
158
+ * Load the framework textdomain.
159
+ *
160
+ * @since 1.4.0
161
+ */
162
+ public function load_textdomain() {
163
+ $mo_file_path = $this->settings['base_dir'] . 'languages/' . get_locale() . '.mo';
164
+
165
+ load_textdomain( 'cherry-framework', $mo_file_path );
166
+ }
167
+
168
+ /**
169
+ * Init a required modules.
170
+ *
171
+ * @since 1.1.0
172
+ */
173
+ public function init_required_modules() {
174
+ $required_modules = apply_filters( 'cherry_core_required_modules', array(
175
+ 'cherry-toolkit',
176
+ 'cherry-widget-factory',
177
+ ), $this );
178
+
179
+ foreach ( $required_modules as $module ) {
180
+
181
+ if ( ! array_key_exists( $module, $this->settings['modules'] ) ) {
182
+ continue;
183
+ }
184
+
185
+ $settings = $this->settings['modules'][ $module ];
186
+ $args = ! empty( $settings['args'] ) ? $settings['args'] : array();
187
+
188
+ $this->init_module( $module, $args );
189
+ }
190
+ }
191
+
192
+ /**
193
+ * Init autoload modules.
194
+ *
195
+ * @since 1.1.0
196
+ */
197
+ public function init_autoload_modules() {
198
+ if ( empty( $this->modules ) ) {
199
+ return;
200
+ }
201
+
202
+ foreach ( $this->settings['modules'] as $module => $settings ) {
203
+
204
+ if ( ! $this->is_module_autoload( $module ) ) {
205
+ continue;
206
+ }
207
+
208
+ if ( ! empty( $this->modules[ $module ] ) ) {
209
+ continue;
210
+ }
211
+
212
+ $args = ! empty( $settings['args'] ) ? $settings['args'] : array();
213
+
214
+ $this->init_module( $module, $args );
215
+ }
216
+ }
217
+
218
+ /**
219
+ * Init single module.
220
+ *
221
+ * @since 1.0.0
222
+ * @param string $module Module slug.
223
+ * @param array $args Module arguments array.
224
+ * @return mixed
225
+ */
226
+ public function init_module( $module, $args = array() ) {
227
+
228
+ if ( empty( $args[ 'module_path' ] ) ) {
229
+ $get_module_path = $this->get_module_path( $module );
230
+ $args['module_path'] = ( $get_module_path ) ? $get_module_path : '';
231
+ }
232
+
233
+ $this->modules[ $module ] = $this->get_module_instance( $module, $args );
234
+
235
+ /**
236
+ * Filter a single module after initialization.
237
+ *
238
+ * @since 1.1.0
239
+ */
240
+ return apply_filters( 'cherry_core_init_module', $this->modules[ $module ], $module, $args, $this );
241
+ }
242
+
243
+ /**
244
+ * Check module autoload.
245
+ *
246
+ * @since 1.0.0
247
+ * @param string $module Module slug.
248
+ * @return bool
249
+ */
250
+ public function is_module_autoload( $module ) {
251
+
252
+ if ( empty( $this->settings['modules'][ $module ]['autoload'] ) ) {
253
+ return false;
254
+ }
255
+
256
+ return $this->settings['modules'][ $module ]['autoload'];
257
+ }
258
+
259
+ /**
260
+ * Include module.
261
+ *
262
+ * @since 1.0.0
263
+ * @param string $module Module slug.
264
+ * @param string $path Module path.
265
+ * @return bool
266
+ */
267
+ public static function load_module( $module, $path ) {
268
+ $class_name = self::get_class_name( $module );
269
+
270
+ if ( ! $path ) {
271
+ return false;
272
+ }
273
+
274
+ if ( class_exists( $class_name ) ) {
275
+ return true;
276
+ }
277
+
278
+ require_once( $path );
279
+
280
+ return true;
281
+ }
282
+
283
+ /**
284
+ * Get module instance.
285
+ *
286
+ * @since 1.0.0
287
+ * @param string $module Module slug.
288
+ * @param array $args Module arguments.
289
+ * @return object
290
+ */
291
+ public function get_module_instance( $module, $args = array() ) {
292
+ $class_name = self::get_class_name( $module );
293
+
294
+ if ( ! class_exists( $class_name ) ) {
295
+ echo '<p>Class <b>' . esc_html( $class_name ) . '</b> not exist!</p>';
296
+ return false;
297
+ }
298
+
299
+ $this->modules[ $module ] = call_user_func( array( $class_name, 'get_instance' ), $this, $args );
300
+
301
+ return $this->modules[ $module ];
302
+ }
303
+
304
+ /**
305
+ * Get class name by module slug.
306
+ *
307
+ * @since 1.0.0
308
+ * @param string $slug Module slug.
309
+ * @return string
310
+ */
311
+ public static function get_class_name( $slug = '' ) {
312
+ $slug = str_replace( '-', ' ', $slug );
313
+ $class = str_replace( ' ', '_', ucwords( $slug ) );
314
+
315
+ return $class;
316
+ }
317
+
318
+ /**
319
+ * Get path to main file for passed module.
320
+ *
321
+ * @since 1.0.1
322
+ * @param string $module Module slug.
323
+ * @return string
324
+ */
325
+ public function get_module_path( $module ) {
326
+ $abs_path = false;
327
+ $rel_path = 'modules/' . $module . '/';
328
+
329
+ if ( file_exists( $this->settings['base_dir'] . $rel_path ) ) {
330
+ $abs_path = $this->settings['base_dir'] . $rel_path;
331
+ }
332
+
333
+ return $abs_path;
334
+ }
335
+
336
+ /**
337
+ * Get path to main file for passed module.
338
+ *
339
+ * @since 1.0.1
340
+ * @param string $module Module slug.
341
+ * @return string
342
+ */
343
+ public function get_module_file( $module ) {
344
+ $abs_path = false;
345
+ $rel_path = 'modules/' . $module . '/' . $module . '.php';
346
+
347
+ if ( file_exists( $this->settings['base_dir'] . $rel_path ) ) {
348
+ $abs_path = $this->settings['base_dir'] . $rel_path;
349
+ }
350
+
351
+ return $abs_path;
352
+ }
353
+
354
+ /**
355
+ * Retrieves the absolute URL to the current file.
356
+ * Like a WordPress function `plugins_url`.
357
+ *
358
+ * @link https://codex.wordpress.org/Function_Reference/plugins_url
359
+ * @since 1.0.1
360
+ * @param string $file_path Optional. Extra path appended to the end of the URL.
361
+ * @param string $module_path A full path to the core or module file.
362
+ * @return string
363
+ */
364
+ public static function base_url( $file_path = '', $module_path ) {
365
+ $module_path = wp_normalize_path( $module_path );
366
+ preg_match( '/\.[0-9a-z]+$/', $module_path, $ext );
367
+
368
+ if ( empty( $ext ) ) {
369
+ $module_dir = $module_path;
370
+ } else {
371
+ // This condition and the using of the function dirname is due to core backwards compatibility with old framework versions
372
+ $module_dir = dirname( $module_path );
373
+ }
374
+
375
+ $plugin_dir = wp_normalize_path( WP_PLUGIN_DIR );
376
+ $stylesheet = get_stylesheet();
377
+ $theme_root = get_raw_theme_root( $stylesheet );
378
+ $theme_dir = "$theme_root/$stylesheet";
379
+
380
+ if ( 0 === strpos( $module_dir, $plugin_dir ) ) {
381
+ $site_url = site_url();
382
+ $abs_path = wp_normalize_path( ABSPATH );
383
+ $url = str_replace( untrailingslashit( $abs_path ), $site_url, $module_dir );
384
+ } else if ( false !== strpos( $module_path, $theme_dir ) ) {
385
+ $explode = explode( $theme_dir, $module_dir );
386
+ $url = get_stylesheet_directory_uri() . end( $explode );
387
+ } else {
388
+ $site_url = site_url();
389
+ $abs_path = wp_normalize_path( ABSPATH );
390
+ $url = str_replace( untrailingslashit( $abs_path ), $site_url, $module_dir );
391
+ }
392
+
393
+ if ( $file_path && is_string( $file_path ) ) {
394
+ $url = trailingslashit( $url );
395
+ $url .= ltrim( $file_path, '/' );
396
+ }
397
+
398
+ return apply_filters( 'cherry_core_base_url', $url, $file_path, $module_path );
399
+ }
400
+
401
+ /**
402
+ * Pass core instance into widget.
403
+ *
404
+ * @since 1.1.0
405
+ * @param mixed $core Current core object.
406
+ * @param string $path Abstract widget file path.
407
+ * @return mixed
408
+ */
409
+ public function pass_core_to_widgets( $core, $path ) {
410
+ $path = str_replace( '\\', '/', $path );
411
+ $current_core = str_replace( '\\', '/', $this->settings['base_dir'] );
412
+
413
+ if ( false !== strpos( $path, $current_core ) ) {
414
+ return self::get_instance();
415
+ }
416
+
417
+ return $core;
418
+ }
419
+
420
+ /**
421
+ * Get core version.
422
+ *
423
+ * @since 1.5.0
424
+ * @return string
425
+ */
426
+ public function get_core_version() {
427
+ global $chery_core_version;
428
+
429
+ return key( $chery_core_version );
430
+ }
431
+
432
+ /**
433
+ * Get path to the core directory.
434
+ *
435
+ * @since 1.0.0
436
+ * @return string
437
+ */
438
+ public function get_core_dir() {
439
+ return trailingslashit( $this->settings['base_dir'] );
440
+ }
441
+
442
+ /**
443
+ * Get URI to the core directory.
444
+ *
445
+ * @since 1.0.0
446
+ * @deprecated 1.1.0 Use `base_url()` method
447
+ * @return string
448
+ */
449
+ public function get_core_url() {
450
+ return trailingslashit( $this->settings['base_url'] );
451
+ }
452
+
453
+ /**
454
+ * Returns the instance.
455
+ *
456
+ * @since 1.0.0
457
+ * @return object
458
+ */
459
+ public static function get_instance() {
460
+
461
+ // If the single instance hasn't been set, set it now.
462
+ if ( null == self::$instance ) {
463
+ self::$instance = new self;
464
+ }
465
+
466
+ return self::$instance;
467
+ }
468
+ }
469
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
cherry-framework/config.json CHANGED
@@ -1,174 +1,196 @@
1
- {
2
- "name" : "Cherry Framework",
3
- "version" : "1.3.1",
4
- "description" : "",
5
- "doc_link" : "",
6
- "git_link" : "https://github.com/CherryFramework/cherry-framework",
7
- "modules" : {
8
- "cherry-breadcrumbs" : {
9
- "name" : "Breadcrumb Trail",
10
- "description" : "A breadcrumb menu script for WordPress.",
11
- "version" : "1.1.2",
12
- "doc_link" : "",
13
- "git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry-breadcrumbs",
14
- "compatible" : ["theme", "plugin"],
15
- "wordpress_org" : true,
16
- "required" : false,
17
- "dependencies" : []
18
- },
19
- "cherry-customizer" : {
20
- "name" : "Customizer API",
21
- "description" : "Customizer functionality.",
22
- "version" : "1.1.5",
23
- "doc_link" : "",
24
- "git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry-customizer",
25
- "compatible" : ["theme", "plugin"],
26
- "wordpress_org" : true,
27
- "required" : false,
28
- "dependencies" : []
29
- },
30
- "cherry-dynamic-css" : {
31
- "name" : "Dynamic CSS",
32
- "description" : "Generate CSS.",
33
- "version" : "1.2.2",
34
- "doc_link" : "",
35
- "git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry-dynamic-css",
36
- "compatible" : ["theme", "plugin"],
37
- "wordpress_org" : true,
38
- "required" : false,
39
- "dependencies" : []
40
- },
41
- "cherry-google-fonts-loader" : {
42
- "name" : "Google Fonts Loader",
43
- "description" : "Enqueue Google fonts.",
44
- "version" : "1.1.0",
45
- "doc_link" : "",
46
- "git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry-google-fonts-loader",
47
- "compatible" : ["theme", "plugin"],
48
- "wordpress_org" : true,
49
- "required" : false,
50
- "dependencies" : []
51
- },
52
- "cherry-handler" : {
53
- "name" : "Cherry handler",
54
- "description" : "Initialize handlers.",
55
- "version" : "1.1.0",
56
- "doc_link" : "",
57
- "git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry-handler",
58
- "compatible" : ["theme", "plugin"],
59
- "wordpress_org" : true,
60
- "required" : false,
61
- "dependencies" : [ "cherry-js-core" ]
62
- },
63
- "cherry-interface-builder" : {
64
- "name" : "Interface Builder",
65
- "description" : "The module for the creation of interfaces in the WordPress admin panel.",
66
- "version" : "1.1.1",
67
- "doc_link" : "",
68
- "git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry-interface-builder",
69
- "compatible" : ["theme", "plugin"],
70
- "wordpress_org" : true,
71
- "required" : false,
72
- "dependencies" : [ "cherry-ui-elements" ]
73
- },
74
- "cherry-js-core" : {
75
- "name" : "JS Core",
76
- "description" : "Initialize global JS object which provides additional plugin functionality.",
77
- "version" : "1.1.2",
78
- "doc_link" : "",
79
- "git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry-js-core",
80
- "compatible" : ["theme", "plugin"],
81
- "wordpress_org" : true,
82
- "required" : false,
83
- "dependencies" : []
84
- },
85
- "cherry-post-formats-api" : {
86
- "name" : "Post Formats API",
87
- "description" : "API for post formats specific content.",
88
- "version" : "1.1.2",
89
- "doc_link" : "",
90
- "git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry-post-formats-api",
91
- "compatible" : ["theme", "plugin"],
92
- "wordpress_org" : true,
93
- "required" : false,
94
- "dependencies" : [ "cherry-js-core" ]
95
- },
96
- "cherry-post-meta" : {
97
- "name" : "Post Meta",
98
- "description" : "Manage post meta.",
99
- "version" : "1.2.1",
100
- "doc_link" : "",
101
- "git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry-post-meta",
102
- "compatible" : ["theme", "plugin"],
103
- "wordpress_org" : true,
104
- "required" : false,
105
- "dependencies" : [ "cherry-interface-builder" ]
106
- },
107
- "cherry-template-manager" : {
108
- "name" : "Template Manager",
109
- "description" : "Module for load and parse *.tmpl files.",
110
- "version" : "1.0.0",
111
- "doc_link" : "",
112
- "git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry-template-manager",
113
- "compatible" : ["theme", "plugin"],
114
- "wordpress_org" : true,
115
- "required" : false,
116
- "dependencies" : []
117
- },
118
- "cherry-term-meta" : {
119
- "name" : "Term Meta",
120
- "description" : "Manage term metadata.",
121
- "version" : "1.1.4",
122
- "doc_link" : "",
123
- "git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry-term-meta",
124
- "compatible" : ["theme", "plugin"],
125
- "wordpress_org" : true,
126
- "required" : false,
127
- "dependencies" : [ "cherry-ui-elements" ]
128
- },
129
- "cherry-toolkit": {
130
- "name": "Framework Toolkit",
131
- "description": "Framework Toolkit contains various PHP utilities",
132
- "version" : "1.2.0",
133
- "doc_link": "",
134
- "git_link": "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry-toolkit",
135
- "compatible": ["theme", "plugin"],
136
- "wordpress_org": true,
137
- "required": true,
138
- "dependencies": []
139
- },
140
- "cherry-ui-elements" : {
141
- "name" : "UI Elements",
142
- "description" : "UI Elements",
143
- "version" : "1.3.2",
144
- "doc_link" : "",
145
- "git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry-ui-elements",
146
- "compatible" : ["theme", "plugin"],
147
- "wordpress_org" : true,
148
- "required" : false,
149
- "dependencies" : [ "cherry-js-core" ]
150
- },
151
- "cherry-utility" : {
152
- "name" : "Utility",
153
- "description" : "Multiple utility functions.",
154
- "version" : "1.1.5",
155
- "doc_link" : "",
156
- "git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry-utility",
157
- "compatible" : ["theme", "plugin"],
158
- "wordpress_org" : true,
159
- "required" : false,
160
- "dependencies" : []
161
- },
162
- "cherry-widget-factory" : {
163
- "name" : "Widget Factory",
164
- "description" : "Base widget class that simplifies creating of your own widgets.",
165
- "version" : "1.2.1",
166
- "doc_link" : "",
167
- "git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry-widget-factory",
168
- "compatible" : ["theme", "plugin"],
169
- "wordpress_org" : true,
170
- "required" : false,
171
- "dependencies" : [ "cherry-ui-elements" ]
172
- }
173
- }
174
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name" : "Cherry Framework",
3
+ "version" : "1.4.3.1",
4
+ "description" : "",
5
+ "doc_link" : "https://github.com/CherryFramework/cherry-framework-docs",
6
+ "git_link" : "https://github.com/CherryFramework/cherry-framework",
7
+ "modules" : {
8
+ "cherry-breadcrumbs" : {
9
+ "name" : "Breadcrumb Trail",
10
+ "description" : "A breadcrumb menu script for WordPress.",
11
+ "version" : "1.1.3",
12
+ "doc_link" : "",
13
+ "git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry-breadcrumbs",
14
+ "compatible" : ["theme", "plugin"],
15
+ "wordpress_org" : true,
16
+ "required" : false,
17
+ "dependencies" : []
18
+ },
19
+ "cherry-customizer" : {
20
+ "name" : "Customizer API",
21
+ "description" : "Customizer functionality.",
22
+ "version" : "1.1.7",
23
+ "doc_link" : "https://github.com/CherryFramework/cherry-framework-docs/blob/master/01.%20cherry-customizer.md",
24
+ "git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry-customizer",
25
+ "compatible" : ["theme", "plugin"],
26
+ "wordpress_org" : true,
27
+ "required" : false,
28
+ "dependencies" : []
29
+ },
30
+ "cherry-db-updater" : {
31
+ "name" : "Database Updater",
32
+ "description" : "Handle database updates if required.",
33
+ "version" : "1.0.0",
34
+ "doc_link" : "",
35
+ "git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry-db-updater",
36
+ "compatible" : ["theme", "plugin"],
37
+ "wordpress_org" : true,
38
+ "required" : false,
39
+ "dependencies" : []
40
+ },
41
+ "cherry-dynamic-css" : {
42
+ "name" : "Dynamic CSS",
43
+ "description" : "Generate CSS.",
44
+ "version" : "1.4.0",
45
+ "doc_link" : "https://github.com/CherryFramework/cherry-framework-docs/blob/master/03.%20cherry-dynamic-css.md",
46
+ "git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry-dynamic-css",
47
+ "compatible" : ["theme", "plugin"],
48
+ "wordpress_org" : true,
49
+ "required" : false,
50
+ "dependencies" : []
51
+ },
52
+ "cherry-google-fonts-loader" : {
53
+ "name" : "Google Fonts Loader",
54
+ "description" : "Enqueue Google fonts.",
55
+ "version" : "1.1.0",
56
+ "doc_link" : "",
57
+ "git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry-google-fonts-loader",
58
+ "compatible" : ["theme", "plugin"],
59
+ "wordpress_org" : true,
60
+ "required" : false,
61
+ "dependencies" : []
62
+ },
63
+ "cherry-handler" : {
64
+ "name" : "Cherry handler",
65
+ "description" : "Initialize handlers.",
66
+ "version" : "1.1.3",
67
+ "doc_link" : "https://github.com/CherryFramework/cherry-framework-docs/blob/master/02.%20cherry-handler.md",
68
+ "git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry-handler",
69
+ "compatible" : ["theme", "plugin"],
70
+ "wordpress_org" : true,
71
+ "required" : false,
72
+ "dependencies" : [ "cherry-js-core" ]
73
+ },
74
+ "cherry-interface-builder" : {
75
+ "name" : "Interface Builder",
76
+ "description" : "The module for the creation of interfaces in the WordPress admin panel.",
77
+ "version" : "1.1.2",
78
+ "doc_link" : "https://github.com/CherryFramework/cherry-framework-docs/blob/master/07.%20cherry-interface-builder.md",
79
+ "git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry-interface-builder",
80
+ "compatible" : ["theme", "plugin"],
81
+ "wordpress_org" : true,
82
+ "required" : false,
83
+ "dependencies" : [ "cherry-ui-elements" ]
84
+ },
85
+ "cherry-js-core" : {
86
+ "name" : "JS Core",
87
+ "description" : "Initialize global JS object which provides additional plugin functionality.",
88
+ "version" : "1.1.2",
89
+ "doc_link" : "https://github.com/CherryFramework/cherry-framework-docs/blob/master/04.%20cherry-js-core.md",
90
+ "git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry-js-core",
91
+ "compatible" : ["theme", "plugin"],
92
+ "wordpress_org" : true,
93
+ "required" : false,
94
+ "dependencies" : []
95
+ },
96
+ "cherry-post-formats-api" : {
97
+ "name" : "Post Formats API",
98
+ "description" : "API for post formats specific content.",
99
+ "version" : "1.1.2",
100
+ "doc_link" : "",
101
+ "git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry-post-formats-api",
102
+ "compatible" : ["theme", "plugin"],
103
+ "wordpress_org" : true,
104
+ "required" : false,
105
+ "dependencies" : [ "cherry-js-core" ]
106
+ },
107
+ "cherry-post-meta" : {
108
+ "name" : "Post Meta",
109
+ "description" : "Manage post meta.",
110
+ "version" : "1.2.1",
111
+ "doc_link" : "",
112
+ "git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry-post-meta",
113
+ "compatible" : ["theme", "plugin"],
114
+ "wordpress_org" : true,
115
+ "required" : false,
116
+ "dependencies" : [ "cherry-interface-builder" ]
117
+ },
118
+ "cherry-term-meta" : {
119
+ "name" : "Term Meta",
120
+ "description" : "Manage term metadata.",
121
+ "version" : "1.1.4",
122
+ "doc_link" : "",
123
+ "git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry-term-meta",
124
+ "compatible" : ["theme", "plugin"],
125
+ "wordpress_org" : true,
126
+ "required" : false,
127
+ "dependencies" : [ "cherry-ui-elements" ]
128
+ },
129
+ "cherry-toolkit": {
130
+ "name": "Framework Toolkit",
131
+ "description": "Framework Toolkit contains various PHP utilities",
132
+ "version" : "1.2.0",
133
+ "doc_link": "https://github.com/CherryFramework/cherry-framework-docs/blob/master/100.%20cherry-toolkit.md",
134
+ "git_link": "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry-toolkit",
135
+ "compatible": ["theme", "plugin"],
136
+ "wordpress_org": true,
137
+ "required": true,
138
+ "dependencies": []
139
+ },
140
+ "cherry-ui-elements" : {
141
+ "name" : "UI Elements",
142
+ "description" : "UI Elements",
143
+ "version" : "1.4.3",
144
+ "doc_link" : "https://github.com/CherryFramework/cherry-framework-docs/blob/master/09.%20cherry-ui-elements.md",
145
+ "git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry-ui-elements",
146
+ "compatible" : ["theme", "plugin"],
147
+ "wordpress_org" : true,
148
+ "required" : false,
149
+ "dependencies" : [ "cherry-js-core" ]
150
+ },
151
+ "cherry-utility" : {
152
+ "name" : "Utility",
153
+ "description" : "Multiple utility functions.",
154
+ "version" : "1.1.7",
155
+ "doc_link" : "https://github.com/CherryFramework/cherry-framework-docs/blob/master/08.%20cherry-utility.md",
156
+ "git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry-utility",
157
+ "compatible" : ["theme", "plugin"],
158
+ "wordpress_org" : true,
159
+ "required" : false,
160
+ "dependencies" : []
161
+ },
162
+ "cherry-widget-factory" : {
163
+ "name" : "Widget Factory",
164
+ "description" : "Base widget class that simplifies creating of your own widgets.",
165
+ "version" : "1.2.1",
166
+ "doc_link" : "https://github.com/CherryFramework/cherry-framework-docs/blob/master/06.%20cherry-widget-factory.md",
167
+ "git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry-widget-factory",
168
+ "compatible" : ["theme", "plugin"],
169
+ "wordpress_org" : true,
170
+ "required" : false,
171
+ "dependencies" : [ "cherry-ui-elements" ]
172
+ },
173
+ "cherry5-assets-loader" : {
174
+ "name" : "Assets Loader",
175
+ "description" : "The module allows you deferred loading scripts and styles.",
176
+ "version" : "1.0.0",
177
+ "doc_link" : "",
178
+ "git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry5-assets-loader",
179
+ "compatible" : [ "theme", "plugin" ],
180
+ "wordpress_org" : true,
181
+ "required" : false,
182
+ "dependencies" : [ "cherry-js-core" ]
183
+ },
184
+ "cherry5-insert-shortcode" : {
185
+ "name" : "Insert Shortcode",
186
+ "description" : "The module allows you to add shortcodes from editor tinyMCE.",
187
+ "version" : "1.0.2",
188
+ "doc_link" : "",
189
+ "git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry5-insert-shortcode",
190
+ "compatible" : [ "plugin" ],
191
+ "wordpress_org" : true,
192
+ "required" : false,
193
+ "dependencies" : [ "cherry-ui-elements", "cherry-interface-builder" ]
194
+ }
195
+ }
196
+ }
cherry-framework/languages/cherry-framework.pot CHANGED
@@ -1,69 +1,119 @@
1
- #, fuzzy
2
- msgid ""
3
- msgstr ""
4
- "Project-Id-Version: cherry-framework\n"
5
- "POT-Creation-Date: 2016-11-28 19:44+0200\n"
6
- "PO-Revision-Date: 2016-02-15 11:18+0200\n"
7
- "Last-Translator: \n"
8
- "Language-Team: TemplateMonster\n"
9
- "Language: en\n"
10
- "MIME-Version: 1.0\n"
11
- "Content-Type: text/plain; charset=UTF-8\n"
12
- "Content-Transfer-Encoding: 8bit\n"
13
- "X-Generator: Poedit 1.8.11\n"
14
- "X-Poedit-Basepath: ..\n"
15
- "Plural-Forms: nplurals=2; plural=(n != 1);\n"
16
- "X-Poedit-SourceCharset: UTF-8\n"
17
- "X-Poedit-KeywordsList: __;_e;_n:1,2;_n_noop:1,2;_x:1,2c;_nx:1,2,4c;"
18
- "_nx_noop:1,2,3c;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;"
19
- "esc_html_e;esc_html_x:1,2c\n"
20
- "X-Poedit-SearchPath-0: .\n"
21
- "X-Poedit-SearchPath-1: .\n"
22
-
23
- #: modules/cherry-breadcrumbs/cherry-breadcrumbs.php:346
24
- msgid "Home"
25
- msgstr ""
26
-
27
- #: modules/cherry-breadcrumbs/cherry-breadcrumbs.php:352
28
- msgid "Browse:"
29
- msgstr ""
30
-
31
- #: modules/cherry-breadcrumbs/cherry-breadcrumbs.php:354
32
- msgid "404 Not Found"
33
- msgstr ""
34
-
35
- #: modules/cherry-breadcrumbs/cherry-breadcrumbs.php:355
36
- msgid "Archives"
37
- msgstr ""
38
-
39
- #: modules/cherry-breadcrumbs/cherry-breadcrumbs.php:356
40
- #, php-format
41
- msgid "Search results for &#8220;%s&#8221;"
42
- msgstr ""
43
-
44
- #: modules/cherry-breadcrumbs/cherry-breadcrumbs.php:357
45
- #, php-format
46
- msgid "Page %s"
47
- msgstr ""
48
-
49
- #: modules/cherry-breadcrumbs/cherry-breadcrumbs.php:358
50
- #, php-format
51
- msgid "Minute %s"
52
- msgstr ""
53
-
54
- #: modules/cherry-breadcrumbs/cherry-breadcrumbs.php:359
55
- #, php-format
56
- msgid "Week %s"
57
- msgstr ""
58
-
59
- #: modules/cherry-customizer/cherry-customizer.php:269
60
- msgid "Untitled Panel"
61
- msgstr ""
62
-
63
- #: modules/cherry-customizer/cherry-customizer.php:305
64
- msgid "Untitled Section"
65
- msgstr ""
66
-
67
- #: modules/cherry-customizer/cherry-customizer.php:338
68
- msgid "Untitled Control"
69
- msgstr ""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #, fuzzy
2
+ msgid ""
3
+ msgstr ""
4
+ "Project-Id-Version: cherry-framework\n"
5
+ "POT-Creation-Date: 2016-12-26 14:10+0200\n"
6
+ "PO-Revision-Date: 2016-12-09 16:29+0200\n"
7
+ "Last-Translator: \n"
8
+ "Language-Team: TemplateMonster\n"
9
+ "Language: en\n"
10
+ "MIME-Version: 1.0\n"
11
+ "Content-Type: text/plain; charset=UTF-8\n"
12
+ "Content-Transfer-Encoding: 8bit\n"
13
+ "X-Generator: Poedit 1.8.11\n"
14
+ "X-Poedit-Basepath: ..\n"
15
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
16
+ "X-Poedit-SourceCharset: UTF-8\n"
17
+ "X-Poedit-KeywordsList: __;_e;_n:1,2;_n_noop:1,2;_x:1,2c;_nx:1,2,4c;"
18
+ "_nx_noop:1,2,3c;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;"
19
+ "esc_html_e;esc_html_x:1,2c\n"
20
+ "X-Poedit-SearchPath-0: .\n"
21
+ "X-Poedit-SearchPath-1: .\n"
22
+
23
+ #: modules/cherry-breadcrumbs/cherry-breadcrumbs.php:346
24
+ msgid "Home"
25
+ msgstr ""
26
+
27
+ #: modules/cherry-breadcrumbs/cherry-breadcrumbs.php:352
28
+ msgid "Browse:"
29
+ msgstr ""
30
+
31
+ #: modules/cherry-breadcrumbs/cherry-breadcrumbs.php:354
32
+ msgid "404 Not Found"
33
+ msgstr ""
34
+
35
+ #: modules/cherry-breadcrumbs/cherry-breadcrumbs.php:355
36
+ msgid "Archives"
37
+ msgstr ""
38
+
39
+ #: modules/cherry-breadcrumbs/cherry-breadcrumbs.php:356
40
+ #, php-format
41
+ msgid "Search results for &#8220;%s&#8221;"
42
+ msgstr ""
43
+
44
+ #: modules/cherry-breadcrumbs/cherry-breadcrumbs.php:357
45
+ #, php-format
46
+ msgid "Page %s"
47
+ msgstr ""
48
+
49
+ #: modules/cherry-breadcrumbs/cherry-breadcrumbs.php:358
50
+ #, php-format
51
+ msgid "Minute %s"
52
+ msgstr ""
53
+
54
+ #: modules/cherry-breadcrumbs/cherry-breadcrumbs.php:359
55
+ #, php-format
56
+ msgid "Week %s"
57
+ msgstr ""
58
+
59
+ #: modules/cherry-customizer/cherry-customizer.php:269
60
+ msgid "Untitled Panel"
61
+ msgstr ""
62
+
63
+ #: modules/cherry-customizer/cherry-customizer.php:305
64
+ msgid "Untitled Section"
65
+ msgstr ""
66
+
67
+ #: modules/cherry-customizer/cherry-customizer.php:338
68
+ msgid "Untitled Control"
69
+ msgstr ""
70
+
71
+ #: modules/cherry-db-updater/cherry-db-updater.php:105
72
+ #, php-format
73
+ msgid ""
74
+ "Module DB Updater init error in %s - version and slug is required arguments"
75
+ msgstr ""
76
+
77
+ #: modules/cherry-db-updater/cherry-db-updater.php:106
78
+ msgid "We need to update your database to the latest version."
79
+ msgstr ""
80
+
81
+ #: modules/cherry-db-updater/cherry-db-updater.php:107
82
+ msgid "Update complete, thank you for updating to the latest version!"
83
+ msgstr ""
84
+
85
+ #: modules/cherry-db-updater/cherry-db-updater.php:331
86
+ msgid "Start Update"
87
+ msgstr ""
88
+
89
+ #: modules/cherry-db-updater/cherry-db-updater.php:368
90
+ msgid "Data Update"
91
+ msgstr ""
92
+
93
+ #: modules/cherry5-insert-shortcode/inc/class-cherry5-insertion-button.php:63
94
+ msgid "Cherry shortcodes"
95
+ msgstr ""
96
+
97
+ #: modules/cherry5-insert-shortcode/inc/class-cherry5-insertion-popup.php:128
98
+ msgid "insert shortcode"
99
+ msgstr ""
100
+
101
+ #: modules/cherry5-insert-shortcode/inc/class-cherry5-insertion-popup.php:148
102
+ msgid "Shortcode List"
103
+ msgstr ""
104
+
105
+ #: modules/cherry5-insert-shortcode/inc/class-cherry5-insertion-popup.php:206
106
+ msgid "Shortcode not found."
107
+ msgstr ""
108
+
109
+ #: modules/cherry5-insert-shortcode/inc/class-cherry5-insertion-popup.php:261
110
+ msgid "Shortcode content."
111
+ msgstr ""
112
+
113
+ #: modules/cherry5-insert-shortcode/inc/class-cherry5-insertion-popup.php:262
114
+ msgid "Input shortcode content."
115
+ msgstr ""
116
+
117
+ #: modules/cherry5-insert-shortcode/inc/class-cherry5-insertion-popup.php:277
118
+ msgid "Shortcode not a have options."
119
+ msgstr ""
cherry-framework/modules/cherry-breadcrumbs/cherry-breadcrumbs.php ADDED