@@ -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'; |
@@ -60,29 +60,29 @@ discard block |
||
60 | 60 | ?> |
61 | 61 | <style> |
62 | 62 | .lasso-editor-controls--wrap, #lasso--post-settings2,#lasso--save,#lasso--post-delete,#lasso--exit,#lasso--publish { |
63 | - background-image: -webkit-linear-gradient(top,<?php echo $button_color1;?> 0,<?php echo $button_color2;?> 100%); |
|
64 | - background-image: -o-linear-gradient(top,<?php echo $button_color1;?> 0,<?php echo $button_color2;?> 100%); |
|
65 | - background-image: linear-gradient(to bottom,<?php echo $button_color1;?> 0,<?php echo $button_color2;?> 100%); |
|
66 | - color: <?php echo $text_color;?>; |
|
63 | + background-image: -webkit-linear-gradient(top,<?php echo $button_color1; ?> 0,<?php echo $button_color2; ?> 100%); |
|
64 | + background-image: -o-linear-gradient(top,<?php echo $button_color1; ?> 0,<?php echo $button_color2; ?> 100%); |
|
65 | + background-image: linear-gradient(to bottom,<?php echo $button_color1; ?> 0,<?php echo $button_color2; ?> 100%); |
|
66 | + color: <?php echo $text_color; ?>; |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | .lasso--controls__right a:before, #lasso-toolbar--html__footer_desc { |
70 | - color: <?php echo $text_color;?> !important; |
|
70 | + color: <?php echo $text_color; ?> !important; |
|
71 | 71 | } |
72 | 72 | |
73 | 73 | ul.lasso-editor-controls li:hover, #lasso--exit:hover,#lasso--post-settings2:hover,#lasso--post-delete:hover,#lasso--publish:hover,#lasso--save:hover { |
74 | - background-image: -webkit-linear-gradient(top,<?php echo $hover_color1;?> 0,<?php echo $hover_color2;?> 100%); |
|
75 | - background-image: -o-linear-gradient(top,<?php echo $hover_color1;?> 0,<?php echo $hover_color2;?> 100%); |
|
76 | - background-image: linear-gradient(to bottom,<?php echo $hover_color1;?> 0,<?php echo $hover_color2;?> 100%); |
|
74 | + background-image: -webkit-linear-gradient(top,<?php echo $hover_color1; ?> 0,<?php echo $hover_color2; ?> 100%); |
|
75 | + background-image: -o-linear-gradient(top,<?php echo $hover_color1; ?> 0,<?php echo $hover_color2; ?> 100%); |
|
76 | + background-image: linear-gradient(to bottom,<?php echo $hover_color1; ?> 0,<?php echo $hover_color2; ?> 100%); |
|
77 | 77 | } |
78 | 78 | |
79 | 79 | .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, |
80 | 80 | #lasso-toolbar--link.link--drop-up #lasso-toolbar--link__wrap { |
81 | - background: <?php echo $dialog_color;?>; |
|
82 | - color: <?php echo $text_color;?>; |
|
81 | + background: <?php echo $dialog_color; ?>; |
|
82 | + color: <?php echo $text_color; ?>; |
|
83 | 83 | } |
84 | 84 | .sweet-alert p,.lasso--modal__inner label,.lasso--toolbar__inner label { |
85 | - color: <?php echo $text_color;?> !important; |
|
85 | + color: <?php echo $text_color; ?> !important; |
|
86 | 86 | } |
87 | 87 | |
88 | 88 | <?php if (!$is_mobile) { ?> |
@@ -112,48 +112,48 @@ discard block |
||
112 | 112 | <?php |
113 | 113 | } |
114 | 114 | ?> |
115 | - <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();?>" > |
|
115 | + <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(); ?>" > |
|
116 | 116 | |
117 | - <ul class="lasso--controls__center lasso-editor-controls lasso-editor-controls--wrap <?php echo $post_access_class;?> " <?php echo $mobile_style ?> > |
|
117 | + <ul class="lasso--controls__center lasso-editor-controls lasso-editor-controls--wrap <?php echo $post_access_class; ?> " <?php echo $mobile_style ?> > |
|
118 | 118 | |
119 | - <?php do_action( 'lasso_editor_controls_before' ); |
|
119 | + <?php do_action('lasso_editor_controls_before'); |
|
120 | 120 | |
121 | - if ( $is_capable ) { ?> |
|
121 | + if ($is_capable) { ?> |
|
122 | 122 | |
123 | - <li id="lasso--edit" title="<?php esc_attr_e( 'Edit Post', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li> |
|
123 | + <li id="lasso--edit" title="<?php esc_attr_e('Edit Post', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li> |
|
124 | 124 | |
125 | - <?php if ( 'off' == $post_settings_disabled || empty( $post_settings_disabled ) ) { ?> |
|
126 | - <li id="lasso--post-settings" title="<?php esc_attr_e( 'Post Settings', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li> |
|
125 | + <?php if ('off' == $post_settings_disabled || empty($post_settings_disabled)) { ?> |
|
126 | + <li id="lasso--post-settings" title="<?php esc_attr_e('Post Settings', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li> |
|
127 | 127 | <?php } |
128 | 128 | |
129 | 129 | } ?> |
130 | 130 | |
131 | - <li id="lasso--post-all" title="<?php esc_attr_e( 'All Posts', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li> |
|
131 | + <li id="lasso--post-all" title="<?php esc_attr_e('All Posts', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li> |
|
132 | 132 | |
133 | - <?php if ( $is_capable && wp_revisions_enabled( $post ) ) { ?> |
|
134 | - <li id="lasso--post-revisions" title="<?php esc_attr_e( 'Revisions', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li> |
|
133 | + <?php if ($is_capable && wp_revisions_enabled($post)) { ?> |
|
134 | + <li id="lasso--post-revisions" title="<?php esc_attr_e('Revisions', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li> |
|
135 | 135 | <?php } ?> |
136 | 136 | |
137 | - <?php if ( ( 'off' == $post_new_disabled || empty( $post_new_disabled ) && lasso_user_can('edit_posts') ) ) { ?> |
|
138 | - <li id="lasso--post-new" title="<?php esc_attr_e( 'Add Post', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li> |
|
137 | + <?php if (('off' == $post_new_disabled || empty($post_new_disabled) && lasso_user_can('edit_posts'))) { ?> |
|
138 | + <li id="lasso--post-new" title="<?php esc_attr_e('Add Post', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li> |
|
139 | 139 | <?php } ?> |
140 | 140 | |
141 | - <?php do_action( 'lasso_editor_controls_after' );?> |
|
141 | + <?php do_action('lasso_editor_controls_after'); ?> |
|
142 | 142 | |
143 | 143 | </ul> |
144 | 144 | |
145 | - <?php if ( is_singular() && !$is_mobile ) { ?> |
|
145 | + <?php if (is_singular() && !$is_mobile) { ?> |
|
146 | 146 | |
147 | - <div class="lasso--controls__right" data-posttype="<?php echo get_post_type( get_the_ID() );?>" data-status="<?php echo $status;?>"> |
|
147 | + <div class="lasso--controls__right" data-posttype="<?php echo get_post_type(get_the_ID()); ?>" data-status="<?php echo $status; ?>"> |
|
148 | 148 | |
149 | - <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> |
|
150 | - <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> |
|
149 | + <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> |
|
150 | + <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> |
|
151 | 151 | |
152 | 152 | |
153 | - <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> |
|
153 | + <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> |
|
154 | 154 | |
155 | - <?php if ( ('draft' == $status ) || ('pending' == $status && $can_publish) ) { ?> |
|
156 | - <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> |
|
155 | + <?php if (('draft' == $status) || ('pending' == $status && $can_publish)) { ?> |
|
156 | + <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> |
|
157 | 157 | <?php } ?> |
158 | 158 | |
159 | 159 | |
@@ -179,9 +179,9 @@ discard block |
||
179 | 179 | |
180 | 180 | |
181 | 181 | // let users add custom css classes |
182 | - $custom_classes = apply_filters( 'lasso_sidebar_classes', '' ); |
|
182 | + $custom_classes = apply_filters('lasso_sidebar_classes', ''); |
|
183 | 183 | ?> |
184 | - <div id="lasso--sidebar" class="<?php echo sanitize_html_class( $custom_classes );?>" > |
|
184 | + <div id="lasso--sidebar" class="<?php echo sanitize_html_class($custom_classes); ?>" > |
|
185 | 185 | <div class="lasso--sidebar__inner"> |
186 | 186 | <div id="lasso--component__settings"></div> |
187 | 187 | </div> |
@@ -203,20 +203,20 @@ discard block |
||
203 | 203 | $is_mobile = wp_is_mobile(); |
204 | 204 | |
205 | 205 | // check for lasso story engine and add a class doniting this |
206 | - $ase_status = class_exists( 'Aesop_Core' ) || defined( 'LASSO_CUSTOM' ) ? 'ase-active' : 'ase-not-active'; |
|
206 | + $ase_status = class_exists('Aesop_Core') || defined('LASSO_CUSTOM') ? 'ase-active' : 'ase-not-active'; |
|
207 | 207 | |
208 | 208 | // let users add custom css classes |
209 | - $custom_classes = apply_filters( 'lasso_toolbar_classes', '' ); |
|
209 | + $custom_classes = apply_filters('lasso_toolbar_classes', ''); |
|
210 | 210 | |
211 | 211 | // are toolbar headings enabled |
212 | - $toolbar_headings = lasso_editor_get_option( 'toolbar_headings', 'lasso_editor' ); |
|
213 | - $toolbar_headings_h4 = lasso_editor_get_option( 'toolbar_headings_h4', 'lasso_editor' ); |
|
212 | + $toolbar_headings = lasso_editor_get_option('toolbar_headings', 'lasso_editor'); |
|
213 | + $toolbar_headings_h4 = lasso_editor_get_option('toolbar_headings_h4', 'lasso_editor'); |
|
214 | 214 | |
215 | - $toolbar_class = $toolbar_headings ? 'toolbar-extended' : false; |
|
215 | + $toolbar_class = $toolbar_headings ? 'toolbar-extended' : false; |
|
216 | 216 | |
217 | 217 | // mobile styles |
218 | 218 | $mobile_class = $is_mobile ? 'lasso-mobile' : false; |
219 | - $mobile_style =$is_mobile ? 'style="bottom:0px;"' : null; |
|
219 | + $mobile_style = $is_mobile ? 'style="bottom:0px;"' : null; |
|
220 | 220 | |
221 | 221 | //show color |
222 | 222 | $show_color = lasso_editor_get_option('toolbar_show_color', 'lasso_editor'); |
@@ -224,113 +224,113 @@ discard block |
||
224 | 224 | //show alignment |
225 | 225 | $show_align = lasso_editor_get_option('toolbar_show_alignment', 'lasso_editor'); |
226 | 226 | |
227 | - $status = get_post_status( get_the_ID() ); |
|
227 | + $status = get_post_status(get_the_ID()); |
|
228 | 228 | |
229 | - $shortcodify_disabled = lasso_editor_get_option( 'shortcodify_disabled', 'lasso_editor' ); |
|
229 | + $shortcodify_disabled = lasso_editor_get_option('shortcodify_disabled', 'lasso_editor'); |
|
230 | 230 | |
231 | 231 | $sc_saving_class = 'on' == $shortcodify_disabled ? 'shortcodify-disabled' : 'shortcodify-enabled'; |
232 | 232 | |
233 | 233 | |
234 | 234 | ?> |
235 | - <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 ?>> |
|
236 | - <ul class="lasso--toolbar__inner lasso-editor-controls" <?php if ($is_mobile) {echo 'style="float:left;"';}?>> |
|
237 | - <?php do_action( 'lasso_toolbar_components_before' );?> |
|
238 | - <li id="lasso-toolbar--bold" title="<?php esc_attr_e( 'Bold', 'lasso' );?>"></li> |
|
239 | - <li id="lasso-toolbar--underline" title="<?php esc_attr_e( 'Underline', 'lasso' );?>"></li> |
|
240 | - <li id="lasso-toolbar--italic" title="<?php esc_attr_e( 'Italicize', 'lasso' );?>"></li> |
|
241 | - <li id="lasso-toolbar--strike" title="<?php esc_attr_e( 'Strikethrough', 'lasso' );?>"></li> |
|
242 | - <li id="lasso-toolbar--components" title="<?php esc_attr_e( 'Insert Component', 'lasso' );?>" style="color:#ffffa0;"> |
|
235 | + <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 ?>> |
|
236 | + <ul class="lasso--toolbar__inner lasso-editor-controls" <?php if ($is_mobile) {echo 'style="float:left;"'; }?>> |
|
237 | + <?php do_action('lasso_toolbar_components_before'); ?> |
|
238 | + <li id="lasso-toolbar--bold" title="<?php esc_attr_e('Bold', 'lasso'); ?>"></li> |
|
239 | + <li id="lasso-toolbar--underline" title="<?php esc_attr_e('Underline', 'lasso'); ?>"></li> |
|
240 | + <li id="lasso-toolbar--italic" title="<?php esc_attr_e('Italicize', 'lasso'); ?>"></li> |
|
241 | + <li id="lasso-toolbar--strike" title="<?php esc_attr_e('Strikethrough', 'lasso'); ?>"></li> |
|
242 | + <li id="lasso-toolbar--components" title="<?php esc_attr_e('Insert Component', 'lasso'); ?>" style="color:#ffffa0;"> |
|
243 | 243 | <ul id="lasso-toolbar--components__list" style="display:none;color:white;"> |
244 | - <?php if ( 'ase-active' == $ase_status ): ?> |
|
245 | - <li data-type="image" title="<?php esc_attr_e( 'Image', 'lasso' );?>" class="lasso-toolbar--component__image"></li> |
|
246 | - <li data-type="character" title="<?php esc_attr_e( 'Character', 'lasso' );?>" class="lasso-toolbar--component__character"></li> |
|
247 | - <li data-type="quote" title="<?php esc_attr_e( 'Quote', 'lasso' );?>" class="lasso-toolbar--component__quote"></li> |
|
248 | - <li data-type="content" title="<?php esc_attr_e( 'Content', 'lasso' );?>" class="lasso-toolbar--component__content"></li> |
|
249 | - <li data-type="chapter" title="<?php esc_attr_e( 'Chapter', 'lasso' );?>" class="lasso-toolbar--component__chapter"></li> |
|
250 | - <li data-type="parallax" title="<?php esc_attr_e( 'Parallax', 'lasso' );?>" class="lasso-toolbar--component__parallax"></li> |
|
251 | - <li data-type="audio" title="<?php esc_attr_e( 'Audio', 'lasso' );?>" class="lasso-toolbar--component__audio"></li> |
|
252 | - <li data-type="video" title="<?php esc_attr_e( 'Video', 'lasso' );?>" class="lasso-toolbar--component__video"></li> |
|
253 | - <li data-type="map" title="<?php esc_attr_e( 'Map', 'lasso' );?>" class="lasso-toolbar--component__map"></li> |
|
254 | - <li data-type="timeline_stop" title="<?php esc_attr_e( 'Timeline', 'lasso' );?>" class="lasso-toolbar--component__timeline"></li> |
|
255 | - <li data-type="document" title="<?php esc_attr_e( 'Document', 'lasso' );?>" class="lasso-toolbar--component__document"></li> |
|
256 | - <li data-type="collection" title="<?php esc_attr_e( 'Collection', 'lasso' );?>" class="lasso-toolbar--component__collection"></li> |
|
257 | - <li data-type="gallery" title="<?php esc_attr_e( 'Gallery', 'lasso' );?>" class="lasso-toolbar--component__gallery"></li> |
|
258 | - <?php if ( class_exists ('Aesop_GalleryPop') ) { ?> |
|
259 | - <li data-type="gallery" title="<?php esc_attr_e( 'Gallery Pop', 'lasso' );?>" class="lasso-toolbar--component__gallerypop"></li> |
|
244 | + <?php if ('ase-active' == $ase_status): ?> |
|
245 | + <li data-type="image" title="<?php esc_attr_e('Image', 'lasso'); ?>" class="lasso-toolbar--component__image"></li> |
|
246 | + <li data-type="character" title="<?php esc_attr_e('Character', 'lasso'); ?>" class="lasso-toolbar--component__character"></li> |
|
247 | + <li data-type="quote" title="<?php esc_attr_e('Quote', 'lasso'); ?>" class="lasso-toolbar--component__quote"></li> |
|
248 | + <li data-type="content" title="<?php esc_attr_e('Content', 'lasso'); ?>" class="lasso-toolbar--component__content"></li> |
|
249 | + <li data-type="chapter" title="<?php esc_attr_e('Chapter', 'lasso'); ?>" class="lasso-toolbar--component__chapter"></li> |
|
250 | + <li data-type="parallax" title="<?php esc_attr_e('Parallax', 'lasso'); ?>" class="lasso-toolbar--component__parallax"></li> |
|
251 | + <li data-type="audio" title="<?php esc_attr_e('Audio', 'lasso'); ?>" class="lasso-toolbar--component__audio"></li> |
|
252 | + <li data-type="video" title="<?php esc_attr_e('Video', 'lasso'); ?>" class="lasso-toolbar--component__video"></li> |
|
253 | + <li data-type="map" title="<?php esc_attr_e('Map', 'lasso'); ?>" class="lasso-toolbar--component__map"></li> |
|
254 | + <li data-type="timeline_stop" title="<?php esc_attr_e('Timeline', 'lasso'); ?>" class="lasso-toolbar--component__timeline"></li> |
|
255 | + <li data-type="document" title="<?php esc_attr_e('Document', 'lasso'); ?>" class="lasso-toolbar--component__document"></li> |
|
256 | + <li data-type="collection" title="<?php esc_attr_e('Collection', 'lasso'); ?>" class="lasso-toolbar--component__collection"></li> |
|
257 | + <li data-type="gallery" title="<?php esc_attr_e('Gallery', 'lasso'); ?>" class="lasso-toolbar--component__gallery"></li> |
|
258 | + <?php if (class_exists('Aesop_GalleryPop')) { ?> |
|
259 | + <li data-type="gallery" title="<?php esc_attr_e('Gallery Pop', 'lasso'); ?>" class="lasso-toolbar--component__gallerypop"></li> |
|
260 | 260 | <?php }?> |
261 | - <?php if ( class_exists ('Aesop_Events') ) { ?> |
|
262 | - <li data-type="events" title="<?php esc_attr_e( 'Event', 'lasso' );?>" class="lasso-toolbar--component__event"></li> |
|
261 | + <?php if (class_exists('Aesop_Events')) { ?> |
|
262 | + <li data-type="events" title="<?php esc_attr_e('Event', 'lasso'); ?>" class="lasso-toolbar--component__event"></li> |
|
263 | 263 | <?php }?> |
264 | 264 | <?php else: ?> |
265 | - <li data-type="wpimg" title="<?php esc_attr_e( 'WordPress Image', 'lasso' );?>" class="image lasso-toolbar--component__image"></li> |
|
266 | - <li data-type="wpquote" title="<?php esc_attr_e( 'WordPress Quote', 'lasso' );?>" class="quote lasso-toolbar--component__quote"></li> |
|
267 | - <!--li data-type="wpvideo" title="<?php esc_attr_e( 'WordPress Video', 'lasso' );?>" class="video lasso-toolbar--component__video"></li--> |
|
265 | + <li data-type="wpimg" title="<?php esc_attr_e('WordPress Image', 'lasso'); ?>" class="image lasso-toolbar--component__image"></li> |
|
266 | + <li data-type="wpquote" title="<?php esc_attr_e('WordPress Quote', 'lasso'); ?>" class="quote lasso-toolbar--component__quote"></li> |
|
267 | + <!--li data-type="wpvideo" title="<?php esc_attr_e('WordPress Video', 'lasso'); ?>" class="video lasso-toolbar--component__video"></li--> |
|
268 | 268 | <?php endif; ?> |
269 | - <?php do_action( 'lasso_toolbar_components' );?> |
|
269 | + <?php do_action('lasso_toolbar_components'); ?> |
|
270 | 270 | </ul> |
271 | 271 | </li> |
272 | - <?php if ( $toolbar_headings ): ?> |
|
273 | - <li id="lasso-toolbar--h2" title="<?php esc_attr_e( 'H2 Heading', 'lasso' );?>"></li> |
|
274 | - <li id="lasso-toolbar--h3" title="<?php esc_attr_e( 'H3 Heading', 'lasso' );?>"></li> |
|
272 | + <?php if ($toolbar_headings): ?> |
|
273 | + <li id="lasso-toolbar--h2" title="<?php esc_attr_e('H2 Heading', 'lasso'); ?>"></li> |
|
274 | + <li id="lasso-toolbar--h3" title="<?php esc_attr_e('H3 Heading', 'lasso'); ?>"></li> |
|
275 | 275 | <?php endif; ?> |
276 | - <?php if ( $toolbar_headings_h4 ): ?> |
|
277 | - <li id="lasso-toolbar--h4" title="<?php esc_attr_e( 'H4 Heading', 'lasso' );?>"></li> |
|
278 | - <li id="lasso-toolbar--h5" title="<?php esc_attr_e( 'H5 Heading', 'lasso' );?>"></li> |
|
279 | - <li id="lasso-toolbar--h6" title="<?php esc_attr_e( 'H6 Heading', 'lasso' );?>"></li> |
|
276 | + <?php if ($toolbar_headings_h4): ?> |
|
277 | + <li id="lasso-toolbar--h4" title="<?php esc_attr_e('H4 Heading', 'lasso'); ?>"></li> |
|
278 | + <li id="lasso-toolbar--h5" title="<?php esc_attr_e('H5 Heading', 'lasso'); ?>"></li> |
|
279 | + <li id="lasso-toolbar--h6" title="<?php esc_attr_e('H6 Heading', 'lasso'); ?>"></li> |
|
280 | 280 | <?php endif; ?> |
281 | 281 | |
282 | - <?php if ( $show_color ): ?> |
|
283 | - <li id="lasso-toolbar--color-set" title="<?php esc_attr_e( 'Set Color for Selected Text', 'lasso' );?>"></li> |
|
284 | - <li id="lasso-toolbar--color-pick" title="<?php esc_attr_e( 'Choose Color', 'lasso' );?>"></li> |
|
282 | + <?php if ($show_color): ?> |
|
283 | + <li id="lasso-toolbar--color-set" title="<?php esc_attr_e('Set Color for Selected Text', 'lasso'); ?>"></li> |
|
284 | + <li id="lasso-toolbar--color-pick" title="<?php esc_attr_e('Choose Color', 'lasso'); ?>"></li> |
|
285 | 285 | <?php endif; ?> |
286 | 286 | |
287 | 287 | |
288 | - <li id="lasso-toolbar--link" title="<?php esc_attr_e( 'Anchor Link', 'lasso' );?>"> |
|
288 | + <li id="lasso-toolbar--link" title="<?php esc_attr_e('Anchor Link', 'lasso'); ?>"> |
|
289 | 289 | <div id="lasso-toolbar--link__wrap" <?php echo $mobile_style ?> > |
290 | - <div id="lasso-toolbar--link__inner" contenteditable="true" placeholder="<?php esc_attr_e( 'http://url.com', 'lasso' );?>"></div> |
|
291 | - <a href="#" title="<?php esc_attr_e( 'Create Link', 'lasso' );?>" class="lasso-toolbar--link__control" id="lasso-toolbar--link__create" ></a> |
|
290 | + <div id="lasso-toolbar--link__inner" contenteditable="true" placeholder="<?php esc_attr_e('http://url.com', 'lasso'); ?>"></div> |
|
291 | + <a href="#" title="<?php esc_attr_e('Create Link', 'lasso'); ?>" class="lasso-toolbar--link__control" id="lasso-toolbar--link__create" ></a> |
|
292 | 292 | <input class="styled-checkbox" type="checkbox" id="aesop-toolbar--link_newtab" checked/> |
293 | - <label for="aesop-toolbar--link_newtab"><?php esc_attr_e( 'Open in a New Tab', 'lasso' );?></label> |
|
293 | + <label for="aesop-toolbar--link_newtab"><?php esc_attr_e('Open in a New Tab', 'lasso'); ?></label> |
|
294 | 294 | </div> |
295 | 295 | </li> |
296 | - <?php do_action( 'lasso_toolbar_components_after' );?> |
|
297 | - <li id="lasso-toolbar--html" title="<?php esc_attr_e( 'Insert HTML or Code', 'lasso' );?>"> |
|
296 | + <?php do_action('lasso_toolbar_components_after'); ?> |
|
297 | + <li id="lasso-toolbar--html" title="<?php esc_attr_e('Insert HTML or Code', 'lasso'); ?>"> |
|
298 | 298 | <div id="lasso-toolbar--html__wrap" <?php echo $mobile_style ?>> |
299 | - <div id="lasso-toolbar--html__inner" contenteditable="true" placeholder="<?php esc_attr_e( 'Enter HTML to insert', 'lasso' );?>"></div> |
|
299 | + <div id="lasso-toolbar--html__inner" contenteditable="true" placeholder="<?php esc_attr_e('Enter HTML to insert', 'lasso'); ?>"></div> |
|
300 | 300 | <div id="lasso-toolbar--html__footer"> |
301 | 301 | <div id="lasso-toolbar--html__footer_desc" > |
302 | - <?php esc_attr_e( 'Enter HTML to insert', 'lasso' );?><br> |
|
303 | - <?php esc_attr_e( 'You can also use Shortcodes', 'lasso' );?><br> |
|
304 | - <?php esc_attr_e( 'You can also enter a URL to embed, such as Youtube, Vimeo and Twitter URLs.', 'lasso' );?> |
|
302 | + <?php esc_attr_e('Enter HTML to insert', 'lasso'); ?><br> |
|
303 | + <?php esc_attr_e('You can also use Shortcodes', 'lasso'); ?><br> |
|
304 | + <?php esc_attr_e('You can also enter a URL to embed, such as Youtube, Vimeo and Twitter URLs.', 'lasso'); ?> |
|
305 | 305 | </div> |
306 | 306 | <ul class="lasso-toolbar--html-snips"> |
307 | 307 | |
308 | - <?php if ( !$toolbar_headings ): ?> |
|
309 | - <li id="lasso-html--h2" title="<?php esc_attr_e( 'H2 Heading', 'lasso' );?>"> |
|
310 | - <li id="lasso-html--h3" title="<?php esc_attr_e( 'H3 Heading', 'lasso' );?>"> |
|
308 | + <?php if (!$toolbar_headings): ?> |
|
309 | + <li id="lasso-html--h2" title="<?php esc_attr_e('H2 Heading', 'lasso'); ?>"> |
|
310 | + <li id="lasso-html--h3" title="<?php esc_attr_e('H3 Heading', 'lasso'); ?>"> |
|
311 | 311 | <?php endif; ?> |
312 | - <li id="lasso-html--ul" title="<?php esc_attr_e( 'Unordered List', 'lasso' );?>"> |
|
313 | - <li id="lasso-html--ol" title="<?php esc_attr_e( 'Ordered List', 'lasso' );?>"> |
|
312 | + <li id="lasso-html--ul" title="<?php esc_attr_e('Unordered List', 'lasso'); ?>"> |
|
313 | + <li id="lasso-html--ol" title="<?php esc_attr_e('Ordered List', 'lasso'); ?>"> |
|
314 | 314 | </ul> |
315 | - <a class="lasso-toolbar--html__control lasso-toolbar--html__cancel" href="#"><?php _e( 'Cancel', 'lasso' );?></a> |
|
316 | - <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> |
|
315 | + <a class="lasso-toolbar--html__control lasso-toolbar--html__cancel" href="#"><?php _e('Cancel', 'lasso'); ?></a> |
|
316 | + <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> |
|
317 | 317 | </div> |
318 | 318 | </div> |
319 | 319 | </li> |
320 | - <?php if ( $show_align ): ?> |
|
321 | - <li id="lasso-toolbar--left-align" title="<?php esc_attr_e( 'Text Left Align', 'lasso' );?>"></li> |
|
322 | - <li id="lasso-toolbar--center-align" title="<?php esc_attr_e( 'Text Center Align', 'lasso' );?>"></li> |
|
323 | - <li id="lasso-toolbar--right-align" title="<?php esc_attr_e( 'Text Right Align', 'lasso' );?>"></li> |
|
320 | + <?php if ($show_align): ?> |
|
321 | + <li id="lasso-toolbar--left-align" title="<?php esc_attr_e('Text Left Align', 'lasso'); ?>"></li> |
|
322 | + <li id="lasso-toolbar--center-align" title="<?php esc_attr_e('Text Center Align', 'lasso'); ?>"></li> |
|
323 | + <li id="lasso-toolbar--right-align" title="<?php esc_attr_e('Text Right Align', 'lasso'); ?>"></li> |
|
324 | 324 | <?php endif; ?> |
325 | 325 | </ul> |
326 | - <?php if ( is_singular() && $is_mobile ) { ?> |
|
326 | + <?php if (is_singular() && $is_mobile) { ?> |
|
327 | 327 | |
328 | - <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;"> |
|
328 | + <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;"> |
|
329 | 329 | |
330 | - <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> |
|
330 | + <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> |
|
331 | 331 | |
332 | - <?php if ( 'draft' == $status && ( lasso_user_can('publish_posts') || lasso_user_can('publish_pages') ) ) { ?> |
|
333 | - <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> |
|
332 | + <?php if ('draft' == $status && (lasso_user_can('publish_posts') || lasso_user_can('publish_pages'))) { ?> |
|
333 | + <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> |
|
334 | 334 | <?php } ?> |
335 | 335 | |
336 | 336 | </div> |
@@ -348,20 +348,20 @@ discard block |
||
348 | 348 | */ |
349 | 349 | function lasso_editor_settings_toolbar() { |
350 | 350 | |
351 | - $delete_nonce = wp_create_nonce( 'lasso-delete-nonce' ); |
|
351 | + $delete_nonce = wp_create_nonce('lasso-delete-nonce'); |
|
352 | 352 | |
353 | 353 | ob_start(); |
354 | 354 | |
355 | 355 | |
356 | 356 | // let users add custom css classes |
357 | - $custom_classes = apply_filters( 'lasso_component_classes', '' ); |
|
357 | + $custom_classes = apply_filters('lasso_component_classes', ''); |
|
358 | 358 | |
359 | 359 | ?> |
360 | - <ul class="lasso-component--controls <?php echo sanitize_html_class( $custom_classes );?>" contenteditable="false"> |
|
361 | - <li class="lasso-drag" title="<?php esc_attr_e( 'Move', 'lasso' );?>"></li> |
|
362 | - <li id="lasso-component--settings__trigger" class="lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li> |
|
363 | - <li class="lasso-clone" title="<?php esc_attr_e( 'Clone', 'lasso' );?>"></li> |
|
364 | - <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> |
|
360 | + <ul class="lasso-component--controls <?php echo sanitize_html_class($custom_classes); ?>" contenteditable="false"> |
|
361 | + <li class="lasso-drag" title="<?php esc_attr_e('Move', 'lasso'); ?>"></li> |
|
362 | + <li id="lasso-component--settings__trigger" class="lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li> |
|
363 | + <li class="lasso-clone" title="<?php esc_attr_e('Clone', 'lasso'); ?>"></li> |
|
364 | + <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> |
|
365 | 365 | </ul> |
366 | 366 | |
367 | 367 | <?php return ob_get_clean(); |
@@ -379,13 +379,13 @@ discard block |
||
379 | 379 | |
380 | 380 | |
381 | 381 | // has post thumbnail |
382 | - $has_thumbnail = has_post_thumbnail( get_the_ID() ) ? 'class="lasso--featImg--has-thumb"' : false; |
|
382 | + $has_thumbnail = has_post_thumbnail(get_the_ID()) ? 'class="lasso--featImg--has-thumb"' : false; |
|
383 | 383 | |
384 | 384 | ?> |
385 | - <ul id="lasso--featImgControls" <?php echo $has_thumbnail;?>> |
|
386 | - <li id="lasso--featImgUpload"><a title="<?php esc_attr_e( 'Replace Image', 'lasso' );?>" href="#"><i class="lasso-icon-image"></i></a></li> |
|
387 | - <li id="lasso--featImgDelete"><a title="<?php esc_attr_e( 'Delete Image', 'lasso' );?>" href="#"><i class="lasso-icon-bin2"></i></a></li> |
|
388 | - <li id="lasso--featImgSave"><a href="#"><?php esc_attr_e( 'save', 'lasso' );?></a></li> |
|
385 | + <ul id="lasso--featImgControls" <?php echo $has_thumbnail; ?>> |
|
386 | + <li id="lasso--featImgUpload"><a title="<?php esc_attr_e('Replace Image', 'lasso'); ?>" href="#"><i class="lasso-icon-image"></i></a></li> |
|
387 | + <li id="lasso--featImgDelete"><a title="<?php esc_attr_e('Delete Image', 'lasso'); ?>" href="#"><i class="lasso-icon-bin2"></i></a></li> |
|
388 | + <li id="lasso--featImgSave"><a href="#"><?php esc_attr_e('save', 'lasso'); ?></a></li> |
|
389 | 389 | </ul> |
390 | 390 | |
391 | 391 | <?php return ob_get_clean(); |
@@ -409,54 +409,54 @@ discard block |
||
409 | 409 | |
410 | 410 | $postid = get_the_ID(); |
411 | 411 | |
412 | - $status = get_post_status( $postid ); |
|
413 | - $nonce = wp_create_nonce( 'lasso-update-post-settings' ); |
|
412 | + $status = get_post_status($postid); |
|
413 | + $nonce = wp_create_nonce('lasso-update-post-settings'); |
|
414 | 414 | |
415 | 415 | // let users add custom css classes |
416 | - $custom_classes = apply_filters( 'lasso_modal_settings_classes', '' ); |
|
416 | + $custom_classes = apply_filters('lasso_modal_settings_classes', ''); |
|
417 | 417 | |
418 | 418 | // objects categories |
419 | - $categories = lasso_get_post_objects( $postid, 'category' ); |
|
420 | - $tags = lasso_get_post_objects( $postid, 'tag' ); |
|
419 | + $categories = lasso_get_post_objects($postid, 'category'); |
|
420 | + $tags = lasso_get_post_objects($postid, 'tag'); |
|
421 | 421 | |
422 | 422 | // modal tabs |
423 | - $tabs = lasso_modal_addons('tab'); |
|
424 | - $content = lasso_modal_addons('content'); |
|
423 | + $tabs = lasso_modal_addons('tab'); |
|
424 | + $content = lasso_modal_addons('content'); |
|
425 | 425 | |
426 | 426 | //editor options |
427 | 427 | $allow_change_date = lasso_editor_get_option('allow_change_date', 'lasso_editor'); |
428 | 428 | |
429 | 429 | // are we singular |
430 | - $is_singular = is_singular(); |
|
430 | + $is_singular = is_singular(); |
|
431 | 431 | $is_singular_class = $is_singular ? 'lasso--postsettings__2col' : 'lasso--postsettings__1col'; |
432 | 432 | $has_thumb_class = has_post_thumbnail() ? 'has-thumbnail' : 'no-thumbnail'; |
433 | 433 | $theme_supports = current_theme_supports('post-thumbnails'); |
434 | - $default_image = LASSO_URL.'/admin/assets/img/empty-img.png'; |
|
434 | + $default_image = LASSO_URL.'/admin/assets/img/empty-img.png'; |
|
435 | 435 | |
436 | 436 | // do we support pending status |
437 | 437 | $no_pending_status = lasso_editor_get_option('no_pending_status', 'lasso_editor'); |
438 | 438 | |
439 | 439 | ?> |
440 | - <div id="lasso--post-settings__modal" class="lasso--modal lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>"> |
|
440 | + <div id="lasso--post-settings__modal" class="lasso--modal lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>"> |
|
441 | 441 | <div class="lasso--modal__inner"> |
442 | 442 | |
443 | - <?php if( $tabs ) { echo $tabs; } ?> |
|
443 | + <?php if ($tabs) { echo $tabs; } ?> |
|
444 | 444 | |
445 | 445 | <div class="lasso--modal__content modal__content--core visible" data-addon-content="core"> |
446 | - <form id="lasso--postsettings__form" enctype="multipart/form-data" class="lasso--post-form <?php echo $is_singular_class.' '.$has_thumb_class;?>" > |
|
446 | + <form id="lasso--postsettings__form" enctype="multipart/form-data" class="lasso--post-form <?php echo $is_singular_class.' '.$has_thumb_class; ?>" > |
|
447 | 447 | |
448 | - <?php if ( $is_singular && $theme_supports ) : ?> |
|
448 | + <?php if ($is_singular && $theme_supports) : ?> |
|
449 | 449 | <div class="lasso--postsettings__left"> |
450 | - <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> |
|
451 | - <div class="lasso--post-thumb" data-default-thumb="<?php echo esc_url( $default_image );?>"> |
|
450 | + <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> |
|
451 | + <div class="lasso--post-thumb" data-default-thumb="<?php echo esc_url($default_image); ?>"> |
|
452 | 452 | |
453 | 453 | <div id="lasso--post-thumb__controls" class="lasso--post-thumb__controls"> |
454 | - <i id="lasso--post-thumb__add" title="<?php _e('Change Featured Image','lasso');?>" class="dashicons dashicons-edit"></i> |
|
455 | - <i id="lasso--post-thumb__delete" title="<?php _e('Delete Featured Image','lasso');?>" class="dashicons dashicons-no-alt"></i> |
|
454 | + <i id="lasso--post-thumb__add" title="<?php _e('Change Featured Image', 'lasso'); ?>" class="dashicons dashicons-edit"></i> |
|
455 | + <i id="lasso--post-thumb__delete" title="<?php _e('Delete Featured Image', 'lasso'); ?>" class="dashicons dashicons-no-alt"></i> |
|
456 | 456 | <i id="lasso--save-status" class="lasso-icon lasso-icon-spinner6 not-visible"></i> |
457 | 457 | </div> |
458 | 458 | |
459 | - <?php echo has_post_thumbnail() ? get_the_post_thumbnail( $post->ID, 'medium' ) : '<img src="'.$default_image.'">'; ?> |
|
459 | + <?php echo has_post_thumbnail() ? get_the_post_thumbnail($post->ID, 'medium') : '<img src="'.$default_image.'">'; ?> |
|
460 | 460 | |
461 | 461 | </div> |
462 | 462 | <div id="lasso--featImgSave"><a href="#" class="not-visible">Save</a></div> |
@@ -466,15 +466,15 @@ discard block |
||
466 | 466 | |
467 | 467 | <div class="lasso--postsettings__right"> |
468 | 468 | |
469 | - <?php if( lasso_user_can('publish_posts') || lasso_user_can('publish_pages') ): ?> |
|
469 | + <?php if (lasso_user_can('publish_posts') || lasso_user_can('publish_pages')): ?> |
|
470 | 470 | <div class="lasso--postsettings__option story-status-option"> |
471 | - <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> |
|
472 | - <ul class="story-status story-status-<?php echo sanitize_html_class( $status );?>"> |
|
473 | - <li id="lasso--status-draft"><?php _e( 'Draft', 'lasso' );?></li> |
|
474 | - <?php if( !$no_pending_status ): ?> |
|
475 | - <li id="lasso--status-pending"><?php _e( 'Pending', 'lasso' );?></li> |
|
471 | + <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> |
|
472 | + <ul class="story-status story-status-<?php echo sanitize_html_class($status); ?>"> |
|
473 | + <li id="lasso--status-draft"><?php _e('Draft', 'lasso'); ?></li> |
|
474 | + <?php if (!$no_pending_status): ?> |
|
475 | + <li id="lasso--status-pending"><?php _e('Pending', 'lasso'); ?></li> |
|
476 | 476 | <?php endif; ?> |
477 | - <li id="lasso--status-publish"><?php _e( 'Publish', 'lasso' );?></li> |
|
477 | + <li id="lasso--status-publish"><?php _e('Publish', 'lasso'); ?></li> |
|
478 | 478 | </ul> |
479 | 479 | <div class="lasso--slider_wrap"> |
480 | 480 | <div id="lasso--slider"></div> |
@@ -482,10 +482,10 @@ discard block |
||
482 | 482 | </div> |
483 | 483 | <?php endif; ?> |
484 | 484 | |
485 | - <?php if ( 'publish' == $status ): ?> |
|
485 | + <?php if ('publish' == $status): ?> |
|
486 | 486 | <div class="lasso--postsettings__option story-slug-option"> |
487 | - <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> |
|
488 | - <input class="lasso--modal__trigger-footer" type="text" name="story_slug" value="<?php echo isset( $post ) ? esc_attr( $post->post_name ) : false;?>"> |
|
487 | + <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> |
|
488 | + <input class="lasso--modal__trigger-footer" type="text" name="story_slug" value="<?php echo isset($post) ? esc_attr($post->post_name) : false; ?>"> |
|
489 | 489 | </div> |
490 | 490 | <?php endif; ?> |
491 | 491 | |
@@ -494,20 +494,20 @@ discard block |
||
494 | 494 | <div class="lasso--postsettings__middle"> |
495 | 495 | |
496 | 496 | <div class="lasso--postsettings__option story-categories-option"> |
497 | - <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> |
|
498 | - <input id="lasso--cat-select" class="lasso--modal__trigger-footer" type="hidden" name="story_cats" value="<?php echo $categories;?>"> |
|
497 | + <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> |
|
498 | + <input id="lasso--cat-select" class="lasso--modal__trigger-footer" type="hidden" name="story_cats" value="<?php echo $categories; ?>"> |
|
499 | 499 | </div> |
500 | 500 | |
501 | 501 | <div class="lasso--postsettings__option story-tags-option"> |
502 | - <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> |
|
503 | - <input id="lasso--tag-select" class="lasso--modal__trigger-footer" type="hidden" name="story_tags" value="<?php echo $tags;?>"> |
|
502 | + <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> |
|
503 | + <input id="lasso--tag-select" class="lasso--modal__trigger-footer" type="hidden" name="story_tags" value="<?php echo $tags; ?>"> |
|
504 | 504 | </div> |
505 | 505 | <?php |
506 | 506 | if ($allow_change_date) { |
507 | - $dateformat = get_option( 'date_format' ); |
|
507 | + $dateformat = get_option('date_format'); |
|
508 | 508 | ?> |
509 | - <label><?php _e( 'Post Date', 'lasso' ); ?></label> |
|
510 | - <input type="text" class="editus_custom_date" name="post_date" value="<?php echo get_the_time($dateformat, $postid);?>"/> |
|
509 | + <label><?php _e('Post Date', 'lasso'); ?></label> |
|
510 | + <input type="text" class="editus_custom_date" name="post_date" value="<?php echo get_the_time($dateformat, $postid); ?>"/> |
|
511 | 511 | <?php |
512 | 512 | }?> |
513 | 513 | |
@@ -529,23 +529,23 @@ discard block |
||
529 | 529 | ?> |
530 | 530 | <!--/div--> |
531 | 531 | |
532 | - <?php do_action( 'lasso_modal_post_form' ); // action ?> |
|
532 | + <?php do_action('lasso_modal_post_form'); // action ?> |
|
533 | 533 | |
534 | 534 | <div class="lasso--postsettings__footer" > |
535 | - <a href="#" class="lasso--postsettings-cancel"><?php _e( 'Cancel', 'lasso' );?></a> |
|
535 | + <a href="#" class="lasso--postsettings-cancel"><?php _e('Cancel', 'lasso'); ?></a> |
|
536 | 536 | <input type="hidden" name="status" value=""> |
537 | 537 | <input type="hidden" name="categories" value=""> |
538 | - <input type="hidden" name="postid" value="<?php echo get_the_ID();?>"> |
|
538 | + <input type="hidden" name="postid" value="<?php echo get_the_ID(); ?>"> |
|
539 | 539 | <input type="hidden" name="action" value="process_update-object_post"> |
540 | - <input type="hidden" name="nonce" value="<?php echo $nonce;?>"> |
|
541 | - <?php do_action( 'lasso_modal_post_form_footer' ); // action ?> |
|
542 | - <input type="submit" id="lasso--postsettings-submit" value="<?php esc_attr_e( 'Save', 'lasso' );?>"> |
|
540 | + <input type="hidden" name="nonce" value="<?php echo $nonce; ?>"> |
|
541 | + <?php do_action('lasso_modal_post_form_footer'); // action ?> |
|
542 | + <input type="submit" id="lasso--postsettings-submit" value="<?php esc_attr_e('Save', 'lasso'); ?>"> |
|
543 | 543 | </div> |
544 | 544 | |
545 | 545 | </form> |
546 | 546 | </div> |
547 | 547 | |
548 | - <?php if( $tabs ) { echo $content; } ?> |
|
548 | + <?php if ($tabs) { echo $content; } ?> |
|
549 | 549 | |
550 | 550 | </div> |
551 | 551 | |
@@ -567,41 +567,41 @@ discard block |
||
567 | 567 | ob_start(); |
568 | 568 | |
569 | 569 | |
570 | - $status = get_post_status( get_the_ID() ); |
|
570 | + $status = get_post_status(get_the_ID()); |
|
571 | 571 | |
572 | - $nonce = wp_create_nonce( 'lasso-editor-new-post' ); |
|
572 | + $nonce = wp_create_nonce('lasso-editor-new-post'); |
|
573 | 573 | |
574 | 574 | // let users add custom css classes |
575 | - $custom_classes = apply_filters( 'lasso_modal_post_classes', '' ); |
|
575 | + $custom_classes = apply_filters('lasso_modal_post_classes', ''); |
|
576 | 576 | |
577 | 577 | // return the post type |
578 | - $type = get_post_type( get_the_ID() ); |
|
578 | + $type = get_post_type(get_the_ID()); |
|
579 | 579 | |
580 | 580 | $mobile_style = ""; |
581 | 581 | if (wp_is_mobile()) { |
582 | 582 | $mobile_style = 'style="top:140px !important;"'; |
583 | 583 | } |
584 | 584 | ?> |
585 | - <div id="lasso--post-new__modal" class="lasso--modal lasso--modal__med lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>" <?php echo $mobile_style;?>"> |
|
585 | + <div id="lasso--post-new__modal" class="lasso--modal lasso--modal__med lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>" <?php echo $mobile_style; ?>"> |
|
586 | 586 | <div class="lasso--modal__inner lasso--hasnewform"> |
587 | 587 | |
588 | 588 | <form id="lasso--postnew__form" enctype="multipart/form-data" class="lasso--post-form"> |
589 | 589 | |
590 | 590 | <div class="lasso--postsettings__option story-slug-option lasso--last-option"> |
591 | - <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> |
|
592 | - <input class="lasso--modal__trigger-footer" type="text" required name="story_title" value="" placeholder="<?php esc_attr_e( 'Type Your Title Here', 'lasso' );?>"> |
|
591 | + <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> |
|
592 | + <input class="lasso--modal__trigger-footer" type="text" required name="story_title" value="" placeholder="<?php esc_attr_e('Type Your Title Here', 'lasso'); ?>"> |
|
593 | 593 | <div class="lasso--select-wrap" style="width:90px"> |
594 | 594 | <select id="lasso--select-type" name="story_type"> |
595 | 595 | |
596 | 596 | <?php |
597 | 597 | $types = lasso_post_types_names(); |
598 | - if ( !empty( $types ) ) { |
|
599 | - foreach( $types as $name => $label ) { |
|
600 | - $type = preg_replace( '/s\b/','', $name ); |
|
598 | + if (!empty($types)) { |
|
599 | + foreach ($types as $name => $label) { |
|
600 | + $type = preg_replace('/s\b/', '', $name); |
|
601 | 601 | if ($type == 'page' && !current_user_can('edit_pages')) { |
602 | 602 | continue; |
603 | 603 | } |
604 | - printf( '<option value="%s">%s</option>', lcfirst( esc_attr( $type ) ) , ucfirst( esc_attr( $label ) ) ); |
|
604 | + printf('<option value="%s">%s</option>', lcfirst(esc_attr($type)), ucfirst(esc_attr($label))); |
|
605 | 605 | } |
606 | 606 | |
607 | 607 | } |
@@ -612,19 +612,19 @@ discard block |
||
612 | 612 | </div> |
613 | 613 | |
614 | 614 | <div class="lasso--postsettings__footer"> |
615 | - <a href="#" class="lasso--postsettings-cancel"><?php _e( 'Cancel', 'lasso' );?></a> |
|
615 | + <a href="#" class="lasso--postsettings-cancel"><?php _e('Cancel', 'lasso'); ?></a> |
|
616 | 616 | <input type="hidden" name="action" value="process_new-object_post"> |
617 | 617 | <?php |
618 | - if ( !empty( $types ) ) { |
|
618 | + if (!empty($types)) { |
|
619 | 619 | // get the first element |
620 | 620 | $keys = array_keys($types); |
621 | - $type =$keys[0]; |
|
622 | - $type = preg_replace( '/s\b/','', $type ); |
|
623 | - printf( '<input type="hidden" name="object" value="%s">', lcfirst( esc_attr( $type ) ) ); |
|
621 | + $type = $keys[0]; |
|
622 | + $type = preg_replace('/s\b/', '', $type); |
|
623 | + printf('<input type="hidden" name="object" value="%s">', lcfirst(esc_attr($type))); |
|
624 | 624 | } |
625 | 625 | ?> |
626 | - <input type="hidden" name="nonce" value="<?php echo $nonce;?>"> |
|
627 | - <input type="submit" value="<?php esc_attr_e( 'Create', 'lasso' );?>"> |
|
626 | + <input type="hidden" name="nonce" value="<?php echo $nonce; ?>"> |
|
627 | + <input type="submit" value="<?php esc_attr_e('Create', 'lasso'); ?>"> |
|
628 | 628 | </div> |
629 | 629 | |
630 | 630 | </form> |
@@ -652,18 +652,18 @@ discard block |
||
652 | 652 | ob_start(); |
653 | 653 | |
654 | 654 | // post status |
655 | - $status = get_post_status( get_the_ID() ); |
|
655 | + $status = get_post_status(get_the_ID()); |
|
656 | 656 | |
657 | 657 | // let users add custom css classes |
658 | - $custom_classes = apply_filters( 'lasso_modal_all_post_classes', '' ); |
|
658 | + $custom_classes = apply_filters('lasso_modal_all_post_classes', ''); |
|
659 | 659 | |
660 | 660 | ?> |
661 | - <div id="lasso--all-posts__modal" class="lasso--modal lasso--modal__full lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>" style="max-height:100%"> |
|
661 | + <div id="lasso--all-posts__modal" class="lasso--modal lasso--modal__full lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>" style="max-height:100%"> |
|
662 | 662 | <div class="lasso--modal__inner"> |
663 | 663 | |
664 | 664 | <div class="lasso--post-filtering not-visible"> |
665 | 665 | <div class="lasso--search__results"> |
666 | - <span id="lasso--results-found"></span><?php _e('results found','lasso');?> |
|
666 | + <span id="lasso--results-found"></span><?php _e('results found', 'lasso'); ?> |
|
667 | 667 | </div> |
668 | 668 | <div class="lasso--search"> |
669 | 669 | <i id="lasso--search__toggle" class="dashicons dashicons-search"></i> |
@@ -677,18 +677,18 @@ discard block |
||
677 | 677 | $post_types = lasso_post_types_names(); |
678 | 678 | $rest_bases = lasso_post_types_rest_base(); |
679 | 679 | |
680 | - if ( ! empty( $post_types ) ) { |
|
680 | + if (!empty($post_types)) { |
|
681 | 681 | $first = 'active'; |
682 | - foreach( $post_types as $name => $label ) { |
|
682 | + foreach ($post_types as $name => $label) { |
|
683 | 683 | if (array_key_exists($name, $rest_bases)) { |
684 | - printf( '<li class="%1s lasso--show-objects" data-post-type="%2s">%3s</li>', esc_attr( $first), esc_attr( $rest_bases[$name] ), esc_attr( $label ) ); |
|
684 | + printf('<li class="%1s lasso--show-objects" data-post-type="%2s">%3s</li>', esc_attr($first), esc_attr($rest_bases[$name]), esc_attr($label)); |
|
685 | 685 | } |
686 | 686 | $first = ''; |
687 | 687 | } |
688 | 688 | |
689 | 689 | } |
690 | 690 | |
691 | - do_action('lasso_modal_post_objects');?> |
|
691 | + do_action('lasso_modal_post_objects'); ?> |
|
692 | 692 | |
693 | 693 | </ul> |
694 | 694 | <div id="lasso--loading" class="lasso--loading"><div class="lasso--loader"></div></div> |
@@ -708,14 +708,14 @@ discard block |
||
708 | 708 | |
709 | 709 | |
710 | 710 | // let users add custom css classes |
711 | - $custom_classes = apply_filters( 'lasso_wpimg_classes', '' ); |
|
711 | + $custom_classes = apply_filters('lasso_wpimg_classes', ''); |
|
712 | 712 | |
713 | 713 | ?> |
714 | - <ul class="lasso-component--controls <?php echo sanitize_html_class( $custom_classes );?>" contenteditable="false"> |
|
715 | - <li class="lasso-drag" title="<?php esc_attr_e( 'Move', 'lasso' );?>"></li> |
|
716 | - <li id="lasso--wpimg-edit" class="lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li> |
|
717 | - <li class="lasso-clone" title="<?php esc_attr_e( 'Clone', 'lasso' );?>"></li> |
|
718 | - <li class="lasso-delete" title="<?php esc_attr_e( 'Delete', 'lasso' );?>"></li> |
|
714 | + <ul class="lasso-component--controls <?php echo sanitize_html_class($custom_classes); ?>" contenteditable="false"> |
|
715 | + <li class="lasso-drag" title="<?php esc_attr_e('Move', 'lasso'); ?>"></li> |
|
716 | + <li id="lasso--wpimg-edit" class="lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li> |
|
717 | + <li class="lasso-clone" title="<?php esc_attr_e('Clone', 'lasso'); ?>"></li> |
|
718 | + <li class="lasso-delete" title="<?php esc_attr_e('Delete', 'lasso'); ?>"></li> |
|
719 | 719 | </ul> |
720 | 720 | |
721 | 721 | <?php return ob_get_clean(); |
@@ -727,14 +727,14 @@ discard block |
||
727 | 727 | |
728 | 728 | |
729 | 729 | // let users add custom css classes |
730 | - $custom_classes = apply_filters( 'lasso_wpimg_classes', '' ); |
|
730 | + $custom_classes = apply_filters('lasso_wpimg_classes', ''); |
|
731 | 731 | |
732 | 732 | ?> |
733 | - <ul class="lasso-component--controls <?php echo sanitize_html_class( $custom_classes );?>" contenteditable="false"> |
|
734 | - <li class="lasso-drag" title="<?php esc_attr_e( 'Move', 'lasso' );?>"></li> |
|
735 | - <li id="lasso--wpvideo-edit" class="lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li> |
|
736 | - <li class="lasso-clone" title="<?php esc_attr_e( 'Clone', 'lasso' );?>"></li> |
|
737 | - <li class="lasso-delete" title="<?php esc_attr_e( 'Delete', 'lasso' );?>"></li> |
|
733 | + <ul class="lasso-component--controls <?php echo sanitize_html_class($custom_classes); ?>" contenteditable="false"> |
|
734 | + <li class="lasso-drag" title="<?php esc_attr_e('Move', 'lasso'); ?>"></li> |
|
735 | + <li id="lasso--wpvideo-edit" class="lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li> |
|
736 | + <li class="lasso-clone" title="<?php esc_attr_e('Clone', 'lasso'); ?>"></li> |
|
737 | + <li class="lasso-delete" title="<?php esc_attr_e('Delete', 'lasso'); ?>"></li> |
|
738 | 738 | </ul> |
739 | 739 | |
740 | 740 | <?php return ob_get_clean(); |
@@ -747,16 +747,16 @@ discard block |
||
747 | 747 | */ |
748 | 748 | function lasso_map_form_footer() { |
749 | 749 | |
750 | - $nonce = wp_create_nonce( 'lasso-process-map' ); |
|
750 | + $nonce = wp_create_nonce('lasso-process-map'); |
|
751 | 751 | |
752 | 752 | ob_start(); |
753 | 753 | |
754 | 754 | ?> |
755 | 755 | <div class="lasso--map-form__footer"> |
756 | - <input type="hidden" name="postid" value="<?php echo get_the_ID();?>"> |
|
757 | - <input type="hidden" name="nonce" value="<?php echo $nonce;?>"> |
|
756 | + <input type="hidden" name="postid" value="<?php echo get_the_ID(); ?>"> |
|
757 | + <input type="hidden" name="nonce" value="<?php echo $nonce; ?>"> |
|
758 | 758 | <input type="hidden" name="action" value="process_map_save"> |
759 | - <input type="submit" class="lasso--map-form__submit" value="<?php esc_attr_e( 'Save Locations', 'lasso' );?>"> |
|
759 | + <input type="submit" class="lasso--map-form__submit" value="<?php esc_attr_e('Save Locations', 'lasso'); ?>"> |
|
760 | 760 | </div> |
761 | 761 | |
762 | 762 | <?php return ob_get_clean(); |
@@ -774,7 +774,7 @@ discard block |
||
774 | 774 | |
775 | 775 | ?> |
776 | 776 | <div id="lasso--pagerefresh" class="visible"> |
777 | - <?php _e( 'Save this post and refesh the page to see these changes.', 'lasso' );?> |
|
777 | + <?php _e('Save this post and refesh the page to see these changes.', 'lasso'); ?> |
|
778 | 778 | </div> |
779 | 779 | |
780 | 780 | <?php return ob_get_clean(); |
@@ -788,43 +788,43 @@ discard block |
||
788 | 788 | */ |
789 | 789 | function lasso_editor_options_blob() { |
790 | 790 | |
791 | - $codes = function_exists( 'aesop_shortcodes' ) ? aesop_shortcodes() : apply_filters( 'lasso_custom_options', '' ); |
|
792 | - $galleries = function_exists( 'lasso_editor_galleries_exist' ) && lasso_editor_galleries_exist() ? 'has-galleries' : 'creating-gallery'; |
|
791 | + $codes = function_exists('aesop_shortcodes') ? aesop_shortcodes() : apply_filters('lasso_custom_options', ''); |
|
792 | + $galleries = function_exists('lasso_editor_galleries_exist') && lasso_editor_galleries_exist() ? 'has-galleries' : 'creating-gallery'; |
|
793 | 793 | |
794 | - $nonce = wp_create_nonce( 'lasso_gallery' ); |
|
794 | + $nonce = wp_create_nonce('lasso_gallery'); |
|
795 | 795 | |
796 | 796 | $blob = array(); |
797 | 797 | |
798 | - if ( empty( $codes ) ) |
|
798 | + if (empty($codes)) |
|
799 | 799 | return; |
800 | 800 | |
801 | - foreach ( $codes as $slug => $shortcode ) { |
|
801 | + foreach ($codes as $slug => $shortcode) { |
|
802 | 802 | $return = ''; |
803 | 803 | // Shortcode has atts |
804 | 804 | |
805 | - if ( count( $shortcode['atts'] ) && $shortcode['atts'] ) { |
|
805 | + if (count($shortcode['atts']) && $shortcode['atts']) { |
|
806 | 806 | |
807 | - foreach ( $shortcode['atts'] as $attr_name => $attr_info ) { |
|
807 | + foreach ($shortcode['atts'] as $attr_name => $attr_info) { |
|
808 | 808 | |
809 | 809 | |
810 | - $prefix = isset( $attr_info['prefix'] ) ? sprintf( '<span class="lasso-option-prefix">%s</span>', $attr_info['prefix'] ) : null; |
|
810 | + $prefix = isset($attr_info['prefix']) ? sprintf('<span class="lasso-option-prefix">%s</span>', $attr_info['prefix']) : null; |
|
811 | 811 | |
812 | 812 | $return .= '<form id="lasso--component-settings-form" class="'.$galleries.'" method="post">'; |
813 | 813 | $return .= '<p data-option="'.$attr_name.'" class="lasso-option aesop-'.$slug.'-'.$attr_name.'">'; |
814 | - $return .= '<label for="aesop-generator-attr-' . $attr_name . '">' . $attr_info['desc'] . '</label>'; |
|
814 | + $return .= '<label for="aesop-generator-attr-'.$attr_name.'">'.$attr_info['desc'].'</label>'; |
|
815 | 815 | $return .= '<small class="lasso-option-desc">'.$attr_info['tip'].'</small>'; |
816 | 816 | // Select |
817 | 817 | |
818 | - if ( isset( $attr_info['values'] ) ) { |
|
818 | + if (isset($attr_info['values'])) { |
|
819 | 819 | |
820 | - $return .= '<select name="' . $attr_name . '" id="aesop-generator-attr-' . $attr_name . '" class="lasso-generator-attr">'; |
|
820 | + $return .= '<select name="'.$attr_name.'" id="aesop-generator-attr-'.$attr_name.'" class="lasso-generator-attr">'; |
|
821 | 821 | |
822 | - $i=0; |
|
822 | + $i = 0; |
|
823 | 823 | |
824 | - foreach ( $attr_info['values'] as $attr_value ) { |
|
824 | + foreach ($attr_info['values'] as $attr_value) { |
|
825 | 825 | $attr_value_selected = $attr_info['default'] == $attr_value ? ' selected="selected"' : ''; |
826 | 826 | |
827 | - $return .= '<option value="'.$attr_info['values'][$i]['value'].'" ' . $attr_value_selected . '>'.$attr_info['values'][$i]['name'].'</option>'; |
|
827 | + $return .= '<option value="'.$attr_info['values'][$i]['value'].'" '.$attr_value_selected.'>'.$attr_info['values'][$i]['name'].'</option>'; |
|
828 | 828 | |
829 | 829 | $i++; |
830 | 830 | } |
@@ -833,24 +833,24 @@ discard block |
||
833 | 833 | |
834 | 834 | } else { |
835 | 835 | |
836 | - $attr_field_type = isset( $attr_info['type'] ) ? $attr_info['type'] : 'text'; |
|
836 | + $attr_field_type = isset($attr_info['type']) ? $attr_info['type'] : 'text'; |
|
837 | 837 | |
838 | 838 | // image upload |
839 | - if ( 'media_upload' == $attr_info['type'] ) { |
|
839 | + if ('media_upload' == $attr_info['type']) { |
|
840 | 840 | |
841 | - $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.'" />'; |
|
841 | + $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.'" />'; |
|
842 | 842 | $return .= '<a href="#" id="lasso-upload-img" class="lasso-option-button" /></a>'; |
843 | 843 | |
844 | - } elseif ( 'color' == $attr_info['type'] ) { |
|
844 | + } elseif ('color' == $attr_info['type']) { |
|
845 | 845 | |
846 | - $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.'" />'; |
|
846 | + $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.'" />'; |
|
847 | 847 | |
848 | - } elseif ( 'text_area' == $attr_info['type'] ) { |
|
848 | + } elseif ('text_area' == $attr_info['type']) { |
|
849 | 849 | |
850 | - $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.''; |
|
850 | + $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.''; |
|
851 | 851 | |
852 | 852 | } else { |
853 | - $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.''; |
|
853 | + $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.''; |
|
854 | 854 | } |
855 | 855 | } |
856 | 856 | $return .= '</p>'; |
@@ -861,9 +861,9 @@ discard block |
||
861 | 861 | /////////////////////////// |
862 | 862 | // START GALLERY AND MAP FRONT END STUFFS |
863 | 863 | /////////////////////////// |
864 | - if ( isset( $shortcode['front'] ) && true == $shortcode['front'] ) { |
|
864 | + if (isset($shortcode['front']) && true == $shortcode['front']) { |
|
865 | 865 | |
866 | - if ( 'gallery' == $shortcode['front_type'] ) { |
|
866 | + if ('gallery' == $shortcode['front_type']) { |
|
867 | 867 | |
868 | 868 | $return .= lasso_gallery_editor_module(); |
869 | 869 | |
@@ -874,13 +874,13 @@ discard block |
||
874 | 874 | /////////////////////////// |
875 | 875 | |
876 | 876 | // Single shortcode (not closed) |
877 | - if ( 'single' == $shortcode['type'] ) { |
|
877 | + if ('single' == $shortcode['type']) { |
|
878 | 878 | |
879 | 879 | $return .= '<input type="hidden" name="lasso-generator-content" id="lasso-generator-content" value="false" />'; |
880 | 880 | |
881 | 881 | } else { |
882 | 882 | |
883 | - $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>'; |
|
883 | + $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>'; |
|
884 | 884 | } |
885 | 885 | |
886 | 886 | $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>'; |
@@ -916,14 +916,14 @@ discard block |
||
916 | 916 | <div id="lasso--loading" class="lasso--loading"><div class="lasso--loader"></div></div> |
917 | 917 | <div id="lasso--hide" style="display:none;" class="lasso--post-form"> |
918 | 918 | <i class="lasso-icon lasso-icon-move"></i> |
919 | - <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> |
|
919 | + <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> |
|
920 | 920 | <div class="lasso--slider_wrap"> |
921 | 921 | <div id="lasso--slider"></div> |
922 | 922 | </div> |
923 | 923 | <ul id="lasso--revision-list"></ul> |
924 | 924 | <div class="lasso--btn-group lasso--btn-group-small"> |
925 | - <a href="#" class="lasso--btn-secondary" id="lasso--close-modal"><?php _e( 'Cancel', 'lasso' );?></a> |
|
926 | - <a href="#" class="lasso--btn-primary" id="lasso--select-revision"><?php _e( 'Select', 'lasso' );?></a> |
|
925 | + <a href="#" class="lasso--btn-secondary" id="lasso--close-modal"><?php _e('Cancel', 'lasso'); ?></a> |
|
926 | + <a href="#" class="lasso--btn-primary" id="lasso--select-revision"><?php _e('Select', 'lasso'); ?></a> |
|
927 | 927 | </div> |
928 | 928 | </div> |
929 | 929 | |
@@ -946,7 +946,7 @@ discard block |
||
946 | 946 | // Normalize into a six character long hex string |
947 | 947 | $hex = str_replace('#', '', $hex); |
948 | 948 | if (strlen($hex) == 3) { |
949 | - $hex = str_repeat(substr($hex,0,1), 2).str_repeat(substr($hex,1,1), 2).str_repeat(substr($hex,2,1), 2); |
|
949 | + $hex = str_repeat(substr($hex, 0, 1), 2).str_repeat(substr($hex, 1, 1), 2).str_repeat(substr($hex, 2, 1), 2); |
|
950 | 950 | } |
951 | 951 | |
952 | 952 | // Split into three parts: R, G and B |
@@ -955,7 +955,7 @@ discard block |
||
955 | 955 | |
956 | 956 | foreach ($color_parts as $color) { |
957 | 957 | $color = hexdec($color); // Convert to decimal |
958 | - $color = max(0,min(255,$color + $steps)); // Adjust color |
|
958 | + $color = max(0, min(255, $color + $steps)); // Adjust color |
|
959 | 959 | $return .= str_pad(dechex($color), 2, '0', STR_PAD_LEFT); // Make two char hex code |
960 | 960 | } |
961 | 961 |