@@ -18,27 +18,27 @@ discard block |
||
18 | 18 | */ |
19 | 19 | |
20 | 20 | // If this file is called directly, abort. |
21 | -if ( ! defined( 'WPINC' ) ) { |
|
21 | +if (!defined('WPINC')) { |
|
22 | 22 | die; |
23 | 23 | } |
24 | 24 | |
25 | 25 | // Set some constants |
26 | -define( 'LASSO_VERSION', '1.1.1' ); |
|
27 | -define( 'LASSO_DIR', plugin_dir_path( __FILE__ ) ); |
|
28 | -define( 'LASSO_URL', plugins_url( '', __FILE__ ) ); |
|
29 | -define( 'LASSO_FILE', __FILE__ ); |
|
26 | +define('LASSO_VERSION', '1.1.1'); |
|
27 | +define('LASSO_DIR', plugin_dir_path(__FILE__)); |
|
28 | +define('LASSO_URL', plugins_url('', __FILE__)); |
|
29 | +define('LASSO_FILE', __FILE__); |
|
30 | 30 | |
31 | 31 | /** |
32 | 32 | * Load plugin if PHP version is 5.4 or later. |
33 | 33 | */ |
34 | -if ( version_compare( PHP_VERSION, '5.4.0', '>=' ) ) { |
|
34 | +if (version_compare(PHP_VERSION, '5.4.0', '>=')) { |
|
35 | 35 | |
36 | - include_once( LASSO_DIR . '/bootstrap.php' ); |
|
36 | + include_once(LASSO_DIR.'/bootstrap.php'); |
|
37 | 37 | |
38 | 38 | } else { |
39 | 39 | |
40 | 40 | add_action('admin_head', 'lasso_fail_notice'); |
41 | - function lasso_fail_notice(){ |
|
41 | + function lasso_fail_notice() { |
|
42 | 42 | |
43 | 43 | printf('<div class="error"><p>Editus requires PHP 5.4 or higher.</p></div>'); |
44 | 44 | |
@@ -46,11 +46,11 @@ discard block |
||
46 | 46 | } |
47 | 47 | |
48 | 48 | add_filter('register_post_type_args', 'lasso_show_in_rest', 10, 2); |
49 | -function lasso_show_in_rest($args, $post_type){ |
|
49 | +function lasso_show_in_rest($args, $post_type) { |
|
50 | 50 | |
51 | - $allowed_post_types = lasso_editor_get_option( 'allowed_post_types', 'lasso_editor', array( ) ); |
|
52 | - $allowed_post_types = apply_filters( 'lasso_allowed_post_types', $allowed_post_types ); |
|
53 | - if (in_array( $post_type,$allowed_post_types)) { |
|
51 | + $allowed_post_types = lasso_editor_get_option('allowed_post_types', 'lasso_editor', array( )); |
|
52 | + $allowed_post_types = apply_filters('lasso_allowed_post_types', $allowed_post_types); |
|
53 | + if (in_array($post_type, $allowed_post_types)) { |
|
54 | 54 | $args['show_in_rest'] = true; |
55 | 55 | if ($post_type != 'post' && $post_type != 'page') { |
56 | 56 | $args['rest_base'] = $post_type; |
@@ -67,16 +67,16 @@ discard block |
||
67 | 67 | )); |
68 | 68 | |
69 | 69 | // Gutenberg |
70 | -if( function_exists( 'is_gutenberg_page' ) ) { |
|
71 | - function add_raw_to_post( $response, $post, $request ) { |
|
70 | +if (function_exists('is_gutenberg_page')) { |
|
71 | + function add_raw_to_post($response, $post, $request) { |
|
72 | 72 | $response_data = $response->get_data(); |
73 | - if ( is_array( $response_data['content'] )) { |
|
74 | - $response_data['content']['raw'] = $post->post_content ; |
|
75 | - $response->set_data( $response_data ); |
|
73 | + if (is_array($response_data['content'])) { |
|
74 | + $response_data['content']['raw'] = $post->post_content; |
|
75 | + $response->set_data($response_data); |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | return $response; |
79 | 79 | } |
80 | - add_filter( "rest_prepare_post", 'add_raw_to_post', 10, 3 ); |
|
80 | + add_filter("rest_prepare_post", 'add_raw_to_post', 10, 3); |
|
81 | 81 | } |
82 | 82 |
@@ -11,39 +11,39 @@ discard block |
||
11 | 11 | * |
12 | 12 | * @since 1.0 |
13 | 13 | */ |
14 | -add_action( 'wp_footer', 'lasso_editor_controls' ); |
|
14 | +add_action('wp_footer', 'lasso_editor_controls'); |
|
15 | 15 | function lasso_editor_controls() { |
16 | 16 | |
17 | 17 | global $post; |
18 | 18 | |
19 | - if ( lasso_user_can('edit_posts') ) { |
|
19 | + if (lasso_user_can('edit_posts')) { |
|
20 | 20 | |
21 | - $status = get_post_status( get_the_ID() ); |
|
22 | - $use_old_ui = lasso_editor_get_option( 'use_old_ui', 'lasso_editor' ); |
|
23 | - $button_color1 = lasso_editor_get_option('button-color1', 'lasso_editor','#0000ff'); |
|
24 | - $button_color2 = lasso_editor_get_option('button-color2', 'lasso_editor','#000000'); |
|
25 | - $dialog_color = lasso_editor_get_option('dialog-color', 'lasso_editor','#000055'); |
|
26 | - $text_color = lasso_editor_get_option('text-color', 'lasso_editor','#ffffff'); |
|
21 | + $status = get_post_status(get_the_ID()); |
|
22 | + $use_old_ui = lasso_editor_get_option('use_old_ui', 'lasso_editor'); |
|
23 | + $button_color1 = lasso_editor_get_option('button-color1', 'lasso_editor', '#0000ff'); |
|
24 | + $button_color2 = lasso_editor_get_option('button-color2', 'lasso_editor', '#000000'); |
|
25 | + $dialog_color = lasso_editor_get_option('dialog-color', 'lasso_editor', '#000055'); |
|
26 | + $text_color = lasso_editor_get_option('text-color', 'lasso_editor', '#ffffff'); |
|
27 | 27 | $hover_color1 = lasso_editor_adjustBrightness($button_color1, 50); |
28 | 28 | $hover_color2 = lasso_editor_adjustBrightness($button_color2, 50); |
29 | 29 | |
30 | 30 | // let users add custom css classes |
31 | - $custom_classes = apply_filters( 'lasso_control_classes', '' ); |
|
31 | + $custom_classes = apply_filters('lasso_control_classes', ''); |
|
32 | 32 | |
33 | 33 | $post_access_class = ''; |
34 | - $post_new_disabled = lasso_editor_get_option( 'post_adding_disabled', 'lasso_editor' ); |
|
35 | - $post_settings_disabled = lasso_editor_get_option( 'post_settings_disabled', 'lasso_editor' ); |
|
36 | - $shortcodify_disabled = lasso_editor_get_option( 'shortcodify_disabled', 'lasso_editor' ); |
|
34 | + $post_new_disabled = lasso_editor_get_option('post_adding_disabled', 'lasso_editor'); |
|
35 | + $post_settings_disabled = lasso_editor_get_option('post_settings_disabled', 'lasso_editor'); |
|
36 | + $shortcodify_disabled = lasso_editor_get_option('shortcodify_disabled', 'lasso_editor'); |
|
37 | 37 | |
38 | 38 | |
39 | 39 | // CSS class if adding new post objects is disabled |
40 | - if ( 'on' == $post_new_disabled ) { $post_access_class = 'lasso--post-new-disabled'; } |
|
40 | + if ('on' == $post_new_disabled) { $post_access_class = 'lasso--post-new-disabled'; } |
|
41 | 41 | |
42 | 42 | // CSS class if adjust settings is disabled |
43 | - if ( 'on' == $post_settings_disabled ) { $post_access_class = 'lasso--post-settings-disabled'; } |
|
43 | + if ('on' == $post_settings_disabled) { $post_access_class = 'lasso--post-settings-disabled'; } |
|
44 | 44 | |
45 | 45 | // CSS class if adding new post objects AND settings are disabled |
46 | - if ( 'on' == $post_new_disabled && 'on' == $post_settings_disabled ) { $post_access_class = 'lasso--post-all-disabled'; } |
|
46 | + if ('on' == $post_new_disabled && 'on' == $post_settings_disabled) { $post_access_class = 'lasso--post-all-disabled'; } |
|
47 | 47 | |
48 | 48 | // CSS class if shortcodify or (Aesop Shortcode Conversion) is disabled |
49 | 49 | $sc_saving_class = 'on' == $shortcodify_disabled ? 'shortcodify-disabled' : 'shortcodify-enabled'; |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | ?> |
58 | 58 | <style> |
59 | 59 | #lasso-html--table:before { |
60 | - content: "<?php esc_attr_e( 'Table', 'lasso' );?>"; |
|
60 | + content: "<?php esc_attr_e('Table', 'lasso'); ?>"; |
|
61 | 61 | } |
62 | 62 | </style> |
63 | 63 | |
@@ -68,31 +68,31 @@ discard block |
||
68 | 68 | <style> |
69 | 69 | |
70 | 70 | .lasso-editor-controls--wrap, #lasso--post-settings2,#lasso--save,#lasso--post-delete,#lasso--exit,#lasso--publish { |
71 | - background-image: -webkit-linear-gradient(top,<?php echo $button_color1;?> 0,<?php echo $button_color2;?> 100%); |
|
72 | - background-image: -o-linear-gradient(top,<?php echo $button_color1;?> 0,<?php echo $button_color2;?> 100%); |
|
73 | - background-image: linear-gradient(to bottom,<?php echo $button_color1;?> 0,<?php echo $button_color2;?> 100%); |
|
74 | - color: <?php echo $text_color;?>; |
|
71 | + background-image: -webkit-linear-gradient(top,<?php echo $button_color1; ?> 0,<?php echo $button_color2; ?> 100%); |
|
72 | + background-image: -o-linear-gradient(top,<?php echo $button_color1; ?> 0,<?php echo $button_color2; ?> 100%); |
|
73 | + background-image: linear-gradient(to bottom,<?php echo $button_color1; ?> 0,<?php echo $button_color2; ?> 100%); |
|
74 | + color: <?php echo $text_color; ?>; |
|
75 | 75 | } |
76 | 76 | |
77 | 77 | .lasso--controls__right a:before, #lasso-toolbar--html__footer_desc { |
78 | - color: <?php echo $text_color;?> !important; |
|
78 | + color: <?php echo $text_color; ?> !important; |
|
79 | 79 | } |
80 | 80 | |
81 | 81 | |
82 | 82 | |
83 | 83 | ul.lasso-editor-controls li:hover, #lasso--exit:hover,#lasso--post-settings2:hover,#lasso--post-delete:hover,#lasso--publish:hover,#lasso--save:hover { |
84 | - background-image: -webkit-linear-gradient(top,<?php echo $hover_color1;?> 0,<?php echo $hover_color2;?> 100%); |
|
85 | - background-image: -o-linear-gradient(top,<?php echo $hover_color1;?> 0,<?php echo $hover_color2;?> 100%); |
|
86 | - background-image: linear-gradient(to bottom,<?php echo $hover_color1;?> 0,<?php echo $hover_color2;?> 100%); |
|
84 | + background-image: -webkit-linear-gradient(top,<?php echo $hover_color1; ?> 0,<?php echo $hover_color2; ?> 100%); |
|
85 | + background-image: -o-linear-gradient(top,<?php echo $hover_color1; ?> 0,<?php echo $hover_color2; ?> 100%); |
|
86 | + background-image: linear-gradient(to bottom,<?php echo $hover_color1; ?> 0,<?php echo $hover_color2; ?> 100%); |
|
87 | 87 | } |
88 | 88 | |
89 | 89 | .lasso--modal__inner,.sweet-alert,#lasso-toolbar--components.toolbar--drop-up ul,#lasso-toolbar--components__list,#lasso-toolbar--html.html--drop-up #lasso-toolbar--html__wrap, |
90 | 90 | #lasso-toolbar--link.link--drop-up #lasso-toolbar--link__wrap { |
91 | - background: <?php echo $dialog_color;?>; |
|
92 | - color: <?php echo $text_color;?>; |
|
91 | + background: <?php echo $dialog_color; ?>; |
|
92 | + color: <?php echo $text_color; ?>; |
|
93 | 93 | } |
94 | 94 | .sweet-alert p,.lasso--modal__inner label,.lasso--toolbar__inner label { |
95 | - color: <?php echo $text_color;?> !important; |
|
95 | + color: <?php echo $text_color; ?> !important; |
|
96 | 96 | } |
97 | 97 | |
98 | 98 | <?php if (!$is_mobile) { ?> |
@@ -122,48 +122,48 @@ discard block |
||
122 | 122 | <?php |
123 | 123 | } |
124 | 124 | ?> |
125 | - <div id="lasso--controls" class="lasso-post-status--<?php echo sanitize_html_class( $status );?> <?php echo sanitize_html_class( $custom_classes );?>" data-post-id="<?php echo get_the_ID();?>" > |
|
125 | + <div id="lasso--controls" class="lasso-post-status--<?php echo sanitize_html_class($status); ?> <?php echo sanitize_html_class($custom_classes); ?>" data-post-id="<?php echo get_the_ID(); ?>" > |
|
126 | 126 | |
127 | - <ul class="lasso--controls__center lasso-editor-controls lasso-editor-controls--wrap <?php echo $post_access_class;?> " <?php echo $mobile_style ?> > |
|
127 | + <ul class="lasso--controls__center lasso-editor-controls lasso-editor-controls--wrap <?php echo $post_access_class; ?> " <?php echo $mobile_style ?> > |
|
128 | 128 | |
129 | - <?php do_action( 'lasso_editor_controls_before' ); |
|
129 | + <?php do_action('lasso_editor_controls_before'); |
|
130 | 130 | |
131 | - if ( $is_capable ) { ?> |
|
131 | + if ($is_capable) { ?> |
|
132 | 132 | |
133 | - <li id="lasso--edit" title="<?php esc_attr_e( 'Edit Post', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li> |
|
133 | + <li id="lasso--edit" title="<?php esc_attr_e('Edit Post', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li> |
|
134 | 134 | |
135 | - <?php if ( 'off' == $post_settings_disabled || empty( $post_settings_disabled ) ) { ?> |
|
136 | - <li id="lasso--post-settings" title="<?php esc_attr_e( 'Post Settings', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li> |
|
135 | + <?php if ('off' == $post_settings_disabled || empty($post_settings_disabled)) { ?> |
|
136 | + <li id="lasso--post-settings" title="<?php esc_attr_e('Post Settings', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li> |
|
137 | 137 | <?php } |
138 | 138 | |
139 | 139 | } ?> |
140 | 140 | |
141 | - <li id="lasso--post-all" title="<?php esc_attr_e( 'All Posts', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li> |
|
141 | + <li id="lasso--post-all" title="<?php esc_attr_e('All Posts', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li> |
|
142 | 142 | |
143 | - <?php if ( $is_capable && wp_revisions_enabled( $post ) ) { ?> |
|
144 | - <li id="lasso--post-revisions" title="<?php esc_attr_e( 'Revisions', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li> |
|
143 | + <?php if ($is_capable && wp_revisions_enabled($post)) { ?> |
|
144 | + <li id="lasso--post-revisions" title="<?php esc_attr_e('Revisions', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li> |
|
145 | 145 | <?php } ?> |
146 | 146 | |
147 | - <?php if ( ( 'off' == $post_new_disabled || empty( $post_new_disabled ) && lasso_user_can('edit_posts') ) ) { ?> |
|
148 | - <li id="lasso--post-new" title="<?php esc_attr_e( 'Add Post', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li> |
|
147 | + <?php if (('off' == $post_new_disabled || empty($post_new_disabled) && lasso_user_can('edit_posts'))) { ?> |
|
148 | + <li id="lasso--post-new" title="<?php esc_attr_e('Add Post', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li> |
|
149 | 149 | <?php } ?> |
150 | 150 | |
151 | - <?php do_action( 'lasso_editor_controls_after' );?> |
|
151 | + <?php do_action('lasso_editor_controls_after'); ?> |
|
152 | 152 | |
153 | 153 | </ul> |
154 | 154 | |
155 | - <?php if ( is_singular() && !$is_mobile ) { ?> |
|
155 | + <?php if (is_singular() && !$is_mobile) { ?> |
|
156 | 156 | |
157 | - <div class="lasso--controls__right" data-posttype="<?php echo get_post_type( get_the_ID() );?>" data-status="<?php echo $status;?>"> |
|
157 | + <div class="lasso--controls__right" data-posttype="<?php echo get_post_type(get_the_ID()); ?>" data-status="<?php echo $status; ?>"> |
|
158 | 158 | |
159 | - <a href="#" title="<?php esc_attr_e( 'Delete Post', 'lasso' );?>" id="lasso--post-delete" class="lasso-save-post lasso--button <?php echo $sc_saving_class;?>"></a> |
|
160 | - <a href="#" title="<?php esc_attr_e( 'Post Settings', 'lasso' );?>" id="lasso--post-settings2" class="lasso-save-post lasso--button <?php echo $sc_saving_class;?>"></a> |
|
159 | + <a href="#" title="<?php esc_attr_e('Delete Post', 'lasso'); ?>" id="lasso--post-delete" class="lasso-save-post lasso--button <?php echo $sc_saving_class; ?>"></a> |
|
160 | + <a href="#" title="<?php esc_attr_e('Post Settings', 'lasso'); ?>" id="lasso--post-settings2" class="lasso-save-post lasso--button <?php echo $sc_saving_class; ?>"></a> |
|
161 | 161 | |
162 | 162 | |
163 | - <a href="#" title="<?php esc_attr_e( 'Save Post', 'lasso' );?>" id="lasso--save" class="lasso-save-post lasso--button <?php echo $sc_saving_class;?>"></a> |
|
163 | + <a href="#" title="<?php esc_attr_e('Save Post', 'lasso'); ?>" id="lasso--save" class="lasso-save-post lasso--button <?php echo $sc_saving_class; ?>"></a> |
|
164 | 164 | |
165 | - <?php if ( ('draft' == $status ) || ('pending' == $status && $can_publish) ) { ?> |
|
166 | - <a href="#" title="<?php $can_publish ? esc_attr_e( 'Publish Post', 'lasso' ) : esc_attr_e( 'Submit For Review', 'lasso' );?>" id="lasso--publish" class="lasso-publish-post lasso--button <?php echo $sc_saving_class;?>"></a> |
|
165 | + <?php if (('draft' == $status) || ('pending' == $status && $can_publish)) { ?> |
|
166 | + <a href="#" title="<?php $can_publish ? esc_attr_e('Publish Post', 'lasso') : esc_attr_e('Submit For Review', 'lasso'); ?>" id="lasso--publish" class="lasso-publish-post lasso--button <?php echo $sc_saving_class; ?>"></a> |
|
167 | 167 | <?php } ?> |
168 | 168 | |
169 | 169 | |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | </div> |
175 | 175 | |
176 | 176 | |
177 | - <?php do_action( 'lasso_editor_controls_after_outside' );?> |
|
177 | + <?php do_action('lasso_editor_controls_after_outside'); ?> |
|
178 | 178 | |
179 | 179 | <?php } |
180 | 180 | } |
@@ -192,9 +192,9 @@ discard block |
||
192 | 192 | |
193 | 193 | |
194 | 194 | // let users add custom css classes |
195 | - $custom_classes = apply_filters( 'lasso_sidebar_classes', '' ); |
|
195 | + $custom_classes = apply_filters('lasso_sidebar_classes', ''); |
|
196 | 196 | ?> |
197 | - <div id="lasso--sidebar" class="<?php echo sanitize_html_class( $custom_classes );?>" > |
|
197 | + <div id="lasso--sidebar" class="<?php echo sanitize_html_class($custom_classes); ?>" > |
|
198 | 198 | <div class="lasso--sidebar__inner"> |
199 | 199 | <div id="lasso--component__settings"></div> |
200 | 200 | </div> |
@@ -216,21 +216,21 @@ discard block |
||
216 | 216 | $is_mobile = wp_is_mobile(); |
217 | 217 | |
218 | 218 | // check for lasso story engine and add a class doniting this |
219 | - $ase_status = class_exists( 'Aesop_Core' ) || defined( 'LASSO_CUSTOM' ) ? 'ase-active' : 'ase-not-active'; |
|
219 | + $ase_status = class_exists('Aesop_Core') || defined('LASSO_CUSTOM') ? 'ase-active' : 'ase-not-active'; |
|
220 | 220 | |
221 | 221 | // let users add custom css classes |
222 | - $custom_classes = apply_filters( 'lasso_toolbar_classes', '' ); |
|
222 | + $custom_classes = apply_filters('lasso_toolbar_classes', ''); |
|
223 | 223 | |
224 | 224 | // are toolbar headings enabled |
225 | - $toolbar_headings = lasso_editor_get_option( 'toolbar_headings', 'lasso_editor' ); |
|
226 | - $toolbar_headings_h4 = lasso_editor_get_option( 'toolbar_headings_h4', 'lasso_editor' ); |
|
227 | - $toolbar_list = lasso_editor_get_option( 'toolbar_list', 'lasso_editor' ); |
|
225 | + $toolbar_headings = lasso_editor_get_option('toolbar_headings', 'lasso_editor'); |
|
226 | + $toolbar_headings_h4 = lasso_editor_get_option('toolbar_headings_h4', 'lasso_editor'); |
|
227 | + $toolbar_list = lasso_editor_get_option('toolbar_list', 'lasso_editor'); |
|
228 | 228 | |
229 | - $toolbar_class = $toolbar_headings ? 'toolbar-extended' : false; |
|
229 | + $toolbar_class = $toolbar_headings ? 'toolbar-extended' : false; |
|
230 | 230 | |
231 | 231 | // mobile styles |
232 | 232 | $mobile_class = $is_mobile ? 'lasso-mobile' : false; |
233 | - $mobile_style =$is_mobile ? 'style="bottom:0px;"' : null; |
|
233 | + $mobile_style = $is_mobile ? 'style="bottom:0px;"' : null; |
|
234 | 234 | |
235 | 235 | //show color |
236 | 236 | $show_color = lasso_editor_get_option('toolbar_show_color', 'lasso_editor'); |
@@ -238,126 +238,126 @@ discard block |
||
238 | 238 | //show alignment |
239 | 239 | $show_align = lasso_editor_get_option('toolbar_show_alignment', 'lasso_editor'); |
240 | 240 | |
241 | - $status = get_post_status( get_the_ID() ); |
|
241 | + $status = get_post_status(get_the_ID()); |
|
242 | 242 | |
243 | - $shortcodify_disabled = lasso_editor_get_option( 'shortcodify_disabled', 'lasso_editor' ); |
|
243 | + $shortcodify_disabled = lasso_editor_get_option('shortcodify_disabled', 'lasso_editor'); |
|
244 | 244 | |
245 | 245 | $sc_saving_class = 'on' == $shortcodify_disabled ? 'shortcodify-disabled' : 'shortcodify-enabled'; |
246 | 246 | |
247 | 247 | |
248 | 248 | ?> |
249 | - <div class="lasso--toolbar_wrap lasso-editor-controls--wrap <?php echo $toolbar_class.' '.$mobile_class.' '.$ase_status.' '.sanitize_html_class( $custom_classes );?>" <?php echo $mobile_style ?>> |
|
250 | - <ul class="lasso--toolbar__inner lasso-editor-controls" <?php if ($is_mobile) {echo 'style="float:left;"';}?>> |
|
251 | - <?php do_action( 'lasso_toolbar_components_before' );?> |
|
252 | - <li id="lasso-toolbar--bold" title="<?php esc_attr_e( 'Bold', 'lasso' );?>"></li> |
|
253 | - <li id="lasso-toolbar--underline" title="<?php esc_attr_e( 'Underline', 'lasso' );?>"></li> |
|
254 | - <li id="lasso-toolbar--italic" title="<?php esc_attr_e( 'Italicize', 'lasso' );?>"></li> |
|
255 | - <li id="lasso-toolbar--strike" title="<?php esc_attr_e( 'Strikethrough', 'lasso' );?>"></li> |
|
256 | - <li id="lasso-toolbar--components" title="<?php esc_attr_e( 'Insert Component', 'lasso' );?>" style="color:#ffffa0;"> |
|
249 | + <div class="lasso--toolbar_wrap lasso-editor-controls--wrap <?php echo $toolbar_class.' '.$mobile_class.' '.$ase_status.' '.sanitize_html_class($custom_classes); ?>" <?php echo $mobile_style ?>> |
|
250 | + <ul class="lasso--toolbar__inner lasso-editor-controls" <?php if ($is_mobile) {echo 'style="float:left;"'; }?>> |
|
251 | + <?php do_action('lasso_toolbar_components_before'); ?> |
|
252 | + <li id="lasso-toolbar--bold" title="<?php esc_attr_e('Bold', 'lasso'); ?>"></li> |
|
253 | + <li id="lasso-toolbar--underline" title="<?php esc_attr_e('Underline', 'lasso'); ?>"></li> |
|
254 | + <li id="lasso-toolbar--italic" title="<?php esc_attr_e('Italicize', 'lasso'); ?>"></li> |
|
255 | + <li id="lasso-toolbar--strike" title="<?php esc_attr_e('Strikethrough', 'lasso'); ?>"></li> |
|
256 | + <li id="lasso-toolbar--components" title="<?php esc_attr_e('Insert Component', 'lasso'); ?>" style="color:#ffffa0;"> |
|
257 | 257 | <ul id="lasso-toolbar--components__list" style="display:none;color:white;"> |
258 | - <?php if ( 'ase-active' == $ase_status ): ?> |
|
259 | - <li data-type="image" title="<?php esc_attr_e( 'Image', 'lasso' );?>" class="lasso-toolbar--component__image"></li> |
|
260 | - <li data-type="character" title="<?php esc_attr_e( 'Character', 'lasso' );?>" class="lasso-toolbar--component__character"></li> |
|
261 | - <li data-type="quote" title="<?php esc_attr_e( 'Quote', 'lasso' );?>" class="lasso-toolbar--component__quote"></li> |
|
262 | - <li data-type="content" title="<?php esc_attr_e( 'Content', 'lasso' );?>" class="lasso-toolbar--component__content"></li> |
|
263 | - <li data-type="chapter" title="<?php esc_attr_e( 'Chapter', 'lasso' );?>" class="lasso-toolbar--component__chapter"></li> |
|
264 | - <li data-type="parallax" title="<?php esc_attr_e( 'Parallax', 'lasso' );?>" class="lasso-toolbar--component__parallax"></li> |
|
265 | - <li data-type="audio" title="<?php esc_attr_e( 'Audio', 'lasso' );?>" class="lasso-toolbar--component__audio"></li> |
|
266 | - <li data-type="video" title="<?php esc_attr_e( 'Video', 'lasso' );?>" class="lasso-toolbar--component__video"></li> |
|
267 | - <li data-type="map" title="<?php esc_attr_e( 'Map', 'lasso' );?>" class="lasso-toolbar--component__map"></li> |
|
268 | - <li data-type="timeline_stop" title="<?php esc_attr_e( 'Timeline', 'lasso' );?>" class="lasso-toolbar--component__timeline"></li> |
|
269 | - <li data-type="document" title="<?php esc_attr_e( 'Document', 'lasso' );?>" class="lasso-toolbar--component__document"></li> |
|
270 | - <li data-type="collection" title="<?php esc_attr_e( 'Collection', 'lasso' );?>" class="lasso-toolbar--component__collection"></li> |
|
271 | - <li data-type="gallery" title="<?php esc_attr_e( 'Gallery', 'lasso' );?>" class="lasso-toolbar--component__gallery"></li> |
|
272 | - <?php if ( class_exists ('Aesop_GalleryPop') ) { ?> |
|
273 | - <li data-type="gallery" title="<?php esc_attr_e( 'Gallery Pop', 'lasso' );?>" class="lasso-toolbar--component__gallerypop"></li> |
|
258 | + <?php if ('ase-active' == $ase_status): ?> |
|
259 | + <li data-type="image" title="<?php esc_attr_e('Image', 'lasso'); ?>" class="lasso-toolbar--component__image"></li> |
|
260 | + <li data-type="character" title="<?php esc_attr_e('Character', 'lasso'); ?>" class="lasso-toolbar--component__character"></li> |
|
261 | + <li data-type="quote" title="<?php esc_attr_e('Quote', 'lasso'); ?>" class="lasso-toolbar--component__quote"></li> |
|
262 | + <li data-type="content" title="<?php esc_attr_e('Content', 'lasso'); ?>" class="lasso-toolbar--component__content"></li> |
|
263 | + <li data-type="chapter" title="<?php esc_attr_e('Chapter', 'lasso'); ?>" class="lasso-toolbar--component__chapter"></li> |
|
264 | + <li data-type="parallax" title="<?php esc_attr_e('Parallax', 'lasso'); ?>" class="lasso-toolbar--component__parallax"></li> |
|
265 | + <li data-type="audio" title="<?php esc_attr_e('Audio', 'lasso'); ?>" class="lasso-toolbar--component__audio"></li> |
|
266 | + <li data-type="video" title="<?php esc_attr_e('Video', 'lasso'); ?>" class="lasso-toolbar--component__video"></li> |
|
267 | + <li data-type="map" title="<?php esc_attr_e('Map', 'lasso'); ?>" class="lasso-toolbar--component__map"></li> |
|
268 | + <li data-type="timeline_stop" title="<?php esc_attr_e('Timeline', 'lasso'); ?>" class="lasso-toolbar--component__timeline"></li> |
|
269 | + <li data-type="document" title="<?php esc_attr_e('Document', 'lasso'); ?>" class="lasso-toolbar--component__document"></li> |
|
270 | + <li data-type="collection" title="<?php esc_attr_e('Collection', 'lasso'); ?>" class="lasso-toolbar--component__collection"></li> |
|
271 | + <li data-type="gallery" title="<?php esc_attr_e('Gallery', 'lasso'); ?>" class="lasso-toolbar--component__gallery"></li> |
|
272 | + <?php if (class_exists('Aesop_GalleryPop')) { ?> |
|
273 | + <li data-type="gallery" title="<?php esc_attr_e('Gallery Pop', 'lasso'); ?>" class="lasso-toolbar--component__gallerypop"></li> |
|
274 | 274 | <?php }?> |
275 | - <?php if ( class_exists ('Aesop_Events') ) { ?> |
|
276 | - <li data-type="events" title="<?php esc_attr_e( 'Event', 'lasso' );?>" class="lasso-toolbar--component__event"></li> |
|
275 | + <?php if (class_exists('Aesop_Events')) { ?> |
|
276 | + <li data-type="events" title="<?php esc_attr_e('Event', 'lasso'); ?>" class="lasso-toolbar--component__event"></li> |
|
277 | 277 | <?php }?> |
278 | 278 | <?php else: ?> |
279 | - <li data-type="wpimg" title="<?php esc_attr_e( 'WordPress Image', 'lasso' );?>" class="image lasso-toolbar--component__image"></li> |
|
280 | - <li data-type="wpquote" title="<?php esc_attr_e( 'WordPress Quote', 'lasso' );?>" class="quote lasso-toolbar--component__quote"></li> |
|
281 | - <!--li data-type="wpvideo" title="<?php esc_attr_e( 'WordPress Video', 'lasso' );?>" class="video lasso-toolbar--component__video"></li--> |
|
279 | + <li data-type="wpimg" title="<?php esc_attr_e('WordPress Image', 'lasso'); ?>" class="image lasso-toolbar--component__image"></li> |
|
280 | + <li data-type="wpquote" title="<?php esc_attr_e('WordPress Quote', 'lasso'); ?>" class="quote lasso-toolbar--component__quote"></li> |
|
281 | + <!--li data-type="wpvideo" title="<?php esc_attr_e('WordPress Video', 'lasso'); ?>" class="video lasso-toolbar--component__video"></li--> |
|
282 | 282 | <?php endif; ?> |
283 | - <?php do_action( 'lasso_toolbar_components' );?> |
|
283 | + <?php do_action('lasso_toolbar_components'); ?> |
|
284 | 284 | </ul> |
285 | 285 | </li> |
286 | - <?php if ( $toolbar_headings ): ?> |
|
287 | - <li id="lasso-toolbar--h2" title="<?php esc_attr_e( 'H2 Heading', 'lasso' );?>"></li> |
|
288 | - <li id="lasso-toolbar--h3" title="<?php esc_attr_e( 'H3 Heading', 'lasso' );?>"></li> |
|
286 | + <?php if ($toolbar_headings): ?> |
|
287 | + <li id="lasso-toolbar--h2" title="<?php esc_attr_e('H2 Heading', 'lasso'); ?>"></li> |
|
288 | + <li id="lasso-toolbar--h3" title="<?php esc_attr_e('H3 Heading', 'lasso'); ?>"></li> |
|
289 | 289 | <?php endif; ?> |
290 | 290 | |
291 | 291 | |
292 | 292 | |
293 | - <?php if ( $toolbar_headings_h4 ): ?> |
|
294 | - <li id="lasso-toolbar--h4" title="<?php esc_attr_e( 'H4 Heading', 'lasso' );?>"></li> |
|
295 | - <li id="lasso-toolbar--h5" title="<?php esc_attr_e( 'H5 Heading', 'lasso' );?>"></li> |
|
296 | - <li id="lasso-toolbar--h6" title="<?php esc_attr_e( 'H6 Heading', 'lasso' );?>"></li> |
|
293 | + <?php if ($toolbar_headings_h4): ?> |
|
294 | + <li id="lasso-toolbar--h4" title="<?php esc_attr_e('H4 Heading', 'lasso'); ?>"></li> |
|
295 | + <li id="lasso-toolbar--h5" title="<?php esc_attr_e('H5 Heading', 'lasso'); ?>"></li> |
|
296 | + <li id="lasso-toolbar--h6" title="<?php esc_attr_e('H6 Heading', 'lasso'); ?>"></li> |
|
297 | 297 | <?php endif; ?> |
298 | 298 | |
299 | - <?php if ( $show_color ): ?> |
|
300 | - <li id="lasso-toolbar--color-set" title="<?php esc_attr_e( 'Set Color for Selected Text', 'lasso' );?>"></li> |
|
301 | - <li id="lasso-toolbar--color-pick" title="<?php esc_attr_e( 'Choose Color', 'lasso' );?>"></li> |
|
299 | + <?php if ($show_color): ?> |
|
300 | + <li id="lasso-toolbar--color-set" title="<?php esc_attr_e('Set Color for Selected Text', 'lasso'); ?>"></li> |
|
301 | + <li id="lasso-toolbar--color-pick" title="<?php esc_attr_e('Choose Color', 'lasso'); ?>"></li> |
|
302 | 302 | <?php endif; ?> |
303 | 303 | |
304 | - <?php if ( $toolbar_list ): ?> |
|
305 | - <li id="lasso-toolbar--ol" title="<?php esc_attr_e( 'Ordered List', 'lasso' );?>"></li> |
|
306 | - <li id="lasso-toolbar--ul" title="<?php esc_attr_e( 'Unordered List', 'lasso' );?>"></li> |
|
304 | + <?php if ($toolbar_list): ?> |
|
305 | + <li id="lasso-toolbar--ol" title="<?php esc_attr_e('Ordered List', 'lasso'); ?>"></li> |
|
306 | + <li id="lasso-toolbar--ul" title="<?php esc_attr_e('Unordered List', 'lasso'); ?>"></li> |
|
307 | 307 | <?php endif; ?> |
308 | 308 | |
309 | 309 | |
310 | - <li id="lasso-toolbar--link" title="<?php esc_attr_e( 'Anchor Link', 'lasso' );?>"> |
|
310 | + <li id="lasso-toolbar--link" title="<?php esc_attr_e('Anchor Link', 'lasso'); ?>"> |
|
311 | 311 | <div id="lasso-toolbar--link__wrap" <?php echo $mobile_style ?> > |
312 | - <div id="lasso-toolbar--link__inner" contenteditable="true" placeholder="<?php esc_attr_e( 'http://url.com', 'lasso' );?>"></div> |
|
313 | - <a href="#" title="<?php esc_attr_e( 'Create Link', 'lasso' );?>" class="lasso-toolbar--link__control" id="lasso-toolbar--link__create" ></a> |
|
312 | + <div id="lasso-toolbar--link__inner" contenteditable="true" placeholder="<?php esc_attr_e('http://url.com', 'lasso'); ?>"></div> |
|
313 | + <a href="#" title="<?php esc_attr_e('Create Link', 'lasso'); ?>" class="lasso-toolbar--link__control" id="lasso-toolbar--link__create" ></a> |
|
314 | 314 | <input class="styled-checkbox" type="checkbox" id="aesop-toolbar--link_newtab" checked/> |
315 | - <label for="aesop-toolbar--link_newtab"><?php esc_attr_e( 'Open in a New Tab', 'lasso' );?></label> |
|
315 | + <label for="aesop-toolbar--link_newtab"><?php esc_attr_e('Open in a New Tab', 'lasso'); ?></label> |
|
316 | 316 | </div> |
317 | 317 | </li> |
318 | - <?php do_action( 'lasso_toolbar_components_after' );?> |
|
319 | - <li id="lasso-toolbar--html" title="<?php esc_attr_e( 'Insert HTML or Code', 'lasso' );?>"> |
|
318 | + <?php do_action('lasso_toolbar_components_after'); ?> |
|
319 | + <li id="lasso-toolbar--html" title="<?php esc_attr_e('Insert HTML or Code', 'lasso'); ?>"> |
|
320 | 320 | <div id="lasso-toolbar--html__wrap" <?php echo $mobile_style ?>> |
321 | - <div id="lasso-toolbar--html__inner" contenteditable="true" placeholder="<?php esc_attr_e( 'Enter HTML to insert', 'lasso' );?>"></div> |
|
321 | + <div id="lasso-toolbar--html__inner" contenteditable="true" placeholder="<?php esc_attr_e('Enter HTML to insert', 'lasso'); ?>"></div> |
|
322 | 322 | <div id="lasso-toolbar--html__footer"> |
323 | 323 | <div id="lasso-toolbar--html__footer_desc" > |
324 | - <?php esc_attr_e( 'Enter HTML to insert', 'lasso' );?><br> |
|
325 | - <?php esc_attr_e( 'You can also use Shortcodes', 'lasso' );?><br> |
|
326 | - <?php esc_attr_e( 'You can also enter a URL to embed, such as Youtube, Vimeo and Twitter URLs.', 'lasso' );?> |
|
324 | + <?php esc_attr_e('Enter HTML to insert', 'lasso'); ?><br> |
|
325 | + <?php esc_attr_e('You can also use Shortcodes', 'lasso'); ?><br> |
|
326 | + <?php esc_attr_e('You can also enter a URL to embed, such as Youtube, Vimeo and Twitter URLs.', 'lasso'); ?> |
|
327 | 327 | </div> |
328 | 328 | <ul class="lasso-toolbar--html-snips"> |
329 | 329 | |
330 | - <?php if ( !$toolbar_headings ): ?> |
|
331 | - <li id="lasso-html--h2" title="<?php esc_attr_e( 'H2 Heading', 'lasso' );?>"> |
|
332 | - <li id="lasso-html--h3" title="<?php esc_attr_e( 'H3 Heading', 'lasso' );?>"> |
|
330 | + <?php if (!$toolbar_headings): ?> |
|
331 | + <li id="lasso-html--h2" title="<?php esc_attr_e('H2 Heading', 'lasso'); ?>"> |
|
332 | + <li id="lasso-html--h3" title="<?php esc_attr_e('H3 Heading', 'lasso'); ?>"> |
|
333 | 333 | <?php endif; ?> |
334 | - <li id="lasso-html--ol" title="<?php esc_attr_e( 'Ordered List', 'lasso' );?>"> |
|
335 | - <li id="lasso-html--ul" title="<?php esc_attr_e( 'Unordered List', 'lasso' );?>"> |
|
334 | + <li id="lasso-html--ol" title="<?php esc_attr_e('Ordered List', 'lasso'); ?>"> |
|
335 | + <li id="lasso-html--ul" title="<?php esc_attr_e('Unordered List', 'lasso'); ?>"> |
|
336 | 336 | |
337 | - <li id="lasso-html--table" title="<?php esc_attr_e( 'Table', 'lasso' );?>"> |
|
337 | + <li id="lasso-html--table" title="<?php esc_attr_e('Table', 'lasso'); ?>"> |
|
338 | 338 | </ul> |
339 | - <a class="lasso-toolbar--html__control lasso-toolbar--html__cancel" href="#"><?php _e( 'Cancel', 'lasso' );?></a> |
|
340 | - <a href="#" title="<?php esc_attr_e( 'Insert HTML or Code', 'lasso' );?>" class="lasso-toolbar--html__control" id="lasso-toolbar--html__insert" ><?php _e( 'Insert', 'lasso' );?></a> |
|
339 | + <a class="lasso-toolbar--html__control lasso-toolbar--html__cancel" href="#"><?php _e('Cancel', 'lasso'); ?></a> |
|
340 | + <a href="#" title="<?php esc_attr_e('Insert HTML or Code', 'lasso'); ?>" class="lasso-toolbar--html__control" id="lasso-toolbar--html__insert" ><?php _e('Insert', 'lasso'); ?></a> |
|
341 | 341 | </div> |
342 | 342 | </div> |
343 | 343 | </li> |
344 | - <?php if ( $show_align ): ?> |
|
345 | - <li id="lasso-toolbar--left-align" title="<?php esc_attr_e( 'Text Left Align', 'lasso' );?>"></li> |
|
346 | - <li id="lasso-toolbar--center-align" title="<?php esc_attr_e( 'Text Center Align', 'lasso' );?>"></li> |
|
347 | - <li id="lasso-toolbar--right-align" title="<?php esc_attr_e( 'Text Right Align', 'lasso' );?>"></li> |
|
344 | + <?php if ($show_align): ?> |
|
345 | + <li id="lasso-toolbar--left-align" title="<?php esc_attr_e('Text Left Align', 'lasso'); ?>"></li> |
|
346 | + <li id="lasso-toolbar--center-align" title="<?php esc_attr_e('Text Center Align', 'lasso'); ?>"></li> |
|
347 | + <li id="lasso-toolbar--right-align" title="<?php esc_attr_e('Text Right Align', 'lasso'); ?>"></li> |
|
348 | 348 | <?php endif; ?> |
349 | 349 | </ul> |
350 | - <?php if ( is_singular() && $is_mobile ) { ?> |
|
350 | + <?php if (is_singular() && $is_mobile) { ?> |
|
351 | 351 | |
352 | - <div class="lasso--controls__right" data-posttype="<?php echo get_post_type( get_the_ID() );?>" data-status="<?php echo $status;?>" style="position:static;bottom:0px;right;0px;left:auto;"> |
|
352 | + <div class="lasso--controls__right" data-posttype="<?php echo get_post_type(get_the_ID()); ?>" data-status="<?php echo $status; ?>" style="position:static;bottom:0px;right;0px;left:auto;"> |
|
353 | 353 | |
354 | - <a href="#" title="<?php esc_attr_e( 'Delete Post', 'lasso' );?>" id="lasso--post-delete" class="lasso-save-post lasso--button <?php echo $sc_saving_class;?>"></a> |
|
355 | - <a href="#" title="<?php esc_attr_e( 'Post Settings', 'lasso' );?>" id="lasso--post-settings2" class="lasso-save-post lasso--button <?php echo $sc_saving_class;?>"></a> |
|
354 | + <a href="#" title="<?php esc_attr_e('Delete Post', 'lasso'); ?>" id="lasso--post-delete" class="lasso-save-post lasso--button <?php echo $sc_saving_class; ?>"></a> |
|
355 | + <a href="#" title="<?php esc_attr_e('Post Settings', 'lasso'); ?>" id="lasso--post-settings2" class="lasso-save-post lasso--button <?php echo $sc_saving_class; ?>"></a> |
|
356 | 356 | |
357 | - <a href="#" title="<?php esc_attr_e( 'Save Post', 'lasso' );?>" id="lasso--save" class="lasso-save-post lasso--button <?php echo $sc_saving_class;?>"></a> |
|
357 | + <a href="#" title="<?php esc_attr_e('Save Post', 'lasso'); ?>" id="lasso--save" class="lasso-save-post lasso--button <?php echo $sc_saving_class; ?>"></a> |
|
358 | 358 | |
359 | - <?php if ( 'draft' == $status && ( lasso_user_can('publish_posts') || lasso_user_can('publish_pages') ) ) { ?> |
|
360 | - <a href="#" title="<?php esc_attr_e( 'Publish Post', 'lasso' );?>" id="lasso--publish" class="lasso-publish-post lasso--button <?php echo $sc_saving_class;?>"></a> |
|
359 | + <?php if ('draft' == $status && (lasso_user_can('publish_posts') || lasso_user_can('publish_pages'))) { ?> |
|
360 | + <a href="#" title="<?php esc_attr_e('Publish Post', 'lasso'); ?>" id="lasso--publish" class="lasso-publish-post lasso--button <?php echo $sc_saving_class; ?>"></a> |
|
361 | 361 | <?php } ?> |
362 | 362 | |
363 | 363 | </div> |
@@ -375,20 +375,20 @@ discard block |
||
375 | 375 | */ |
376 | 376 | function lasso_editor_settings_toolbar() { |
377 | 377 | |
378 | - $delete_nonce = wp_create_nonce( 'lasso-delete-nonce' ); |
|
378 | + $delete_nonce = wp_create_nonce('lasso-delete-nonce'); |
|
379 | 379 | |
380 | 380 | ob_start(); |
381 | 381 | |
382 | 382 | |
383 | 383 | // let users add custom css classes |
384 | - $custom_classes = apply_filters( 'lasso_component_classes', '' ); |
|
384 | + $custom_classes = apply_filters('lasso_component_classes', ''); |
|
385 | 385 | |
386 | 386 | ?> |
387 | - <ul class="lasso-component--controls <?php echo sanitize_html_class( $custom_classes );?>" contenteditable="false"> |
|
388 | - <li class="lasso-drag" title="<?php esc_attr_e( 'Move', 'lasso' );?>"></li> |
|
389 | - <li id="lasso-component--settings__trigger" class="lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li> |
|
390 | - <li class="lasso-clone" title="<?php esc_attr_e( 'Clone', 'lasso' );?>"></li> |
|
391 | - <li class="lasso-delete" data-postid="<?php echo get_the_ID();?>" data-nonce="<?php echo $delete_nonce;?>" title="<?php esc_attr_e( 'Delete', 'lasso' );?>"></li> |
|
387 | + <ul class="lasso-component--controls <?php echo sanitize_html_class($custom_classes); ?>" contenteditable="false"> |
|
388 | + <li class="lasso-drag" title="<?php esc_attr_e('Move', 'lasso'); ?>"></li> |
|
389 | + <li id="lasso-component--settings__trigger" class="lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li> |
|
390 | + <li class="lasso-clone" title="<?php esc_attr_e('Clone', 'lasso'); ?>"></li> |
|
391 | + <li class="lasso-delete" data-postid="<?php echo get_the_ID(); ?>" data-nonce="<?php echo $delete_nonce; ?>" title="<?php esc_attr_e('Delete', 'lasso'); ?>"></li> |
|
392 | 392 | </ul> |
393 | 393 | |
394 | 394 | <?php return ob_get_clean(); |
@@ -406,13 +406,13 @@ discard block |
||
406 | 406 | |
407 | 407 | |
408 | 408 | // has post thumbnail |
409 | - $has_thumbnail = has_post_thumbnail( get_the_ID() ) ? 'class="lasso--featImg--has-thumb"' : false; |
|
409 | + $has_thumbnail = has_post_thumbnail(get_the_ID()) ? 'class="lasso--featImg--has-thumb"' : false; |
|
410 | 410 | |
411 | 411 | ?> |
412 | - <ul id="lasso--featImgControls" <?php echo $has_thumbnail;?>> |
|
413 | - <li id="lasso--featImgUpload"><a title="<?php esc_attr_e( 'Replace Image', 'lasso' );?>" href="#"><i class="lasso-icon-image"></i></a></li> |
|
414 | - <li id="lasso--featImgDelete"><a title="<?php esc_attr_e( 'Delete Image', 'lasso' );?>" href="#"><i class="lasso-icon-bin2"></i></a></li> |
|
415 | - <li id="lasso--featImgSave"><a href="#"><?php esc_attr_e( 'save', 'lasso' );?></a></li> |
|
412 | + <ul id="lasso--featImgControls" <?php echo $has_thumbnail; ?>> |
|
413 | + <li id="lasso--featImgUpload"><a title="<?php esc_attr_e('Replace Image', 'lasso'); ?>" href="#"><i class="lasso-icon-image"></i></a></li> |
|
414 | + <li id="lasso--featImgDelete"><a title="<?php esc_attr_e('Delete Image', 'lasso'); ?>" href="#"><i class="lasso-icon-bin2"></i></a></li> |
|
415 | + <li id="lasso--featImgSave"><a href="#"><?php esc_attr_e('save', 'lasso'); ?></a></li> |
|
416 | 416 | </ul> |
417 | 417 | |
418 | 418 | <?php return ob_get_clean(); |
@@ -436,55 +436,55 @@ discard block |
||
436 | 436 | |
437 | 437 | $postid = get_the_ID(); |
438 | 438 | |
439 | - $status = get_post_status( $postid ); |
|
440 | - $nonce = wp_create_nonce( 'lasso-update-post-settings' ); |
|
439 | + $status = get_post_status($postid); |
|
440 | + $nonce = wp_create_nonce('lasso-update-post-settings'); |
|
441 | 441 | |
442 | 442 | // let users add custom css classes |
443 | - $custom_classes = apply_filters( 'lasso_modal_settings_classes', '' ); |
|
443 | + $custom_classes = apply_filters('lasso_modal_settings_classes', ''); |
|
444 | 444 | |
445 | 445 | // objects categories |
446 | - $categories = lasso_get_post_objects( $postid, 'category' ); |
|
447 | - $tags = lasso_get_post_objects( $postid, 'tag' ); |
|
446 | + $categories = lasso_get_post_objects($postid, 'category'); |
|
447 | + $tags = lasso_get_post_objects($postid, 'tag'); |
|
448 | 448 | |
449 | 449 | // modal tabs |
450 | - $tabs = lasso_modal_addons('tab'); |
|
451 | - $content = lasso_modal_addons('content'); |
|
450 | + $tabs = lasso_modal_addons('tab'); |
|
451 | + $content = lasso_modal_addons('content'); |
|
452 | 452 | |
453 | 453 | //editor options |
454 | 454 | $allow_change_date = lasso_editor_get_option('allow_change_date', 'lasso_editor'); |
455 | 455 | $no_url_setting = lasso_editor_get_option('no_url_setting', 'lasso_editor'); |
456 | 456 | |
457 | 457 | // are we singular |
458 | - $is_singular = is_singular(); |
|
458 | + $is_singular = is_singular(); |
|
459 | 459 | $is_singular_class = $is_singular ? 'lasso--postsettings__2col' : 'lasso--postsettings__1col'; |
460 | 460 | $has_thumb_class = has_post_thumbnail() ? 'has-thumbnail' : 'no-thumbnail'; |
461 | 461 | $theme_supports = current_theme_supports('post-thumbnails'); |
462 | - $default_image = LASSO_URL.'/admin/assets/img/empty-img.png'; |
|
462 | + $default_image = LASSO_URL.'/admin/assets/img/empty-img.png'; |
|
463 | 463 | |
464 | 464 | // do we support pending status |
465 | 465 | $no_pending_status = lasso_editor_get_option('no_pending_status', 'lasso_editor'); |
466 | 466 | |
467 | 467 | ?> |
468 | - <div id="lasso--post-settings__modal" class="lasso--modal lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>"> |
|
468 | + <div id="lasso--post-settings__modal" class="lasso--modal lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>"> |
|
469 | 469 | <div class="lasso--modal__inner"> |
470 | 470 | |
471 | - <?php if( $tabs ) { echo $tabs; } ?> |
|
471 | + <?php if ($tabs) { echo $tabs; } ?> |
|
472 | 472 | |
473 | 473 | <div class="lasso--modal__content modal__content--core visible" data-addon-content="core"> |
474 | - <form id="lasso--postsettings__form" enctype="multipart/form-data" class="lasso--post-form <?php echo $is_singular_class.' '.$has_thumb_class;?>" > |
|
474 | + <form id="lasso--postsettings__form" enctype="multipart/form-data" class="lasso--post-form <?php echo $is_singular_class.' '.$has_thumb_class; ?>" > |
|
475 | 475 | |
476 | - <?php if ( $is_singular && $theme_supports ) : ?> |
|
476 | + <?php if ($is_singular && $theme_supports) : ?> |
|
477 | 477 | <div class="lasso--postsettings__left"> |
478 | - <label><?php _e( 'Featured Image', 'lasso' );?><span class="lasso-util--help lasso-util--help-top" data-tooltip="<?php esc_attr_e( 'Change the featured image for this post.', 'lasso' );?>"><i class="lasso-icon-help"></i></span></label> |
|
479 | - <div class="lasso--post-thumb" data-default-thumb="<?php echo esc_url( $default_image );?>"> |
|
478 | + <label><?php _e('Featured Image', 'lasso'); ?><span class="lasso-util--help lasso-util--help-top" data-tooltip="<?php esc_attr_e('Change the featured image for this post.', 'lasso'); ?>"><i class="lasso-icon-help"></i></span></label> |
|
479 | + <div class="lasso--post-thumb" data-default-thumb="<?php echo esc_url($default_image); ?>"> |
|
480 | 480 | |
481 | 481 | <div id="lasso--post-thumb__controls" class="lasso--post-thumb__controls"> |
482 | - <i id="lasso--post-thumb__add" title="<?php _e('Change Featured Image','lasso');?>" class="dashicons dashicons-edit"></i> |
|
483 | - <i id="lasso--post-thumb__delete" title="<?php _e('Delete Featured Image','lasso');?>" class="dashicons dashicons-no-alt"></i> |
|
482 | + <i id="lasso--post-thumb__add" title="<?php _e('Change Featured Image', 'lasso'); ?>" class="dashicons dashicons-edit"></i> |
|
483 | + <i id="lasso--post-thumb__delete" title="<?php _e('Delete Featured Image', 'lasso'); ?>" class="dashicons dashicons-no-alt"></i> |
|
484 | 484 | <i id="lasso--save-status" class="lasso-icon lasso-icon-spinner6 not-visible"></i> |
485 | 485 | </div> |
486 | 486 | |
487 | - <?php echo has_post_thumbnail() ? get_the_post_thumbnail( $post->ID, 'medium' ) : '<img src="'.$default_image.'">'; ?> |
|
487 | + <?php echo has_post_thumbnail() ? get_the_post_thumbnail($post->ID, 'medium') : '<img src="'.$default_image.'">'; ?> |
|
488 | 488 | |
489 | 489 | </div> |
490 | 490 | <div id="lasso--featImgSave"><a href="#" class="not-visible">Save</a></div> |
@@ -494,15 +494,15 @@ discard block |
||
494 | 494 | |
495 | 495 | <div class="lasso--postsettings__right"> |
496 | 496 | |
497 | - <?php if( lasso_user_can('publish_posts') || lasso_user_can('publish_pages') ): ?> |
|
497 | + <?php if (lasso_user_can('publish_posts') || lasso_user_can('publish_pages')): ?> |
|
498 | 498 | <div class="lasso--postsettings__option story-status-option"> |
499 | - <label><?php _e( 'Status', 'lasso' );?><span class="lasso-util--help lasso-util--help-top" data-tooltip="<?php esc_attr_e( 'Change the status of the post to draft or publish.', 'lasso' );?>"><i class="lasso-icon-help"></i></span></label> |
|
500 | - <ul class="story-status story-status-<?php echo sanitize_html_class( $status );?>"> |
|
501 | - <li id="lasso--status-draft"><?php _e( 'Draft', 'lasso' );?></li> |
|
502 | - <?php if( !$no_pending_status ): ?> |
|
503 | - <li id="lasso--status-pending"><?php _e( 'Pending', 'lasso' );?></li> |
|
499 | + <label><?php _e('Status', 'lasso'); ?><span class="lasso-util--help lasso-util--help-top" data-tooltip="<?php esc_attr_e('Change the status of the post to draft or publish.', 'lasso'); ?>"><i class="lasso-icon-help"></i></span></label> |
|
500 | + <ul class="story-status story-status-<?php echo sanitize_html_class($status); ?>"> |
|
501 | + <li id="lasso--status-draft"><?php _e('Draft', 'lasso'); ?></li> |
|
502 | + <?php if (!$no_pending_status): ?> |
|
503 | + <li id="lasso--status-pending"><?php _e('Pending', 'lasso'); ?></li> |
|
504 | 504 | <?php endif; ?> |
505 | - <li id="lasso--status-publish"><?php _e( 'Publish', 'lasso' );?></li> |
|
505 | + <li id="lasso--status-publish"><?php _e('Publish', 'lasso'); ?></li> |
|
506 | 506 | </ul> |
507 | 507 | <div class="lasso--slider_wrap"> |
508 | 508 | <div id="lasso--slider"></div> |
@@ -510,10 +510,10 @@ discard block |
||
510 | 510 | </div> |
511 | 511 | <?php endif; ?> |
512 | 512 | |
513 | - <?php if ( 'publish' == $status && !$no_url_setting): ?> |
|
513 | + <?php if ('publish' == $status && !$no_url_setting): ?> |
|
514 | 514 | <div class="lasso--postsettings__option story-slug-option"> |
515 | - <label><?php _e( 'Post URL', 'lasso' );?><span class="lasso-util--help lasso-util--help-top" data-tooltip="<?php esc_attr_e( 'Change the URL (slug) of this post.', 'lasso' );?>"><i class="lasso-icon-help"></i></span></label> |
|
516 | - <input class="lasso--modal__trigger-footer" type="text" name="story_slug" value="<?php echo isset( $post ) ? esc_attr( $post->post_name ) : false;?>"> |
|
515 | + <label><?php _e('Post URL', 'lasso'); ?><span class="lasso-util--help lasso-util--help-top" data-tooltip="<?php esc_attr_e('Change the URL (slug) of this post.', 'lasso'); ?>"><i class="lasso-icon-help"></i></span></label> |
|
516 | + <input class="lasso--modal__trigger-footer" type="text" name="story_slug" value="<?php echo isset($post) ? esc_attr($post->post_name) : false; ?>"> |
|
517 | 517 | </div> |
518 | 518 | <?php endif; ?> |
519 | 519 | |
@@ -522,21 +522,21 @@ discard block |
||
522 | 522 | <div class="lasso--postsettings__middle"> |
523 | 523 | |
524 | 524 | <div class="lasso--postsettings__option story-categories-option"> |
525 | - <label style="width:120px;"><?php _e( 'Categories', 'lasso' );?><span class="lasso-util--help lasso-util--help-top" data-tooltip="<?php esc_attr_e( 'Type a category name and press enter.', 'lasso' );?>"><i class="lasso-icon-help"></i></span></label> |
|
526 | - <input id="lasso--cat-select" class="lasso--modal__trigger-footer" type="hidden" name="story_cats" value="<?php echo $categories;?>"> |
|
525 | + <label style="width:120px;"><?php _e('Categories', 'lasso'); ?><span class="lasso-util--help lasso-util--help-top" data-tooltip="<?php esc_attr_e('Type a category name and press enter.', 'lasso'); ?>"><i class="lasso-icon-help"></i></span></label> |
|
526 | + <input id="lasso--cat-select" class="lasso--modal__trigger-footer" type="hidden" name="story_cats" value="<?php echo $categories; ?>"> |
|
527 | 527 | </div> |
528 | 528 | |
529 | 529 | <div class="lasso--postsettings__option story-tags-option"> |
530 | - <label><?php _e( 'Tags', 'lasso' );?><span class="lasso-util--help lasso-util--help-top" data-tooltip="<?php esc_attr_e( 'Type a tag name and press enter.', 'lasso' );?>"><i class="lasso-icon-help"></i></span></label> |
|
531 | - <input id="lasso--tag-select" class="lasso--modal__trigger-footer" type="hidden" name="story_tags" value="<?php echo $tags;?>"> |
|
530 | + <label><?php _e('Tags', 'lasso'); ?><span class="lasso-util--help lasso-util--help-top" data-tooltip="<?php esc_attr_e('Type a tag name and press enter.', 'lasso'); ?>"><i class="lasso-icon-help"></i></span></label> |
|
531 | + <input id="lasso--tag-select" class="lasso--modal__trigger-footer" type="hidden" name="story_tags" value="<?php echo $tags; ?>"> |
|
532 | 532 | </div> |
533 | 533 | <?php |
534 | 534 | if ($allow_change_date) { |
535 | - $dateformat = get_option( 'date_format' ); |
|
535 | + $dateformat = get_option('date_format'); |
|
536 | 536 | ?> |
537 | - <label><?php _e( 'Post Date', 'lasso' ); ?></label> |
|
538 | - <input type="text" class="editus_custom_date" name="post_date" value="<?php echo get_the_time($dateformat, $postid);?>"/> |
|
539 | - <a href="#" id="lasso--postsettings-setnow"><?php _e( 'Set to Now', 'lasso' ); ?></a> |
|
537 | + <label><?php _e('Post Date', 'lasso'); ?></label> |
|
538 | + <input type="text" class="editus_custom_date" name="post_date" value="<?php echo get_the_time($dateformat, $postid); ?>"/> |
|
539 | + <a href="#" id="lasso--postsettings-setnow"><?php _e('Set to Now', 'lasso'); ?></a> |
|
540 | 540 | <?php |
541 | 541 | }?> |
542 | 542 | |
@@ -558,23 +558,23 @@ discard block |
||
558 | 558 | ?> |
559 | 559 | <!--/div--> |
560 | 560 | |
561 | - <?php do_action( 'lasso_modal_post_form' ); // action ?> |
|
561 | + <?php do_action('lasso_modal_post_form'); // action ?> |
|
562 | 562 | |
563 | 563 | <div class="lasso--postsettings__footer" > |
564 | - <a href="#" class="lasso--postsettings-cancel"><?php _e( 'Cancel', 'lasso' );?></a> |
|
564 | + <a href="#" class="lasso--postsettings-cancel"><?php _e('Cancel', 'lasso'); ?></a> |
|
565 | 565 | <input type="hidden" name="status" value=""> |
566 | 566 | <input type="hidden" name="categories" value=""> |
567 | - <input type="hidden" name="postid" value="<?php echo get_the_ID();?>"> |
|
567 | + <input type="hidden" name="postid" value="<?php echo get_the_ID(); ?>"> |
|
568 | 568 | <input type="hidden" name="action" value="process_update-object_post"> |
569 | - <input type="hidden" name="nonce" value="<?php echo $nonce;?>"> |
|
570 | - <?php do_action( 'lasso_modal_post_form_footer' ); // action ?> |
|
571 | - <input type="submit" id="lasso--postsettings-submit" value="<?php esc_attr_e( 'Save', 'lasso' );?>"> |
|
569 | + <input type="hidden" name="nonce" value="<?php echo $nonce; ?>"> |
|
570 | + <?php do_action('lasso_modal_post_form_footer'); // action ?> |
|
571 | + <input type="submit" id="lasso--postsettings-submit" value="<?php esc_attr_e('Save', 'lasso'); ?>"> |
|
572 | 572 | </div> |
573 | 573 | |
574 | 574 | </form> |
575 | 575 | </div> |
576 | 576 | |
577 | - <?php if( $tabs ) { echo $content; } ?> |
|
577 | + <?php if ($tabs) { echo $content; } ?> |
|
578 | 578 | |
579 | 579 | </div> |
580 | 580 | |
@@ -596,41 +596,41 @@ discard block |
||
596 | 596 | ob_start(); |
597 | 597 | |
598 | 598 | |
599 | - $status = get_post_status( get_the_ID() ); |
|
599 | + $status = get_post_status(get_the_ID()); |
|
600 | 600 | |
601 | - $nonce = wp_create_nonce( 'lasso-editor-new-post' ); |
|
601 | + $nonce = wp_create_nonce('lasso-editor-new-post'); |
|
602 | 602 | |
603 | 603 | // let users add custom css classes |
604 | - $custom_classes = apply_filters( 'lasso_modal_post_classes', '' ); |
|
604 | + $custom_classes = apply_filters('lasso_modal_post_classes', ''); |
|
605 | 605 | |
606 | 606 | // return the post type |
607 | - $type = get_post_type( get_the_ID() ); |
|
607 | + $type = get_post_type(get_the_ID()); |
|
608 | 608 | |
609 | 609 | $mobile_style = ""; |
610 | 610 | if (wp_is_mobile()) { |
611 | 611 | $mobile_style = 'style="top:140px !important;"'; |
612 | 612 | } |
613 | 613 | ?> |
614 | - <div id="lasso--post-new__modal" class="lasso--modal lasso--modal__med lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>" <?php echo $mobile_style;?>"> |
|
614 | + <div id="lasso--post-new__modal" class="lasso--modal lasso--modal__med lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>" <?php echo $mobile_style; ?>"> |
|
615 | 615 | <div class="lasso--modal__inner lasso--hasnewform"> |
616 | 616 | |
617 | 617 | <form id="lasso--postnew__form" enctype="multipart/form-data" class="lasso--post-form"> |
618 | 618 | |
619 | 619 | <div class="lasso--postsettings__option story-slug-option lasso--last-option"> |
620 | - <label><?php esc_attr_e( 'New <span>post</span> title', 'lasso' );?><span class="lasso-util--help lasso-util--help-top" data-tooltip="<?php esc_attr_e( 'Specify title for new post, then save to edit.', 'lasso' );?>"><i class="lasso-icon-help"></i></span></label> |
|
621 | - <input class="lasso--modal__trigger-footer" type="text" required name="story_title" value="" placeholder="<?php esc_attr_e( 'Type Your Title Here', 'lasso' );?>"> |
|
620 | + <label><?php esc_attr_e('New <span>post</span> title', 'lasso'); ?><span class="lasso-util--help lasso-util--help-top" data-tooltip="<?php esc_attr_e('Specify title for new post, then save to edit.', 'lasso'); ?>"><i class="lasso-icon-help"></i></span></label> |
|
621 | + <input class="lasso--modal__trigger-footer" type="text" required name="story_title" value="" placeholder="<?php esc_attr_e('Type Your Title Here', 'lasso'); ?>"> |
|
622 | 622 | <div class="lasso--select-wrap" style="width:90px"> |
623 | 623 | <select id="lasso--select-type" name="story_type"> |
624 | 624 | |
625 | 625 | <?php |
626 | 626 | $types = lasso_post_types_names(); |
627 | - if ( !empty( $types ) ) { |
|
628 | - foreach( $types as $name => $label ) { |
|
629 | - $type = preg_replace( '/s\b/','', $name ); |
|
627 | + if (!empty($types)) { |
|
628 | + foreach ($types as $name => $label) { |
|
629 | + $type = preg_replace('/s\b/', '', $name); |
|
630 | 630 | if ($type == 'page' && !current_user_can('edit_pages')) { |
631 | 631 | continue; |
632 | 632 | } |
633 | - printf( '<option value="%s">%s</option>', lcfirst( esc_attr( $type ) ) , ucfirst( esc_attr( $label ) ) ); |
|
633 | + printf('<option value="%s">%s</option>', lcfirst(esc_attr($type)), ucfirst(esc_attr($label))); |
|
634 | 634 | } |
635 | 635 | |
636 | 636 | } |
@@ -641,19 +641,19 @@ discard block |
||
641 | 641 | </div> |
642 | 642 | |
643 | 643 | <div class="lasso--postsettings__footer"> |
644 | - <a href="#" class="lasso--postsettings-cancel"><?php _e( 'Cancel', 'lasso' );?></a> |
|
644 | + <a href="#" class="lasso--postsettings-cancel"><?php _e('Cancel', 'lasso'); ?></a> |
|
645 | 645 | <input type="hidden" name="action" value="process_new-object_post"> |
646 | 646 | <?php |
647 | - if ( !empty( $types ) ) { |
|
647 | + if (!empty($types)) { |
|
648 | 648 | // get the first element |
649 | 649 | $keys = array_keys($types); |
650 | - $type =$keys[0]; |
|
651 | - $type = preg_replace( '/s\b/','', $type ); |
|
652 | - printf( '<input type="hidden" name="object" value="%s">', lcfirst( esc_attr( $type ) ) ); |
|
650 | + $type = $keys[0]; |
|
651 | + $type = preg_replace('/s\b/', '', $type); |
|
652 | + printf('<input type="hidden" name="object" value="%s">', lcfirst(esc_attr($type))); |
|
653 | 653 | } |
654 | 654 | ?> |
655 | - <input type="hidden" name="nonce" value="<?php echo $nonce;?>"> |
|
656 | - <input type="submit" value="<?php esc_attr_e( 'Create', 'lasso' );?>"> |
|
655 | + <input type="hidden" name="nonce" value="<?php echo $nonce; ?>"> |
|
656 | + <input type="submit" value="<?php esc_attr_e('Create', 'lasso'); ?>"> |
|
657 | 657 | </div> |
658 | 658 | |
659 | 659 | </form> |
@@ -681,18 +681,18 @@ discard block |
||
681 | 681 | ob_start(); |
682 | 682 | |
683 | 683 | // post status |
684 | - $status = get_post_status( get_the_ID() ); |
|
684 | + $status = get_post_status(get_the_ID()); |
|
685 | 685 | |
686 | 686 | // let users add custom css classes |
687 | - $custom_classes = apply_filters( 'lasso_modal_all_post_classes', '' ); |
|
687 | + $custom_classes = apply_filters('lasso_modal_all_post_classes', ''); |
|
688 | 688 | |
689 | 689 | ?> |
690 | - <div id="lasso--all-posts__modal" class="lasso--modal lasso--modal__full lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>" style="max-height:100%"> |
|
690 | + <div id="lasso--all-posts__modal" class="lasso--modal lasso--modal__full lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>" style="max-height:100%"> |
|
691 | 691 | <div class="lasso--modal__inner"> |
692 | 692 | |
693 | 693 | <div class="lasso--post-filtering not-visible"> |
694 | 694 | <div class="lasso--search__results"> |
695 | - <span id="lasso--results-found"></span><?php _e('results found','lasso');?> |
|
695 | + <span id="lasso--results-found"></span><?php _e('results found', 'lasso'); ?> |
|
696 | 696 | </div> |
697 | 697 | <div class="lasso--search"> |
698 | 698 | <i id="lasso--search__toggle" class="dashicons dashicons-search"></i> |
@@ -706,18 +706,18 @@ discard block |
||
706 | 706 | $post_types = lasso_post_types_names(); |
707 | 707 | $rest_bases = lasso_post_types_rest_base(); |
708 | 708 | |
709 | - if ( ! empty( $post_types ) ) { |
|
709 | + if (!empty($post_types)) { |
|
710 | 710 | $first = 'active'; |
711 | - foreach( $post_types as $name => $label ) { |
|
711 | + foreach ($post_types as $name => $label) { |
|
712 | 712 | if (array_key_exists($name, $rest_bases)) { |
713 | - printf( '<li class="%1s lasso--show-objects" data-post-type="%2s">%3s</li>', esc_attr( $first), esc_attr( $rest_bases[$name] ), esc_attr( $label ) ); |
|
713 | + printf('<li class="%1s lasso--show-objects" data-post-type="%2s">%3s</li>', esc_attr($first), esc_attr($rest_bases[$name]), esc_attr($label)); |
|
714 | 714 | } |
715 | 715 | $first = ''; |
716 | 716 | } |
717 | 717 | |
718 | 718 | } |
719 | 719 | |
720 | - do_action('lasso_modal_post_objects');?> |
|
720 | + do_action('lasso_modal_post_objects'); ?> |
|
721 | 721 | |
722 | 722 | </ul> |
723 | 723 | <div id="lasso--loading" class="lasso--loading"><div class="lasso--loader"></div></div> |
@@ -737,14 +737,14 @@ discard block |
||
737 | 737 | |
738 | 738 | |
739 | 739 | // let users add custom css classes |
740 | - $custom_classes = apply_filters( 'lasso_wpimg_classes', '' ); |
|
740 | + $custom_classes = apply_filters('lasso_wpimg_classes', ''); |
|
741 | 741 | |
742 | 742 | ?> |
743 | - <ul class="lasso-component--controls <?php echo sanitize_html_class( $custom_classes );?>" contenteditable="false"> |
|
744 | - <li class="lasso-drag" title="<?php esc_attr_e( 'Move', 'lasso' );?>"></li> |
|
745 | - <li id="lasso--wpimg-edit" class="lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li> |
|
746 | - <li class="lasso-clone" title="<?php esc_attr_e( 'Clone', 'lasso' );?>"></li> |
|
747 | - <li class="lasso-delete" title="<?php esc_attr_e( 'Delete', 'lasso' );?>"></li> |
|
743 | + <ul class="lasso-component--controls <?php echo sanitize_html_class($custom_classes); ?>" contenteditable="false"> |
|
744 | + <li class="lasso-drag" title="<?php esc_attr_e('Move', 'lasso'); ?>"></li> |
|
745 | + <li id="lasso--wpimg-edit" class="lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li> |
|
746 | + <li class="lasso-clone" title="<?php esc_attr_e('Clone', 'lasso'); ?>"></li> |
|
747 | + <li class="lasso-delete" title="<?php esc_attr_e('Delete', 'lasso'); ?>"></li> |
|
748 | 748 | </ul> |
749 | 749 | |
750 | 750 | <?php return ob_get_clean(); |
@@ -756,14 +756,14 @@ discard block |
||
756 | 756 | |
757 | 757 | |
758 | 758 | // let users add custom css classes |
759 | - $custom_classes = apply_filters( 'lasso_wpimg_classes', '' ); |
|
759 | + $custom_classes = apply_filters('lasso_wpimg_classes', ''); |
|
760 | 760 | |
761 | 761 | ?> |
762 | - <ul class="lasso-component--controls <?php echo sanitize_html_class( $custom_classes );?>" contenteditable="false"> |
|
763 | - <li class="lasso-drag" title="<?php esc_attr_e( 'Move', 'lasso' );?>"></li> |
|
764 | - <li id="lasso--wpvideo-edit" class="lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li> |
|
765 | - <li class="lasso-clone" title="<?php esc_attr_e( 'Clone', 'lasso' );?>"></li> |
|
766 | - <li class="lasso-delete" title="<?php esc_attr_e( 'Delete', 'lasso' );?>"></li> |
|
762 | + <ul class="lasso-component--controls <?php echo sanitize_html_class($custom_classes); ?>" contenteditable="false"> |
|
763 | + <li class="lasso-drag" title="<?php esc_attr_e('Move', 'lasso'); ?>"></li> |
|
764 | + <li id="lasso--wpvideo-edit" class="lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li> |
|
765 | + <li class="lasso-clone" title="<?php esc_attr_e('Clone', 'lasso'); ?>"></li> |
|
766 | + <li class="lasso-delete" title="<?php esc_attr_e('Delete', 'lasso'); ?>"></li> |
|
767 | 767 | </ul> |
768 | 768 | |
769 | 769 | <?php return ob_get_clean(); |
@@ -776,16 +776,16 @@ discard block |
||
776 | 776 | */ |
777 | 777 | function lasso_map_form_footer() { |
778 | 778 | |
779 | - $nonce = wp_create_nonce( 'lasso-process-map' ); |
|
779 | + $nonce = wp_create_nonce('lasso-process-map'); |
|
780 | 780 | |
781 | 781 | ob_start(); |
782 | 782 | |
783 | 783 | ?> |
784 | 784 | <div class="lasso--map-form__footer"> |
785 | - <input type="hidden" name="postid" value="<?php echo get_the_ID();?>"> |
|
786 | - <input type="hidden" name="nonce" value="<?php echo $nonce;?>"> |
|
785 | + <input type="hidden" name="postid" value="<?php echo get_the_ID(); ?>"> |
|
786 | + <input type="hidden" name="nonce" value="<?php echo $nonce; ?>"> |
|
787 | 787 | <input type="hidden" name="action" value="process_map_save"> |
788 | - <input type="submit" class="lasso--map-form__submit" value="<?php esc_attr_e( 'Save Locations', 'lasso' );?>"> |
|
788 | + <input type="submit" class="lasso--map-form__submit" value="<?php esc_attr_e('Save Locations', 'lasso'); ?>"> |
|
789 | 789 | </div> |
790 | 790 | |
791 | 791 | <?php return ob_get_clean(); |
@@ -803,7 +803,7 @@ discard block |
||
803 | 803 | |
804 | 804 | ?> |
805 | 805 | <div id="lasso--pagerefresh" class="visible"> |
806 | - <?php _e( 'Save this post and refesh the page to see these changes.', 'lasso' );?> |
|
806 | + <?php _e('Save this post and refesh the page to see these changes.', 'lasso'); ?> |
|
807 | 807 | </div> |
808 | 808 | |
809 | 809 | <?php return ob_get_clean(); |
@@ -817,43 +817,43 @@ discard block |
||
817 | 817 | */ |
818 | 818 | function lasso_editor_options_blob() { |
819 | 819 | |
820 | - $codes = function_exists( 'aesop_shortcodes' ) ? aesop_shortcodes() : apply_filters( 'lasso_custom_options', '' ); |
|
821 | - $galleries = function_exists( 'lasso_editor_galleries_exist' ) && lasso_editor_galleries_exist() ? 'has-galleries' : 'creating-gallery'; |
|
820 | + $codes = function_exists('aesop_shortcodes') ? aesop_shortcodes() : apply_filters('lasso_custom_options', ''); |
|
821 | + $galleries = function_exists('lasso_editor_galleries_exist') && lasso_editor_galleries_exist() ? 'has-galleries' : 'creating-gallery'; |
|
822 | 822 | |
823 | - $nonce = wp_create_nonce( 'lasso_gallery' ); |
|
823 | + $nonce = wp_create_nonce('lasso_gallery'); |
|
824 | 824 | |
825 | 825 | $blob = array(); |
826 | 826 | |
827 | - if ( empty( $codes ) ) |
|
827 | + if (empty($codes)) |
|
828 | 828 | return; |
829 | 829 | |
830 | - foreach ( $codes as $slug => $shortcode ) { |
|
830 | + foreach ($codes as $slug => $shortcode) { |
|
831 | 831 | $return = ''; |
832 | 832 | // Shortcode has atts |
833 | 833 | |
834 | - if ( count( $shortcode['atts'] ) && $shortcode['atts'] ) { |
|
834 | + if (count($shortcode['atts']) && $shortcode['atts']) { |
|
835 | 835 | |
836 | - foreach ( $shortcode['atts'] as $attr_name => $attr_info ) { |
|
836 | + foreach ($shortcode['atts'] as $attr_name => $attr_info) { |
|
837 | 837 | |
838 | 838 | |
839 | - $prefix = isset( $attr_info['prefix'] ) ? sprintf( '<span class="lasso-option-prefix">%s</span>', $attr_info['prefix'] ) : null; |
|
839 | + $prefix = isset($attr_info['prefix']) ? sprintf('<span class="lasso-option-prefix">%s</span>', $attr_info['prefix']) : null; |
|
840 | 840 | |
841 | 841 | $return .= '<form id="lasso--component-settings-form" class="'.$galleries.'" method="post">'; |
842 | 842 | $return .= '<p data-option="'.$attr_name.'" class="lasso-option aesop-'.$slug.'-'.$attr_name.'">'; |
843 | - $return .= '<label for="aesop-generator-attr-' . $attr_name . '">' . $attr_info['desc'] . '</label>'; |
|
843 | + $return .= '<label for="aesop-generator-attr-'.$attr_name.'">'.$attr_info['desc'].'</label>'; |
|
844 | 844 | $return .= '<small class="lasso-option-desc">'.$attr_info['tip'].'</small>'; |
845 | 845 | // Select |
846 | 846 | |
847 | - if ( isset( $attr_info['values'] ) ) { |
|
847 | + if (isset($attr_info['values'])) { |
|
848 | 848 | |
849 | - $return .= '<select name="' . $attr_name . '" id="aesop-generator-attr-' . $attr_name . '" class="lasso-generator-attr">'; |
|
849 | + $return .= '<select name="'.$attr_name.'" id="aesop-generator-attr-'.$attr_name.'" class="lasso-generator-attr">'; |
|
850 | 850 | |
851 | - $i=0; |
|
851 | + $i = 0; |
|
852 | 852 | |
853 | - foreach ( $attr_info['values'] as $attr_value ) { |
|
853 | + foreach ($attr_info['values'] as $attr_value) { |
|
854 | 854 | $attr_value_selected = $attr_info['default'] == $attr_value ? ' selected="selected"' : ''; |
855 | 855 | |
856 | - $return .= '<option value="'.$attr_info['values'][$i]['value'].'" ' . $attr_value_selected . '>'.$attr_info['values'][$i]['name'].'</option>'; |
|
856 | + $return .= '<option value="'.$attr_info['values'][$i]['value'].'" '.$attr_value_selected.'>'.$attr_info['values'][$i]['name'].'</option>'; |
|
857 | 857 | |
858 | 858 | $i++; |
859 | 859 | } |
@@ -862,24 +862,24 @@ discard block |
||
862 | 862 | |
863 | 863 | } else { |
864 | 864 | |
865 | - $attr_field_type = isset( $attr_info['type'] ) ? $attr_info['type'] : 'text'; |
|
865 | + $attr_field_type = isset($attr_info['type']) ? $attr_info['type'] : 'text'; |
|
866 | 866 | |
867 | 867 | // image upload |
868 | - if ( 'media_upload' == $attr_info['type'] ) { |
|
868 | + if ('media_upload' == $attr_info['type']) { |
|
869 | 869 | |
870 | - $return .= '<input type="' . $attr_field_type . '" name="' . $attr_name . '" value="'.$attr_info['default'].'" id="aesop-generator-attr-' . $attr_name . '" class="lasso-generator-attr aesop-generator-attr-'.$attr_field_type.'" />'; |
|
870 | + $return .= '<input type="'.$attr_field_type.'" name="'.$attr_name.'" value="'.$attr_info['default'].'" id="aesop-generator-attr-'.$attr_name.'" class="lasso-generator-attr aesop-generator-attr-'.$attr_field_type.'" />'; |
|
871 | 871 | $return .= '<a href="#" id="lasso-upload-img" class="lasso-option-button" /></a>'; |
872 | 872 | |
873 | - } elseif ( 'color' == $attr_info['type'] ) { |
|
873 | + } elseif ('color' == $attr_info['type']) { |
|
874 | 874 | |
875 | - $return .= '<input type="color" name="' . $attr_name . '" value="'.$attr_info['default'].'" id="aesop-generator-attr-' . $attr_name . '" class="lasso-generator-attr aesop-generator-attr-'.$attr_field_type.'" />'; |
|
875 | + $return .= '<input type="color" name="'.$attr_name.'" value="'.$attr_info['default'].'" id="aesop-generator-attr-'.$attr_name.'" class="lasso-generator-attr aesop-generator-attr-'.$attr_field_type.'" />'; |
|
876 | 876 | |
877 | - } elseif ( 'text_area' == $attr_info['type'] ) { |
|
877 | + } elseif ('text_area' == $attr_info['type']) { |
|
878 | 878 | |
879 | - $return .= '<textarea name="' . $attr_name . '" id="aesop-generator-attr-' . $attr_name . '" class="lasso-generator-attr aesop-generator-attr-'.$attr_field_type.'" placeholder="'.$attr_info['default'].'" /></textarea>'.$prefix.''; |
|
879 | + $return .= '<textarea name="'.$attr_name.'" id="aesop-generator-attr-'.$attr_name.'" class="lasso-generator-attr aesop-generator-attr-'.$attr_field_type.'" placeholder="'.$attr_info['default'].'" /></textarea>'.$prefix.''; |
|
880 | 880 | |
881 | 881 | } else { |
882 | - $return .= '<input type="' . $attr_field_type . '" name="' . $attr_name . '" value="'.$attr_info['default'].'" id="aesop-generator-attr-' . $attr_name . '" class="lasso-generator-attr aesop-generator-attr-'.$attr_field_type.'" />'.$prefix.''; |
|
882 | + $return .= '<input type="'.$attr_field_type.'" name="'.$attr_name.'" value="'.$attr_info['default'].'" id="aesop-generator-attr-'.$attr_name.'" class="lasso-generator-attr aesop-generator-attr-'.$attr_field_type.'" />'.$prefix.''; |
|
883 | 883 | } |
884 | 884 | } |
885 | 885 | $return .= '</p>'; |
@@ -890,9 +890,9 @@ discard block |
||
890 | 890 | /////////////////////////// |
891 | 891 | // START GALLERY AND MAP FRONT END STUFFS |
892 | 892 | /////////////////////////// |
893 | - if ( isset( $shortcode['front'] ) && true == $shortcode['front'] ) { |
|
893 | + if (isset($shortcode['front']) && true == $shortcode['front']) { |
|
894 | 894 | |
895 | - if ( 'gallery' == $shortcode['front_type'] ) { |
|
895 | + if ('gallery' == $shortcode['front_type']) { |
|
896 | 896 | |
897 | 897 | $return .= lasso_gallery_editor_module(); |
898 | 898 | |
@@ -903,13 +903,13 @@ discard block |
||
903 | 903 | /////////////////////////// |
904 | 904 | |
905 | 905 | // Single shortcode (not closed) |
906 | - if ( 'single' == $shortcode['type'] ) { |
|
906 | + if ('single' == $shortcode['type']) { |
|
907 | 907 | |
908 | 908 | $return .= '<input type="hidden" name="lasso-generator-content" id="lasso-generator-content" value="false" />'; |
909 | 909 | |
910 | 910 | } else { |
911 | 911 | |
912 | - $return .= '<p data-option="content" class="lasso-option lasso-c-comp-text"><label>' . __( 'Content', 'lasso' ) . '</label><textarea type="text" name="lasso-generator-content" id="lasso-generator-content" value="' . $shortcode['content'] . '" /></textarea></p>'; |
|
912 | + $return .= '<p data-option="content" class="lasso-option lasso-c-comp-text"><label>'.__('Content', 'lasso').'</label><textarea type="text" name="lasso-generator-content" id="lasso-generator-content" value="'.$shortcode['content'].'" /></textarea></p>'; |
|
913 | 913 | } |
914 | 914 | |
915 | 915 | $return .= '<p class="lasso-buttoninsert-wrap"><a href="#" class="lasso-generator-cancel" id="lasso--sidebar__close">Cancel</a><input type="submit" id="lasso-generator-insert" value="Save Settings"></p>'; |
@@ -945,14 +945,14 @@ discard block |
||
945 | 945 | <div id="lasso--loading" class="lasso--loading"><div class="lasso--loader"></div></div> |
946 | 946 | <div id="lasso--hide" style="display:none;" class="lasso--post-form"> |
947 | 947 | <i class="lasso-icon lasso-icon-move"></i> |
948 | - <label><?php _e( 'Revisions', 'lasso' );?><span class="lasso-util--help lasso-util--help-top" data-tooltip="<?php esc_attr_e( 'Use the slider to view the revision live on the page.', 'lasso' );?>"><i class="lasso-icon-help"></i></span></label> |
|
948 | + <label><?php _e('Revisions', 'lasso'); ?><span class="lasso-util--help lasso-util--help-top" data-tooltip="<?php esc_attr_e('Use the slider to view the revision live on the page.', 'lasso'); ?>"><i class="lasso-icon-help"></i></span></label> |
|
949 | 949 | <div class="lasso--slider_wrap"> |
950 | 950 | <div id="lasso--slider"></div> |
951 | 951 | </div> |
952 | 952 | <ul id="lasso--revision-list"></ul> |
953 | 953 | <div class="lasso--btn-group lasso--btn-group-small"> |
954 | - <a href="#" class="lasso--btn-secondary" id="lasso--close-modal"><?php _e( 'Cancel', 'lasso' );?></a> |
|
955 | - <a href="#" class="lasso--btn-primary" id="lasso--select-revision"><?php _e( 'Select', 'lasso' );?></a> |
|
954 | + <a href="#" class="lasso--btn-secondary" id="lasso--close-modal"><?php _e('Cancel', 'lasso'); ?></a> |
|
955 | + <a href="#" class="lasso--btn-primary" id="lasso--select-revision"><?php _e('Select', 'lasso'); ?></a> |
|
956 | 956 | </div> |
957 | 957 | </div> |
958 | 958 | |
@@ -975,7 +975,7 @@ discard block |
||
975 | 975 | // Normalize into a six character long hex string |
976 | 976 | $hex = str_replace('#', '', $hex); |
977 | 977 | if (strlen($hex) == 3) { |
978 | - $hex = str_repeat(substr($hex,0,1), 2).str_repeat(substr($hex,1,1), 2).str_repeat(substr($hex,2,1), 2); |
|
978 | + $hex = str_repeat(substr($hex, 0, 1), 2).str_repeat(substr($hex, 1, 1), 2).str_repeat(substr($hex, 2, 1), 2); |
|
979 | 979 | } |
980 | 980 | |
981 | 981 | // Split into three parts: R, G and B |
@@ -984,7 +984,7 @@ discard block |
||
984 | 984 | |
985 | 985 | foreach ($color_parts as $color) { |
986 | 986 | $color = hexdec($color); // Convert to decimal |
987 | - $color = max(0,min(255,$color + $steps)); // Adjust color |
|
987 | + $color = max(0, min(255, $color + $steps)); // Adjust color |
|
988 | 988 | $return .= str_pad(dechex($color), 2, '0', STR_PAD_LEFT); // Make two char hex code |
989 | 989 | } |
990 | 990 |
@@ -10,24 +10,24 @@ discard block |
||
10 | 10 | |
11 | 11 | class assets { |
12 | 12 | |
13 | - public function __construct(){ |
|
13 | + public function __construct() { |
|
14 | 14 | |
15 | - add_action('wp_enqueue_scripts', array($this,'scripts')); |
|
15 | + add_action('wp_enqueue_scripts', array($this, 'scripts')); |
|
16 | 16 | } |
17 | 17 | |
18 | - public function scripts(){ |
|
18 | + public function scripts() { |
|
19 | 19 | |
20 | 20 | |
21 | 21 | global $post; |
22 | - if ( lasso_user_can('edit_posts') && |
|
23 | - !( function_exists( 'is_gutenberg_page' ) && has_blocks( $post->post_content) )) {// bail if the post has Gutenberg bloc |
|
22 | + if (lasso_user_can('edit_posts') && |
|
23 | + !(function_exists('is_gutenberg_page') && has_blocks($post->post_content))) {// bail if the post has Gutenberg bloc |
|
24 | 24 | |
25 | 25 | /** Returns the time offset from UTC |
26 | 26 | */ |
27 | 27 | function get_UTC_offset() { |
28 | - $timezone_string = get_option( 'timezone_string' ); |
|
29 | - if (empty( $timezone_string ) ) { |
|
30 | - return get_option('gmt_offset')*3600; |
|
28 | + $timezone_string = get_option('timezone_string'); |
|
29 | + if (empty($timezone_string)) { |
|
30 | + return get_option('gmt_offset') * 3600; |
|
31 | 31 | } |
32 | 32 | |
33 | 33 | $origin_dtz = new \DateTimeZone($timezone_string); |
@@ -39,8 +39,8 @@ discard block |
||
39 | 39 | wp_enqueue_style('lasso-style', LASSO_URL.'/public/assets/css/lasso.css', LASSO_VERSION, true); |
40 | 40 | |
41 | 41 | //don't load autocomplete if it's a stockholm theme |
42 | - $themename = wp_get_theme()->get('Name'); |
|
43 | - if ($themename !='Stockholm' ) { |
|
42 | + $themename = wp_get_theme()->get('Name'); |
|
43 | + if ($themename != 'Stockholm') { |
|
44 | 44 | wp_enqueue_script('jquery-ui-autocomplete'); |
45 | 45 | } |
46 | 46 | wp_enqueue_script('jquery-ui-draggable'); |
@@ -53,28 +53,28 @@ discard block |
||
53 | 53 | // url for json api |
54 | 54 | $home_url = function_exists('json_get_url_prefix') ? json_get_url_prefix() : false; |
55 | 55 | |
56 | - $article_object = lasso_editor_get_option('article_class','lasso_editor'); |
|
56 | + $article_object = lasso_editor_get_option('article_class', 'lasso_editor'); |
|
57 | 57 | |
58 | - $article_object = empty( $article_object ) && lasso_get_supported_theme_class() ? lasso_get_supported_theme_class() : $article_object; |
|
58 | + $article_object = empty($article_object) && lasso_get_supported_theme_class() ? lasso_get_supported_theme_class() : $article_object; |
|
59 | 59 | |
60 | - $featImgClass = lasso_editor_get_option('featimg_class','lasso_editor'); |
|
61 | - if (empty( $featImgClass )) { |
|
60 | + $featImgClass = lasso_editor_get_option('featimg_class', 'lasso_editor'); |
|
61 | + if (empty($featImgClass)) { |
|
62 | 62 | $featImgClass = lasso_get_supported_theme_featured_image_class(); |
63 | 63 | } |
64 | - $titleClass = lasso_editor_get_option('title_class','lasso_editor'); |
|
65 | - if (empty( $titleClass )) { |
|
64 | + $titleClass = lasso_editor_get_option('title_class', 'lasso_editor'); |
|
65 | + if (empty($titleClass)) { |
|
66 | 66 | $titleClass = lasso_get_supported_theme_title_class(); |
67 | 67 | } |
68 | - $toolbar_headings = lasso_editor_get_option('toolbar_headings', 'lasso_editor'); |
|
69 | - $toolbar_headings_h4 = lasso_editor_get_option('toolbar_headings_h4', 'lasso_editor'); |
|
68 | + $toolbar_headings = lasso_editor_get_option('toolbar_headings', 'lasso_editor'); |
|
69 | + $toolbar_headings_h4 = lasso_editor_get_option('toolbar_headings_h4', 'lasso_editor'); |
|
70 | 70 | $objectsNoSave = lasso_editor_get_option('dont_save', 'lasso_editor'); |
71 | - $objectsNonEditable = lasso_editor_get_option('non_editable', 'lasso_editor'); |
|
71 | + $objectsNonEditable = lasso_editor_get_option('non_editable', 'lasso_editor'); |
|
72 | 72 | $disableRESTSave = lasso_editor_get_option('save_using_rest_disabled', 'lasso_editor'); |
73 | - $save_to_post_disabled = lasso_editor_get_option( 'post_save_disabled', 'lasso_editor' ); |
|
74 | - $edit_post_disabled = lasso_editor_get_option( 'post_edit_disabled', 'lasso_editor' ); |
|
73 | + $save_to_post_disabled = lasso_editor_get_option('post_save_disabled', 'lasso_editor'); |
|
74 | + $edit_post_disabled = lasso_editor_get_option('post_edit_disabled', 'lasso_editor'); |
|
75 | 75 | |
76 | - $bold_tag = lasso_editor_get_option('bold_tag', 'lasso_editor','b'); |
|
77 | - $i_tag = lasso_editor_get_option('i_tag', 'lasso_editor','i'); |
|
76 | + $bold_tag = lasso_editor_get_option('bold_tag', 'lasso_editor', 'b'); |
|
77 | + $i_tag = lasso_editor_get_option('i_tag', 'lasso_editor', 'i'); |
|
78 | 78 | |
79 | 79 | |
80 | 80 | //text alignement |
@@ -91,8 +91,8 @@ discard block |
||
91 | 91 | |
92 | 92 | if ($show_color) { |
93 | 93 | //color picker |
94 | - wp_enqueue_style( 'wp-color-picker' ); |
|
95 | - wp_enqueue_script( 'iris', admin_url( 'js/iris.min.js' ), array( 'jquery-ui-draggable', 'jquery-ui-slider', 'jquery-touch-punch' ), false, 1 ); |
|
94 | + wp_enqueue_style('wp-color-picker'); |
|
95 | + wp_enqueue_script('iris', admin_url('js/iris.min.js'), array('jquery-ui-draggable', 'jquery-ui-slider', 'jquery-touch-punch'), false, 1); |
|
96 | 96 | } |
97 | 97 | |
98 | 98 | // click to insert components, not drag and drop |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | |
105 | 105 | // custom fields |
106 | 106 | |
107 | - $custom_fields = apply_filters( 'editus_custom_fields', null ); //array('testFieldName' => '#field1'); |
|
107 | + $custom_fields = apply_filters('editus_custom_fields', null); //array('testFieldName' => '#field1'); |
|
108 | 108 | |
109 | 109 | |
110 | 110 | |
@@ -112,47 +112,47 @@ discard block |
||
112 | 112 | $postid = get_the_ID(); |
113 | 113 | $tz_offset = get_UTC_offset(); |
114 | 114 | $post_date = get_the_time('U', $postid); |
115 | - $time = (time()+$tz_offset); |
|
115 | + $time = (time() + $tz_offset); |
|
116 | 116 | $delta = $time - $post_date; |
117 | 117 | |
118 | 118 | $strings = array( |
119 | - 'save' => __('Save','lasso'), |
|
120 | - 'selectText' => __('Please Select Text First.','lasso'), |
|
121 | - 'cancel' => __('Cancel','lasso'), |
|
122 | - 'exiteditor' => __('Exit Editor','lasso'), |
|
123 | - 'saving' => __('Saving...','lasso'), |
|
124 | - 'saved' => __('Saved!','lasso'), |
|
125 | - 'adding' => __('Adding...','lasso'), |
|
126 | - 'added' => __('Added!','lasso'), |
|
127 | - 'loading' => __('Loading...','lasso'), |
|
128 | - 'loadMore' => __('Load More','lasso'), |
|
129 | - 'close' => __('Close','lasso'), |
|
130 | - 'noPostsFound' => __('No more posts found','lasso'), |
|
131 | - 'fetchFail' => __('Fetching failed.','lasso'), |
|
132 | - 'galleryCreated' => __('Gallery Created!','lasso'), |
|
133 | - 'galleryUpdated' => __('Gallery Updated!','lasso'), |
|
134 | - 'justWrite' => __('Just write...','lasso'), |
|
135 | - 'chooseImage' => __('Choose an image','lasso'), |
|
136 | - 'updateImage' => __('Update Image','lasso'), |
|
137 | - 'insertImage' => __('Insert Image','lasso'), |
|
138 | - 'selectImage' => __('Select Image','lasso'), |
|
139 | - 'removeFeatImg' => __('Remove featured image?','lasso'), |
|
140 | - 'updateSelectedImg' => __('Update Selected Image','lasso'), |
|
141 | - 'chooseImages' => __('Choose images','lasso'), |
|
142 | - 'editImage' => __('Edit Image','lasso'), |
|
143 | - 'addImages' => __('Add Images','lasso'), |
|
144 | - 'addNewGallery' => __('Add New Gallery','lasso'), |
|
145 | - 'selectGallery' => __('Select Editus Gallery Image','lasso'), |
|
146 | - 'useSelectedImages' => __('Use Selected Images','lasso'), |
|
147 | - 'publishPost' => __('Publish Post?','lasso'), |
|
148 | - 'publishYes' => __('Yes, publish it!','lasso'), |
|
149 | - 'deletePost' => __('Trash Post?','lasso'), |
|
150 | - 'deleteYes' => __('Yes, trash it!','lasso'), |
|
151 | - 'warning' => __('Oh snap!','laso'), |
|
152 | - 'cancelText' => __('O.K. got it!','lasso'), |
|
153 | - 'missingClass' => __('It looks like we are either missing the Article CSS class, or it is configured incorrectly. Editus will not function correctly without this CSS class.','lasso'), |
|
119 | + 'save' => __('Save', 'lasso'), |
|
120 | + 'selectText' => __('Please Select Text First.', 'lasso'), |
|
121 | + 'cancel' => __('Cancel', 'lasso'), |
|
122 | + 'exiteditor' => __('Exit Editor', 'lasso'), |
|
123 | + 'saving' => __('Saving...', 'lasso'), |
|
124 | + 'saved' => __('Saved!', 'lasso'), |
|
125 | + 'adding' => __('Adding...', 'lasso'), |
|
126 | + 'added' => __('Added!', 'lasso'), |
|
127 | + 'loading' => __('Loading...', 'lasso'), |
|
128 | + 'loadMore' => __('Load More', 'lasso'), |
|
129 | + 'close' => __('Close', 'lasso'), |
|
130 | + 'noPostsFound' => __('No more posts found', 'lasso'), |
|
131 | + 'fetchFail' => __('Fetching failed.', 'lasso'), |
|
132 | + 'galleryCreated' => __('Gallery Created!', 'lasso'), |
|
133 | + 'galleryUpdated' => __('Gallery Updated!', 'lasso'), |
|
134 | + 'justWrite' => __('Just write...', 'lasso'), |
|
135 | + 'chooseImage' => __('Choose an image', 'lasso'), |
|
136 | + 'updateImage' => __('Update Image', 'lasso'), |
|
137 | + 'insertImage' => __('Insert Image', 'lasso'), |
|
138 | + 'selectImage' => __('Select Image', 'lasso'), |
|
139 | + 'removeFeatImg' => __('Remove featured image?', 'lasso'), |
|
140 | + 'updateSelectedImg' => __('Update Selected Image', 'lasso'), |
|
141 | + 'chooseImages' => __('Choose images', 'lasso'), |
|
142 | + 'editImage' => __('Edit Image', 'lasso'), |
|
143 | + 'addImages' => __('Add Images', 'lasso'), |
|
144 | + 'addNewGallery' => __('Add New Gallery', 'lasso'), |
|
145 | + 'selectGallery' => __('Select Editus Gallery Image', 'lasso'), |
|
146 | + 'useSelectedImages' => __('Use Selected Images', 'lasso'), |
|
147 | + 'publishPost' => __('Publish Post?', 'lasso'), |
|
148 | + 'publishYes' => __('Yes, publish it!', 'lasso'), |
|
149 | + 'deletePost' => __('Trash Post?', 'lasso'), |
|
150 | + 'deleteYes' => __('Yes, trash it!', 'lasso'), |
|
151 | + 'warning' => __('Oh snap!', 'laso'), |
|
152 | + 'cancelText' => __('O.K. got it!', 'lasso'), |
|
153 | + 'missingClass' => __('It looks like we are either missing the Article CSS class, or it is configured incorrectly. Editus will not function correctly without this CSS class.', 'lasso'), |
|
154 | 154 | 'missingConfirm' => __('Update Settings', 'lasso'), |
155 | - 'helperText' => __('one more letter','lasso'), |
|
155 | + 'helperText' => __('one more letter', 'lasso'), |
|
156 | 156 | 'editingBackup' => __('You are currently editing a backup copy of this post.'), |
157 | 157 | |
158 | 158 | 'catsPlaceholder' => __('add categories...'), |
@@ -161,11 +161,11 @@ discard block |
||
161 | 161 | |
162 | 162 | ); |
163 | 163 | |
164 | - $api_url = trailingslashit( home_url() ) . 'lasso-internal-api'; |
|
164 | + $api_url = trailingslashit(home_url()).'lasso-internal-api'; |
|
165 | 165 | |
166 | 166 | $gallery_class = new gallery(); |
167 | 167 | $gallery_nonce_action = $gallery_class->nonce_action; |
168 | - $gallery_nonce = wp_create_nonce( $gallery_nonce_action ); |
|
168 | + $gallery_nonce = wp_create_nonce($gallery_nonce_action); |
|
169 | 169 | |
170 | 170 | |
171 | 171 | if ($allow_change_date) { |
@@ -180,13 +180,13 @@ discard block |
||
180 | 180 | |
181 | 181 | if (function_exists('rest_url')) { |
182 | 182 | //$rest_root = esc_url_raw( rest_url()); |
183 | - $rest_nonce = wp_create_nonce( 'wp_rest' ); |
|
184 | - $settings = array( 'root' => $rest_root, 'nonce' => $rest_nonce ); |
|
185 | - wp_enqueue_script( 'wp-api', '', array( 'jquery', 'underscore', 'backbone' ), LASSO_VERSION, true ); |
|
186 | - wp_localize_script( 'wp-api', 'wpApiSettings', $settings ); |
|
187 | - wp_localize_script( 'wp-api', 'WP_API_Settings', $settings ); |
|
183 | + $rest_nonce = wp_create_nonce('wp_rest'); |
|
184 | + $settings = array('root' => $rest_root, 'nonce' => $rest_nonce); |
|
185 | + wp_enqueue_script('wp-api', '', array('jquery', 'underscore', 'backbone'), LASSO_VERSION, true); |
|
186 | + wp_localize_script('wp-api', 'wpApiSettings', $settings); |
|
187 | + wp_localize_script('wp-api', 'WP_API_Settings', $settings); |
|
188 | 188 | |
189 | - if ( class_exists( 'WP_REST_Controller' )) { |
|
189 | + if (class_exists('WP_REST_Controller')) { |
|
190 | 190 | // we are using REST API V2 |
191 | 191 | $using_restapiv2 = true; |
192 | 192 | } |
@@ -194,8 +194,8 @@ discard block |
||
194 | 194 | |
195 | 195 | // localized objects |
196 | 196 | $objects = array( |
197 | - 'ajaxurl' => esc_url( $api_url ), |
|
198 | - 'ajaxurl2' => esc_url( admin_url( 'admin-ajax.php' )), |
|
197 | + 'ajaxurl' => esc_url($api_url), |
|
198 | + 'ajaxurl2' => esc_url(admin_url('admin-ajax.php')), |
|
199 | 199 | 'siteUrl' => site_url(), |
200 | 200 | 'rest_root' => $rest_root, |
201 | 201 | 'rest_nonce' => $rest_nonce, |
@@ -204,13 +204,13 @@ discard block |
||
204 | 204 | 'featImgClass' => $featImgClass, |
205 | 205 | 'titleClass' => $titleClass, |
206 | 206 | 'strings' => $strings, |
207 | - 'settingsLink' => function_exists('is_multisite') && is_multisite() ? network_admin_url( 'settings.php?page=lasso-editor' ) : admin_url( 'admin.php?page=lasso-editor-settings' ), |
|
208 | - 'post_status' => get_post_status( $postid ), |
|
207 | + 'settingsLink' => function_exists('is_multisite') && is_multisite() ? network_admin_url('settings.php?page=lasso-editor') : admin_url('admin.php?page=lasso-editor-settings'), |
|
208 | + 'post_status' => get_post_status($postid), |
|
209 | 209 | 'postid' => $postid, |
210 | 210 | 'permalink' => $permalink, |
211 | 211 | 'edit_others_pages' => current_user_can('edit_others_pages') ? true : false, |
212 | 212 | 'edit_others_posts' => current_user_can('edit_others_posts') ? true : false, |
213 | - 'userCanEdit' => current_user_can('edit_post', $postid ), |
|
213 | + 'userCanEdit' => current_user_can('edit_post', $postid), |
|
214 | 214 | 'can_publish' => is_page() ? current_user_can('publish_pages') : current_user_can('publish_posts'), |
215 | 215 | //'can_publish_posts' => current_user_can('publish_posts'), |
216 | 216 | //'can_publish_pages' => current_user_can('publish_pages'), |
@@ -246,28 +246,28 @@ discard block |
||
246 | 246 | 'postTags' => lasso_get_objects('tag'), |
247 | 247 | 'noResultsDiv' => lasso_editor_empty_results(), |
248 | 248 | 'noRevisionsDiv' => lasso_editor_empty_results('revision'), |
249 | - 'mapTileProvider' => function_exists('aesop_map_tile_provider') ? aesop_map_tile_provider( $postid ) : false, |
|
250 | - 'mapLocations' => get_post_meta( $postid, 'ase_map_component_locations' ), |
|
251 | - 'mapStart' => get_post_meta( $postid, 'ase_map_component_start_point', true ), |
|
252 | - 'mapZoom' => get_post_meta( $postid, 'ase_map_component_zoom', true ), |
|
249 | + 'mapTileProvider' => function_exists('aesop_map_tile_provider') ? aesop_map_tile_provider($postid) : false, |
|
250 | + 'mapLocations' => get_post_meta($postid, 'ase_map_component_locations'), |
|
251 | + 'mapStart' => get_post_meta($postid, 'ase_map_component_start_point', true), |
|
252 | + 'mapZoom' => get_post_meta($postid, 'ase_map_component_zoom', true), |
|
253 | 253 | 'revisionModal' => lasso_editor_revision_modal(), |
254 | 254 | 'isMobile' => wp_is_mobile(), |
255 | - 'enableAutoSave' => lasso_editor_get_option( 'enable_autosave', 'lasso_editor' ), |
|
255 | + 'enableAutoSave' => lasso_editor_get_option('enable_autosave', 'lasso_editor'), |
|
256 | 256 | 'showColor' => $show_color, |
257 | 257 | 'showAlignment' => $show_align, |
258 | 258 | 'showIgnoredItems' => lasso_editor_get_option('show_ignored_items', 'lasso_editor'), |
259 | 259 | 'restapi2' => $using_restapiv2, |
260 | 260 | 'saveusingrest' => $using_restapiv2 && !$disableRESTSave, |
261 | - 'newObjectContent' => '<p>'.apply_filters( 'lasso_new_object_content', __( 'Once upon a time...','lasso') ).'</p>', |
|
261 | + 'newObjectContent' => '<p>'.apply_filters('lasso_new_object_content', __('Once upon a time...', 'lasso')).'</p>', |
|
262 | 262 | 'disableSavePost' => $save_to_post_disabled, |
263 | 263 | 'disableEditPost' => $edit_post_disabled, |
264 | 264 | 'boldTag' => $bold_tag, |
265 | 265 | 'iTag' => $i_tag, |
266 | 266 | 'customFields' => $custom_fields, |
267 | - 'clickToInsert' => ($insert_comp_ui =='click'), |
|
268 | - 'buttonOnEmptyP' => ($insert_comp_ui =='mediumcom'), // auto show a button to insert components on an empty paragraph |
|
267 | + 'clickToInsert' => ($insert_comp_ui == 'click'), |
|
268 | + 'buttonOnEmptyP' => ($insert_comp_ui == 'mediumcom'), // auto show a button to insert components on an empty paragraph |
|
269 | 269 | 'rtl' => is_rtl(), |
270 | - 'skipToEdit' =>( $delta < 10 && $delta >=0 ), // if it's a new post, skip to edit mode |
|
270 | + 'skipToEdit' =>($delta < 10 && $delta >= 0), // if it's a new post, skip to edit mode |
|
271 | 271 | 'linksEditable' => $links_editable, |
272 | 272 | 'supportPendingStatus' => !$no_pending_status |
273 | 273 | ); |
@@ -278,9 +278,9 @@ discard block |
||
278 | 278 | |
279 | 279 | if (!$using_restapiv2) { |
280 | 280 | // enqueue REST API V1 |
281 | - wp_enqueue_script( 'wp-api-js', LASSO_URL.'/public/assets/js/source/util--wp-api.js', array( 'jquery', 'underscore', 'backbone' ), LASSO_VERSION, true ); |
|
282 | - $settings = array( 'root' => home_url( $home_url ), 'nonce' => wp_create_nonce( 'wp_json' ) ); |
|
283 | - wp_localize_script( 'wp-api-js', 'WP_API_Settings', $settings ); |
|
281 | + wp_enqueue_script('wp-api-js', LASSO_URL.'/public/assets/js/source/util--wp-api.js', array('jquery', 'underscore', 'backbone'), LASSO_VERSION, true); |
|
282 | + $settings = array('root' => home_url($home_url), 'nonce' => wp_create_nonce('wp_json')); |
|
283 | + wp_localize_script('wp-api-js', 'WP_API_Settings', $settings); |
|
284 | 284 | } |
285 | 285 | |
286 | 286 | if ($allow_change_date) { |
@@ -289,13 +289,13 @@ discard block |
||
289 | 289 | wp_enqueue_style('jquery-ui'); |
290 | 290 | } |
291 | 291 | |
292 | - $postfix = ( defined( 'SCRIPT_DEBUG' ) && true === SCRIPT_DEBUG ) ? '' : '.min'; |
|
292 | + $postfix = (defined('SCRIPT_DEBUG') && true === SCRIPT_DEBUG) ? '' : '.min'; |
|
293 | 293 | if ($show_color) { |
294 | - wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api','iris'), LASSO_VERSION, true); |
|
294 | + wp_enqueue_script('lasso', LASSO_URL."/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api', 'iris'), LASSO_VERSION, true); |
|
295 | 295 | } else { |
296 | - wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api'), LASSO_VERSION, true); |
|
296 | + wp_enqueue_script('lasso', LASSO_URL."/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api'), LASSO_VERSION, true); |
|
297 | 297 | } |
298 | - wp_localize_script('lasso', 'lasso_editor', apply_filters('lasso_localized_objects', $objects ) ); |
|
298 | + wp_localize_script('lasso', 'lasso_editor', apply_filters('lasso_localized_objects', $objects)); |
|
299 | 299 | |
300 | 300 | |
301 | 301 | } |
@@ -9,9 +9,9 @@ discard block |
||
9 | 9 | |
10 | 10 | function __construct() { |
11 | 11 | |
12 | - add_action( 'admin_menu', array( $this, 'menu' ) ); |
|
13 | - add_action( 'network_admin_menu', array( $this, 'menu' ) ); |
|
14 | - add_action( 'wp_ajax_lasso-editor-settings', array( $this, 'process_settings' ) ); |
|
12 | + add_action('admin_menu', array($this, 'menu')); |
|
13 | + add_action('network_admin_menu', array($this, 'menu')); |
|
14 | + add_action('wp_ajax_lasso-editor-settings', array($this, 'process_settings')); |
|
15 | 15 | |
16 | 16 | } |
17 | 17 | |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | function menu() { |
24 | 24 | |
25 | 25 | // CHANGED Removed condition. |
26 | - add_submenu_page( 'lasso-editor', __( 'Settings', 'lasso' ), __( 'Settings', 'lasso' ), 'manage_options', 'lasso-editor-settings', array( $this, 'settings' ) ); |
|
26 | + add_submenu_page('lasso-editor', __('Settings', 'lasso'), __('Settings', 'lasso'), 'manage_options', 'lasso-editor-settings', array($this, 'settings')); |
|
27 | 27 | |
28 | 28 | } |
29 | 29 | |
@@ -45,26 +45,26 @@ discard block |
||
45 | 45 | function process_settings() { |
46 | 46 | |
47 | 47 | // bail out if current user isn't and administrator and they are not logged in |
48 | - if ( !current_user_can( 'manage_options' ) || !is_user_logged_in() ) |
|
48 | + if (!current_user_can('manage_options') || !is_user_logged_in()) |
|
49 | 49 | return; |
50 | 50 | |
51 | - if ( isset( $_POST['action'] ) && 'lasso-editor-settings' == $_POST['action'] && check_admin_referer( 'nonce', 'lasso_editor_settings' ) ) { |
|
51 | + if (isset($_POST['action']) && 'lasso-editor-settings' == $_POST['action'] && check_admin_referer('nonce', 'lasso_editor_settings')) { |
|
52 | 52 | |
53 | - $options = isset( $_POST['lasso_editor'] ) ? $_POST['lasso_editor'] : false; |
|
53 | + $options = isset($_POST['lasso_editor']) ? $_POST['lasso_editor'] : false; |
|
54 | 54 | |
55 | 55 | $arr = $options['allowed_post_types']; |
56 | - $options = array_map( 'sanitize_text_field', $options ); |
|
57 | - $options['allowed_post_types'] = array_keys( $arr); |
|
56 | + $options = array_map('sanitize_text_field', $options); |
|
57 | + $options['allowed_post_types'] = array_keys($arr); |
|
58 | 58 | |
59 | 59 | |
60 | 60 | |
61 | - if ( function_exists( 'is_multisite' ) && is_multisite() ) { |
|
61 | + if (function_exists('is_multisite') && is_multisite()) { |
|
62 | 62 | |
63 | - update_site_option( 'lasso_editor', $options ); |
|
63 | + update_site_option('lasso_editor', $options); |
|
64 | 64 | |
65 | 65 | } else { |
66 | 66 | |
67 | - update_option( 'lasso_editor', $options ); |
|
67 | + update_option('lasso_editor', $options); |
|
68 | 68 | } |
69 | 69 | |
70 | 70 | wp_send_json_success(); |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | } |
81 | 81 | |
82 | 82 | function create_section_for_color_picker($id, $title, $defvalue) { |
83 | - $color_value = lasso_editor_get_option( $id, 'lasso_editor',$defvalue ); |
|
83 | + $color_value = lasso_editor_get_option($id, 'lasso_editor', $defvalue); |
|
84 | 84 | |
85 | 85 | echo '<div lass="lasso-editor-settings--option-inner">'."\n"; |
86 | 86 | echo '<label>'.$title.'</label>'; |
@@ -95,41 +95,41 @@ discard block |
||
95 | 95 | */ |
96 | 96 | function lasso_editor_settings_form() { |
97 | 97 | |
98 | - if ( !is_user_logged_in() ) |
|
98 | + if (!is_user_logged_in()) |
|
99 | 99 | return; |
100 | 100 | |
101 | - $article_object = lasso_editor_get_option( 'article_class', 'lasso_editor' ); |
|
102 | - $featImgClass = lasso_editor_get_option( 'featimg_class', 'lasso_editor' ); |
|
103 | - $titleClass = lasso_editor_get_option( 'title_class', 'lasso_editor' ); |
|
104 | - |
|
105 | - $post_new_disabled = lasso_editor_get_option( 'post_adding_disabled', 'lasso_editor' ); |
|
106 | - $save_to_post_disabled = lasso_editor_get_option( 'post_save_disabled', 'lasso_editor' ); |
|
107 | - $edit_post_disabled = lasso_editor_get_option( 'post_edit_disabled', 'lasso_editor' ); |
|
108 | - $post_settings_disabled = lasso_editor_get_option( 'post_settings_disabled', 'lasso_editor' ); |
|
109 | - $allow_change_date = lasso_editor_get_option( 'allow_change_date', 'lasso_editor' ); |
|
110 | - $allow_new_category = lasso_editor_get_option( 'allow_new_category', 'lasso_editor' ); |
|
111 | - $shortcodify_disabled = lasso_editor_get_option( 'shortcodify_disabled', 'lasso_editor' ); |
|
112 | - $enable_autosave = lasso_editor_get_option( 'enable_autosave', 'lasso_editor' ); |
|
113 | - |
|
114 | - $use_old_ui = lasso_editor_get_option( 'use_old_ui', 'lasso_editor' ); |
|
115 | - $toolbar_headings = lasso_editor_get_option( 'toolbar_headings', 'lasso_editor' ); |
|
116 | - $toolbar_headings_h4 = lasso_editor_get_option( 'toolbar_headings_h4', 'lasso_editor' ); |
|
117 | - $toolbar_list = lasso_editor_get_option( 'toolbar_list', 'lasso_editor' ); |
|
118 | - $toolbar_show_color = lasso_editor_get_option( 'toolbar_show_color', 'lasso_editor' ); |
|
119 | - $toolbar_show_alignment = lasso_editor_get_option( 'toolbar_show_alignment', 'lasso_editor' ); |
|
101 | + $article_object = lasso_editor_get_option('article_class', 'lasso_editor'); |
|
102 | + $featImgClass = lasso_editor_get_option('featimg_class', 'lasso_editor'); |
|
103 | + $titleClass = lasso_editor_get_option('title_class', 'lasso_editor'); |
|
104 | + |
|
105 | + $post_new_disabled = lasso_editor_get_option('post_adding_disabled', 'lasso_editor'); |
|
106 | + $save_to_post_disabled = lasso_editor_get_option('post_save_disabled', 'lasso_editor'); |
|
107 | + $edit_post_disabled = lasso_editor_get_option('post_edit_disabled', 'lasso_editor'); |
|
108 | + $post_settings_disabled = lasso_editor_get_option('post_settings_disabled', 'lasso_editor'); |
|
109 | + $allow_change_date = lasso_editor_get_option('allow_change_date', 'lasso_editor'); |
|
110 | + $allow_new_category = lasso_editor_get_option('allow_new_category', 'lasso_editor'); |
|
111 | + $shortcodify_disabled = lasso_editor_get_option('shortcodify_disabled', 'lasso_editor'); |
|
112 | + $enable_autosave = lasso_editor_get_option('enable_autosave', 'lasso_editor'); |
|
113 | + |
|
114 | + $use_old_ui = lasso_editor_get_option('use_old_ui', 'lasso_editor'); |
|
115 | + $toolbar_headings = lasso_editor_get_option('toolbar_headings', 'lasso_editor'); |
|
116 | + $toolbar_headings_h4 = lasso_editor_get_option('toolbar_headings_h4', 'lasso_editor'); |
|
117 | + $toolbar_list = lasso_editor_get_option('toolbar_list', 'lasso_editor'); |
|
118 | + $toolbar_show_color = lasso_editor_get_option('toolbar_show_color', 'lasso_editor'); |
|
119 | + $toolbar_show_alignment = lasso_editor_get_option('toolbar_show_alignment', 'lasso_editor'); |
|
120 | 120 | |
121 | - $objectsNoSave = lasso_editor_get_option('dont_save', 'lasso_editor'); |
|
122 | - $objectsNonEditable = lasso_editor_get_option('non_editable', 'lasso_editor'); |
|
121 | + $objectsNoSave = lasso_editor_get_option('dont_save', 'lasso_editor'); |
|
122 | + $objectsNonEditable = lasso_editor_get_option('non_editable', 'lasso_editor'); |
|
123 | 123 | $disable_tour = lasso_editor_get_option('disable_tour', 'lasso_editor'); |
124 | 124 | $show_ignored_items = lasso_editor_get_option('show_ignored_items', 'lasso_editor'); |
125 | 125 | $save_using_rest_disabled = lasso_editor_get_option('save_using_rest_disabled', 'lasso_editor'); |
126 | 126 | |
127 | - $default_post_types = apply_filters( 'lasso_allowed_post_types', array( 'post', 'page')); |
|
128 | - $allowed_post_types = lasso_editor_get_option( 'allowed_post_types', 'lasso_editor', $default_post_types); |
|
127 | + $default_post_types = apply_filters('lasso_allowed_post_types', array('post', 'page')); |
|
128 | + $allowed_post_types = lasso_editor_get_option('allowed_post_types', 'lasso_editor', $default_post_types); |
|
129 | 129 | |
130 | 130 | $links_editable = lasso_editor_get_option('links_editable', 'lasso_editor', false); |
131 | - $bold_tag = lasso_editor_get_option( 'bold_tag', 'lasso_editor', "b"); |
|
132 | - $i_tag = lasso_editor_get_option( 'i_tag', 'lasso_editor', "i"); |
|
131 | + $bold_tag = lasso_editor_get_option('bold_tag', 'lasso_editor', "b"); |
|
132 | + $i_tag = lasso_editor_get_option('i_tag', 'lasso_editor', "i"); |
|
133 | 133 | |
134 | 134 | // do we support pending status |
135 | 135 | $no_pending_status = lasso_editor_get_option('no_pending_status', 'lasso_editor'); |
@@ -144,31 +144,31 @@ discard block |
||
144 | 144 | ?> |
145 | 145 | <div class="wrap"> |
146 | 146 | |
147 | - <h2><?php _e( 'Editus Settings', 'lasso' );?></h2> |
|
147 | + <h2><?php _e('Editus Settings', 'lasso'); ?></h2> |
|
148 | 148 | |
149 | 149 | <form id="lasso-editor-settings-form" class="lasso--form-settings" method="post" enctype="multipart/form-data"> |
150 | 150 | |
151 | - <?php do_action('lasso_settings_before');?> |
|
151 | + <?php do_action('lasso_settings_before'); ?> |
|
152 | 152 | |
153 | 153 | |
154 | 154 | |
155 | - <h3><?php _e( 'Enable for:', 'lasso' );?></h3> |
|
155 | + <h3><?php _e('Enable for:', 'lasso'); ?></h3> |
|
156 | 156 | <div class="lasso-editor-settings--option-wrap"> |
157 | 157 | <div class="lasso-editor-settings--option-inner"> |
158 | 158 | |
159 | - <span class="lasso--setting-description"><?php _e( 'Enable Editus for the following post types.', 'lasso' );?></span> |
|
159 | + <span class="lasso--setting-description"><?php _e('Enable Editus for the following post types.', 'lasso'); ?></span> |
|
160 | 160 | <?php |
161 | 161 | $args = array( |
162 | 162 | 'public' => true |
163 | 163 | ); |
164 | 164 | |
165 | - $allowed_post_types = apply_filters( 'lasso_allowed_post_types', $allowed_post_types ); |
|
166 | - $post_types = get_post_types( $args, 'objects' ); |
|
165 | + $allowed_post_types = apply_filters('lasso_allowed_post_types', $allowed_post_types); |
|
166 | + $post_types = get_post_types($args, 'objects'); |
|
167 | 167 | |
168 | - foreach ( $post_types as $post_type ) { |
|
168 | + foreach ($post_types as $post_type) { |
|
169 | 169 | if ($post_type->name == 'attachment') continue; |
170 | - $checked =""; |
|
171 | - if ( in_array( $post_type->name, $allowed_post_types ) ) { |
|
170 | + $checked = ""; |
|
171 | + if (in_array($post_type->name, $allowed_post_types)) { |
|
172 | 172 | $checked = 'checked="checked"'; |
173 | 173 | } |
174 | 174 | echo '<label><input type="checkbox" '.$checked.' name="lasso_editor[allowed_post_types]['.$post_type->name.']" id="lasso_editor[allowed_post_types]['.$post_type->name.']" >'.$post_type->name.'</label>'; |
@@ -178,111 +178,111 @@ discard block |
||
178 | 178 | </div> |
179 | 179 | |
180 | 180 | |
181 | - <h3><?php _e( 'Internal Settings', 'lasso' );?></h3> |
|
181 | + <h3><?php _e('Internal Settings', 'lasso'); ?></h3> |
|
182 | 182 | <div class="lasso-editor-settings--option-wrap"> |
183 | 183 | <div class="lasso-editor-settings--option-inner" style="border:none;"> |
184 | - <label><?php _e( 'Article Class', 'lasso' );?></label> |
|
185 | - <span class="lasso--setting-description"><?php _e( 'Provide the CSS class (including the preceding dot) of container that holds the post. This should be the first parent container class that holds the_content.', 'lasso' );?></span> |
|
186 | - <input type="text" name="lasso_editor[article_class]" id="lasso_editor[article_class]" value="<?php echo esc_attr( $article_object );?>" placeholder=".entry-content"> |
|
184 | + <label><?php _e('Article Class', 'lasso'); ?></label> |
|
185 | + <span class="lasso--setting-description"><?php _e('Provide the CSS class (including the preceding dot) of container that holds the post. This should be the first parent container class that holds the_content.', 'lasso'); ?></span> |
|
186 | + <input type="text" name="lasso_editor[article_class]" id="lasso_editor[article_class]" value="<?php echo esc_attr($article_object); ?>" placeholder=".entry-content"> |
|
187 | 187 | </div> |
188 | 188 | |
189 | 189 | <div class="lasso-editor-settings--option-inner" style="border:none;"> |
190 | - <label><?php _e( 'Featured Image Class', 'lasso' );?></label> |
|
191 | - <span class="lasso--setting-description"><?php _e( 'Provide the CSS class that uses a featured image as a background image. This currently only supports themes that have the featured image set as background image.', 'lasso' );?></span> |
|
192 | - <input type="text" name="lasso_editor[featimg_class]" id="lasso_editor[featimg_class]" value="<?php echo esc_attr( $featImgClass );?>" placeholder=".entry-content"> |
|
190 | + <label><?php _e('Featured Image Class', 'lasso'); ?></label> |
|
191 | + <span class="lasso--setting-description"><?php _e('Provide the CSS class that uses a featured image as a background image. This currently only supports themes that have the featured image set as background image.', 'lasso'); ?></span> |
|
192 | + <input type="text" name="lasso_editor[featimg_class]" id="lasso_editor[featimg_class]" value="<?php echo esc_attr($featImgClass); ?>" placeholder=".entry-content"> |
|
193 | 193 | </div> |
194 | 194 | |
195 | 195 | <div class="lasso-editor-settings--option-inner" style="border:none;"> |
196 | - <label><?php _e( 'Article Title Class', 'lasso' );?></label> |
|
197 | - <span class="lasso--setting-description"><?php _e( 'Provide the CSS class for the post title. This will enable you to update the title of the post by clicking and typing.', 'lasso' );?></span> |
|
198 | - <input type="text" name="lasso_editor[title_class]" id="lasso_editor[title_class]" value="<?php echo esc_attr( $titleClass );?>" placeholder=".entry-content"> |
|
196 | + <label><?php _e('Article Title Class', 'lasso'); ?></label> |
|
197 | + <span class="lasso--setting-description"><?php _e('Provide the CSS class for the post title. This will enable you to update the title of the post by clicking and typing.', 'lasso'); ?></span> |
|
198 | + <input type="text" name="lasso_editor[title_class]" id="lasso_editor[title_class]" value="<?php echo esc_attr($titleClass); ?>" placeholder=".entry-content"> |
|
199 | 199 | </div> |
200 | 200 | |
201 | 201 | <div class="lasso-editor-settings--option-inner" style="border:none;"> |
202 | - <label><?php _e( 'Ignored Items to Save', 'lasso' );?></label> |
|
203 | - <span class="lasso--setting-description"><?php _e( 'If your post container holds additional markup, list the css class names (comma separated, including the dot) of those items. When you enter the editor, Editus will remove (NOT delete) these items so that it does not save them as HTML.', 'lasso' );?></span> |
|
204 | - <textarea name="lasso_editor[dont_save]" id="lasso_editor[dont_save]" placeholder=".classname, .another-class"><?php echo esc_attr( $objectsNoSave );?></textarea> |
|
202 | + <label><?php _e('Ignored Items to Save', 'lasso'); ?></label> |
|
203 | + <span class="lasso--setting-description"><?php _e('If your post container holds additional markup, list the css class names (comma separated, including the dot) of those items. When you enter the editor, Editus will remove (NOT delete) these items so that it does not save them as HTML.', 'lasso'); ?></span> |
|
204 | + <textarea name="lasso_editor[dont_save]" id="lasso_editor[dont_save]" placeholder=".classname, .another-class"><?php echo esc_attr($objectsNoSave); ?></textarea> |
|
205 | 205 | </div> |
206 | 206 | |
207 | 207 | <div class="lasso-editor-settings--option-inner" style="border:none;"> |
208 | - <label><?php _e( 'Read Only Items', 'lasso' );?></label> |
|
209 | - <span class="lasso--setting-description"><?php _e( 'If your post has items that should not be editable, list the css class names (comma separated, including the dot) of those items.', 'lasso' );?></span> |
|
210 | - <textarea name="lasso_editor[non_editable]" id="lasso_editor[non_editable]" placeholder=".classname, .another-class"><?php echo esc_attr( $objectsNonEditable );?></textarea> |
|
208 | + <label><?php _e('Read Only Items', 'lasso'); ?></label> |
|
209 | + <span class="lasso--setting-description"><?php _e('If your post has items that should not be editable, list the css class names (comma separated, including the dot) of those items.', 'lasso'); ?></span> |
|
210 | + <textarea name="lasso_editor[non_editable]" id="lasso_editor[non_editable]" placeholder=".classname, .another-class"><?php echo esc_attr($objectsNonEditable); ?></textarea> |
|
211 | 211 | </div> |
212 | 212 | |
213 | 213 | <div class="lasso-editor-settings--option-inner" > |
214 | - <input type="checkbox" class="checkbox" name="lasso_editor[show_ignored_items]" id="lasso_editor[show_ignored_items]" <?php echo checked( $show_ignored_items, 'on' );?> > |
|
215 | - <label for="lasso_editor[show_ignored_items]"> <?php _e( 'Show Ignored Items', 'lasso' );?></label> |
|
216 | - <span class="lasso--setting-description"><?php _e( 'By default the ignored items are hidden. Check this to show ignored items while keeping them uneditable.', 'lasso' );?></span> |
|
214 | + <input type="checkbox" class="checkbox" name="lasso_editor[show_ignored_items]" id="lasso_editor[show_ignored_items]" <?php echo checked($show_ignored_items, 'on'); ?> > |
|
215 | + <label for="lasso_editor[show_ignored_items]"> <?php _e('Show Ignored Items', 'lasso'); ?></label> |
|
216 | + <span class="lasso--setting-description"><?php _e('By default the ignored items are hidden. Check this to show ignored items while keeping them uneditable.', 'lasso'); ?></span> |
|
217 | 217 | </div> |
218 | 218 | </div> |
219 | 219 | |
220 | - <h3><?php _e( 'Editor UI', 'lasso' );?></h3> |
|
220 | + <h3><?php _e('Editor UI', 'lasso'); ?></h3> |
|
221 | 221 | <div class="lasso-editor-settings--option-wrap"> |
222 | 222 | <div class="lasso-editor-settings--option-inner" style="border:none;"> |
223 | - <input type="checkbox" class="checkbox" name="lasso_editor[use_old_ui]" id="lasso_editor_use_old_ui" <?php echo checked( $use_old_ui, 'on' );?> > |
|
224 | - <label for="lasso_editor[use_old_ui]"><?php _e( 'Use the Old Toolbar', 'lasso' );?></label> |
|
225 | - <span class="lasso--setting-description"><?php _e( 'Use this option to disable the new color options and use the pre-1.0 toolbar.', 'lasso' );?></span> |
|
223 | + <input type="checkbox" class="checkbox" name="lasso_editor[use_old_ui]" id="lasso_editor_use_old_ui" <?php echo checked($use_old_ui, 'on'); ?> > |
|
224 | + <label for="lasso_editor[use_old_ui]"><?php _e('Use the Old Toolbar', 'lasso'); ?></label> |
|
225 | + <span class="lasso--setting-description"><?php _e('Use this option to disable the new color options and use the pre-1.0 toolbar.', 'lasso'); ?></span> |
|
226 | 226 | </div> |
227 | 227 | <div id="lasso-editor-settings--colors"> |
228 | 228 | <?php |
229 | - self::create_section_for_color_picker('button-color1', _e( 'Editor Bar Color Top', 'lasso' ), '#0000ff'); |
|
230 | - self::create_section_for_color_picker('button-color2', _e( 'Editor Bar Color Bottom', 'lasso' ), '#000030'); |
|
231 | - self::create_section_for_color_picker('dialog-color', _e( 'Dialog Color', 'lasso' ), '#000055'); |
|
232 | - self::create_section_for_color_picker('text-color', _e( 'Icon/Text Color', 'lasso' ), '#ffffff'); |
|
229 | + self::create_section_for_color_picker('button-color1', _e('Editor Bar Color Top', 'lasso'), '#0000ff'); |
|
230 | + self::create_section_for_color_picker('button-color2', _e('Editor Bar Color Bottom', 'lasso'), '#000030'); |
|
231 | + self::create_section_for_color_picker('dialog-color', _e('Dialog Color', 'lasso'), '#000055'); |
|
232 | + self::create_section_for_color_picker('text-color', _e('Icon/Text Color', 'lasso'), '#ffffff'); |
|
233 | 233 | ?> |
234 | - <button type="button" id="lasso-editor-settings--default-colors" ><?php _e( 'Default Colors', 'lasso' );?></button> |
|
234 | + <button type="button" id="lasso-editor-settings--default-colors" ><?php _e('Default Colors', 'lasso'); ?></button> |
|
235 | 235 | <div style="height:50px;"></div> |
236 | 236 | </div> |
237 | 237 | <div class="lasso-editor-settings--option-inner" style="border:none;"> |
238 | - <input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings]" id="lasso_editor[toolbar_headings]" <?php echo checked( $toolbar_headings, 'on' );?> > |
|
239 | - <label for="lasso_editor[toolbar_headings]"><?php _e( 'Enable H2 and H3 Buttons', 'lasso' );?></label> |
|
240 | - <span class="lasso--setting-description"><?php _e( 'Show the buttons to set H2 and H3 settings.', 'lasso' );?></span> |
|
238 | + <input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings]" id="lasso_editor[toolbar_headings]" <?php echo checked($toolbar_headings, 'on'); ?> > |
|
239 | + <label for="lasso_editor[toolbar_headings]"><?php _e('Enable H2 and H3 Buttons', 'lasso'); ?></label> |
|
240 | + <span class="lasso--setting-description"><?php _e('Show the buttons to set H2 and H3 settings.', 'lasso'); ?></span> |
|
241 | 241 | |
242 | 242 | </div> |
243 | 243 | <div class="lasso-editor-settings--option-inner" style="border:none;"> |
244 | - <input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings_h4]" id="lasso_editor[toolbar_headings_h4]" <?php echo checked( $toolbar_headings_h4, 'on' );?> > |
|
245 | - <label for="lasso_editor[toolbar_headings_h4]"><?php _e( 'Enable H4/H5/H6 Buttons', 'lasso' );?></label> |
|
246 | - <span class="lasso--setting-description"><?php _e( 'Show the buttons to set H4/H5/H6 settings.', 'lasso' );?></span> |
|
244 | + <input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings_h4]" id="lasso_editor[toolbar_headings_h4]" <?php echo checked($toolbar_headings_h4, 'on'); ?> > |
|
245 | + <label for="lasso_editor[toolbar_headings_h4]"><?php _e('Enable H4/H5/H6 Buttons', 'lasso'); ?></label> |
|
246 | + <span class="lasso--setting-description"><?php _e('Show the buttons to set H4/H5/H6 settings.', 'lasso'); ?></span> |
|
247 | 247 | |
248 | 248 | </div> |
249 | 249 | |
250 | 250 | <div class="lasso-editor-settings--option-inner" style="border:none;"> |
251 | - <input type="checkbox" class="checkbox" name="lasso_editor[toolbar_list]" id="lasso_editor[toolbar_list]" <?php echo checked( $toolbar_list, 'on' );?> > |
|
252 | - <label for="lasso_editor[toolbar_list]"><?php _e( 'Enable OL/UL Buttons', 'lasso' );?></label> |
|
253 | - <span class="lasso--setting-description"><?php _e( 'Show the buttons to create Ordered and Unordered Lists from text selection.', 'lasso' );?></span> |
|
251 | + <input type="checkbox" class="checkbox" name="lasso_editor[toolbar_list]" id="lasso_editor[toolbar_list]" <?php echo checked($toolbar_list, 'on'); ?> > |
|
252 | + <label for="lasso_editor[toolbar_list]"><?php _e('Enable OL/UL Buttons', 'lasso'); ?></label> |
|
253 | + <span class="lasso--setting-description"><?php _e('Show the buttons to create Ordered and Unordered Lists from text selection.', 'lasso'); ?></span> |
|
254 | 254 | </div> |
255 | 255 | |
256 | 256 | <div class="lasso-editor-settings--option-inner" style="border:none;"> |
257 | - <input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_color]" id="lasso_editor[toolbar_show_color]" <?php echo checked( $toolbar_show_color, 'on' );?> > |
|
258 | - <label for="lasso_editor[toolbar_show_color]"><?php _e( 'Enable Text Color Buttons', 'lasso' );?></label> |
|
259 | - <span class="lasso--setting-description"><?php _e( 'Show the buttons to set text colors.', 'lasso' );?></span> |
|
257 | + <input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_color]" id="lasso_editor[toolbar_show_color]" <?php echo checked($toolbar_show_color, 'on'); ?> > |
|
258 | + <label for="lasso_editor[toolbar_show_color]"><?php _e('Enable Text Color Buttons', 'lasso'); ?></label> |
|
259 | + <span class="lasso--setting-description"><?php _e('Show the buttons to set text colors.', 'lasso'); ?></span> |
|
260 | 260 | |
261 | 261 | </div> |
262 | 262 | <div class="lasso-editor-settings--option-inner" style="border:none;"> |
263 | - <input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_alignment]" id="lasso_editor[toolbar_show_alignment]" <?php echo checked( $toolbar_show_alignment, 'on' );?> > |
|
264 | - <label for="lasso_editor[toolbar_show_alignment]"><?php _e( 'Enable Text Align Buttons', 'lasso' );?></label> |
|
265 | - <span class="lasso--setting-description"><?php _e( 'Show the buttons to set text alignment.', 'lasso' );?></span> |
|
263 | + <input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_alignment]" id="lasso_editor[toolbar_show_alignment]" <?php echo checked($toolbar_show_alignment, 'on'); ?> > |
|
264 | + <label for="lasso_editor[toolbar_show_alignment]"><?php _e('Enable Text Align Buttons', 'lasso'); ?></label> |
|
265 | + <span class="lasso--setting-description"><?php _e('Show the buttons to set text alignment.', 'lasso'); ?></span> |
|
266 | 266 | |
267 | 267 | </div> |
268 | 268 | |
269 | 269 | <div class="lasso-editor-settings--option-inner" style="border:none;"> |
270 | - <input type="checkbox" class="checkbox" name="lasso_editor[links_editable]" id="lasso_editor[links_editable]" <?php echo checked( $links_editable, 'on' );?> > |
|
271 | - <label for="lasso_editor[links_editable]"><?php _e( 'Make links editable under the Editing Mode', 'lasso' );?></label> |
|
272 | - <span class="lasso--setting-description"><?php _e( 'Make links editable under the Editing Mode. Turning this on will make the links non-clickable while editing.', 'lasso' );?></span> |
|
270 | + <input type="checkbox" class="checkbox" name="lasso_editor[links_editable]" id="lasso_editor[links_editable]" <?php echo checked($links_editable, 'on'); ?> > |
|
271 | + <label for="lasso_editor[links_editable]"><?php _e('Make links editable under the Editing Mode', 'lasso'); ?></label> |
|
272 | + <span class="lasso--setting-description"><?php _e('Make links editable under the Editing Mode. Turning this on will make the links non-clickable while editing.', 'lasso'); ?></span> |
|
273 | 273 | |
274 | 274 | </div> |
275 | 275 | <div class="lasso-editor-settings--option-inner"> |
276 | - <label for="lasso_editor[insert_comp_ui]"> <?php _e( 'Insert Component UI', 'lasso' );?></label> |
|
277 | - <span class="lasso--setting-description"><?php _e( 'UI mechanism to insert components', 'lasso' );?></span> |
|
276 | + <label for="lasso_editor[insert_comp_ui]"> <?php _e('Insert Component UI', 'lasso'); ?></label> |
|
277 | + <span class="lasso--setting-description"><?php _e('UI mechanism to insert components', 'lasso'); ?></span> |
|
278 | 278 | <div class="lasso-editor-settings--option-inner" style="border:none;"> |
279 | - <input type="radio" name="lasso_editor[insert_comp_ui]" value='drag' <?php echo checked( $insert_comp_ui, 'drag' );?>> <?php _e( 'Drag and Drop', 'lasso' );?> |
|
279 | + <input type="radio" name="lasso_editor[insert_comp_ui]" value='drag' <?php echo checked($insert_comp_ui, 'drag'); ?>> <?php _e('Drag and Drop', 'lasso'); ?> |
|
280 | 280 | </div> |
281 | 281 | <div class="lasso-editor-settings--option-inner" style="border:none;"> |
282 | - <input type="radio" name="lasso_editor[insert_comp_ui]" value="click" <?php echo checked( $insert_comp_ui, 'click' );?>> <?php _e( 'Click', 'lasso' );?> |
|
282 | + <input type="radio" name="lasso_editor[insert_comp_ui]" value="click" <?php echo checked($insert_comp_ui, 'click'); ?>> <?php _e('Click', 'lasso'); ?> |
|
283 | 283 | </div> |
284 | 284 | <div class="lasso-editor-settings--option-inner" style="border:none;"> |
285 | - <input type="radio" name="lasso_editor[insert_comp_ui]" value="mediumcom" <?php echo checked( $insert_comp_ui, 'mediumcom' );?>> <?php _e( 'Auto Button on Empty Paragraph. medium.com-like UI.', 'lasso' );?> |
|
285 | + <input type="radio" name="lasso_editor[insert_comp_ui]" value="mediumcom" <?php echo checked($insert_comp_ui, 'mediumcom'); ?>> <?php _e('Auto Button on Empty Paragraph. medium.com-like UI.', 'lasso'); ?> |
|
286 | 286 | </div> |
287 | 287 | </div> |
288 | 288 | </div> |
@@ -291,101 +291,101 @@ discard block |
||
291 | 291 | |
292 | 292 | |
293 | 293 | |
294 | - <h3><?php _e( 'Post Settings UI', 'lasso' );?></h3> |
|
294 | + <h3><?php _e('Post Settings UI', 'lasso'); ?></h3> |
|
295 | 295 | <div class="lasso-editor-settings--option-wrap" > |
296 | 296 | <div class="lasso-editor-settings--option-inner" style="border:none"> |
297 | - <input type="checkbox" class="checkbox" name="lasso_editor[post_settings_disabled]" id="lasso_editor[post_settings_disabled]" <?php echo checked( $post_settings_disabled, 'on' );?> > |
|
298 | - <label for="lasso_editor[post_settings_disabled]"> <?php _e( 'Disable Post Settings', 'lasso' );?></label> |
|
299 | - <span class="lasso--setting-description"><?php _e( 'Check this to disable users from being able to edit post settings from the front-end.', 'lasso' );?></span> |
|
297 | + <input type="checkbox" class="checkbox" name="lasso_editor[post_settings_disabled]" id="lasso_editor[post_settings_disabled]" <?php echo checked($post_settings_disabled, 'on'); ?> > |
|
298 | + <label for="lasso_editor[post_settings_disabled]"> <?php _e('Disable Post Settings', 'lasso'); ?></label> |
|
299 | + <span class="lasso--setting-description"><?php _e('Check this to disable users from being able to edit post settings from the front-end.', 'lasso'); ?></span> |
|
300 | 300 | </div> |
301 | 301 | |
302 | 302 | <div class="lasso-editor-settings--option-inner" style="border:none"> |
303 | - <input type="checkbox" class="checkbox" name="lasso_editor[allow_change_date]" id="lasso_editor[allow_change_date]" <?php echo checked( $allow_change_date, 'on' );?> > |
|
304 | - <label for="lasso_editor[allow_change_date]"> <?php _e( 'Allow Changing Post Date', 'lasso' );?></label> |
|
305 | - <span class="lasso--setting-description"><?php _e( 'Add the date selector to change the post\'s date to the Post Setting dialog', 'lasso' );?></span> |
|
303 | + <input type="checkbox" class="checkbox" name="lasso_editor[allow_change_date]" id="lasso_editor[allow_change_date]" <?php echo checked($allow_change_date, 'on'); ?> > |
|
304 | + <label for="lasso_editor[allow_change_date]"> <?php _e('Allow Changing Post Date', 'lasso'); ?></label> |
|
305 | + <span class="lasso--setting-description"><?php _e('Add the date selector to change the post\'s date to the Post Setting dialog', 'lasso'); ?></span> |
|
306 | 306 | </div> |
307 | 307 | |
308 | 308 | <div class="lasso-editor-settings--option-inner" style="border:none"> |
309 | - <input type="checkbox" class="checkbox" name="lasso_editor[allow_new_category]" id="lasso_editor[allow_new_category]" <?php echo checked( $allow_new_category, 'on' );?> > |
|
310 | - <label for="lasso_editor[allow_new_category]"> <?php _e( 'Allow Adding New Category', 'lasso' );?></label> |
|
311 | - <span class="lasso--setting-description"><?php _e( 'Add the user to create new, previously non-existing categories for posts.', 'lasso' );?></span> |
|
309 | + <input type="checkbox" class="checkbox" name="lasso_editor[allow_new_category]" id="lasso_editor[allow_new_category]" <?php echo checked($allow_new_category, 'on'); ?> > |
|
310 | + <label for="lasso_editor[allow_new_category]"> <?php _e('Allow Adding New Category', 'lasso'); ?></label> |
|
311 | + <span class="lasso--setting-description"><?php _e('Add the user to create new, previously non-existing categories for posts.', 'lasso'); ?></span> |
|
312 | 312 | </div> |
313 | 313 | |
314 | 314 | <div class="lasso-editor-settings--option-inner" style="border:none"> |
315 | - <input type="checkbox" class="checkbox" name="lasso_editor[no_pending_status]" id="lasso_editor[no_pending_status]" <?php echo checked( $no_pending_status, 'on' );?> > |
|
316 | - <label for="lasso_editor[no_pending_status]"> <?php _e( 'Do Not Allow "Pending" Status', 'lasso' );?></label> |
|
317 | - <span class="lasso--setting-description"><?php _e( 'Remove the Option to Set the Status to Pending.', 'lasso' );?></span> |
|
315 | + <input type="checkbox" class="checkbox" name="lasso_editor[no_pending_status]" id="lasso_editor[no_pending_status]" <?php echo checked($no_pending_status, 'on'); ?> > |
|
316 | + <label for="lasso_editor[no_pending_status]"> <?php _e('Do Not Allow "Pending" Status', 'lasso'); ?></label> |
|
317 | + <span class="lasso--setting-description"><?php _e('Remove the Option to Set the Status to Pending.', 'lasso'); ?></span> |
|
318 | 318 | </div> |
319 | 319 | |
320 | 320 | <div class="lasso-editor-settings--option-inner" style="border:none"> |
321 | - <input type="checkbox" class="checkbox" name="lasso_editor[no_url_setting]" id="lasso_editor[no_slug_setting]" <?php echo checked( $no_url_setting, 'on' );?> > |
|
322 | - <label for="lasso_editor[no_url_setting]"> <?php _e( 'Remove POST URL Option', 'lasso' );?></label> |
|
323 | - <span class="lasso--setting-description"><?php _e( 'Remove the Option to Set the URL for the Post.', 'lasso' );?></span> |
|
321 | + <input type="checkbox" class="checkbox" name="lasso_editor[no_url_setting]" id="lasso_editor[no_slug_setting]" <?php echo checked($no_url_setting, 'on'); ?> > |
|
322 | + <label for="lasso_editor[no_url_setting]"> <?php _e('Remove POST URL Option', 'lasso'); ?></label> |
|
323 | + <span class="lasso--setting-description"><?php _e('Remove the Option to Set the URL for the Post.', 'lasso'); ?></span> |
|
324 | 324 | </div> |
325 | 325 | |
326 | 326 | <div class="lasso-editor-settings--option-inner" > |
327 | - <input type="checkbox" class="checkbox" name="lasso_editor[post_adding_disabled]" id="lasso_editor[post_adding_disabled]" <?php echo checked( $post_new_disabled, 'on' );?> > |
|
328 | - <label for="lasso_editor[post_adding_disabled]"><?php _e( 'Disable Post Adding', 'lasso' );?></label> |
|
329 | - <span class="lasso--setting-description"><?php _e( 'Check this box to disable users from being able to add new posts from the front-end.', 'lasso' );?></span> |
|
327 | + <input type="checkbox" class="checkbox" name="lasso_editor[post_adding_disabled]" id="lasso_editor[post_adding_disabled]" <?php echo checked($post_new_disabled, 'on'); ?> > |
|
328 | + <label for="lasso_editor[post_adding_disabled]"><?php _e('Disable Post Adding', 'lasso'); ?></label> |
|
329 | + <span class="lasso--setting-description"><?php _e('Check this box to disable users from being able to add new posts from the front-end.', 'lasso'); ?></span> |
|
330 | 330 | </div> |
331 | 331 | |
332 | 332 | |
333 | 333 | </div> |
334 | 334 | |
335 | - <h3><?php _e( 'Misc', 'lasso' );?></h3> |
|
335 | + <h3><?php _e('Misc', 'lasso'); ?></h3> |
|
336 | 336 | <div class="lasso-editor-settings--option-wrap"> |
337 | 337 | <div class="lasso-editor-settings--option-inner" style="border:none"> |
338 | - <input type="checkbox" class="checkbox" name="lasso_editor[disable_tour]" id="lasso_editor[disable_tour]" <?php echo checked( $disable_tour, 'on' );?> > |
|
339 | - <label for="lasso_editor[disable_tour]"> <?php _e( 'Do Not Show Tour Dialog', 'lasso' );?></label> |
|
340 | - <span class="lasso--setting-description"><?php _e( 'Check this box to disable the tour dialog box for all users.', 'lasso' );?></span> |
|
338 | + <input type="checkbox" class="checkbox" name="lasso_editor[disable_tour]" id="lasso_editor[disable_tour]" <?php echo checked($disable_tour, 'on'); ?> > |
|
339 | + <label for="lasso_editor[disable_tour]"> <?php _e('Do Not Show Tour Dialog', 'lasso'); ?></label> |
|
340 | + <span class="lasso--setting-description"><?php _e('Check this box to disable the tour dialog box for all users.', 'lasso'); ?></span> |
|
341 | 341 | </div> |
342 | 342 | |
343 | 343 | <div class="lasso-editor-settings--option-inner" style="border:none"> |
344 | - <label for="lasso_editor[bold_tag]"> <?php _e( '"Bold" Tag', 'lasso' );?></label> |
|
345 | - <span class="lasso--setting-description"><?php _e( 'Choose the HTML tag used for the "Bold" style.', 'lasso' );?></span> |
|
346 | - <input type="radio" name="lasso_editor[bold_tag]" value='b' <?php echo checked( $bold_tag, 'b' );?>> b |
|
347 | - <input type="radio" name="lasso_editor[bold_tag]" value="strong" <?php echo checked( $bold_tag, 'strong' );?>> strong |
|
344 | + <label for="lasso_editor[bold_tag]"> <?php _e('"Bold" Tag', 'lasso'); ?></label> |
|
345 | + <span class="lasso--setting-description"><?php _e('Choose the HTML tag used for the "Bold" style.', 'lasso'); ?></span> |
|
346 | + <input type="radio" name="lasso_editor[bold_tag]" value='b' <?php echo checked($bold_tag, 'b'); ?>> b |
|
347 | + <input type="radio" name="lasso_editor[bold_tag]" value="strong" <?php echo checked($bold_tag, 'strong'); ?>> strong |
|
348 | 348 | </div> |
349 | 349 | <div class="lasso-editor-settings--option-inner" > |
350 | - <label for="lasso_editor[i_tag]"> <?php _e( '"Italic" Tag', 'lasso' );?></label> |
|
351 | - <span class="lasso--setting-description"><?php _e( 'Choose the HTML tag used for the "Italic" style.', 'lasso' );?></span> |
|
352 | - <input type="radio" name="lasso_editor[i_tag]" value='i' <?php echo checked( $i_tag, 'i' );?>> i |
|
353 | - <input type="radio" name="lasso_editor[i_tag]" value="em" <?php echo checked( $i_tag, 'em' );?>> em |
|
350 | + <label for="lasso_editor[i_tag]"> <?php _e('"Italic" Tag', 'lasso'); ?></label> |
|
351 | + <span class="lasso--setting-description"><?php _e('Choose the HTML tag used for the "Italic" style.', 'lasso'); ?></span> |
|
352 | + <input type="radio" name="lasso_editor[i_tag]" value='i' <?php echo checked($i_tag, 'i'); ?>> i |
|
353 | + <input type="radio" name="lasso_editor[i_tag]" value="em" <?php echo checked($i_tag, 'em'); ?>> em |
|
354 | 354 | </div> |
355 | 355 | </div> |
356 | 356 | |
357 | - <h3><?php _e( 'Advanced', 'lasso' );?></h3> |
|
357 | + <h3><?php _e('Advanced', 'lasso'); ?></h3> |
|
358 | 358 | <div class="lasso-editor-settings--option-wrap "> |
359 | 359 | <div class="lasso-editor-settings--option-inner" style="border:none"> |
360 | - <input type="checkbox" class="checkbox" name="lasso_editor[shortcodify_disabled]" id="lasso_editor[shortcodify_disabled]" <?php echo checked( $shortcodify_disabled, 'on' );?> > |
|
361 | - <label for="lasso_editor[shortcodify_disabled]"><?php _e( 'Disable Aesop Component Conversion', 'lasso' );?></label> |
|
362 | - <span class="lasso--setting-description"><?php _e( 'Check this box to disable the conversion process used on Aesop Story Engine components.', 'lasso' );?></span> |
|
360 | + <input type="checkbox" class="checkbox" name="lasso_editor[shortcodify_disabled]" id="lasso_editor[shortcodify_disabled]" <?php echo checked($shortcodify_disabled, 'on'); ?> > |
|
361 | + <label for="lasso_editor[shortcodify_disabled]"><?php _e('Disable Aesop Component Conversion', 'lasso'); ?></label> |
|
362 | + <span class="lasso--setting-description"><?php _e('Check this box to disable the conversion process used on Aesop Story Engine components.', 'lasso'); ?></span> |
|
363 | 363 | </div> |
364 | 364 | |
365 | 365 | <div class="lasso-editor-settings--option-inner" style="border:none"> |
366 | - <input type="checkbox" class="checkbox" name="lasso_editor[enable_autosave]" id="lasso_editor[enable_autosave]" <?php echo checked( $enable_autosave, 'on' );?> > |
|
367 | - <label for="lasso_editor[enable_autosave]"><?php _e( 'Enable Auto Save', 'lasso' );?></label> |
|
368 | - <span class="lasso--setting-description"><?php _e( 'Check this box to enable auto save.', 'lasso' );?></span> |
|
366 | + <input type="checkbox" class="checkbox" name="lasso_editor[enable_autosave]" id="lasso_editor[enable_autosave]" <?php echo checked($enable_autosave, 'on'); ?> > |
|
367 | + <label for="lasso_editor[enable_autosave]"><?php _e('Enable Auto Save', 'lasso'); ?></label> |
|
368 | + <span class="lasso--setting-description"><?php _e('Check this box to enable auto save.', 'lasso'); ?></span> |
|
369 | 369 | </div> |
370 | 370 | |
371 | 371 | <div class="lasso-editor-settings--option-inner" style="border:none"> |
372 | - <input type="checkbox" class="checkbox" name="lasso_editor[post_save_disabled]" id="lasso_editor[post_save_disabled]" <?php echo checked( $save_to_post_disabled, 'on' );?> > |
|
373 | - <label for="lasso_editor[post_save_disabled]"><?php _e( 'Disable Post Saving', 'lasso' );?></label> |
|
374 | - <span class="lasso--setting-description"><?php _e( 'By default the editor will update the database with the post or page it is being used on. Check this box to disable this. If you check this box, it is assumed that you will be using the provided filters to save your own content.', 'lasso' );?></span> |
|
372 | + <input type="checkbox" class="checkbox" name="lasso_editor[post_save_disabled]" id="lasso_editor[post_save_disabled]" <?php echo checked($save_to_post_disabled, 'on'); ?> > |
|
373 | + <label for="lasso_editor[post_save_disabled]"><?php _e('Disable Post Saving', 'lasso'); ?></label> |
|
374 | + <span class="lasso--setting-description"><?php _e('By default the editor will update the database with the post or page it is being used on. Check this box to disable this. If you check this box, it is assumed that you will be using the provided filters to save your own content.', 'lasso'); ?></span> |
|
375 | 375 | |
376 | 376 | </div> |
377 | 377 | |
378 | 378 | <div class="lasso-editor-settings--option-inner" style="border:none"> |
379 | - <input type="checkbox" class="checkbox" name="lasso_editor[post_edit_disabled]" id="lasso_editor[post_edit_disabled]" <?php echo checked( $edit_post_disabled, 'on' );?> > |
|
380 | - <label for="lasso_editor[post_edit_disabled]"><?php _e( 'Disable Post Editing', 'lasso' );?></label> |
|
381 | - <span class="lasso--setting-description"><?php _e( 'You may use this option if you only want to edit custom fields. Refer <a href="https://edituswp.com/editing-and-updating-custom-fields-from-frontend/">here</a> for more information. The custom fields you specify will be still editable under the editing mode.', 'lasso' );?></span> |
|
379 | + <input type="checkbox" class="checkbox" name="lasso_editor[post_edit_disabled]" id="lasso_editor[post_edit_disabled]" <?php echo checked($edit_post_disabled, 'on'); ?> > |
|
380 | + <label for="lasso_editor[post_edit_disabled]"><?php _e('Disable Post Editing', 'lasso'); ?></label> |
|
381 | + <span class="lasso--setting-description"><?php _e('You may use this option if you only want to edit custom fields. Refer <a href="https://edituswp.com/editing-and-updating-custom-fields-from-frontend/">here</a> for more information. The custom fields you specify will be still editable under the editing mode.', 'lasso'); ?></span> |
|
382 | 382 | |
383 | 383 | </div> |
384 | 384 | |
385 | 385 | <div class="lasso-editor-settings--option-inner"> |
386 | - <input type="checkbox" class="checkbox" name="lasso_editor[save_using_rest_disabled]" id="lasso_editor[save_using_rest_disabled]" <?php echo checked( $save_using_rest_disabled, 'on' );?> > |
|
387 | - <label for="lasso_editor[save_using_rest_disabled]"><?php _e( "Don't Use REST API to Save", 'lasso' );?></label> |
|
388 | - <span class="lasso--setting-description"><?php _e( 'By default the editor will use REST API to save posts. Check this box to use custom AJAX calls instead.', 'lasso' );?></span> |
|
386 | + <input type="checkbox" class="checkbox" name="lasso_editor[save_using_rest_disabled]" id="lasso_editor[save_using_rest_disabled]" <?php echo checked($save_using_rest_disabled, 'on'); ?> > |
|
387 | + <label for="lasso_editor[save_using_rest_disabled]"><?php _e("Don't Use REST API to Save", 'lasso'); ?></label> |
|
388 | + <span class="lasso--setting-description"><?php _e('By default the editor will use REST API to save posts. Check this box to use custom AJAX calls instead.', 'lasso'); ?></span> |
|
389 | 389 | |
390 | 390 | </div> |
391 | 391 | </div> |
@@ -395,11 +395,11 @@ discard block |
||
395 | 395 | |
396 | 396 | <div class="lasso-editor-settings--submit"> |
397 | 397 | <input type="hidden" name="action" value="lasso-editor-settings" /> |
398 | - <input type="submit" class="button-primary" value="<?php esc_attr_e( 'Save Settings', 'lasso' );?>" /> |
|
399 | - <?php wp_nonce_field( 'nonce', 'lasso_editor_settings' ); ?> |
|
398 | + <input type="submit" class="button-primary" value="<?php esc_attr_e('Save Settings', 'lasso'); ?>" /> |
|
399 | + <?php wp_nonce_field('nonce', 'lasso_editor_settings'); ?> |
|
400 | 400 | </div> |
401 | 401 | |
402 | - <?php do_action('lasso_settings_after');?> |
|
402 | + <?php do_action('lasso_settings_after'); ?> |
|
403 | 403 | </form> |
404 | 404 | |
405 | 405 | </div><?php |