@@ -11,20 +11,20 @@ discard block |
||
11 | 11 | |
12 | 12 | ob_start(); |
13 | 13 | |
14 | - if ( $galleries ) { ?> |
|
14 | + if ($galleries) { ?> |
|
15 | 15 | |
16 | 16 | <div class="ase-gallery-opts ase-gallery-opts--edit-gallery" > |
17 | 17 | <div class="ase-gallery-opts--single lasso-option"> |
18 | 18 | |
19 | - <label><?php _e( 'Manage Images', 'lasso' );?> |
|
20 | - <a href="#" id="ase-gallery-add-image" class="lasso-editor-tiny-btn" title="<?php esc_attr_e( 'Add Images', 'lasso' );?>"><i class="lasso-icon-pencil"></i></a> |
|
19 | + <label><?php _e('Manage Images', 'lasso'); ?> |
|
20 | + <a href="#" id="ase-gallery-add-image" class="lasso-editor-tiny-btn" title="<?php esc_attr_e('Add Images', 'lasso'); ?>"><i class="lasso-icon-pencil"></i></a> |
|
21 | 21 | |
22 | - <?php if ( lasso_user_can( 'publish_posts' ) ): ?> |
|
23 | - <a href="#" id="lasso--gallery__create" class="lasso-editor-tiny-btn" title="<?php esc_attr_e( 'Create Gallery', 'lasso' );?>"><i class="lasso-icon-plus"></i></a> |
|
22 | + <?php if (lasso_user_can('publish_posts')): ?> |
|
23 | + <a href="#" id="lasso--gallery__create" class="lasso-editor-tiny-btn" title="<?php esc_attr_e('Create Gallery', 'lasso'); ?>"><i class="lasso-icon-plus"></i></a> |
|
24 | 24 | <?php endif; ?> |
25 | 25 | |
26 | 26 | </label> |
27 | - <small class="lasso-option-desc"><?php _e( 'Rearrange or edit the images in this gallery.', 'lasso' );?></small> |
|
27 | + <small class="lasso-option-desc"><?php _e('Rearrange or edit the images in this gallery.', 'lasso'); ?></small> |
|
28 | 28 | |
29 | 29 | <div id="lasso--gallery__images"><span class="lasso-icon-spinner6"></span></div> |
30 | 30 | |
@@ -34,20 +34,20 @@ discard block |
||
34 | 34 | |
35 | 35 | <?php } |
36 | 36 | |
37 | - if ( lasso_user_can( 'publish_posts' ) ): ?> |
|
37 | + if (lasso_user_can('publish_posts')): ?> |
|
38 | 38 | |
39 | 39 | <div class="ase-gallery-opts ase-gallery-opts--create-gallery" > |
40 | 40 | |
41 | 41 | <div class="ase-gallery-opts--single lasso-option"> |
42 | 42 | |
43 | - <label><?php _e( 'Create a Gallery', 'lasso' );?></label> |
|
44 | - <small class="lasso-option-desc"><?php _e( 'Select images to create a gallery.', 'lasso' );?></small> |
|
43 | + <label><?php _e('Create a Gallery', 'lasso'); ?></label> |
|
44 | + <small class="lasso-option-desc"><?php _e('Select images to create a gallery.', 'lasso'); ?></small> |
|
45 | 45 | |
46 | - <a href="#" class="editor-btn-secondary" id="lasso--gallery__selectImages"><?php _e( 'Select Images', 'lasso' );?></a> |
|
46 | + <a href="#" class="editor-btn-secondary" id="lasso--gallery__selectImages"><?php _e('Select Images', 'lasso'); ?></a> |
|
47 | 47 | |
48 | 48 | <div id="ase-gallery-images"></div> |
49 | 49 | |
50 | - <a style="display:none;" class="editor-btn-secondary" data-post-title="<?php echo esc_attr( strtolower( the_title_attribute() ) );?>" id="lasso--gallery__save" href="#"><?php _e( 'Create Gallery', 'lasso' );?></a> |
|
50 | + <a style="display:none;" class="editor-btn-secondary" data-post-title="<?php echo esc_attr(strtolower(the_title_attribute())); ?>" id="lasso--gallery__save" href="#"><?php _e('Create Gallery', 'lasso'); ?></a> |
|
51 | 51 | |
52 | 52 | </div> |
53 | 53 | |
@@ -58,14 +58,14 @@ discard block |
||
58 | 58 | <!-- Gallery Layout/Type Chooser --> |
59 | 59 | <div class="ase-gallery-opts ase-gallery-opts--type" > |
60 | 60 | <div data-option="gallery-type" class="ase-gallery-opts--single lasso-option"> |
61 | - <label><?php _e( 'Gallery Type', 'lasso' );?></label> |
|
62 | - <small class="lasso-option-desc"><?php _e( 'Select the type of gallery.', 'lasso' );?></small> |
|
61 | + <label><?php _e('Gallery Type', 'lasso'); ?></label> |
|
62 | + <small class="lasso-option-desc"><?php _e('Select the type of gallery.', 'lasso'); ?></small> |
|
63 | 63 | <fieldset> |
64 | - <label for="lasso_gallery_type" class="ase-gallery-layout-label"><input class="lasso-generator-attr ase-gallery-type-radio" type="radio" name="lasso_gallery_type" value="grid"><?php _e( 'Grid', 'lasso' );?></label> |
|
65 | - <label for="lasso_gallery_type" class="ase-gallery-layout-label"><input class="lasso-generator-attr ase-gallery-type-radio" type="radio" name="lasso_gallery_type" value="thumbnail"><?php _e( 'Thumbnail', 'lasso' );?></label> |
|
64 | + <label for="lasso_gallery_type" class="ase-gallery-layout-label"><input class="lasso-generator-attr ase-gallery-type-radio" type="radio" name="lasso_gallery_type" value="grid"><?php _e('Grid', 'lasso'); ?></label> |
|
65 | + <label for="lasso_gallery_type" class="ase-gallery-layout-label"><input class="lasso-generator-attr ase-gallery-type-radio" type="radio" name="lasso_gallery_type" value="thumbnail"><?php _e('Thumbnail', 'lasso'); ?></label> |
|
66 | 66 | <label for="lasso_gallery_type" class="ase-gallery-layout-label"><input class="lasso-generator-attr ase-gallery-type-radio" type="radio" name="lasso_gallery_type" value="sequence">Sequence</label> |
67 | - <label for="lasso_gallery_type" class="ase-gallery-layout-label"><input class="lasso-generator-attr ase-gallery-type-radio" type="radio" name="lasso_gallery_type" value="photoset"><?php _e( 'Photoset', 'lasso' );?></label> |
|
68 | - <label for="lasso_gallery_type" class="ase-gallery-layout-label"><input class="lasso-generator-attr ase-gallery-type-radio" type="radio" name="lasso_gallery_type" value="stacked"><?php _e( 'Parallax', 'lasso' );?></label> |
|
67 | + <label for="lasso_gallery_type" class="ase-gallery-layout-label"><input class="lasso-generator-attr ase-gallery-type-radio" type="radio" name="lasso_gallery_type" value="photoset"><?php _e('Photoset', 'lasso'); ?></label> |
|
68 | + <label for="lasso_gallery_type" class="ase-gallery-layout-label"><input class="lasso-generator-attr ase-gallery-type-radio" type="radio" name="lasso_gallery_type" value="stacked"><?php _e('Parallax', 'lasso'); ?></label> |
|
69 | 69 | </fieldset> |
70 | 70 | </div> |
71 | 71 | </div> |
@@ -74,8 +74,8 @@ discard block |
||
74 | 74 | <div class="ase-gallery-opts ase-gallery-opts--grid" style="display:none;"> |
75 | 75 | |
76 | 76 | <div data-option="itemwidth" class="ase-gallery-opts--single lasso-option"> |
77 | - <label for="lasso_grid_gallery_width"><?php _e( 'Grid Item Width', 'lasso' );?></label> |
|
78 | - <small class="lasso-option-desc"><?php _e( 'Adjust the width of the individual grid items, only if using Grid gallery style. Default is 400.', 'lasso' );?></small> |
|
77 | + <label for="lasso_grid_gallery_width"><?php _e('Grid Item Width', 'lasso'); ?></label> |
|
78 | + <small class="lasso-option-desc"><?php _e('Adjust the width of the individual grid items, only if using Grid gallery style. Default is 400.', 'lasso'); ?></small> |
|
79 | 79 | <input type="text_small" class="lasso-generator-attr" name="lasso_grid_gallery_width" value=""> |
80 | 80 | </div> |
81 | 81 | |
@@ -85,24 +85,24 @@ discard block |
||
85 | 85 | <div class="ase-gallery-opts ase-gallery-opts--thumb" style="display:none;"> |
86 | 86 | |
87 | 87 | <div data-option="transition" class="ase-gallery-opts--single lasso-option"> |
88 | - <label for="lasso_thumb_gallery_transition"><?php _e( 'Gallery Transition', 'lasso' );?></label> |
|
89 | - <small class="lasso-option-desc"><?php _e( 'Adjust the transition effect for the Thumbnail gallery. Default is slide.', 'lasso' );?></small> |
|
88 | + <label for="lasso_thumb_gallery_transition"><?php _e('Gallery Transition', 'lasso'); ?></label> |
|
89 | + <small class="lasso-option-desc"><?php _e('Adjust the transition effect for the Thumbnail gallery. Default is slide.', 'lasso'); ?></small> |
|
90 | 90 | <select name="lasso_thumb_gallery_transition" class="lasso-generator-attr"> |
91 | - <option value="crossfade"><?php _e( 'Fade', 'lasso' );?></option> |
|
92 | - <option value="slide"><?php _e( 'Slide', 'lasso' );?></option> |
|
93 | - <option value="dissolve"><?php _e( 'Dissolve', 'lasso' );?></option> |
|
91 | + <option value="crossfade"><?php _e('Fade', 'lasso'); ?></option> |
|
92 | + <option value="slide"><?php _e('Slide', 'lasso'); ?></option> |
|
93 | + <option value="dissolve"><?php _e('Dissolve', 'lasso'); ?></option> |
|
94 | 94 | </select> |
95 | 95 | </div> |
96 | 96 | |
97 | 97 | <div data-option="speed" class="ase-gallery-opts--single lasso-option"> |
98 | - <label for="lasso_thumb_gallery_transition_speed"><?php _e( 'Gallery Transition Speed', 'lasso' );?></label> |
|
99 | - <small class="lasso-option-desc"><?php _e( 'Activate slideshow by setting a speed for the transition.5000 = 5 seconds.', 'lasso' );?></small> |
|
98 | + <label for="lasso_thumb_gallery_transition_speed"><?php _e('Gallery Transition Speed', 'lasso'); ?></label> |
|
99 | + <small class="lasso-option-desc"><?php _e('Activate slideshow by setting a speed for the transition.5000 = 5 seconds.', 'lasso'); ?></small> |
|
100 | 100 | <input type="text" class="lasso-generator-attr" name="lasso_thumb_gallery_transition_speed" value=""> |
101 | 101 | </div> |
102 | 102 | |
103 | 103 | <div data-option="hide-thumbs" class="ase-gallery-opts--single lasso-option"> |
104 | 104 | <input class="lasso-generator-attr" type="checkbox" name="lasso_thumb_gallery_hide_thumbs"> |
105 | - <label for="lasso_thumb_gallery_hide_thumbs"><?php _e( 'Hide Gallery Thumbnails', 'lasso' );?></label> |
|
105 | + <label for="lasso_thumb_gallery_hide_thumbs"><?php _e('Hide Gallery Thumbnails', 'lasso'); ?></label> |
|
106 | 106 | </div> |
107 | 107 | |
108 | 108 | </div> |
@@ -111,14 +111,14 @@ discard block |
||
111 | 111 | <div class="ase-gallery-opts ase-gallery-opts--photoset" style="display:none;"> |
112 | 112 | |
113 | 113 | <div data-option="pslayout" class="ase-gallery-opts--single lasso-option"> |
114 | - <label for="lasso-photoset-gallery-layout"><?php _e( 'Gallery Layout', 'lasso' );?></label> |
|
115 | - <small class="lasso-option-desc"><?php _e( 'Let\'s say you have 4 images in this gallery. If you enter 121 you will have one image on the top row, two images on the second row, and one image on the third row.', 'lasso' );?></small> |
|
114 | + <label for="lasso-photoset-gallery-layout"><?php _e('Gallery Layout', 'lasso'); ?></label> |
|
115 | + <small class="lasso-option-desc"><?php _e('Let\'s say you have 4 images in this gallery. If you enter 121 you will have one image on the top row, two images on the second row, and one image on the third row.', 'lasso'); ?></small> |
|
116 | 116 | <input type="text" class="lasso-generator-attr" name="lasso_photoset_gallery_layout" value=""> |
117 | 117 | </div> |
118 | 118 | |
119 | 119 | <div data-option="pslightbox" class="ase-gallery-opts--single lasso-option"> |
120 | 120 | <input type="checkbox" class="lasso-generator-attr" name="lasso_photoset_gallery_lightbox"> |
121 | - <label for="lasso_photoset_gallery_lightbox"><?php _e( 'Enable Lightbox', 'lasso' );?></label> |
|
121 | + <label for="lasso_photoset_gallery_lightbox"><?php _e('Enable Lightbox', 'lasso'); ?></label> |
|
122 | 122 | </div> |
123 | 123 | |
124 | 124 | </div> |
@@ -127,13 +127,13 @@ discard block |
||
127 | 127 | <div class="ase-gallery-opts ase-gallery-opts--global"> |
128 | 128 | |
129 | 129 | <div data-option="width" class="ase-gallery-opts--single lasso-option"> |
130 | - <label for="lasso_gallery_width"><?php _e( 'Main Gallery Width', 'lasso' );?></label> |
|
131 | - <small class="lasso-option-desc"><?php _e( 'Adjust the overall width of the grid/thumbnail gallery. Acceptable values include 500px or 50%.', 'lasso' );?></small> |
|
130 | + <label for="lasso_gallery_width"><?php _e('Main Gallery Width', 'lasso'); ?></label> |
|
131 | + <small class="lasso-option-desc"><?php _e('Adjust the overall width of the grid/thumbnail gallery. Acceptable values include 500px or 50%.', 'lasso'); ?></small> |
|
132 | 132 | <input type="text_small" class="lasso-generator-attr" name="lasso_gallery_width" value=""> |
133 | 133 | </div> |
134 | 134 | <div data-option="caption" class="ase-gallery-opts--single lasso-option"> |
135 | - <label for="lasso_gallery_caption"><?php _e( 'Gallery Caption', 'lasso' );?></label> |
|
136 | - <small class="lasso-option-desc"><?php _e( 'Add an optional caption for the gallery.', 'lasso' );?></small> |
|
135 | + <label for="lasso_gallery_caption"><?php _e('Gallery Caption', 'lasso'); ?></label> |
|
136 | + <small class="lasso-option-desc"><?php _e('Add an optional caption for the gallery.', 'lasso'); ?></small> |
|
137 | 137 | <textarea name="lasso_gallery_caption" class="lasso-generator-attr"></textarea> |
138 | 138 | </div> |
139 | 139 |
@@ -12,32 +12,32 @@ discard block |
||
12 | 12 | * |
13 | 13 | * @since 1.0 |
14 | 14 | */ |
15 | -add_action( 'wp_footer', 'lasso_editor_controls' ); |
|
15 | +add_action('wp_footer', 'lasso_editor_controls'); |
|
16 | 16 | function lasso_editor_controls() { |
17 | 17 | |
18 | 18 | global $post; |
19 | 19 | |
20 | - if ( lasso_user_can('edit_posts') ) { |
|
20 | + if (lasso_user_can('edit_posts')) { |
|
21 | 21 | |
22 | - $status = get_post_status( get_the_ID() ); |
|
22 | + $status = get_post_status(get_the_ID()); |
|
23 | 23 | |
24 | 24 | // let users add custom css classes |
25 | - $custom_classes = apply_filters( 'lasso_control_classes', '' ); |
|
25 | + $custom_classes = apply_filters('lasso_control_classes', ''); |
|
26 | 26 | |
27 | 27 | $post_access_class = ''; |
28 | - $post_new_disabled = lasso_editor_get_option( 'post_adding_disabled', 'lasso_editor' ); |
|
29 | - $post_settings_disabled = lasso_editor_get_option( 'post_settings_disabled', 'lasso_editor' ); |
|
30 | - $shortcodify_disabled = lasso_editor_get_option( 'shortcodify_disabled', 'lasso_editor' ); |
|
28 | + $post_new_disabled = lasso_editor_get_option('post_adding_disabled', 'lasso_editor'); |
|
29 | + $post_settings_disabled = lasso_editor_get_option('post_settings_disabled', 'lasso_editor'); |
|
30 | + $shortcodify_disabled = lasso_editor_get_option('shortcodify_disabled', 'lasso_editor'); |
|
31 | 31 | |
32 | 32 | |
33 | 33 | // CSS class if adding new post objects is disabled |
34 | - if ( 'on' == $post_new_disabled ) { $post_access_class = 'lasso--post-new-disabled'; } |
|
34 | + if ('on' == $post_new_disabled) { $post_access_class = 'lasso--post-new-disabled'; } |
|
35 | 35 | |
36 | 36 | // CSS class if adjust settings is disabled |
37 | - if ( 'on' == $post_settings_disabled ) { $post_access_class = 'lasso--post-settings-disabled'; } |
|
37 | + if ('on' == $post_settings_disabled) { $post_access_class = 'lasso--post-settings-disabled'; } |
|
38 | 38 | |
39 | 39 | // CSS class if adding new post objects AND settings are disabled |
40 | - if ( 'on' == $post_new_disabled && 'on' == $post_settings_disabled ) { $post_access_class = 'lasso--post-all-disabled'; } |
|
40 | + if ('on' == $post_new_disabled && 'on' == $post_settings_disabled) { $post_access_class = 'lasso--post-all-disabled'; } |
|
41 | 41 | |
42 | 42 | // CSS class if shortcodify or (Aesop Shortcode Conversion) is disabled |
43 | 43 | $sc_saving_class = 'on' == $shortcodify_disabled ? 'shortcodify-disabled' : 'shortcodify-enabled'; |
@@ -45,44 +45,44 @@ discard block |
||
45 | 45 | // user is capable |
46 | 46 | $is_capable = is_singular() && lasso_user_can('edit_post'); |
47 | 47 | |
48 | - ?><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();?>" > |
|
48 | + ?><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(); ?>" > |
|
49 | 49 | |
50 | - <ul class="lasso--controls__center lasso-editor-controls lasso-editor-controls--wrap <?php echo $post_access_class;?> "> |
|
50 | + <ul class="lasso--controls__center lasso-editor-controls lasso-editor-controls--wrap <?php echo $post_access_class; ?> "> |
|
51 | 51 | |
52 | - <?php do_action( 'lasso_editor_controls_before' ); |
|
52 | + <?php do_action('lasso_editor_controls_before'); |
|
53 | 53 | |
54 | - if ( $is_capable ) { ?> |
|
54 | + if ($is_capable) { ?> |
|
55 | 55 | |
56 | - <li id="lasso--edit" title="<?php esc_attr_e( 'Edit Post', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li> |
|
56 | + <li id="lasso--edit" title="<?php esc_attr_e('Edit Post', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li> |
|
57 | 57 | |
58 | - <?php if ( 'off' == $post_settings_disabled || empty( $post_settings_disabled ) ) { ?> |
|
59 | - <li id="lasso--post-settings" title="<?php esc_attr_e( 'Post Settings', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li> |
|
58 | + <?php if ('off' == $post_settings_disabled || empty($post_settings_disabled)) { ?> |
|
59 | + <li id="lasso--post-settings" title="<?php esc_attr_e('Post Settings', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li> |
|
60 | 60 | <?php } |
61 | 61 | |
62 | 62 | } ?> |
63 | 63 | |
64 | - <li id="lasso--post-all" title="<?php esc_attr_e( 'All Posts', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li> |
|
64 | + <li id="lasso--post-all" title="<?php esc_attr_e('All Posts', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li> |
|
65 | 65 | |
66 | - <?php if ( $is_capable && wp_revisions_enabled( $post ) ) { ?> |
|
67 | - <li id="lasso--post-revisions" title="<?php esc_attr_e( 'Revisions', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li> |
|
66 | + <?php if ($is_capable && wp_revisions_enabled($post)) { ?> |
|
67 | + <li id="lasso--post-revisions" title="<?php esc_attr_e('Revisions', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li> |
|
68 | 68 | <?php } ?> |
69 | 69 | |
70 | - <?php if ( ( 'off' == $post_new_disabled || empty( $post_new_disabled ) && lasso_user_can('publish_posts') ) ) { ?> |
|
71 | - <li id="lasso--post-new" title="<?php esc_attr_e( 'Add Post', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li> |
|
70 | + <?php if (('off' == $post_new_disabled || empty($post_new_disabled) && lasso_user_can('publish_posts'))) { ?> |
|
71 | + <li id="lasso--post-new" title="<?php esc_attr_e('Add Post', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li> |
|
72 | 72 | <?php } ?> |
73 | 73 | |
74 | - <?php do_action( 'lasso_editor_controls_after' );?> |
|
74 | + <?php do_action('lasso_editor_controls_after'); ?> |
|
75 | 75 | |
76 | 76 | </ul> |
77 | 77 | |
78 | - <?php if ( is_singular() ) { ?> |
|
78 | + <?php if (is_singular()) { ?> |
|
79 | 79 | |
80 | 80 | <div class="lasso--controls__right"> |
81 | 81 | |
82 | - <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> |
|
82 | + <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> |
|
83 | 83 | |
84 | - <?php if ( 'draft' == $status && ( lasso_user_can('publish_posts') || lasso_user_can('publish_pages') ) ) { ?> |
|
85 | - <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> |
|
84 | + <?php if ('draft' == $status && (lasso_user_can('publish_posts') || lasso_user_can('publish_pages'))) { ?> |
|
85 | + <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> |
|
86 | 86 | <?php } ?> |
87 | 87 | |
88 | 88 | </div> |
@@ -105,13 +105,13 @@ discard block |
||
105 | 105 | |
106 | 106 | ob_start(); |
107 | 107 | |
108 | - if ( !lasso_user_can() ) |
|
108 | + if (!lasso_user_can()) |
|
109 | 109 | return; |
110 | 110 | |
111 | 111 | // let users add custom css classes |
112 | - $custom_classes = apply_filters( 'lasso_sidebar_classes', '' ); |
|
112 | + $custom_classes = apply_filters('lasso_sidebar_classes', ''); |
|
113 | 113 | ?> |
114 | - <div id="lasso--sidebar" class="<?php echo sanitize_html_class( $custom_classes );?>" > |
|
114 | + <div id="lasso--sidebar" class="<?php echo sanitize_html_class($custom_classes); ?>" > |
|
115 | 115 | <div class="lasso--sidebar__inner"> |
116 | 116 | <div id="lasso--component__settings"></div> |
117 | 117 | </div> |
@@ -129,77 +129,77 @@ discard block |
||
129 | 129 | |
130 | 130 | ob_start(); |
131 | 131 | |
132 | - if ( !lasso_user_can() ) |
|
132 | + if (!lasso_user_can()) |
|
133 | 133 | return; |
134 | 134 | |
135 | 135 | // check for lasso story engine and add a class doniting this |
136 | - $ase_status = class_exists( 'Aesop_Core' ) || defined( 'LASSO_CUSTOM' ) ? 'ase-active' : 'ase-not-active'; |
|
136 | + $ase_status = class_exists('Aesop_Core') || defined('LASSO_CUSTOM') ? 'ase-active' : 'ase-not-active'; |
|
137 | 137 | |
138 | 138 | // let users add custom css classes |
139 | - $custom_classes = apply_filters( 'lasso_toolbar_classes', '' ); |
|
139 | + $custom_classes = apply_filters('lasso_toolbar_classes', ''); |
|
140 | 140 | |
141 | 141 | // are toolbar headings enabled |
142 | - $toolbar_headings = lasso_editor_get_option( 'toolbar_headings', 'lasso_editor' ); |
|
142 | + $toolbar_headings = lasso_editor_get_option('toolbar_headings', 'lasso_editor'); |
|
143 | 143 | |
144 | - $toolbar_class = $toolbar_headings ? 'toolbar-extended' : false; |
|
144 | + $toolbar_class = $toolbar_headings ? 'toolbar-extended' : false; |
|
145 | 145 | |
146 | 146 | ?> |
147 | - <div class="lasso--toolbar_wrap lasso-editor-controls--wrap <?php echo $toolbar_class.' '.$ase_status.' '.sanitize_html_class( $custom_classes );?>"> |
|
147 | + <div class="lasso--toolbar_wrap lasso-editor-controls--wrap <?php echo $toolbar_class.' '.$ase_status.' '.sanitize_html_class($custom_classes); ?>"> |
|
148 | 148 | <ul class="lasso--toolbar__inner lasso-editor-controls"> |
149 | - <?php do_action( 'lasso_toolbar_components_before' );?> |
|
150 | - <li id="lasso-toolbar--bold" title="<?php esc_attr_e( 'Bold', 'lasso' );?>"></li> |
|
151 | - <li id="lasso-toolbar--underline" title="<?php esc_attr_e( 'Underline', 'lasso' );?>"></li> |
|
152 | - <li id="lasso-toolbar--italic" title="<?php esc_attr_e( 'Italicize', 'lasso' );?>"></li> |
|
153 | - <li id="lasso-toolbar--strike" title="<?php esc_attr_e( 'Strikethrough', 'lasso' );?>"></li> |
|
154 | - <?php if ( $toolbar_headings ): ?> |
|
155 | - <li id="lasso-toolbar--h2" title="<?php esc_attr_e( 'H2 Heading', 'lasso' );?>"></li> |
|
156 | - <li id="lasso-toolbar--h3" title="<?php esc_attr_e( 'H3 Heading', 'lasso' );?>"></li> |
|
149 | + <?php do_action('lasso_toolbar_components_before'); ?> |
|
150 | + <li id="lasso-toolbar--bold" title="<?php esc_attr_e('Bold', 'lasso'); ?>"></li> |
|
151 | + <li id="lasso-toolbar--underline" title="<?php esc_attr_e('Underline', 'lasso'); ?>"></li> |
|
152 | + <li id="lasso-toolbar--italic" title="<?php esc_attr_e('Italicize', 'lasso'); ?>"></li> |
|
153 | + <li id="lasso-toolbar--strike" title="<?php esc_attr_e('Strikethrough', 'lasso'); ?>"></li> |
|
154 | + <?php if ($toolbar_headings): ?> |
|
155 | + <li id="lasso-toolbar--h2" title="<?php esc_attr_e('H2 Heading', 'lasso'); ?>"></li> |
|
156 | + <li id="lasso-toolbar--h3" title="<?php esc_attr_e('H3 Heading', 'lasso'); ?>"></li> |
|
157 | 157 | <?php endif; ?> |
158 | - <li id="lasso-toolbar--link" title="<?php esc_attr_e( 'Anchor Link', 'lasso' );?>"> |
|
158 | + <li id="lasso-toolbar--link" title="<?php esc_attr_e('Anchor Link', 'lasso'); ?>"> |
|
159 | 159 | <div id="lasso-toolbar--link__wrap"> |
160 | - <div id="lasso-toolbar--link__inner" contenteditable="true" placeholder="<?php esc_attr_e( 'http://url.com', 'lasso' );?>"></div> |
|
161 | - <a href="#" title="<?php esc_attr_e( 'Create Link', 'lasso' );?>" class="lasso-toolbar--link__control" id="lasso-toolbar--link__create" ></a> |
|
160 | + <div id="lasso-toolbar--link__inner" contenteditable="true" placeholder="<?php esc_attr_e('http://url.com', 'lasso'); ?>"></div> |
|
161 | + <a href="#" title="<?php esc_attr_e('Create Link', 'lasso'); ?>" class="lasso-toolbar--link__control" id="lasso-toolbar--link__create" ></a> |
|
162 | 162 | </div> |
163 | 163 | </li> |
164 | - <?php do_action( 'lasso_toolbar_components_after' );?> |
|
165 | - <li id="lasso-toolbar--html" title="<?php esc_attr_e( 'Insert HTML', 'lasso' );?>"> |
|
164 | + <?php do_action('lasso_toolbar_components_after'); ?> |
|
165 | + <li id="lasso-toolbar--html" title="<?php esc_attr_e('Insert HTML', 'lasso'); ?>"> |
|
166 | 166 | <div id="lasso-toolbar--html__wrap"> |
167 | - <div id="lasso-toolbar--html__inner" contenteditable="true" placeholder="<?php esc_attr_e( 'Enter HTML to insert', 'lasso' );?>"></div> |
|
167 | + <div id="lasso-toolbar--html__inner" contenteditable="true" placeholder="<?php esc_attr_e('Enter HTML to insert', 'lasso'); ?>"></div> |
|
168 | 168 | <div id="lasso-toolbar--html__footer"> |
169 | 169 | <ul class="lasso-toolbar--html-snips"> |
170 | - <?php if ( !$toolbar_headings ): ?> |
|
171 | - <li id="lasso-html--h2" title="<?php esc_attr_e( 'H2 Heading', 'lasso' );?>"> |
|
172 | - <li id="lasso-html--h3" title="<?php esc_attr_e( 'H3 Heading', 'lasso' );?>"> |
|
170 | + <?php if (!$toolbar_headings): ?> |
|
171 | + <li id="lasso-html--h2" title="<?php esc_attr_e('H2 Heading', 'lasso'); ?>"> |
|
172 | + <li id="lasso-html--h3" title="<?php esc_attr_e('H3 Heading', 'lasso'); ?>"> |
|
173 | 173 | <?php endif; ?> |
174 | - <li id="lasso-html--ul" title="<?php esc_attr_e( 'Unordered List', 'lasso' );?>"> |
|
175 | - <li id="lasso-html--ol" title="<?php esc_attr_e( 'Ordered List', 'lasso' );?>"> |
|
174 | + <li id="lasso-html--ul" title="<?php esc_attr_e('Unordered List', 'lasso'); ?>"> |
|
175 | + <li id="lasso-html--ol" title="<?php esc_attr_e('Ordered List', 'lasso'); ?>"> |
|
176 | 176 | </ul> |
177 | - <a class="lasso-toolbar--html__control lasso-toolbar--html__cancel" href="#"><?php _e( 'Cancel', 'lasso' );?></a> |
|
178 | - <a href="#" title="<?php esc_attr_e( 'Insert HTML', 'lasso' );?>" class="lasso-toolbar--html__control" id="lasso-toolbar--html__insert" ><?php _e( 'Insert', 'lasso' );?></a> |
|
177 | + <a class="lasso-toolbar--html__control lasso-toolbar--html__cancel" href="#"><?php _e('Cancel', 'lasso'); ?></a> |
|
178 | + <a href="#" title="<?php esc_attr_e('Insert HTML', 'lasso'); ?>" class="lasso-toolbar--html__control" id="lasso-toolbar--html__insert" ><?php _e('Insert', 'lasso'); ?></a> |
|
179 | 179 | </div> |
180 | 180 | </div> |
181 | 181 | </li> |
182 | - <li id="lasso-toolbar--components" title="<?php esc_attr_e( 'Insert Component', 'lasso' );?>"> |
|
182 | + <li id="lasso-toolbar--components" title="<?php esc_attr_e('Insert Component', 'lasso'); ?>"> |
|
183 | 183 | <ul id="lasso-toolbar--components__list"> |
184 | - <?php if ( 'ase-active' == $ase_status ): ?> |
|
185 | - <li data-type="image" title="<?php esc_attr_e( 'Image', 'lasso' );?>" class="lasso-toolbar--component__image"></li> |
|
186 | - <li data-type="character" title="<?php esc_attr_e( 'Character', 'lasso' );?>" class="lasso-toolbar--component__character"></li> |
|
187 | - <li data-type="quote" title="<?php esc_attr_e( 'Quote', 'lasso' );?>" class="lasso-toolbar--component__quote"></li> |
|
188 | - <li data-type="content" title="<?php esc_attr_e( 'Content', 'lasso' );?>" class="lasso-toolbar--component__content"></li> |
|
189 | - <li data-type="chapter" title="<?php esc_attr_e( 'Chapter', 'lasso' );?>" class="lasso-toolbar--component__chapter"></li> |
|
190 | - <li data-type="parallax" title="<?php esc_attr_e( 'Parallax', 'lasso' );?>" class="lasso-toolbar--component__parallax"></li> |
|
191 | - <li data-type="audio" title="<?php esc_attr_e( 'Audio', 'lasso' );?>" class="lasso-toolbar--component__audio"></li> |
|
192 | - <li data-type="video" title="<?php esc_attr_e( 'Video', 'lasso' );?>" class="lasso-toolbar--component__video"></li> |
|
193 | - <li data-type="map" title="<?php esc_attr_e( 'Map', 'lasso' );?>" class="lasso-toolbar--component__map"></li> |
|
194 | - <li data-type="timeline_stop" title="<?php esc_attr_e( 'Timeline', 'lasso' );?>" class="lasso-toolbar--component__timeline"></li> |
|
195 | - <li data-type="document" title="<?php esc_attr_e( 'Document', 'lasso' );?>" class="lasso-toolbar--component__document"></li> |
|
196 | - <li data-type="collection" title="<?php esc_attr_e( 'Collection', 'lasso' );?>" class="lasso-toolbar--component__collection"></li> |
|
197 | - <li data-type="gallery" title="<?php esc_attr_e( 'Gallery', 'lasso' );?>" class="lasso-toolbar--component__gallery"></li> |
|
184 | + <?php if ('ase-active' == $ase_status): ?> |
|
185 | + <li data-type="image" title="<?php esc_attr_e('Image', 'lasso'); ?>" class="lasso-toolbar--component__image"></li> |
|
186 | + <li data-type="character" title="<?php esc_attr_e('Character', 'lasso'); ?>" class="lasso-toolbar--component__character"></li> |
|
187 | + <li data-type="quote" title="<?php esc_attr_e('Quote', 'lasso'); ?>" class="lasso-toolbar--component__quote"></li> |
|
188 | + <li data-type="content" title="<?php esc_attr_e('Content', 'lasso'); ?>" class="lasso-toolbar--component__content"></li> |
|
189 | + <li data-type="chapter" title="<?php esc_attr_e('Chapter', 'lasso'); ?>" class="lasso-toolbar--component__chapter"></li> |
|
190 | + <li data-type="parallax" title="<?php esc_attr_e('Parallax', 'lasso'); ?>" class="lasso-toolbar--component__parallax"></li> |
|
191 | + <li data-type="audio" title="<?php esc_attr_e('Audio', 'lasso'); ?>" class="lasso-toolbar--component__audio"></li> |
|
192 | + <li data-type="video" title="<?php esc_attr_e('Video', 'lasso'); ?>" class="lasso-toolbar--component__video"></li> |
|
193 | + <li data-type="map" title="<?php esc_attr_e('Map', 'lasso'); ?>" class="lasso-toolbar--component__map"></li> |
|
194 | + <li data-type="timeline_stop" title="<?php esc_attr_e('Timeline', 'lasso'); ?>" class="lasso-toolbar--component__timeline"></li> |
|
195 | + <li data-type="document" title="<?php esc_attr_e('Document', 'lasso'); ?>" class="lasso-toolbar--component__document"></li> |
|
196 | + <li data-type="collection" title="<?php esc_attr_e('Collection', 'lasso'); ?>" class="lasso-toolbar--component__collection"></li> |
|
197 | + <li data-type="gallery" title="<?php esc_attr_e('Gallery', 'lasso'); ?>" class="lasso-toolbar--component__gallery"></li> |
|
198 | 198 | <?php else: ?> |
199 | - <li data-type="wpimg" title="<?php esc_attr_e( 'WordPress Image', 'lasso' );?>" class="image lasso-toolbar--component__image"></li> |
|
200 | - <li data-type="wpquote" title="<?php esc_attr_e( 'WordPress Quote', 'lasso' );?>" class="quote lasso-toolbar--component__quote"></li> |
|
199 | + <li data-type="wpimg" title="<?php esc_attr_e('WordPress Image', 'lasso'); ?>" class="image lasso-toolbar--component__image"></li> |
|
200 | + <li data-type="wpquote" title="<?php esc_attr_e('WordPress Quote', 'lasso'); ?>" class="quote lasso-toolbar--component__quote"></li> |
|
201 | 201 | <?php endif; ?> |
202 | - <?php do_action( 'lasso_toolbar_components' );?> |
|
202 | + <?php do_action('lasso_toolbar_components'); ?> |
|
203 | 203 | </ul> |
204 | 204 | </li> |
205 | 205 | </ul> |
@@ -215,22 +215,22 @@ discard block |
||
215 | 215 | */ |
216 | 216 | function lasso_editor_settings_toolbar() { |
217 | 217 | |
218 | - $delete_nonce = wp_create_nonce( 'lasso-delete-nonce' ); |
|
218 | + $delete_nonce = wp_create_nonce('lasso-delete-nonce'); |
|
219 | 219 | |
220 | 220 | ob_start(); |
221 | 221 | |
222 | - if ( !lasso_user_can() ) |
|
222 | + if (!lasso_user_can()) |
|
223 | 223 | return; |
224 | 224 | |
225 | 225 | // let users add custom css classes |
226 | - $custom_classes = apply_filters( 'lasso_component_classes', '' ); |
|
226 | + $custom_classes = apply_filters('lasso_component_classes', ''); |
|
227 | 227 | |
228 | 228 | ?> |
229 | - <ul class="lasso-component--controls <?php echo sanitize_html_class( $custom_classes );?>" contenteditable="false"> |
|
230 | - <li class="lasso-drag" title="<?php esc_attr_e( 'Move', 'lasso' );?>"></li> |
|
231 | - <li id="lasso-component--settings__trigger" class="lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li> |
|
232 | - <li class="lasso-clone" title="<?php esc_attr_e( 'Clone', 'lasso' );?>"></li> |
|
233 | - <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> |
|
229 | + <ul class="lasso-component--controls <?php echo sanitize_html_class($custom_classes); ?>" contenteditable="false"> |
|
230 | + <li class="lasso-drag" title="<?php esc_attr_e('Move', 'lasso'); ?>"></li> |
|
231 | + <li id="lasso-component--settings__trigger" class="lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li> |
|
232 | + <li class="lasso-clone" title="<?php esc_attr_e('Clone', 'lasso'); ?>"></li> |
|
233 | + <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> |
|
234 | 234 | </ul> |
235 | 235 | |
236 | 236 | <?php return ob_get_clean(); |
@@ -246,17 +246,17 @@ discard block |
||
246 | 246 | |
247 | 247 | ob_start(); |
248 | 248 | |
249 | - if ( !lasso_user_can() ) |
|
249 | + if (!lasso_user_can()) |
|
250 | 250 | return; |
251 | 251 | |
252 | 252 | // has post thumbnail |
253 | - $has_thumbnail = has_post_thumbnail( get_the_ID() ) ? 'class="lasso--featImg--has-thumb"' : false; |
|
253 | + $has_thumbnail = has_post_thumbnail(get_the_ID()) ? 'class="lasso--featImg--has-thumb"' : false; |
|
254 | 254 | |
255 | 255 | ?> |
256 | - <ul id="lasso--featImgControls" <?php echo $has_thumbnail;?>> |
|
257 | - <li id="lasso--featImgUpload"><a title="<?php esc_attr_e( 'Replace Image', 'lasso' );?>" href="#"><i class="lasso-icon-image"></i></a></li> |
|
258 | - <li id="lasso--featImgDelete"><a title="<?php esc_attr_e( 'Delete Image', 'lasso' );?>" href="#"><i class="lasso-icon-bin2"></i></a></li> |
|
259 | - <li id="lasso--featImgSave"><a href="#"><?php esc_attr_e( 'save', 'lasso' );?></a></li> |
|
256 | + <ul id="lasso--featImgControls" <?php echo $has_thumbnail; ?>> |
|
257 | + <li id="lasso--featImgUpload"><a title="<?php esc_attr_e('Replace Image', 'lasso'); ?>" href="#"><i class="lasso-icon-image"></i></a></li> |
|
258 | + <li id="lasso--featImgDelete"><a title="<?php esc_attr_e('Delete Image', 'lasso'); ?>" href="#"><i class="lasso-icon-bin2"></i></a></li> |
|
259 | + <li id="lasso--featImgSave"><a href="#"><?php esc_attr_e('save', 'lasso'); ?></a></li> |
|
260 | 260 | </ul> |
261 | 261 | |
262 | 262 | <?php return ob_get_clean(); |
@@ -275,55 +275,55 @@ discard block |
||
275 | 275 | |
276 | 276 | ob_start(); |
277 | 277 | |
278 | - if ( !lasso_user_can() ) |
|
278 | + if (!lasso_user_can()) |
|
279 | 279 | return; |
280 | 280 | |
281 | 281 | global $post; |
282 | 282 | |
283 | 283 | $postid = get_the_ID(); |
284 | 284 | |
285 | - $status = get_post_status( $postid ); |
|
286 | - $nonce = wp_create_nonce( 'lasso-update-post-settings' ); |
|
285 | + $status = get_post_status($postid); |
|
286 | + $nonce = wp_create_nonce('lasso-update-post-settings'); |
|
287 | 287 | |
288 | 288 | // let users add custom css classes |
289 | - $custom_classes = apply_filters( 'lasso_modal_settings_classes', '' ); |
|
289 | + $custom_classes = apply_filters('lasso_modal_settings_classes', ''); |
|
290 | 290 | |
291 | 291 | // objects categories |
292 | - $categories = lasso_get_post_objects( $postid, 'category' ); |
|
293 | - $tags = lasso_get_post_objects( $postid, 'tag' ); |
|
292 | + $categories = lasso_get_post_objects($postid, 'category'); |
|
293 | + $tags = lasso_get_post_objects($postid, 'tag'); |
|
294 | 294 | |
295 | 295 | // modal tabs |
296 | - $tabs = lasso_modal_addons('tab'); |
|
297 | - $content = lasso_modal_addons('content'); |
|
296 | + $tabs = lasso_modal_addons('tab'); |
|
297 | + $content = lasso_modal_addons('content'); |
|
298 | 298 | |
299 | 299 | // are we singular |
300 | - $is_singular = is_singular(); |
|
300 | + $is_singular = is_singular(); |
|
301 | 301 | $is_singular_class = $is_singular ? 'lasso--postsettings__2col' : 'lasso--postsettings__1col'; |
302 | 302 | $has_thumb_class = has_post_thumbnail() ? 'has-thumbnail' : 'no-thumbnail'; |
303 | 303 | $theme_supports = current_theme_supports('post-thumbnails'); |
304 | - $default_image = LASSO_URL.'/admin/assets/img/empty-img.png'; |
|
304 | + $default_image = LASSO_URL.'/admin/assets/img/empty-img.png'; |
|
305 | 305 | |
306 | 306 | ?> |
307 | - <div id="lasso--post-settings__modal" class="lasso--modal lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>"> |
|
307 | + <div id="lasso--post-settings__modal" class="lasso--modal lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>"> |
|
308 | 308 | <div class="lasso--modal__inner"> |
309 | 309 | |
310 | - <?php if( $tabs ) { echo $tabs; } ?> |
|
310 | + <?php if ($tabs) { echo $tabs; } ?> |
|
311 | 311 | |
312 | 312 | <div class="lasso--modal__content modal__content--core visible" data-addon-content="core"> |
313 | - <form id="lasso--postsettings__form" enctype="multipart/form-data" class="lasso--post-form <?php echo $is_singular_class.' '.$has_thumb_class;?>" > |
|
313 | + <form id="lasso--postsettings__form" enctype="multipart/form-data" class="lasso--post-form <?php echo $is_singular_class.' '.$has_thumb_class; ?>" > |
|
314 | 314 | |
315 | - <?php if ( $is_singular && $theme_supports ) : ?> |
|
315 | + <?php if ($is_singular && $theme_supports) : ?> |
|
316 | 316 | <div class="lasso--postsettings__left"> |
317 | - <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> |
|
318 | - <div class="lasso--post-thumb" data-default-thumb="<?php echo esc_url( $default_image );?>"> |
|
317 | + <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> |
|
318 | + <div class="lasso--post-thumb" data-default-thumb="<?php echo esc_url($default_image); ?>"> |
|
319 | 319 | |
320 | 320 | <div id="lasso--post-thumb__controls" class="lasso--post-thumb__controls"> |
321 | - <i id="lasso--post-thumb__add" title="<?php _e('Change Featured Image','lasso');?>" class="dashicons dashicons-edit"></i> |
|
322 | - <i id="lasso--post-thumb__delete" title="<?php _e('Delete Featured Image','lasso');?>" class="dashicons dashicons-no-alt"></i> |
|
321 | + <i id="lasso--post-thumb__add" title="<?php _e('Change Featured Image', 'lasso'); ?>" class="dashicons dashicons-edit"></i> |
|
322 | + <i id="lasso--post-thumb__delete" title="<?php _e('Delete Featured Image', 'lasso'); ?>" class="dashicons dashicons-no-alt"></i> |
|
323 | 323 | <i id="lasso--save-status" class="lasso-icon lasso-icon-spinner6 not-visible"></i> |
324 | 324 | </div> |
325 | 325 | |
326 | - <?php echo has_post_thumbnail() ? get_the_post_thumbnail( $post->ID, 'medium' ) : '<img src="'.$default_image.'">'; ?> |
|
326 | + <?php echo has_post_thumbnail() ? get_the_post_thumbnail($post->ID, 'medium') : '<img src="'.$default_image.'">'; ?> |
|
327 | 327 | |
328 | 328 | </div> |
329 | 329 | <div id="lasso--featImgSave"><a href="#" class="not-visible">Save</a></div> |
@@ -333,12 +333,12 @@ discard block |
||
333 | 333 | |
334 | 334 | <div class="lasso--postsettings__right"> |
335 | 335 | |
336 | - <?php if( lasso_user_can('publish_posts') || lasso_user_can('publish_pages') ): ?> |
|
336 | + <?php if (lasso_user_can('publish_posts') || lasso_user_can('publish_pages')): ?> |
|
337 | 337 | <div class="lasso--postsettings__option story-status-option"> |
338 | - <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> |
|
339 | - <ul class="story-status story-status-<?php echo sanitize_html_class( $status );?>"> |
|
340 | - <li id="lasso--status-draft"><?php _e( 'Draft', 'lasso' );?></li> |
|
341 | - <li id="lasso--status-publish"><?php _e( 'Publish', 'lasso' );?></li> |
|
338 | + <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> |
|
339 | + <ul class="story-status story-status-<?php echo sanitize_html_class($status); ?>"> |
|
340 | + <li id="lasso--status-draft"><?php _e('Draft', 'lasso'); ?></li> |
|
341 | + <li id="lasso--status-publish"><?php _e('Publish', 'lasso'); ?></li> |
|
342 | 342 | </ul> |
343 | 343 | <div class="lasso--slider_wrap"> |
344 | 344 | <div id="lasso--slider"></div> |
@@ -346,10 +346,10 @@ discard block |
||
346 | 346 | </div> |
347 | 347 | <?php endif; ?> |
348 | 348 | |
349 | - <?php if ( 'publish' == $status ): ?> |
|
349 | + <?php if ('publish' == $status): ?> |
|
350 | 350 | <div class="lasso--postsettings__option story-slug-option"> |
351 | - <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> |
|
352 | - <input class="lasso--modal__trigger-footer" type="text" name="story_slug" value="<?php echo isset( $post ) ? esc_attr( $post->post_name ) : false;?>"> |
|
351 | + <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> |
|
352 | + <input class="lasso--modal__trigger-footer" type="text" name="story_slug" value="<?php echo isset($post) ? esc_attr($post->post_name) : false; ?>"> |
|
353 | 353 | </div> |
354 | 354 | <?php endif; ?> |
355 | 355 | |
@@ -358,34 +358,34 @@ discard block |
||
358 | 358 | <div class="lasso--postsettings__middle"> |
359 | 359 | |
360 | 360 | <div class="lasso--postsettings__option story-categories-option"> |
361 | - <label><?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> |
|
362 | - <input id="lasso--cat-select" class="lasso--modal__trigger-footer" type="hidden" name="story_cats" value="<?php echo $categories;?>"> |
|
361 | + <label><?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> |
|
362 | + <input id="lasso--cat-select" class="lasso--modal__trigger-footer" type="hidden" name="story_cats" value="<?php echo $categories; ?>"> |
|
363 | 363 | </div> |
364 | 364 | |
365 | 365 | <div class="lasso--postsettings__option story-tags-option"> |
366 | - <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> |
|
367 | - <input id="lasso--tag-select" class="lasso--modal__trigger-footer" type="hidden" name="story_tags" value="<?php echo $tags;?>"> |
|
366 | + <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> |
|
367 | + <input id="lasso--tag-select" class="lasso--modal__trigger-footer" type="hidden" name="story_tags" value="<?php echo $tags; ?>"> |
|
368 | 368 | </div> |
369 | 369 | |
370 | 370 | </div> |
371 | 371 | |
372 | - <?php do_action( 'lasso_modal_post_form' ); // action ?> |
|
372 | + <?php do_action('lasso_modal_post_form'); // action ?> |
|
373 | 373 | |
374 | 374 | <div class="lasso--postsettings__footer" style="display:none;"> |
375 | - <a href="#" class="lasso--postsettings-cancel"><?php _e( 'Cancel', 'lasso' );?></a> |
|
375 | + <a href="#" class="lasso--postsettings-cancel"><?php _e('Cancel', 'lasso'); ?></a> |
|
376 | 376 | <input type="hidden" name="status" value=""> |
377 | 377 | <input type="hidden" name="categories" value=""> |
378 | - <input type="hidden" name="postid" value="<?php echo get_the_ID();?>"> |
|
378 | + <input type="hidden" name="postid" value="<?php echo get_the_ID(); ?>"> |
|
379 | 379 | <input type="hidden" name="action" value="process_update-object_post"> |
380 | - <input type="hidden" name="nonce" value="<?php echo $nonce;?>"> |
|
381 | - <?php do_action( 'lasso_modal_post_form_footer' ); // action ?> |
|
382 | - <input type="submit" value="<?php esc_attr_e( 'Save', 'lasso' );?>"> |
|
380 | + <input type="hidden" name="nonce" value="<?php echo $nonce; ?>"> |
|
381 | + <?php do_action('lasso_modal_post_form_footer'); // action ?> |
|
382 | + <input type="submit" value="<?php esc_attr_e('Save', 'lasso'); ?>"> |
|
383 | 383 | </div> |
384 | 384 | |
385 | 385 | </form> |
386 | 386 | </div> |
387 | 387 | |
388 | - <?php if( $tabs ) { echo $content; } ?> |
|
388 | + <?php if ($tabs) { echo $content; } ?> |
|
389 | 389 | |
390 | 390 | </div> |
391 | 391 | |
@@ -406,41 +406,41 @@ discard block |
||
406 | 406 | |
407 | 407 | ob_start(); |
408 | 408 | |
409 | - if ( !lasso_user_can('edit_posts') ) |
|
409 | + if (!lasso_user_can('edit_posts')) |
|
410 | 410 | return; |
411 | 411 | |
412 | - $status = get_post_status( get_the_ID() ); |
|
412 | + $status = get_post_status(get_the_ID()); |
|
413 | 413 | |
414 | - $nonce = wp_create_nonce( 'lasso-editor-new-post' ); |
|
414 | + $nonce = wp_create_nonce('lasso-editor-new-post'); |
|
415 | 415 | |
416 | 416 | // let users add custom css classes |
417 | - $custom_classes = apply_filters( 'lasso_modal_post_classes', '' ); |
|
417 | + $custom_classes = apply_filters('lasso_modal_post_classes', ''); |
|
418 | 418 | |
419 | 419 | // return the post type |
420 | - $type = get_post_type( get_the_ID() ); |
|
420 | + $type = get_post_type(get_the_ID()); |
|
421 | 421 | |
422 | 422 | ?> |
423 | - <div id="lasso--post-new__modal" class="lasso--modal lasso--modal__med lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>"> |
|
423 | + <div id="lasso--post-new__modal" class="lasso--modal lasso--modal__med lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>"> |
|
424 | 424 | <div class="lasso--modal__inner"> |
425 | 425 | |
426 | 426 | <form id="lasso--postnew__form" enctype="multipart/form-data" class="lasso--post-form"> |
427 | 427 | |
428 | 428 | <div class="lasso--postsettings__option story-slug-option lasso--last-option"> |
429 | - <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> |
|
430 | - <input class="lasso--modal__trigger-footer" type="text" required name="story_title" value="" placeholder="<?php esc_attr_e( 'Grump Wizards Make Toxic Brew', 'lasso' );?>"> |
|
429 | + <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> |
|
430 | + <input class="lasso--modal__trigger-footer" type="text" required name="story_title" value="" placeholder="<?php esc_attr_e('Grump Wizards Make Toxic Brew', 'lasso'); ?>"> |
|
431 | 431 | <div class="lasso--select-wrap"> |
432 | 432 | <select id="lasso--select-type" name="story_type"> |
433 | 433 | |
434 | 434 | <?php |
435 | 435 | $types = lasso_post_types(); |
436 | 436 | |
437 | - if ( !empty( $types ) ) { |
|
437 | + if (!empty($types)) { |
|
438 | 438 | |
439 | - foreach( $types as $type ) { |
|
439 | + foreach ($types as $type) { |
|
440 | 440 | |
441 | - $type = preg_replace( '/s\b/','', $type ); |
|
441 | + $type = preg_replace('/s\b/', '', $type); |
|
442 | 442 | |
443 | - printf( '<option value="%s">%s</option>', lcfirst( esc_attr( $type ) ) , ucfirst( esc_attr( $type ) ) ); |
|
443 | + printf('<option value="%s">%s</option>', lcfirst(esc_attr($type)), ucfirst(esc_attr($type))); |
|
444 | 444 | } |
445 | 445 | |
446 | 446 | } |
@@ -451,11 +451,11 @@ discard block |
||
451 | 451 | </div> |
452 | 452 | |
453 | 453 | <div class="lasso--postsettings__footer" style="display:none;"> |
454 | - <a href="#" class="lasso--postsettings-cancel"><?php _e( 'Cancel', 'lasso' );?></a> |
|
454 | + <a href="#" class="lasso--postsettings-cancel"><?php _e('Cancel', 'lasso'); ?></a> |
|
455 | 455 | <input type="hidden" name="action" value="process_new-object_post"> |
456 | 456 | <input type="hidden" name="object" value="post"> |
457 | - <input type="hidden" name="nonce" value="<?php echo $nonce;?>"> |
|
458 | - <input type="submit" value="<?php esc_attr_e( 'Create', 'lasso' );?>"> |
|
457 | + <input type="hidden" name="nonce" value="<?php echo $nonce; ?>"> |
|
458 | + <input type="submit" value="<?php esc_attr_e('Create', 'lasso'); ?>"> |
|
459 | 459 | </div> |
460 | 460 | |
461 | 461 | </form> |
@@ -479,18 +479,18 @@ discard block |
||
479 | 479 | ob_start(); |
480 | 480 | |
481 | 481 | // post status |
482 | - $status = get_post_status( get_the_ID() ); |
|
482 | + $status = get_post_status(get_the_ID()); |
|
483 | 483 | |
484 | 484 | // let users add custom css classes |
485 | - $custom_classes = apply_filters( 'lasso_modal_all_post_classes', '' ); |
|
485 | + $custom_classes = apply_filters('lasso_modal_all_post_classes', ''); |
|
486 | 486 | |
487 | 487 | ?> |
488 | - <div id="lasso--all-posts__modal" class="lasso--modal lasso--modal__full lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>"> |
|
488 | + <div id="lasso--all-posts__modal" class="lasso--modal lasso--modal__full lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>"> |
|
489 | 489 | <div class="lasso--modal__inner"> |
490 | 490 | |
491 | 491 | <div class="lasso--post-filtering not-visible"> |
492 | 492 | <div class="lasso--search__results"> |
493 | - <span id="lasso--results-found"></span><?php _e('results found','lasso');?> |
|
493 | + <span id="lasso--results-found"></span><?php _e('results found', 'lasso'); ?> |
|
494 | 494 | </div> |
495 | 495 | <div class="lasso--search"> |
496 | 496 | <i id="lasso--search__toggle" class="dashicons dashicons-search"></i> |
@@ -503,16 +503,16 @@ discard block |
||
503 | 503 | |
504 | 504 | $post_types = lasso_post_types(); |
505 | 505 | |
506 | - if ( ! empty( $post_types ) ) { |
|
506 | + if (!empty($post_types)) { |
|
507 | 507 | $first = 'active'; |
508 | - foreach( $post_types as $name => $label ) { |
|
509 | - printf( '<li class="%1s lasso--show-objects" data-post-type="%2s">%3s</li>', esc_attr( $first), esc_attr( $name ), esc_attr( $label ) ); |
|
508 | + foreach ($post_types as $name => $label) { |
|
509 | + printf('<li class="%1s lasso--show-objects" data-post-type="%2s">%3s</li>', esc_attr($first), esc_attr($name), esc_attr($label)); |
|
510 | 510 | $first = ''; |
511 | 511 | } |
512 | 512 | |
513 | 513 | } |
514 | 514 | |
515 | - do_action('lasso_modal_post_objects');?> |
|
515 | + do_action('lasso_modal_post_objects'); ?> |
|
516 | 516 | |
517 | 517 | </ul> |
518 | 518 | <div id="lasso--loading" class="lasso--loading"><div class="lasso--loader"></div></div> |
@@ -530,18 +530,18 @@ discard block |
||
530 | 530 | |
531 | 531 | ob_start(); |
532 | 532 | |
533 | - if ( !lasso_user_can() ) |
|
533 | + if (!lasso_user_can()) |
|
534 | 534 | return; |
535 | 535 | |
536 | 536 | // let users add custom css classes |
537 | - $custom_classes = apply_filters( 'lasso_wpimg_classes', '' ); |
|
537 | + $custom_classes = apply_filters('lasso_wpimg_classes', ''); |
|
538 | 538 | |
539 | 539 | ?> |
540 | - <ul class="lasso-component--controls <?php echo sanitize_html_class( $custom_classes );?>" contenteditable="false"> |
|
541 | - <li class="lasso-drag" title="<?php esc_attr_e( 'Move', 'lasso' );?>"></li> |
|
542 | - <li id="lasso--wpimg-edit" class="lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li> |
|
543 | - <li class="lasso-clone" title="<?php esc_attr_e( 'Clone', 'lasso' );?>"></li> |
|
544 | - <li class="lasso-delete" title="<?php esc_attr_e( 'Delete', 'lasso' );?>"></li> |
|
540 | + <ul class="lasso-component--controls <?php echo sanitize_html_class($custom_classes); ?>" contenteditable="false"> |
|
541 | + <li class="lasso-drag" title="<?php esc_attr_e('Move', 'lasso'); ?>"></li> |
|
542 | + <li id="lasso--wpimg-edit" class="lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li> |
|
543 | + <li class="lasso-clone" title="<?php esc_attr_e('Clone', 'lasso'); ?>"></li> |
|
544 | + <li class="lasso-delete" title="<?php esc_attr_e('Delete', 'lasso'); ?>"></li> |
|
545 | 545 | </ul> |
546 | 546 | |
547 | 547 | <?php return ob_get_clean(); |
@@ -554,16 +554,16 @@ discard block |
||
554 | 554 | */ |
555 | 555 | function lasso_map_form_footer() { |
556 | 556 | |
557 | - $nonce = wp_create_nonce( 'lasso-process-map' ); |
|
557 | + $nonce = wp_create_nonce('lasso-process-map'); |
|
558 | 558 | |
559 | 559 | ob_start(); |
560 | 560 | |
561 | 561 | ?> |
562 | 562 | <div class="lasso--map-form__footer"> |
563 | - <input type="hidden" name="postid" value="<?php echo get_the_ID();?>"> |
|
564 | - <input type="hidden" name="nonce" value="<?php echo $nonce;?>"> |
|
563 | + <input type="hidden" name="postid" value="<?php echo get_the_ID(); ?>"> |
|
564 | + <input type="hidden" name="nonce" value="<?php echo $nonce; ?>"> |
|
565 | 565 | <input type="hidden" name="action" value="process_map_save"> |
566 | - <input type="submit" class="lasso--map-form__submit" value="<?php esc_attr_e( 'Save Locations', 'lasso' );?>"> |
|
566 | + <input type="submit" class="lasso--map-form__submit" value="<?php esc_attr_e('Save Locations', 'lasso'); ?>"> |
|
567 | 567 | </div> |
568 | 568 | |
569 | 569 | <?php return ob_get_clean(); |
@@ -581,7 +581,7 @@ discard block |
||
581 | 581 | |
582 | 582 | ?> |
583 | 583 | <div id="lasso--pagerefresh" class="visible"> |
584 | - <?php _e( 'Save this post and refesh the page to see these changes.', 'lasso' );?> |
|
584 | + <?php _e('Save this post and refesh the page to see these changes.', 'lasso'); ?> |
|
585 | 585 | </div> |
586 | 586 | |
587 | 587 | <?php return ob_get_clean(); |
@@ -595,43 +595,43 @@ discard block |
||
595 | 595 | */ |
596 | 596 | function lasso_editor_options_blob() { |
597 | 597 | |
598 | - $codes = function_exists( 'aesop_shortcodes' ) ? aesop_shortcodes() : apply_filters( 'lasso_custom_options', '' ); |
|
599 | - $galleries = function_exists( 'lasso_editor_galleries_exist' ) && lasso_editor_galleries_exist() ? 'has-galleries' : 'creating-gallery'; |
|
598 | + $codes = function_exists('aesop_shortcodes') ? aesop_shortcodes() : apply_filters('lasso_custom_options', ''); |
|
599 | + $galleries = function_exists('lasso_editor_galleries_exist') && lasso_editor_galleries_exist() ? 'has-galleries' : 'creating-gallery'; |
|
600 | 600 | |
601 | - $nonce = wp_create_nonce( 'lasso_gallery' ); |
|
601 | + $nonce = wp_create_nonce('lasso_gallery'); |
|
602 | 602 | |
603 | 603 | $blob = array(); |
604 | 604 | |
605 | - if ( empty( $codes ) ) |
|
605 | + if (empty($codes)) |
|
606 | 606 | return; |
607 | 607 | |
608 | - foreach ( $codes as $slug => $shortcode ) { |
|
608 | + foreach ($codes as $slug => $shortcode) { |
|
609 | 609 | $return = ''; |
610 | 610 | // Shortcode has atts |
611 | 611 | |
612 | - if ( count( $shortcode['atts'] ) && $shortcode['atts'] ) { |
|
612 | + if (count($shortcode['atts']) && $shortcode['atts']) { |
|
613 | 613 | |
614 | - foreach ( $shortcode['atts'] as $attr_name => $attr_info ) { |
|
614 | + foreach ($shortcode['atts'] as $attr_name => $attr_info) { |
|
615 | 615 | |
616 | 616 | |
617 | - $prefix = isset( $attr_info['prefix'] ) ? sprintf( '<span class="lasso-option-prefix">%s</span>', $attr_info['prefix'] ) : null; |
|
617 | + $prefix = isset($attr_info['prefix']) ? sprintf('<span class="lasso-option-prefix">%s</span>', $attr_info['prefix']) : null; |
|
618 | 618 | |
619 | 619 | $return .= '<form id="lasso--component-settings-form" class="'.$galleries.'" method="post">'; |
620 | 620 | $return .= '<p data-option="'.$attr_name.'" class="lasso-option lasso-'.$slug.'-'.$attr_name.'">'; |
621 | - $return .= '<label for="lasso-generator-attr-' . $attr_name . '">' . $attr_info['desc'] . '</label>'; |
|
621 | + $return .= '<label for="lasso-generator-attr-'.$attr_name.'">'.$attr_info['desc'].'</label>'; |
|
622 | 622 | $return .= '<small class="lasso-option-desc">'.$attr_info['tip'].'</small>'; |
623 | 623 | // Select |
624 | 624 | |
625 | - if ( isset( $attr_info['values'] ) ) { |
|
625 | + if (isset($attr_info['values'])) { |
|
626 | 626 | |
627 | - $return .= '<select name="' . $attr_name . '" id="lasso-generator-attr-' . $attr_name . '" class="lasso-generator-attr">'; |
|
627 | + $return .= '<select name="'.$attr_name.'" id="lasso-generator-attr-'.$attr_name.'" class="lasso-generator-attr">'; |
|
628 | 628 | |
629 | - $i=0; |
|
629 | + $i = 0; |
|
630 | 630 | |
631 | - foreach ( $attr_info['values'] as $attr_value ) { |
|
631 | + foreach ($attr_info['values'] as $attr_value) { |
|
632 | 632 | $attr_value_selected = $attr_info['default'] == $attr_value ? ' selected="selected"' : ''; |
633 | 633 | |
634 | - $return .= '<option value="'.$attr_info['values'][$i]['value'].'" ' . $attr_value_selected . '>'.$attr_info['values'][$i]['name'].'</option>'; |
|
634 | + $return .= '<option value="'.$attr_info['values'][$i]['value'].'" '.$attr_value_selected.'>'.$attr_info['values'][$i]['name'].'</option>'; |
|
635 | 635 | |
636 | 636 | $i++; |
637 | 637 | } |
@@ -640,24 +640,24 @@ discard block |
||
640 | 640 | |
641 | 641 | } else { |
642 | 642 | |
643 | - $attr_field_type = isset( $attr_info['type'] ) ? $attr_info['type'] : 'text'; |
|
643 | + $attr_field_type = isset($attr_info['type']) ? $attr_info['type'] : 'text'; |
|
644 | 644 | |
645 | 645 | // image upload |
646 | - if ( 'media_upload' == $attr_info['type'] ) { |
|
646 | + if ('media_upload' == $attr_info['type']) { |
|
647 | 647 | |
648 | - $return .= '<input type="' . $attr_field_type . '" name="' . $attr_name . '" value="'.$attr_info['default'].'" id="lasso-generator-attr-' . $attr_name . '" class="lasso-generator-attr lasso-generator-attr-'.$attr_field_type.'" />'; |
|
648 | + $return .= '<input type="'.$attr_field_type.'" name="'.$attr_name.'" value="'.$attr_info['default'].'" id="lasso-generator-attr-'.$attr_name.'" class="lasso-generator-attr lasso-generator-attr-'.$attr_field_type.'" />'; |
|
649 | 649 | $return .= '<a href="#" id="lasso-upload-img" class="lasso-option-button" /></a>'; |
650 | 650 | |
651 | - } elseif ( 'color' == $attr_info['type'] ) { |
|
651 | + } elseif ('color' == $attr_info['type']) { |
|
652 | 652 | |
653 | - $return .= '<input type="color" name="' . $attr_name . '" value="'.$attr_info['default'].'" id="lasso-generator-attr-' . $attr_name . '" class="lasso-generator-attr lasso-generator-attr-'.$attr_field_type.'" />'; |
|
653 | + $return .= '<input type="color" name="'.$attr_name.'" value="'.$attr_info['default'].'" id="lasso-generator-attr-'.$attr_name.'" class="lasso-generator-attr lasso-generator-attr-'.$attr_field_type.'" />'; |
|
654 | 654 | |
655 | - } elseif ( 'text_area' == $attr_info['type'] ) { |
|
655 | + } elseif ('text_area' == $attr_info['type']) { |
|
656 | 656 | |
657 | - $return .= '<textarea name="' . $attr_name . '" id="lasso-generator-attr-' . $attr_name . '" class="lasso-generator-attr lasso-generator-attr-'.$attr_field_type.'" placeholder="'.$attr_info['default'].'" /></textarea>'.$prefix.''; |
|
657 | + $return .= '<textarea name="'.$attr_name.'" id="lasso-generator-attr-'.$attr_name.'" class="lasso-generator-attr lasso-generator-attr-'.$attr_field_type.'" placeholder="'.$attr_info['default'].'" /></textarea>'.$prefix.''; |
|
658 | 658 | |
659 | 659 | } else { |
660 | - $return .= '<input type="' . $attr_field_type . '" name="' . $attr_name . '" value="'.$attr_info['default'].'" id="lasso-generator-attr-' . $attr_name . '" class="lasso-generator-attr lasso-generator-attr-'.$attr_field_type.'" />'.$prefix.''; |
|
660 | + $return .= '<input type="'.$attr_field_type.'" name="'.$attr_name.'" value="'.$attr_info['default'].'" id="lasso-generator-attr-'.$attr_name.'" class="lasso-generator-attr lasso-generator-attr-'.$attr_field_type.'" />'.$prefix.''; |
|
661 | 661 | } |
662 | 662 | } |
663 | 663 | $return .= '</p>'; |
@@ -668,9 +668,9 @@ discard block |
||
668 | 668 | /////////////////////////// |
669 | 669 | // START GALLERY AND MAP FRONT END STUFFS |
670 | 670 | /////////////////////////// |
671 | - if ( isset( $shortcode['front'] ) && true == $shortcode['front'] ) { |
|
671 | + if (isset($shortcode['front']) && true == $shortcode['front']) { |
|
672 | 672 | |
673 | - if ( 'gallery' == $shortcode['front_type'] ) { |
|
673 | + if ('gallery' == $shortcode['front_type']) { |
|
674 | 674 | |
675 | 675 | $return .= lasso_gallery_editor_module(); |
676 | 676 | |
@@ -681,13 +681,13 @@ discard block |
||
681 | 681 | /////////////////////////// |
682 | 682 | |
683 | 683 | // Single shortcode (not closed) |
684 | - if ( 'single' == $shortcode['type'] ) { |
|
684 | + if ('single' == $shortcode['type']) { |
|
685 | 685 | |
686 | 686 | $return .= '<input type="hidden" name="lasso-generator-content" id="lasso-generator-content" value="false" />'; |
687 | 687 | |
688 | 688 | } else { |
689 | 689 | |
690 | - $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>'; |
|
690 | + $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>'; |
|
691 | 691 | } |
692 | 692 | |
693 | 693 | $return .= '<p class="lasso-buttoninsert-wrap"><a href="#" class="lasso-generator-cancel" id="lasso--sidebar__close">Cancel |
@@ -720,7 +720,7 @@ discard block |
||
720 | 720 | <div id="lasso--loading" class="lasso--loading"><div class="lasso--loader"></div></div> |
721 | 721 | <div id="lasso--hide" style="display:none;" class="lasso--post-form"> |
722 | 722 | <i class="lasso-icon lasso-icon-move"></i> |
723 | - <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> |
|
723 | + <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> |
|
724 | 724 | <div class="lasso--slider_wrap"> |
725 | 725 | <div id="lasso--slider"></div> |
726 | 726 | </div> |
@@ -105,8 +105,9 @@ discard block |
||
105 | 105 | |
106 | 106 | ob_start(); |
107 | 107 | |
108 | - if ( !lasso_user_can() ) |
|
109 | - return; |
|
108 | + if ( !lasso_user_can() ) { |
|
109 | + return; |
|
110 | + } |
|
110 | 111 | |
111 | 112 | // let users add custom css classes |
112 | 113 | $custom_classes = apply_filters( 'lasso_sidebar_classes', '' ); |
@@ -129,8 +130,9 @@ discard block |
||
129 | 130 | |
130 | 131 | ob_start(); |
131 | 132 | |
132 | - if ( !lasso_user_can() ) |
|
133 | - return; |
|
133 | + if ( !lasso_user_can() ) { |
|
134 | + return; |
|
135 | + } |
|
134 | 136 | |
135 | 137 | // check for lasso story engine and add a class doniting this |
136 | 138 | $ase_status = class_exists( 'Aesop_Core' ) || defined( 'LASSO_CUSTOM' ) ? 'ase-active' : 'ase-not-active'; |
@@ -195,8 +197,11 @@ discard block |
||
195 | 197 | <li data-type="document" title="<?php esc_attr_e( 'Document', 'lasso' );?>" class="lasso-toolbar--component__document"></li> |
196 | 198 | <li data-type="collection" title="<?php esc_attr_e( 'Collection', 'lasso' );?>" class="lasso-toolbar--component__collection"></li> |
197 | 199 | <li data-type="gallery" title="<?php esc_attr_e( 'Gallery', 'lasso' );?>" class="lasso-toolbar--component__gallery"></li> |
198 | - <?php else: ?> |
|
199 | - <li data-type="wpimg" title="<?php esc_attr_e( 'WordPress Image', 'lasso' );?>" class="image lasso-toolbar--component__image"></li> |
|
200 | + <?php else { |
|
201 | + : ?> |
|
202 | + <li data-type="wpimg" title="<?php esc_attr_e( 'WordPress Image', 'lasso' ); |
|
203 | +} |
|
204 | +?>" class="image lasso-toolbar--component__image"></li> |
|
200 | 205 | <li data-type="wpquote" title="<?php esc_attr_e( 'WordPress Quote', 'lasso' );?>" class="quote lasso-toolbar--component__quote"></li> |
201 | 206 | <?php endif; ?> |
202 | 207 | <?php do_action( 'lasso_toolbar_components' );?> |
@@ -219,8 +224,9 @@ discard block |
||
219 | 224 | |
220 | 225 | ob_start(); |
221 | 226 | |
222 | - if ( !lasso_user_can() ) |
|
223 | - return; |
|
227 | + if ( !lasso_user_can() ) { |
|
228 | + return; |
|
229 | + } |
|
224 | 230 | |
225 | 231 | // let users add custom css classes |
226 | 232 | $custom_classes = apply_filters( 'lasso_component_classes', '' ); |
@@ -246,8 +252,9 @@ discard block |
||
246 | 252 | |
247 | 253 | ob_start(); |
248 | 254 | |
249 | - if ( !lasso_user_can() ) |
|
250 | - return; |
|
255 | + if ( !lasso_user_can() ) { |
|
256 | + return; |
|
257 | + } |
|
251 | 258 | |
252 | 259 | // has post thumbnail |
253 | 260 | $has_thumbnail = has_post_thumbnail( get_the_ID() ) ? 'class="lasso--featImg--has-thumb"' : false; |
@@ -275,8 +282,9 @@ discard block |
||
275 | 282 | |
276 | 283 | ob_start(); |
277 | 284 | |
278 | - if ( !lasso_user_can() ) |
|
279 | - return; |
|
285 | + if ( !lasso_user_can() ) { |
|
286 | + return; |
|
287 | + } |
|
280 | 288 | |
281 | 289 | global $post; |
282 | 290 | |
@@ -406,8 +414,9 @@ discard block |
||
406 | 414 | |
407 | 415 | ob_start(); |
408 | 416 | |
409 | - if ( !lasso_user_can('edit_posts') ) |
|
410 | - return; |
|
417 | + if ( !lasso_user_can('edit_posts') ) { |
|
418 | + return; |
|
419 | + } |
|
411 | 420 | |
412 | 421 | $status = get_post_status( get_the_ID() ); |
413 | 422 | |
@@ -530,8 +539,9 @@ discard block |
||
530 | 539 | |
531 | 540 | ob_start(); |
532 | 541 | |
533 | - if ( !lasso_user_can() ) |
|
534 | - return; |
|
542 | + if ( !lasso_user_can() ) { |
|
543 | + return; |
|
544 | + } |
|
535 | 545 | |
536 | 546 | // let users add custom css classes |
537 | 547 | $custom_classes = apply_filters( 'lasso_wpimg_classes', '' ); |
@@ -602,8 +612,9 @@ discard block |
||
602 | 612 | |
603 | 613 | $blob = array(); |
604 | 614 | |
605 | - if ( empty( $codes ) ) |
|
606 | - return; |
|
615 | + if ( empty( $codes ) ) { |
|
616 | + return; |
|
617 | + } |
|
607 | 618 | |
608 | 619 | foreach ( $codes as $slug => $shortcode ) { |
609 | 620 | $return = ''; |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | * Get an array of addon data for the settings modal |
44 | 44 | * @since 0.9.4 |
45 | 45 | */ |
46 | -function lasso_get_modal_tabs(){ |
|
46 | +function lasso_get_modal_tabs() { |
|
47 | 47 | |
48 | 48 | $tabs = array(); |
49 | 49 | |
@@ -60,36 +60,36 @@ discard block |
||
60 | 60 | * @uses lasso_modal_addons_content() |
61 | 61 | * @since 0.9.4 |
62 | 62 | */ |
63 | -function lasso_modal_addons( $type = 'tab' ){ |
|
63 | +function lasso_modal_addons($type = 'tab') { |
|
64 | 64 | |
65 | 65 | $tabs = lasso_get_modal_tabs(); |
66 | 66 | $out = ''; |
67 | 67 | |
68 | - if ( $tabs ): |
|
68 | + if ($tabs): |
|
69 | 69 | |
70 | - if ( 'tab' == $type ) { |
|
70 | + if ('tab' == $type) { |
|
71 | 71 | |
72 | 72 | $out = '<ul class="lasso--modal__tabs">'; |
73 | 73 | |
74 | 74 | $out .= '<li class="active-tab" data-addon-name="core">Lasso</li>'; |
75 | 75 | |
76 | - foreach ( $tabs as $tab ) { |
|
76 | + foreach ($tabs as $tab) { |
|
77 | 77 | |
78 | - if ( isset( $tab ) ) { |
|
78 | + if (isset($tab)) { |
|
79 | 79 | |
80 | - $out .= lasso_modal_addons_content( $tab, $type ); |
|
80 | + $out .= lasso_modal_addons_content($tab, $type); |
|
81 | 81 | } |
82 | 82 | } |
83 | 83 | |
84 | 84 | $out .= '</ul>'; |
85 | 85 | |
86 | - } elseif ( 'content' == $type ) { |
|
86 | + } elseif ('content' == $type) { |
|
87 | 87 | |
88 | 88 | |
89 | - foreach ( $tabs as $tab ) { |
|
89 | + foreach ($tabs as $tab) { |
|
90 | 90 | |
91 | - if ( isset( $tab ) ) { |
|
92 | - $out .= lasso_modal_addons_content( $tab , $type ); |
|
91 | + if (isset($tab)) { |
|
92 | + $out .= lasso_modal_addons_content($tab, $type); |
|
93 | 93 | } |
94 | 94 | } |
95 | 95 | |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | |
98 | 98 | endif; |
99 | 99 | |
100 | - return !empty( $out ) ? $out : false; |
|
100 | + return !empty($out) ? $out : false; |
|
101 | 101 | } |
102 | 102 | |
103 | 103 | /** |
@@ -117,26 +117,26 @@ discard block |
||
117 | 117 | * @since 0.9.5 |
118 | 118 | * @subpackage lasso_modal_addons_content |
119 | 119 | */ |
120 | -function lasso_option_form( $name = '', $options = array() ){ |
|
120 | +function lasso_option_form($name = '', $options = array()) { |
|
121 | 121 | |
122 | 122 | ob_start(); |
123 | 123 | |
124 | - if ( empty( $name ) || empty( $options ) || !is_array( $options ) ) |
|
124 | + if (empty($name) || empty($options) || !is_array($options)) |
|
125 | 125 | return; |
126 | 126 | |
127 | 127 | $nonce = wp_create_nonce('lasso-process-post-meta'); |
128 | - $key = sprintf('_lasso_%s_settings', $name ); |
|
128 | + $key = sprintf('_lasso_%s_settings', $name); |
|
129 | 129 | |
130 | - $out = sprintf('<form id="lasso--post-form" class="lasso--post-form">' ); |
|
130 | + $out = sprintf('<form id="lasso--post-form" class="lasso--post-form">'); |
|
131 | 131 | |
132 | - $out .= lasso_option_fields( $name, $options ); |
|
133 | - $out .='<div class="form--bottom">'; |
|
134 | - $out .='<input type="submit" value="Save">'; |
|
135 | - $out .='<input type="hidden" name="tab_name" value="'.$key.'">'; |
|
136 | - $out .='<input type="hidden" name="post_id" value="'.get_the_ID().'">'; |
|
137 | - $out .='<input type="hidden" name="nonce" value="'.$nonce.'">'; |
|
138 | - $out .='<input type="hidden" name="action" value="process_meta_update">'; |
|
139 | - $out .='</div>'; |
|
132 | + $out .= lasso_option_fields($name, $options); |
|
133 | + $out .= '<div class="form--bottom">'; |
|
134 | + $out .= '<input type="submit" value="Save">'; |
|
135 | + $out .= '<input type="hidden" name="tab_name" value="'.$key.'">'; |
|
136 | + $out .= '<input type="hidden" name="post_id" value="'.get_the_ID().'">'; |
|
137 | + $out .= '<input type="hidden" name="nonce" value="'.$nonce.'">'; |
|
138 | + $out .= '<input type="hidden" name="action" value="process_meta_update">'; |
|
139 | + $out .= '</div>'; |
|
140 | 140 | |
141 | 141 | $out .= '</form>'; |
142 | 142 | |
@@ -154,28 +154,28 @@ discard block |
||
154 | 154 | * @since 0.9.5 |
155 | 155 | * @subpackage lasso_modal_addons_content |
156 | 156 | */ |
157 | -function lasso_option_fields( $name = '', $options = array() ){ |
|
157 | +function lasso_option_fields($name = '', $options = array()) { |
|
158 | 158 | |
159 | - $out = ''; |
|
159 | + $out = ''; |
|
160 | 160 | $before = '<div class="lasso--postsettings__option">'; |
161 | 161 | $after = '</div>'; |
162 | 162 | |
163 | - if ( empty( $name ) || empty( $options ) ) |
|
163 | + if (empty($name) || empty($options)) |
|
164 | 164 | return; |
165 | 165 | |
166 | - foreach ( (array) $options as $option ) { |
|
166 | + foreach ((array) $options as $option) { |
|
167 | 167 | |
168 | - $type = isset( $option['type'] ) ? $option['type'] : 'text'; |
|
168 | + $type = isset($option['type']) ? $option['type'] : 'text'; |
|
169 | 169 | |
170 | - switch ( $type ) { |
|
170 | + switch ($type) { |
|
171 | 171 | case 'text': |
172 | - $out .= sprintf('%s%s%s', $before, lasso_option_engine_option( $name, $option,'text' ), $after ); |
|
172 | + $out .= sprintf('%s%s%s', $before, lasso_option_engine_option($name, $option, 'text'), $after); |
|
173 | 173 | break; |
174 | 174 | case 'textarea': |
175 | - $out .= sprintf('%s%s%s', $before, lasso_option_engine_option( $name, $option,'textarea' ), $after ); |
|
175 | + $out .= sprintf('%s%s%s', $before, lasso_option_engine_option($name, $option, 'textarea'), $after); |
|
176 | 176 | break; |
177 | 177 | case 'checkbox': |
178 | - $out .= sprintf('%s%s%s', $before, lasso_option_engine_option( $name, $option,'checkbox' ), $after ); |
|
178 | + $out .= sprintf('%s%s%s', $before, lasso_option_engine_option($name, $option, 'checkbox'), $after); |
|
179 | 179 | break; |
180 | 180 | } |
181 | 181 | |
@@ -193,27 +193,27 @@ discard block |
||
193 | 193 | * @param $type string text, textarea, checkbox, color |
194 | 194 | * @since 5.0 |
195 | 195 | */ |
196 | -function lasso_option_engine_option( $name = '', $option = '', $type = '') { |
|
196 | +function lasso_option_engine_option($name = '', $option = '', $type = '') { |
|
197 | 197 | |
198 | - if ( empty( $type ) || empty( $option ) ) |
|
198 | + if (empty($type) || empty($option)) |
|
199 | 199 | return; |
200 | 200 | |
201 | - $id = isset( $option['id'] ) ? $option['id'] : false; |
|
202 | - $id = $id ? lasso_clean_string( $id ) : false; |
|
201 | + $id = isset($option['id']) ? $option['id'] : false; |
|
202 | + $id = $id ? lasso_clean_string($id) : false; |
|
203 | 203 | |
204 | - $desc = isset( $option['desc'] ) ? $option['desc'] : false; |
|
204 | + $desc = isset($option['desc']) ? $option['desc'] : false; |
|
205 | 205 | |
206 | - $value = get_post_meta( get_the_id(), $option[ 'id' ], true ); |
|
206 | + $value = get_post_meta(get_the_id(), $option['id'], true); |
|
207 | 207 | |
208 | - switch ( $type ) { |
|
208 | + switch ($type) { |
|
209 | 209 | case 'text': |
210 | - $out = sprintf('<label for="lasso--post-option-%s">%s</label><input id="lasso--post-option-%s" name="%s" type="text" value="%s">',$id, esc_html( $desc ), $id, $id, $value ); |
|
210 | + $out = sprintf('<label for="lasso--post-option-%s">%s</label><input id="lasso--post-option-%s" name="%s" type="text" value="%s">', $id, esc_html($desc), $id, $id, $value); |
|
211 | 211 | break; |
212 | 212 | case 'textarea': |
213 | - $out = sprintf('<label for="lasso--post-option-%s">%s</label><textarea id="lasso--post-option-%s" name="%s">%s</textarea>',$id, esc_html( $desc ), $id, $id, $value ); |
|
213 | + $out = sprintf('<label for="lasso--post-option-%s">%s</label><textarea id="lasso--post-option-%s" name="%s">%s</textarea>', $id, esc_html($desc), $id, $id, $value); |
|
214 | 214 | break; |
215 | 215 | case 'checkbox': |
216 | - $out = sprintf('<label for="lasso--post-option-%s" class="checkbox-control checkbox"><input id="lasso--post-option-%s" type="checkbox" name="%s" class="checkbox"><span class="control-indicator"></span>%s',$id, $id, $id ,esc_html( $desc ) ); |
|
216 | + $out = sprintf('<label for="lasso--post-option-%s" class="checkbox-control checkbox"><input id="lasso--post-option-%s" type="checkbox" name="%s" class="checkbox"><span class="control-indicator"></span>%s', $id, $id, $id, esc_html($desc)); |
|
217 | 217 | break; |
218 | 218 | } |
219 | 219 |
@@ -121,8 +121,9 @@ discard block |
||
121 | 121 | |
122 | 122 | ob_start(); |
123 | 123 | |
124 | - if ( empty( $name ) || empty( $options ) || !is_array( $options ) ) |
|
125 | - return; |
|
124 | + if ( empty( $name ) || empty( $options ) || !is_array( $options ) ) { |
|
125 | + return; |
|
126 | + } |
|
126 | 127 | |
127 | 128 | $nonce = wp_create_nonce('lasso-process-post-meta'); |
128 | 129 | $key = sprintf('_lasso_%s_settings', $name ); |
@@ -160,8 +161,9 @@ discard block |
||
160 | 161 | $before = '<div class="lasso--postsettings__option">'; |
161 | 162 | $after = '</div>'; |
162 | 163 | |
163 | - if ( empty( $name ) || empty( $options ) ) |
|
164 | - return; |
|
164 | + if ( empty( $name ) || empty( $options ) ) { |
|
165 | + return; |
|
166 | + } |
|
165 | 167 | |
166 | 168 | foreach ( (array) $options as $option ) { |
167 | 169 | |
@@ -195,8 +197,9 @@ discard block |
||
195 | 197 | */ |
196 | 198 | function lasso_option_engine_option( $name = '', $option = '', $type = '') { |
197 | 199 | |
198 | - if ( empty( $type ) || empty( $option ) ) |
|
199 | - return; |
|
200 | + if ( empty( $type ) || empty( $option ) ) { |
|
201 | + return; |
|
202 | + } |
|
200 | 203 | |
201 | 204 | $id = isset( $option['id'] ) ? $option['id'] : false; |
202 | 205 | $id = $id ? lasso_clean_string( $id ) : false; |
@@ -15,22 +15,22 @@ |
||
15 | 15 | * |
16 | 16 | * @param array $fields |
17 | 17 | */ |
18 | - public function __construct( $fields ) { |
|
18 | + public function __construct($fields) { |
|
19 | 19 | $this->fields = $fields; |
20 | - add_filter( 'lasso_api_params', function( $params ) { |
|
21 | - foreach( $this->fields as $field => $cbs ) { |
|
22 | - $field = lasso_clean_string( $field ); |
|
23 | - $params[ 'process_meta_update' ][ $field ] = $cbs; |
|
20 | + add_filter('lasso_api_params', function($params) { |
|
21 | + foreach ($this->fields as $field => $cbs) { |
|
22 | + $field = lasso_clean_string($field); |
|
23 | + $params['process_meta_update'][$field] = $cbs; |
|
24 | 24 | } |
25 | 25 | |
26 | 26 | return $params; |
27 | 27 | |
28 | 28 | }); |
29 | 29 | |
30 | - add_filter( 'lasso_meta_fields', function( $allowed ) { |
|
30 | + add_filter('lasso_meta_fields', function($allowed) { |
|
31 | 31 | |
32 | - foreach( array_keys( $this->fields ) as $field ) { |
|
33 | - $field = lasso_clean_string( $field ); |
|
32 | + foreach (array_keys($this->fields) as $field) { |
|
33 | + $field = lasso_clean_string($field); |
|
34 | 34 | $allowed[] = $field; |
35 | 35 | |
36 | 36 | } |
@@ -16,9 +16,9 @@ discard block |
||
16 | 16 | } |
17 | 17 | |
18 | 18 | /** |
19 | - * Draw the modal used to house the walk through |
|
20 | - * @since 0.6 |
|
21 | - */ |
|
19 | + * Draw the modal used to house the walk through |
|
20 | + * @since 0.6 |
|
21 | + */ |
|
22 | 22 | public function draw_tour() { |
23 | 23 | |
24 | 24 | $tour_hidden = get_user_meta( get_current_user_ID(), 'lasso_hide_tour', true ); |
@@ -76,9 +76,9 @@ discard block |
||
76 | 76 | } |
77 | 77 | |
78 | 78 | /** |
79 | - * Draw the inner slides for the welcome walkthrough |
|
80 | - * @since 0.6 |
|
81 | - */ |
|
79 | + * Draw the inner slides for the welcome walkthrough |
|
80 | + * @since 0.6 |
|
81 | + */ |
|
82 | 82 | public function tour_slides() { ?> |
83 | 83 | |
84 | 84 | <div id="lasso--loading" class="lasso--loading"><div class="lasso--loader"></div></div> |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | |
12 | 12 | public function __construct() { |
13 | 13 | |
14 | - add_action( 'wp_footer', array( $this, 'draw_tour' ) ); |
|
14 | + add_action('wp_footer', array($this, 'draw_tour')); |
|
15 | 15 | |
16 | 16 | } |
17 | 17 | |
@@ -21,19 +21,19 @@ discard block |
||
21 | 21 | */ |
22 | 22 | public function draw_tour() { |
23 | 23 | |
24 | - $tour_hidden = get_user_meta( get_current_user_ID(), 'lasso_hide_tour', true ); |
|
24 | + $tour_hidden = get_user_meta(get_current_user_ID(), 'lasso_hide_tour', true); |
|
25 | 25 | |
26 | - if ( lasso_user_can() && !$tour_hidden ) { |
|
26 | + if (lasso_user_can() && !$tour_hidden) { |
|
27 | 27 | |
28 | 28 | global $post; |
29 | 29 | |
30 | - $nonce = wp_create_nonce( 'lasso-editor-tour' ); |
|
30 | + $nonce = wp_create_nonce('lasso-editor-tour'); |
|
31 | 31 | |
32 | 32 | // let users add custom css classes |
33 | - $custom_classes = apply_filters( 'lasso_modal_tour_classes', '' ); |
|
33 | + $custom_classes = apply_filters('lasso_modal_tour_classes', ''); |
|
34 | 34 | |
35 | 35 | ?> |
36 | - <div id="lasso--tour__modal" class="lasso--modal lasso--tour__modal lasso--modal__checkbox <?php echo sanitize_html_class( $custom_classes );?>"> |
|
36 | + <div id="lasso--tour__modal" class="lasso--modal lasso--tour__modal lasso--modal__checkbox <?php echo sanitize_html_class($custom_classes); ?>"> |
|
37 | 37 | <script> |
38 | 38 | jQuery(window).ready(function($){ |
39 | 39 | |
@@ -51,19 +51,19 @@ discard block |
||
51 | 51 | </script> |
52 | 52 | <div class="lasso--modal__inner"> |
53 | 53 | |
54 | - <?php echo self::tour_slides();?> |
|
54 | + <?php echo self::tour_slides(); ?> |
|
55 | 55 | |
56 | 56 | <div class="lasso--postsettings__footer"> |
57 | 57 | |
58 | 58 | <div class="lasso--postsettings__option"> |
59 | 59 | <label for="hide_tour" class="checkbox-control checkbox"> |
60 | - <input type="checkbox" id="hide_tour" name="hide_tour" <?php checked( $tour_hidden, 1 ); ?>> |
|
60 | + <input type="checkbox" id="hide_tour" name="hide_tour" <?php checked($tour_hidden, 1); ?>> |
|
61 | 61 | <span class="control-indicator"></span> |
62 | - <?php _e('Don\'t show this again','lasso');?> |
|
62 | + <?php _e('Don\'t show this again', 'lasso'); ?> |
|
63 | 63 | </label> |
64 | 64 | </div> |
65 | 65 | |
66 | - <input type="submit" value="<?php _e( 'Okay, got it!', 'lasso' );?>" data-nonce="<?php echo $nonce;?>" > |
|
66 | + <input type="submit" value="<?php _e('Okay, got it!', 'lasso'); ?>" data-nonce="<?php echo $nonce; ?>" > |
|
67 | 67 | </div> |
68 | 68 | |
69 | 69 | </div> |
@@ -87,20 +87,20 @@ discard block |
||
87 | 87 | <?php |
88 | 88 | |
89 | 89 | $out = '<ul><li>'; |
90 | - $out .= sprintf( '<img src="%s">', LASSO_URL.'/public/assets/img/s-1.jpg' ); |
|
91 | - $out .= '<p>'.__('Access posts by clicking the list icon. Create a new post by clicking the new post icon.','lasso').'</p>'; |
|
90 | + $out .= sprintf('<img src="%s">', LASSO_URL.'/public/assets/img/s-1.jpg'); |
|
91 | + $out .= '<p>'.__('Access posts by clicking the list icon. Create a new post by clicking the new post icon.', 'lasso').'</p>'; |
|
92 | 92 | $out .= '</li><li>'; |
93 | - $out .= sprintf( '<img src="%s">', LASSO_URL.'/public/assets/img/s-2.jpg' ); |
|
94 | - $out .= '<p>'.__('While on a single post, edit by clicking the Pen icon. Access post settings with the settings icon. Press escape to exit any modal.','lasso').'</p>'; |
|
93 | + $out .= sprintf('<img src="%s">', LASSO_URL.'/public/assets/img/s-2.jpg'); |
|
94 | + $out .= '<p>'.__('While on a single post, edit by clicking the Pen icon. Access post settings with the settings icon. Press escape to exit any modal.', 'lasso').'</p>'; |
|
95 | 95 | $out .= '</li><li>'; |
96 | - $out .= sprintf( '<img src="%s">', LASSO_URL.'/public/assets/img/s-3.jpg' ); |
|
97 | - $out .= '<p>'.__('Highlight a piece of text, and click on a formatting option to style it. Click the Disk icon or CMD-S to save. Click the orange "X" button to exit the editor.','lasso').'</p>'; |
|
96 | + $out .= sprintf('<img src="%s">', LASSO_URL.'/public/assets/img/s-3.jpg'); |
|
97 | + $out .= '<p>'.__('Highlight a piece of text, and click on a formatting option to style it. Click the Disk icon or CMD-S to save. Click the orange "X" button to exit the editor.', 'lasso').'</p>'; |
|
98 | 98 | $out .= '</li><li>'; |
99 | - $out .= sprintf( '<img src="%s">', LASSO_URL.'/public/assets/img/s-4.jpg' ); |
|
100 | - $out .= '<p>'.__('Story components can be added by clicking the plus icon, and dragging any component from the component tray into the story.','lasso').'</p>'; |
|
99 | + $out .= sprintf('<img src="%s">', LASSO_URL.'/public/assets/img/s-4.jpg'); |
|
100 | + $out .= '<p>'.__('Story components can be added by clicking the plus icon, and dragging any component from the component tray into the story.', 'lasso').'</p>'; |
|
101 | 101 | $out .= '</li></ul>'; |
102 | 102 | |
103 | - echo apply_filters( 'lasso_tour_slides', $out ); |
|
103 | + echo apply_filters('lasso_tour_slides', $out); |
|
104 | 104 | |
105 | 105 | ?></div><?php |
106 | 106 |
@@ -1,24 +1,24 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if ( !function_exists( 'lasso_backbone_templates' ) ): |
|
3 | +if (!function_exists('lasso_backbone_templates')): |
|
4 | 4 | |
5 | 5 | add_action('wp_footer', 'lasso_backbone_templates'); |
6 | - function lasso_backbone_templates(){ |
|
6 | + function lasso_backbone_templates() { |
|
7 | 7 | |
8 | 8 | $can_delete = lasso_user_can('delete_others_posts'); |
9 | 9 | $can_delete_class = $can_delete ? false : 'no-delete'; |
10 | 10 | |
11 | 11 | // only run on posts and pages if user is logged in |
12 | - if ( is_user_logged_in() && lasso_user_can('edit_posts') ) { ?> |
|
12 | + if (is_user_logged_in() && lasso_user_can('edit_posts')) { ?> |
|
13 | 13 | <script type="text/html" id="lasso-tmpl--post"> |
14 | 14 | <li> |
15 | - <a href="<%= post.link %>" class="lasso--post-list__item <?php echo $can_delete_class;?> <%= post.status %>" data-postid="<%= post.ID %>" > |
|
15 | + <a href="<%= post.link %>" class="lasso--post-list__item <?php echo $can_delete_class; ?> <%= post.status %>" data-postid="<%= post.ID %>" > |
|
16 | 16 | <%= post.title %> |
17 | 17 | |
18 | 18 | <div class="lasso--post-list__controls"> |
19 | - <span title="<?php echo esc_attr_e('Edit Post','lasso');?>" id="lasso--post__edit"></span> |
|
20 | - <?php if( $can_delete ): ?> |
|
21 | - <span title="<?php echo esc_attr_e('Delete Post','lasso');?>" id="lasso--post__delete"></span> |
|
19 | + <span title="<?php echo esc_attr_e('Edit Post', 'lasso'); ?>" id="lasso--post__edit"></span> |
|
20 | + <?php if ($can_delete): ?> |
|
21 | + <span title="<?php echo esc_attr_e('Delete Post', 'lasso'); ?>" id="lasso--post__delete"></span> |
|
22 | 22 | <?php endif; ?> |
23 | 23 | </div> |
24 | 24 | </a> |
@@ -10,7 +10,7 @@ |
||
10 | 10 | */ |
11 | 11 | |
12 | 12 | // If uninstall not called from WordPress, then exit |
13 | -if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) { |
|
13 | +if (!defined('WP_UNINSTALL_PLUGIN')) { |
|
14 | 14 | exit; |
15 | 15 | } |
16 | 16 |