Completed
Pull Request — master (#116)
by
unknown
02:26
created
includes/process/save.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -19,26 +19,26 @@  discard block
 block discarded – undo
19 19
 	 *
20 20
 	 * @return bool Always returns true.
21 21
 	 */
22
-	public function content( $data ) {
22
+	public function content($data) {
23 23
 
24 24
 		$save_to_post_disabled = $this->save_to_post_disables();
25 25
 
26
-		$postid = (int) $data[ 'post_id' ];
27
-		$content = $this->replace_rendered_shortcodes( $data[ 'content' ] );
26
+		$postid = (int) $data['post_id'];
27
+		$content = $this->replace_rendered_shortcodes($data['content']);
28 28
 
29
-		if ( 'off' == $save_to_post_disabled || empty( $save_to_post_disabled ) ) {
29
+		if ('off' == $save_to_post_disabled || empty($save_to_post_disabled)) {
30 30
 
31 31
 			$args = array(
32 32
 				'ID'           => (int) $postid,
33 33
 				'post_content' => $content
34 34
 			);
35 35
 
36
-			wp_update_post( apply_filters( 'lasso_object_save_args', $args ) );
36
+			wp_update_post(apply_filters('lasso_object_save_args', $args));
37 37
 
38 38
 		}
39 39
 
40 40
 		// run save action
41
-		do_action( 'lasso_post_saved', $postid, $content, get_current_user_ID() );
41
+		do_action('lasso_post_saved', $postid, $content, get_current_user_ID());
42 42
 
43 43
 		return true;
44 44
 
@@ -53,24 +53,24 @@  discard block
 block discarded – undo
53 53
 	 *
54 54
 	 * @return bool Always returns true.
55 55
 	 */
56
-	public function publish_content( $data ) {
56
+	public function publish_content($data) {
57 57
 		$save_to_post_disabled = $this->save_to_post_disables();
58 58
 
59
-		$postid = (int) $data[ 'post_id' ];
60
-		$content = $this->replace_rendered_shortcodes( $data[ 'content' ] );
59
+		$postid = (int) $data['post_id'];
60
+		$content = $this->replace_rendered_shortcodes($data['content']);
61 61
 
62
-		if ( 'off' == $save_to_post_disabled || empty( $save_to_post_disabled ) ) {
62
+		if ('off' == $save_to_post_disabled || empty($save_to_post_disabled)) {
63 63
 
64
-			$args = array (
64
+			$args = array(
65 65
 				'ID'           	=> $postid,
66 66
 				'post_content' 	=> $content,
67 67
 				'post_status' 	=> 'publish'
68 68
 			);
69
-			wp_update_post( apply_filters( 'lasso_object_publish_args', $args ) );
69
+			wp_update_post(apply_filters('lasso_object_publish_args', $args));
70 70
 
71 71
 		}
72 72
 
73
-		do_action( 'lasso_post_published', $postid, $content, get_current_user_ID() );
73
+		do_action('lasso_post_published', $postid, $content, get_current_user_ID());
74 74
 
75 75
 		return true;
76 76
 
@@ -83,13 +83,13 @@  discard block
 block discarded – undo
83 83
 	 *
84 84
 	 * @return array Array of keys to pull from $_POST per action and their sanitization callback
85 85
 	 */
86
-	public static function params(){
87
-		$params[ 'process_save_content' ] = array(
86
+	public static function params() {
87
+		$params['process_save_content'] = array(
88 88
 			'post_id' => 'absint',
89 89
 			'content' => 'wp_kses_post'
90 90
 		);
91 91
 
92
-		$params[ 'process_save_publish_content' ] = array(
92
+		$params['process_save_publish_content'] = array(
93 93
 			'post_id' => 'absint',
94 94
 			'content' => 'wp_kses_post'
95 95
 		);
@@ -105,11 +105,11 @@  discard block
 block discarded – undo
105 105
 	 * @return array Array of additional functions to use to authorize action.
106 106
 	 */
107 107
 	public static function auth_callbacks() {
108
-		$params[ 'process_save_content' ] = array(
108
+		$params['process_save_content'] = array(
109 109
 			'lasso_user_can'
110 110
 		);
111 111
 
112
-		$params[ 'process_save_publish_content' ] = array();
112
+		$params['process_save_publish_content'] = array();
113 113
 
114 114
 		return $params;
115 115
 
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 	 * @return bool
126 126
 	 */
127 127
 	protected function save_to_post_disables() {
128
-		$save_to_post_disabled = lasso_editor_get_option( 'post_save_disabled', 'lasso_editor' );
128
+		$save_to_post_disabled = lasso_editor_get_option('post_save_disabled', 'lasso_editor');
129 129
 
130 130
 		return $save_to_post_disabled;
131 131
 
@@ -142,11 +142,11 @@  discard block
 block discarded – undo
142 142
 	 *
143 143
 	 * @return string
144 144
 	 */
145
-	protected function replace_rendered_shortcodes( $content ) {
146
-		if ( false === strpos( $content, '--EDITUS_OTHER_SHORTCODE_START|' ) ) {
145
+	protected function replace_rendered_shortcodes($content) {
146
+		if (false === strpos($content, '--EDITUS_OTHER_SHORTCODE_START|')) {
147 147
 			return $content;
148 148
 		}
149
-		$content = htmlspecialchars_decode ($content);
149
+		$content = htmlspecialchars_decode($content);
150 150
 
151 151
 		$content = preg_replace(
152 152
 			'/<!--EDITUS_OTHER_SHORTCODE_START\|\[(.*?)\]-->(.*?)<!--EDITUS_OTHER_SHORTCODE_END-->/s',
Please login to merge, or discard this patch.
public/includes/wrap-shortcodes.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -3,8 +3,8 @@  discard block
 block discarded – undo
3 3
  * Wraps shortcodes of other Plugins in prep for later replacement on save to preserve the shortcodes
4 4
  */
5 5
 
6
-if ( lasso_user_can( 'edit_posts' ) && ! is_admin() ) {
7
-	add_filter( 'the_content', 'lasso_wrap_shortcodes', 9 );
6
+if (lasso_user_can('edit_posts') && !is_admin()) {
7
+	add_filter('the_content', 'lasso_wrap_shortcodes', 9);
8 8
 }
9 9
 
10 10
 /**
@@ -17,33 +17,33 @@  discard block
 block discarded – undo
17 17
  *
18 18
  * @return string
19 19
  */
20
-function lasso_wrap_shortcodes( $content ) {
20
+function lasso_wrap_shortcodes($content) {
21 21
 	global $shortcode_tags;
22 22
 
23
-	if ( false === strpos( $content, '[' ) ) {
23
+	if (false === strpos($content, '[')) {
24 24
 		return $content;
25 25
 	}
26 26
 
27
-	if ( empty( $shortcode_tags ) || ! is_array( $shortcode_tags ) ) {
27
+	if (empty($shortcode_tags) || !is_array($shortcode_tags)) {
28 28
 		return $content;
29 29
 	}
30 30
 
31
-	$tagnames  = array_keys( $shortcode_tags );
32
-	$tagregexp = join( '|', array_map( 'preg_quote', $tagnames ) );
31
+	$tagnames  = array_keys($shortcode_tags);
32
+	$tagregexp = join('|', array_map('preg_quote', $tagnames));
33 33
 	$pattern   = "/\\[($tagregexp)/s";
34 34
 
35
-	if ( 1 !== preg_match( $pattern, $content ) ) {
35
+	if (1 !== preg_match($pattern, $content)) {
36 36
 		// Avoids parsing HTML when there are no shortcodes or embeds anyway.
37 37
 		return $content;
38 38
 	}
39 39
 
40
-	$content = do_shortcodes_in_html_tags( $content, true ,$tagnames);
40
+	$content = do_shortcodes_in_html_tags($content, true, $tagnames);
41 41
 
42 42
 	$pattern = get_shortcode_regex();
43
-	$content = preg_replace_callback( "/$pattern/s", 'lasso_wrap_shortcode_tag', $content );
43
+	$content = preg_replace_callback("/$pattern/s", 'lasso_wrap_shortcode_tag', $content);
44 44
 
45 45
 	// Always restore square braces so we don't break things like <!--[if IE ]>
46
-	$content = unescape_invalid_shortcodes( $content );
46
+	$content = unescape_invalid_shortcodes($content);
47 47
 
48 48
 	return $content;
49 49
 }
@@ -57,28 +57,28 @@  discard block
 block discarded – undo
57 57
  *
58 58
  * @return string
59 59
  */
60
-function lasso_wrap_shortcode_tag( $m ) {
60
+function lasso_wrap_shortcode_tag($m) {
61 61
 	// allow [[foo]] syntax for escaping a tag
62
-	if ( $m[1] == '[' && $m[6] == ']' ) {
63
-		return substr( $m[0], 1, - 1 );
62
+	if ($m[1] == '[' && $m[6] == ']') {
63
+		return substr($m[0], 1, - 1);
64 64
 	}
65 65
 	//array('aesop_quote','aesop_gallery','aesop_chapter','aesop_timeline_stop','aesop_video','aesop_collection','aesop_character','aesop_document','aesop_audio','aesop_content','aesop_map')
66 66
 
67
-	if ( strpos( $m[2],'aesop_'  ) === 0 ) {
67
+	if (strpos($m[2], 'aesop_') === 0) {
68 68
 		// check against the exceptions
69
-		if (strpos_arr($m[2],array('aesop_gallery_pop','aesop_character_carousel'))===false) {
69
+		if (strpos_arr($m[2], array('aesop_gallery_pop', 'aesop_character_carousel')) === false) {
70 70
 		    return $m[0];
71 71
 		}
72 72
 	}
73 73
 
74
-	return '<!--EDITUS_OTHER_SHORTCODE_START|[' . $m[0] . ']-->' . $m[0] . '<!--EDITUS_OTHER_SHORTCODE_END-->';
74
+	return '<!--EDITUS_OTHER_SHORTCODE_START|['.$m[0].']-->'.$m[0].'<!--EDITUS_OTHER_SHORTCODE_END-->';
75 75
 }
76 76
 
77 77
 /* a helper function */
78 78
 function strpos_arr($haystack, $needle) {
79
-    if(!is_array($needle)) $needle = array($needle);
80
-    foreach($needle as $what) {
81
-        if(($pos = strpos($haystack, $what))!==false) return $pos;
79
+    if (!is_array($needle)) $needle = array($needle);
80
+    foreach ($needle as $what) {
81
+        if (($pos = strpos($haystack, $what)) !== false) return $pos;
82 82
     }
83 83
     return false;
84 84
 }
85 85
\ No newline at end of file
Please login to merge, or discard this patch.
public/includes/editor-modules.php 1 patch
Spacing   +207 added lines, -207 removed lines patch added patch discarded remove patch
@@ -12,32 +12,32 @@  discard block
 block discarded – undo
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';
@@ -47,44 +47,44 @@  discard block
 block discarded – undo
47 47
 		
48 48
 		$mobile_style = wp_is_mobile() ? 'style="top:40px;"' : null;
49 49
 
50
-		?><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();?>" >
50
+		?><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(); ?>" >
51 51
 
52
-			<ul class="lasso--controls__center lasso-editor-controls lasso-editor-controls--wrap <?php echo $post_access_class;?> "  <?php echo $mobile_style ?> >
52
+			<ul class="lasso--controls__center lasso-editor-controls lasso-editor-controls--wrap <?php echo $post_access_class; ?> "  <?php echo $mobile_style ?> >
53 53
 
54
-				<?php do_action( 'lasso_editor_controls_before' );
54
+				<?php do_action('lasso_editor_controls_before');
55 55
 
56
-				if ( $is_capable ) { ?>
56
+				if ($is_capable) { ?>
57 57
 
58
-					<li id="lasso--edit" title="<?php esc_attr_e( 'Edit Post', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
58
+					<li id="lasso--edit" title="<?php esc_attr_e('Edit Post', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
59 59
 
60
-					<?php if ( 'off' == $post_settings_disabled || empty( $post_settings_disabled ) ) { ?>
61
-						<li id="lasso--post-settings" title="<?php esc_attr_e( 'Post Settings', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
60
+					<?php if ('off' == $post_settings_disabled || empty($post_settings_disabled)) { ?>
61
+						<li id="lasso--post-settings" title="<?php esc_attr_e('Post Settings', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
62 62
 					<?php }
63 63
 
64 64
 				} ?>
65 65
 
66
-				<li id="lasso--post-all" title="<?php esc_attr_e( 'All Posts', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
66
+				<li id="lasso--post-all" title="<?php esc_attr_e('All Posts', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
67 67
 
68
-				<?php if ( $is_capable && wp_revisions_enabled( $post ) ) { ?>
69
-					<li id="lasso--post-revisions" title="<?php esc_attr_e( 'Revisions', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
68
+				<?php if ($is_capable && wp_revisions_enabled($post)) { ?>
69
+					<li id="lasso--post-revisions" title="<?php esc_attr_e('Revisions', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
70 70
 				<?php } ?>
71 71
 
72
-				<?php if ( ( 'off' == $post_new_disabled || empty( $post_new_disabled ) && lasso_user_can('publish_posts') ) ) { ?>
73
-					<li id="lasso--post-new" title="<?php esc_attr_e( 'Add Post', 'lasso' );?>"><a href="#" class="lasso--button__primary"></a></li>
72
+				<?php if (('off' == $post_new_disabled || empty($post_new_disabled) && lasso_user_can('publish_posts'))) { ?>
73
+					<li id="lasso--post-new" title="<?php esc_attr_e('Add Post', 'lasso'); ?>"><a href="#" class="lasso--button__primary"></a></li>
74 74
 				<?php } ?>
75 75
 
76
-				<?php do_action( 'lasso_editor_controls_after' );?>
76
+				<?php do_action('lasso_editor_controls_after'); ?>
77 77
 
78 78
 			</ul>
79 79
 
80
-			<?php if ( is_singular() ) { ?>
80
+			<?php if (is_singular()) { ?>
81 81
 
82 82
 				<div class="lasso--controls__right">
83 83
 
84
-					<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>
84
+					<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>
85 85
 
86
-					<?php if ( 'draft' == $status && ( lasso_user_can('publish_posts') || lasso_user_can('publish_pages') )  ) { ?>
87
-						<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
+					<?php if ('draft' == $status && (lasso_user_can('publish_posts') || lasso_user_can('publish_pages'))) { ?>
87
+						<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>
88 88
 					<?php } ?>
89 89
 
90 90
 				</div>
@@ -107,13 +107,13 @@  discard block
 block discarded – undo
107 107
 
108 108
 	ob_start();
109 109
 
110
-	if ( !lasso_user_can() )
110
+	if (!lasso_user_can())
111 111
 		return;
112 112
 
113 113
 	// let users add custom css classes
114
-	$custom_classes = apply_filters( 'lasso_sidebar_classes', '' );
114
+	$custom_classes = apply_filters('lasso_sidebar_classes', '');
115 115
 	?>
116
-	<div id="lasso--sidebar" class="<?php echo sanitize_html_class( $custom_classes );?>" >
116
+	<div id="lasso--sidebar" class="<?php echo sanitize_html_class($custom_classes); ?>" >
117 117
 		<div class="lasso--sidebar__inner">
118 118
 			<div id="lasso--component__settings"></div>
119 119
 		</div>
@@ -131,25 +131,25 @@  discard block
 block discarded – undo
131 131
 
132 132
 	ob_start();
133 133
 
134
-	if ( !lasso_user_can() )
134
+	if (!lasso_user_can())
135 135
 		return;
136 136
 	
137 137
 	$is_mobile = wp_is_mobile();
138 138
 
139 139
 	// check for lasso story engine and add a class doniting this
140
-	$ase_status = class_exists( 'Aesop_Core' ) || defined( 'LASSO_CUSTOM' ) ? 'ase-active' : 'ase-not-active';
140
+	$ase_status = class_exists('Aesop_Core') || defined('LASSO_CUSTOM') ? 'ase-active' : 'ase-not-active';
141 141
 
142 142
 	// let users add custom css classes
143
-	$custom_classes = apply_filters( 'lasso_toolbar_classes', '' );
143
+	$custom_classes = apply_filters('lasso_toolbar_classes', '');
144 144
 
145 145
 	// are toolbar headings enabled
146
-	$toolbar_headings      = lasso_editor_get_option( 'toolbar_headings', 'lasso_editor' );
146
+	$toolbar_headings = lasso_editor_get_option('toolbar_headings', 'lasso_editor');
147 147
 
148
-	$toolbar_class  = $toolbar_headings ? 'toolbar-extended' : false;
148
+	$toolbar_class = $toolbar_headings ? 'toolbar-extended' : false;
149 149
 	
150 150
 	// mobile styles
151 151
     $mobile_class = $is_mobile ? 'lasso-mobile' : false;
152
-	$mobile_style =$is_mobile ? 'style="top:40px;"' : null;
152
+	$mobile_style = $is_mobile ? 'style="top:40px;"' : null;
153 153
 	
154 154
 	//show color
155 155
 	$show_color = true;
@@ -159,81 +159,81 @@  discard block
 block discarded – undo
159 159
 
160 160
 
161 161
 	?>
162
-	<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 ?>>
162
+	<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 ?>>
163 163
 		<ul class="lasso--toolbar__inner lasso-editor-controls">
164
-			<?php do_action( 'lasso_toolbar_components_before' );?>
165
-		    <li id="lasso-toolbar--bold" title="<?php esc_attr_e( 'Bold', 'lasso' );?>"></li>
166
-		    <li id="lasso-toolbar--underline" title="<?php esc_attr_e( 'Underline', 'lasso' );?>"></li>
167
-		    <li id="lasso-toolbar--italic" title="<?php esc_attr_e( 'Italicize', 'lasso' );?>"></li>
168
-		    <li id="lasso-toolbar--strike" title="<?php esc_attr_e( 'Strikethrough', 'lasso' );?>"></li>
169
-		    <?php if ( $toolbar_headings ): ?>
170
-		    <li id="lasso-toolbar--h2" title="<?php esc_attr_e( 'H2 Heading', 'lasso' );?>"></li>
171
-		    <li id="lasso-toolbar--h3" title="<?php esc_attr_e( 'H3 Heading', 'lasso' );?>"></li>
164
+			<?php do_action('lasso_toolbar_components_before'); ?>
165
+		    <li id="lasso-toolbar--bold" title="<?php esc_attr_e('Bold', 'lasso'); ?>"></li>
166
+		    <li id="lasso-toolbar--underline" title="<?php esc_attr_e('Underline', 'lasso'); ?>"></li>
167
+		    <li id="lasso-toolbar--italic" title="<?php esc_attr_e('Italicize', 'lasso'); ?>"></li>
168
+		    <li id="lasso-toolbar--strike" title="<?php esc_attr_e('Strikethrough', 'lasso'); ?>"></li>
169
+		    <?php if ($toolbar_headings): ?>
170
+		    <li id="lasso-toolbar--h2" title="<?php esc_attr_e('H2 Heading', 'lasso'); ?>"></li>
171
+		    <li id="lasso-toolbar--h3" title="<?php esc_attr_e('H3 Heading', 'lasso'); ?>"></li>
172 172
 			<?php endif; ?>
173 173
 			
174
-			<?php if ( $show_color ): ?>
175
-		    <li id="lasso-toolbar--color-set" title="<?php esc_attr_e( 'Set Text Color', 'lasso' );?>"></li>
176
-		    <li id="lasso-toolbar--color-pick" title="<?php esc_attr_e( 'Choose Color', 'lasso' );?>"></li>
174
+			<?php if ($show_color): ?>
175
+		    <li id="lasso-toolbar--color-set" title="<?php esc_attr_e('Set Text Color', 'lasso'); ?>"></li>
176
+		    <li id="lasso-toolbar--color-pick" title="<?php esc_attr_e('Choose Color', 'lasso'); ?>"></li>
177 177
 			<?php endif; ?>
178 178
 			
179
-		    <li id="lasso-toolbar--link" title="<?php esc_attr_e( 'Anchor Link', 'lasso' );?>">
179
+		    <li id="lasso-toolbar--link" title="<?php esc_attr_e('Anchor Link', 'lasso'); ?>">
180 180
 		    	<div id="lasso-toolbar--link__wrap" <?php echo $mobile_style ?> >
181
-		    		<div id="lasso-toolbar--link__inner" contenteditable="true" placeholder="<?php esc_attr_e( 'http://url.com', 'lasso' );?>"></div>
182
-		    		<a href="#" title="<?php esc_attr_e( 'Create Link', 'lasso' );?>" class="lasso-toolbar--link__control" id="lasso-toolbar--link__create" ></a>
181
+		    		<div id="lasso-toolbar--link__inner" contenteditable="true" placeholder="<?php esc_attr_e('http://url.com', 'lasso'); ?>"></div>
182
+		    		<a href="#" title="<?php esc_attr_e('Create Link', 'lasso'); ?>" class="lasso-toolbar--link__control" id="lasso-toolbar--link__create" ></a>
183 183
 					<!--input class="styled-checkbox" type="checkbox" /-->
184 184
                     <!--label>Styled Check Box</label-->
185 185
 		    	</div>
186 186
 		    </li>
187
-		    <?php do_action( 'lasso_toolbar_components_after' );?>
188
-		    <li id="lasso-toolbar--html" title="<?php esc_attr_e( 'Insert HTML', 'lasso' );?>">
187
+		    <?php do_action('lasso_toolbar_components_after'); ?>
188
+		    <li id="lasso-toolbar--html" title="<?php esc_attr_e('Insert HTML', 'lasso'); ?>">
189 189
 		    	<div id="lasso-toolbar--html__wrap" <?php echo $mobile_style ?>>
190
-		    		<div id="lasso-toolbar--html__inner" contenteditable="true" placeholder="<?php esc_attr_e( 'Enter HTML to insert', 'lasso' );?>"></div>
190
+		    		<div id="lasso-toolbar--html__inner" contenteditable="true" placeholder="<?php esc_attr_e('Enter HTML to insert', 'lasso'); ?>"></div>
191 191
 		    		<div id="lasso-toolbar--html__footer">
192 192
 		    			<ul class="lasso-toolbar--html-snips">
193
-		    				<?php if ( !$toolbar_headings ): ?>
194
-		    				<li id="lasso-html--h2" title="<?php esc_attr_e( 'H2 Heading', 'lasso' );?>">
195
-		    				<li id="lasso-html--h3" title="<?php esc_attr_e( 'H3 Heading', 'lasso' );?>">
193
+		    				<?php if (!$toolbar_headings): ?>
194
+		    				<li id="lasso-html--h2" title="<?php esc_attr_e('H2 Heading', 'lasso'); ?>">
195
+		    				<li id="lasso-html--h3" title="<?php esc_attr_e('H3 Heading', 'lasso'); ?>">
196 196
 		    				<?php endif; ?>
197
-		    				<li id="lasso-html--ul" title="<?php esc_attr_e( 'Unordered List', 'lasso' );?>">
198
-		    				<li id="lasso-html--ol" title="<?php esc_attr_e( 'Ordered List', 'lasso' );?>">
197
+		    				<li id="lasso-html--ul" title="<?php esc_attr_e('Unordered List', 'lasso'); ?>">
198
+		    				<li id="lasso-html--ol" title="<?php esc_attr_e('Ordered List', 'lasso'); ?>">
199 199
 		    			</ul>
200
-		    			<a class="lasso-toolbar--html__control lasso-toolbar--html__cancel" href="#"><?php _e( 'Cancel', 'lasso' );?></a>
201
-		    			<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>
200
+		    			<a class="lasso-toolbar--html__control lasso-toolbar--html__cancel" href="#"><?php _e('Cancel', 'lasso'); ?></a>
201
+		    			<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>
202 202
 		    		</div>
203 203
 		    	</div>
204 204
 		    </li>
205 205
 			
206
-			<?php if ( $show_align ): ?>
207
-		    <li id="lasso-toolbar--left-align" title="<?php esc_attr_e( 'Text Left Align', 'lasso' );?>"></li>
208
-		    <li id="lasso-toolbar--center-align" title="<?php esc_attr_e( 'Text Center Align', 'lasso' );?>"></li>
209
-			<li id="lasso-toolbar--right-align" title="<?php esc_attr_e( 'Text Right Align', 'lasso' );?>"></li>
206
+			<?php if ($show_align): ?>
207
+		    <li id="lasso-toolbar--left-align" title="<?php esc_attr_e('Text Left Align', 'lasso'); ?>"></li>
208
+		    <li id="lasso-toolbar--center-align" title="<?php esc_attr_e('Text Center Align', 'lasso'); ?>"></li>
209
+			<li id="lasso-toolbar--right-align" title="<?php esc_attr_e('Text Right Align', 'lasso'); ?>"></li>
210 210
 			<?php endif; ?>
211 211
 			
212
-		    <li id="lasso-toolbar--components" title="<?php esc_attr_e( 'Insert Component', 'lasso' );?>">
212
+		    <li id="lasso-toolbar--components" title="<?php esc_attr_e('Insert Component', 'lasso'); ?>">
213 213
 			    <ul id="lasso-toolbar--components__list" style="display:none;">
214
-			    	<?php if ( 'ase-active' == $ase_status ): ?>
215
-						<li data-type="image" title="<?php esc_attr_e( 'Image', 'lasso' );?>" class="lasso-toolbar--component__image"></li>
216
-						<li data-type="character" title="<?php esc_attr_e( 'Character', 'lasso' );?>" class="lasso-toolbar--component__character"></li>
217
-						<li data-type="quote" title="<?php esc_attr_e( 'Quote', 'lasso' );?>"  class="lasso-toolbar--component__quote"></li>
218
-						<li data-type="content" title="<?php esc_attr_e( 'Content', 'lasso' );?>"  class="lasso-toolbar--component__content"></li>
219
-						<li data-type="chapter" title="<?php esc_attr_e( 'Chapter', 'lasso' );?>"  class="lasso-toolbar--component__chapter"></li>
220
-						<li data-type="parallax" title="<?php esc_attr_e( 'Parallax', 'lasso' );?>"  class="lasso-toolbar--component__parallax"></li>
221
-						<li data-type="audio" title="<?php esc_attr_e( 'Audio', 'lasso' );?>"  class="lasso-toolbar--component__audio"></li>
222
-						<li data-type="video" title="<?php esc_attr_e( 'Video', 'lasso' );?>"  class="lasso-toolbar--component__video"></li>
223
-						<li data-type="map" title="<?php esc_attr_e( 'Map', 'lasso' );?>"  class="lasso-toolbar--component__map"></li>
224
-						<li data-type="timeline_stop" title="<?php esc_attr_e( 'Timeline', 'lasso' );?>"  class="lasso-toolbar--component__timeline"></li>
225
-						<li data-type="document" title="<?php esc_attr_e( 'Document', 'lasso' );?>"  class="lasso-toolbar--component__document"></li>
226
-						<li data-type="collection" title="<?php esc_attr_e( 'Collection', 'lasso' );?>"  class="lasso-toolbar--component__collection"></li>
227
-						<li data-type="gallery" title="<?php esc_attr_e( 'Gallery', 'lasso' );?>"  class="lasso-toolbar--component__gallery"></li>
228
-						<?php if ( class_exists ('Aesop_GalleryPop') ) { ?>
229
-						     <li data-type="gallery" title="<?php esc_attr_e( 'Gallery Pop', 'lasso' );?>"  class="lasso-toolbar--component__gallerypop"></li>
214
+			    	<?php if ('ase-active' == $ase_status): ?>
215
+						<li data-type="image" title="<?php esc_attr_e('Image', 'lasso'); ?>" class="lasso-toolbar--component__image"></li>
216
+						<li data-type="character" title="<?php esc_attr_e('Character', 'lasso'); ?>" class="lasso-toolbar--component__character"></li>
217
+						<li data-type="quote" title="<?php esc_attr_e('Quote', 'lasso'); ?>"  class="lasso-toolbar--component__quote"></li>
218
+						<li data-type="content" title="<?php esc_attr_e('Content', 'lasso'); ?>"  class="lasso-toolbar--component__content"></li>
219
+						<li data-type="chapter" title="<?php esc_attr_e('Chapter', 'lasso'); ?>"  class="lasso-toolbar--component__chapter"></li>
220
+						<li data-type="parallax" title="<?php esc_attr_e('Parallax', 'lasso'); ?>"  class="lasso-toolbar--component__parallax"></li>
221
+						<li data-type="audio" title="<?php esc_attr_e('Audio', 'lasso'); ?>"  class="lasso-toolbar--component__audio"></li>
222
+						<li data-type="video" title="<?php esc_attr_e('Video', 'lasso'); ?>"  class="lasso-toolbar--component__video"></li>
223
+						<li data-type="map" title="<?php esc_attr_e('Map', 'lasso'); ?>"  class="lasso-toolbar--component__map"></li>
224
+						<li data-type="timeline_stop" title="<?php esc_attr_e('Timeline', 'lasso'); ?>"  class="lasso-toolbar--component__timeline"></li>
225
+						<li data-type="document" title="<?php esc_attr_e('Document', 'lasso'); ?>"  class="lasso-toolbar--component__document"></li>
226
+						<li data-type="collection" title="<?php esc_attr_e('Collection', 'lasso'); ?>"  class="lasso-toolbar--component__collection"></li>
227
+						<li data-type="gallery" title="<?php esc_attr_e('Gallery', 'lasso'); ?>"  class="lasso-toolbar--component__gallery"></li>
228
+						<?php if (class_exists('Aesop_GalleryPop')) { ?>
229
+						     <li data-type="gallery" title="<?php esc_attr_e('Gallery Pop', 'lasso'); ?>"  class="lasso-toolbar--component__gallerypop"></li>
230 230
 						<?php }?>
231 231
 					<?php else: ?>
232
-						<li data-type="wpimg" title="<?php esc_attr_e( 'WordPress Image', 'lasso' );?>" class="image lasso-toolbar--component__image"></li>
233
-						<li data-type="wpquote" title="<?php esc_attr_e( 'WordPress Quote', 'lasso' );?>" class="quote lasso-toolbar--component__quote"></li>
234
-						<!--li data-type="wpvideo" title="<?php esc_attr_e( 'WordPress Video', 'lasso' );?>" class="video lasso-toolbar--component__video"></li-->
232
+						<li data-type="wpimg" title="<?php esc_attr_e('WordPress Image', 'lasso'); ?>" class="image lasso-toolbar--component__image"></li>
233
+						<li data-type="wpquote" title="<?php esc_attr_e('WordPress Quote', 'lasso'); ?>" class="quote lasso-toolbar--component__quote"></li>
234
+						<!--li data-type="wpvideo" title="<?php esc_attr_e('WordPress Video', 'lasso'); ?>" class="video lasso-toolbar--component__video"></li-->
235 235
 					<?php endif; ?>
236
-					<?php do_action( 'lasso_toolbar_components' );?>
236
+					<?php do_action('lasso_toolbar_components'); ?>
237 237
 			    </ul>
238 238
 			</li>
239 239
 		</ul>
@@ -249,22 +249,22 @@  discard block
 block discarded – undo
249 249
  */
250 250
 function lasso_editor_settings_toolbar() {
251 251
 
252
-	$delete_nonce = wp_create_nonce( 'lasso-delete-nonce' );
252
+	$delete_nonce = wp_create_nonce('lasso-delete-nonce');
253 253
 
254 254
 	ob_start();
255 255
 
256
-	if ( !lasso_user_can() )
256
+	if (!lasso_user_can())
257 257
 		return;
258 258
 
259 259
 	// let users add custom css classes
260
-	$custom_classes = apply_filters( 'lasso_component_classes', '' );
260
+	$custom_classes = apply_filters('lasso_component_classes', '');
261 261
 
262 262
 	?>
263
-	<ul class="lasso-component--controls <?php echo sanitize_html_class( $custom_classes );?>" contenteditable="false">
264
-		<li class="lasso-drag" title="<?php esc_attr_e( 'Move', 'lasso' );?>"></li>
265
-		<li id="lasso-component--settings__trigger" class="lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li>
266
-		<li class="lasso-clone" title="<?php esc_attr_e( 'Clone', 'lasso' );?>"></li>
267
-		<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>
263
+	<ul class="lasso-component--controls <?php echo sanitize_html_class($custom_classes); ?>" contenteditable="false">
264
+		<li class="lasso-drag" title="<?php esc_attr_e('Move', 'lasso'); ?>"></li>
265
+		<li id="lasso-component--settings__trigger" class="lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li>
266
+		<li class="lasso-clone" title="<?php esc_attr_e('Clone', 'lasso'); ?>"></li>
267
+		<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>
268 268
 	</ul>
269 269
 
270 270
 	<?php return ob_get_clean();
@@ -280,17 +280,17 @@  discard block
 block discarded – undo
280 280
 
281 281
 	ob_start();
282 282
 
283
-	if ( !lasso_user_can() )
283
+	if (!lasso_user_can())
284 284
 		return;
285 285
 
286 286
 	// has post thumbnail
287
-	$has_thumbnail = has_post_thumbnail( get_the_ID() ) ? 'class="lasso--featImg--has-thumb"' : false;
287
+	$has_thumbnail = has_post_thumbnail(get_the_ID()) ? 'class="lasso--featImg--has-thumb"' : false;
288 288
 
289 289
 	?>
290
-	<ul id="lasso--featImgControls" <?php echo $has_thumbnail;?>>
291
-		<li id="lasso--featImgUpload"><a title="<?php esc_attr_e( 'Replace Image', 'lasso' );?>" href="#"><i class="lasso-icon-image"></i></a></li>
292
-		<li id="lasso--featImgDelete"><a title="<?php esc_attr_e( 'Delete Image', 'lasso' );?>" href="#"><i class="lasso-icon-bin2"></i></a></li>
293
-		<li id="lasso--featImgSave"><a href="#"><?php esc_attr_e( 'save', 'lasso' );?></a></li>
290
+	<ul id="lasso--featImgControls" <?php echo $has_thumbnail; ?>>
291
+		<li id="lasso--featImgUpload"><a title="<?php esc_attr_e('Replace Image', 'lasso'); ?>" href="#"><i class="lasso-icon-image"></i></a></li>
292
+		<li id="lasso--featImgDelete"><a title="<?php esc_attr_e('Delete Image', 'lasso'); ?>" href="#"><i class="lasso-icon-bin2"></i></a></li>
293
+		<li id="lasso--featImgSave"><a href="#"><?php esc_attr_e('save', 'lasso'); ?></a></li>
294 294
 	</ul>
295 295
 
296 296
 	<?php return ob_get_clean();
@@ -309,55 +309,55 @@  discard block
 block discarded – undo
309 309
 
310 310
 	ob_start();
311 311
 
312
-	if ( !lasso_user_can() )
312
+	if (!lasso_user_can())
313 313
 		return;
314 314
 
315 315
 	global $post;
316 316
 
317 317
 	$postid = get_the_ID();
318 318
 
319
-	$status = get_post_status( $postid );
320
-	$nonce = wp_create_nonce( 'lasso-update-post-settings' );
319
+	$status = get_post_status($postid);
320
+	$nonce = wp_create_nonce('lasso-update-post-settings');
321 321
 
322 322
 	// let users add custom css classes
323
-	$custom_classes = apply_filters( 'lasso_modal_settings_classes', '' );
323
+	$custom_classes = apply_filters('lasso_modal_settings_classes', '');
324 324
 
325 325
 	// objects categories
326
-	$categories 		= lasso_get_post_objects( $postid, 'category' );
327
-	$tags 				= lasso_get_post_objects( $postid, 'tag' );
326
+	$categories = lasso_get_post_objects($postid, 'category');
327
+	$tags = lasso_get_post_objects($postid, 'tag');
328 328
 
329 329
 	// modal tabs
330
-	$tabs  				= lasso_modal_addons('tab');
331
-	$content 			= lasso_modal_addons('content');
330
+	$tabs = lasso_modal_addons('tab');
331
+	$content = lasso_modal_addons('content');
332 332
 
333 333
 	// are we singular
334
-	$is_singular 		= is_singular();
334
+	$is_singular = is_singular();
335 335
 	$is_singular_class 	= $is_singular ? 'lasso--postsettings__2col' : 'lasso--postsettings__1col';
336 336
 	$has_thumb_class    = has_post_thumbnail() ? 'has-thumbnail' : 'no-thumbnail';
337 337
 	$theme_supports     = current_theme_supports('post-thumbnails');
338
-	$default_image 		= LASSO_URL.'/admin/assets/img/empty-img.png';
338
+	$default_image = LASSO_URL.'/admin/assets/img/empty-img.png';
339 339
 
340 340
 ?>
341
-	<div id="lasso--post-settings__modal" class="lasso--modal lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>">
341
+	<div id="lasso--post-settings__modal" class="lasso--modal lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>">
342 342
 		<div class="lasso--modal__inner">
343 343
 
344
-			<?php if( $tabs ) { echo $tabs; } ?>
344
+			<?php if ($tabs) { echo $tabs; } ?>
345 345
 
346 346
 			<div class="lasso--modal__content modal__content--core visible" data-addon-content="core">
347
-				<form id="lasso--postsettings__form" enctype="multipart/form-data" class="lasso--post-form <?php echo $is_singular_class.' '.$has_thumb_class;?>" >
347
+				<form id="lasso--postsettings__form" enctype="multipart/form-data" class="lasso--post-form <?php echo $is_singular_class.' '.$has_thumb_class; ?>" >
348 348
 
349
-					<?php if ( $is_singular && $theme_supports ) : ?>
349
+					<?php if ($is_singular && $theme_supports) : ?>
350 350
 					<div class="lasso--postsettings__left">
351
-						<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>
352
-						<div class="lasso--post-thumb" data-default-thumb="<?php echo esc_url( $default_image );?>">
351
+						<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>
352
+						<div class="lasso--post-thumb" data-default-thumb="<?php echo esc_url($default_image); ?>">
353 353
 
354 354
 							<div id="lasso--post-thumb__controls" class="lasso--post-thumb__controls">
355
-								<i id="lasso--post-thumb__add" title="<?php _e('Change Featured Image','lasso');?>" class="dashicons dashicons-edit"></i>
356
-								<i id="lasso--post-thumb__delete" title="<?php _e('Delete Featured Image','lasso');?>" class="dashicons dashicons-no-alt"></i>
355
+								<i id="lasso--post-thumb__add" title="<?php _e('Change Featured Image', 'lasso'); ?>" class="dashicons dashicons-edit"></i>
356
+								<i id="lasso--post-thumb__delete" title="<?php _e('Delete Featured Image', 'lasso'); ?>" class="dashicons dashicons-no-alt"></i>
357 357
 								<i id="lasso--save-status" class="lasso-icon lasso-icon-spinner6 not-visible"></i>
358 358
 							</div>
359 359
 
360
-							<?php echo has_post_thumbnail() ? get_the_post_thumbnail( $post->ID, 'medium' ) : '<img src="'.$default_image.'">'; ?>
360
+							<?php echo has_post_thumbnail() ? get_the_post_thumbnail($post->ID, 'medium') : '<img src="'.$default_image.'">'; ?>
361 361
 
362 362
 						</div>
363 363
 						<div id="lasso--featImgSave"><a href="#" class="not-visible">Save</a></div>
@@ -367,12 +367,12 @@  discard block
 block discarded – undo
367 367
 
368 368
 					<div class="lasso--postsettings__right">
369 369
 
370
-						<?php if( lasso_user_can('publish_posts') || lasso_user_can('publish_pages') ): ?>
370
+						<?php if (lasso_user_can('publish_posts') || lasso_user_can('publish_pages')): ?>
371 371
 						<div class="lasso--postsettings__option story-status-option">
372
-							<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>
373
-							<ul class="story-status story-status-<?php echo sanitize_html_class( $status );?>">
374
-								<li id="lasso--status-draft"><?php _e( 'Draft', 'lasso' );?></li>
375
-								<li id="lasso--status-publish"><?php _e( 'Publish', 'lasso' );?></li>
372
+							<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>
373
+							<ul class="story-status story-status-<?php echo sanitize_html_class($status); ?>">
374
+								<li id="lasso--status-draft"><?php _e('Draft', 'lasso'); ?></li>
375
+								<li id="lasso--status-publish"><?php _e('Publish', 'lasso'); ?></li>
376 376
 							</ul>
377 377
 							<div class="lasso--slider_wrap">
378 378
 								<div id="lasso--slider"></div>
@@ -380,10 +380,10 @@  discard block
 block discarded – undo
380 380
 						</div>
381 381
 						<?php endif; ?>
382 382
 
383
-						<?php if ( 'publish' == $status ): ?>
383
+						<?php if ('publish' == $status): ?>
384 384
 						<div class="lasso--postsettings__option story-slug-option">
385
-							<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>
386
-							<input class="lasso--modal__trigger-footer" type="text" name="story_slug" value="<?php echo isset( $post ) ? esc_attr( $post->post_name ) : false;?>">
385
+							<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>
386
+							<input class="lasso--modal__trigger-footer" type="text" name="story_slug" value="<?php echo isset($post) ? esc_attr($post->post_name) : false; ?>">
387 387
 						</div>
388 388
 						<?php endif; ?>
389 389
 
@@ -392,34 +392,34 @@  discard block
 block discarded – undo
392 392
 					<div class="lasso--postsettings__middle">
393 393
 
394 394
 						<div class="lasso--postsettings__option story-categories-option">
395
-							<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>
396
-							<input id="lasso--cat-select" class="lasso--modal__trigger-footer" type="hidden" name="story_cats" value="<?php echo $categories;?>">
395
+							<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>
396
+							<input id="lasso--cat-select" class="lasso--modal__trigger-footer" type="hidden" name="story_cats" value="<?php echo $categories; ?>">
397 397
 						</div>
398 398
 
399 399
 						<div class="lasso--postsettings__option story-tags-option">
400
-							<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>
401
-							<input id="lasso--tag-select" class="lasso--modal__trigger-footer" type="hidden" name="story_tags" value="<?php echo $tags;?>">
400
+							<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>
401
+							<input id="lasso--tag-select" class="lasso--modal__trigger-footer" type="hidden" name="story_tags" value="<?php echo $tags; ?>">
402 402
 						</div>
403 403
 
404 404
 					</div>
405 405
 
406
-					<?php do_action( 'lasso_modal_post_form' ); // action ?>
406
+					<?php do_action('lasso_modal_post_form'); // action ?>
407 407
 
408 408
 					<div class="lasso--postsettings__footer" style="display:none;">
409
-						<a href="#" class="lasso--postsettings-cancel"><?php _e( 'Cancel', 'lasso' );?></a>
409
+						<a href="#" class="lasso--postsettings-cancel"><?php _e('Cancel', 'lasso'); ?></a>
410 410
 						<input type="hidden" name="status" value="">
411 411
 						<input type="hidden" name="categories" value="">
412
-						<input type="hidden" name="postid" value="<?php echo get_the_ID();?>">
412
+						<input type="hidden" name="postid" value="<?php echo get_the_ID(); ?>">
413 413
 						<input type="hidden" name="action" value="process_update-object_post">
414
-						<input type="hidden" name="nonce" value="<?php echo $nonce;?>">
415
-						<?php do_action( 'lasso_modal_post_form_footer' ); // action ?>
416
-						<input type="submit" value="<?php esc_attr_e( 'Save', 'lasso' );?>">
414
+						<input type="hidden" name="nonce" value="<?php echo $nonce; ?>">
415
+						<?php do_action('lasso_modal_post_form_footer'); // action ?>
416
+						<input type="submit" value="<?php esc_attr_e('Save', 'lasso'); ?>">
417 417
 					</div>
418 418
 
419 419
 				</form>
420 420
 			</div>
421 421
 
422
-			<?php if( $tabs ) { echo $content; } ?>
422
+			<?php if ($tabs) { echo $content; } ?>
423 423
 
424 424
 		</div>
425 425
 
@@ -440,41 +440,41 @@  discard block
 block discarded – undo
440 440
 
441 441
 	ob_start();
442 442
 
443
-	if ( !lasso_user_can('edit_posts') )
443
+	if (!lasso_user_can('edit_posts'))
444 444
 		return;
445 445
 
446
-	$status = get_post_status( get_the_ID() );
446
+	$status = get_post_status(get_the_ID());
447 447
 
448
-	$nonce = wp_create_nonce( 'lasso-editor-new-post' );
448
+	$nonce = wp_create_nonce('lasso-editor-new-post');
449 449
 
450 450
 	// let users add custom css classes
451
-	$custom_classes = apply_filters( 'lasso_modal_post_classes', '' );
451
+	$custom_classes = apply_filters('lasso_modal_post_classes', '');
452 452
 
453 453
 	// return the post type
454
-	$type = get_post_type( get_the_ID() );
454
+	$type = get_post_type(get_the_ID());
455 455
 
456 456
 	?>
457
-	<div id="lasso--post-new__modal" class="lasso--modal lasso--modal__med lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>">
457
+	<div id="lasso--post-new__modal" class="lasso--modal lasso--modal__med lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>">
458 458
 		<div class="lasso--modal__inner">
459 459
 
460 460
 			<form id="lasso--postnew__form" enctype="multipart/form-data" class="lasso--post-form">
461 461
 
462 462
 				<div class="lasso--postsettings__option story-slug-option lasso--last-option">
463
-					<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>
464
-					<input class="lasso--modal__trigger-footer" type="text" required name="story_title" value="" placeholder="<?php esc_attr_e( 'Grump Wizards Make Toxic Brew', 'lasso' );?>">
463
+					<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>
464
+					<input class="lasso--modal__trigger-footer" type="text" required name="story_title" value="" placeholder="<?php esc_attr_e('Grump Wizards Make Toxic Brew', 'lasso'); ?>">
465 465
 						<div class="lasso--select-wrap" style="width:90px">
466 466
 						<select id="lasso--select-type" name="story_type">
467 467
 
468 468
 							<?php
469 469
 								$types = lasso_post_types();
470 470
 
471
-								if ( !empty( $types ) ) {
471
+								if (!empty($types)) {
472 472
 
473
-									foreach( $types as $type ) {
473
+									foreach ($types as $type) {
474 474
 
475
-										$type = preg_replace( '/s\b/','', $type );
475
+										$type = preg_replace('/s\b/', '', $type);
476 476
 
477
-										printf( '<option value="%s">%s</option>', lcfirst( esc_attr( $type ) ) , ucfirst( esc_attr( $type ) ) );
477
+										printf('<option value="%s">%s</option>', lcfirst(esc_attr($type)), ucfirst(esc_attr($type)));
478 478
 									}
479 479
 
480 480
 								}
@@ -485,11 +485,11 @@  discard block
 block discarded – undo
485 485
 				</div>
486 486
 
487 487
 				<div class="lasso--postsettings__footer" style="display:none;">
488
-					<a href="#" class="lasso--postsettings-cancel"><?php _e( 'Cancel', 'lasso' );?></a>
488
+					<a href="#" class="lasso--postsettings-cancel"><?php _e('Cancel', 'lasso'); ?></a>
489 489
 					<input type="hidden" name="action" value="process_new-object_post">
490 490
 					<input type="hidden" name="object" value="post">
491
-					<input type="hidden" name="nonce" value="<?php echo $nonce;?>">
492
-					<input type="submit" value="<?php esc_attr_e( 'Create', 'lasso' );?>">
491
+					<input type="hidden" name="nonce" value="<?php echo $nonce; ?>">
492
+					<input type="submit" value="<?php esc_attr_e('Create', 'lasso'); ?>">
493 493
 				</div>
494 494
 
495 495
 			</form>
@@ -513,18 +513,18 @@  discard block
 block discarded – undo
513 513
 	ob_start();
514 514
 
515 515
 	// post status
516
-	$status = get_post_status( get_the_ID() );
516
+	$status = get_post_status(get_the_ID());
517 517
 
518 518
 	// let users add custom css classes
519
-	$custom_classes = apply_filters( 'lasso_modal_all_post_classes', '' );
519
+	$custom_classes = apply_filters('lasso_modal_all_post_classes', '');
520 520
 
521 521
 	?>
522
-	<div id="lasso--all-posts__modal" class="lasso--modal lasso--modal__full lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>">
522
+	<div id="lasso--all-posts__modal" class="lasso--modal lasso--modal__full lassoShowAnimate <?php echo sanitize_html_class($custom_classes); ?>">
523 523
 		<div class="lasso--modal__inner">
524 524
 
525 525
 			<div class="lasso--post-filtering not-visible">
526 526
 				<div class="lasso--search__results">
527
-					<span id="lasso--results-found"></span><?php _e('results found','lasso');?>
527
+					<span id="lasso--results-found"></span><?php _e('results found', 'lasso'); ?>
528 528
 				</div>
529 529
 				<div class="lasso--search">
530 530
 					<i id="lasso--search__toggle" class="dashicons dashicons-search"></i>
@@ -537,16 +537,16 @@  discard block
 block discarded – undo
537 537
 
538 538
 				$post_types = lasso_post_types_names();
539 539
 
540
-				if ( ! empty( $post_types ) ) {
540
+				if (!empty($post_types)) {
541 541
 					$first = 'active';
542
-					foreach( $post_types as $name => $label ) {
543
-						printf( '<li class="%1s lasso--show-objects" data-post-type="%2s">%3s</li>', esc_attr( $first), esc_attr( $name ), esc_attr( $label ) );
542
+					foreach ($post_types as $name => $label) {
543
+						printf('<li class="%1s lasso--show-objects" data-post-type="%2s">%3s</li>', esc_attr($first), esc_attr($name), esc_attr($label));
544 544
 						$first = '';
545 545
 					}
546 546
 
547 547
 				}
548 548
 
549
-				do_action('lasso_modal_post_objects');?>
549
+				do_action('lasso_modal_post_objects'); ?>
550 550
 
551 551
 			</ul>
552 552
 			<div id="lasso--loading" class="lasso--loading"><div class="lasso--loader"></div></div>
@@ -564,18 +564,18 @@  discard block
 block discarded – undo
564 564
 
565 565
 	ob_start();
566 566
 
567
-	if ( !lasso_user_can() )
567
+	if (!lasso_user_can())
568 568
 		return;
569 569
 
570 570
 	// let users add custom css classes
571
-	$custom_classes = apply_filters( 'lasso_wpimg_classes', '' );
571
+	$custom_classes = apply_filters('lasso_wpimg_classes', '');
572 572
 
573 573
 	?>
574
-	<ul class="lasso-component--controls <?php echo sanitize_html_class( $custom_classes );?>" contenteditable="false">
575
-		<li class="lasso-drag" title="<?php esc_attr_e( 'Move', 'lasso' );?>"></li>
576
-		<li id="lasso--wpimg-edit" class="lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li>
577
-		<li class="lasso-clone" title="<?php esc_attr_e( 'Clone', 'lasso' );?>"></li>
578
-		<li class="lasso-delete" title="<?php esc_attr_e( 'Delete', 'lasso' );?>"></li>
574
+	<ul class="lasso-component--controls <?php echo sanitize_html_class($custom_classes); ?>" contenteditable="false">
575
+		<li class="lasso-drag" title="<?php esc_attr_e('Move', 'lasso'); ?>"></li>
576
+		<li id="lasso--wpimg-edit" class="lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li>
577
+		<li class="lasso-clone" title="<?php esc_attr_e('Clone', 'lasso'); ?>"></li>
578
+		<li class="lasso-delete" title="<?php esc_attr_e('Delete', 'lasso'); ?>"></li>
579 579
 	</ul>
580 580
 
581 581
 	<?php return ob_get_clean();
@@ -585,18 +585,18 @@  discard block
 block discarded – undo
585 585
 
586 586
 	ob_start();
587 587
 
588
-	if ( !lasso_user_can() )
588
+	if (!lasso_user_can())
589 589
 		return;
590 590
 
591 591
 	// let users add custom css classes
592
-	$custom_classes = apply_filters( 'lasso_wpimg_classes', '' );
592
+	$custom_classes = apply_filters('lasso_wpimg_classes', '');
593 593
 
594 594
 	?>
595
-	<ul class="lasso-component--controls <?php echo sanitize_html_class( $custom_classes );?>" contenteditable="false">
596
-		<li class="lasso-drag" title="<?php esc_attr_e( 'Move', 'lasso' );?>"></li>
597
-		<li id="lasso--wpvideo-edit" class="lasso-settings" title="<?php esc_attr_e( 'Settings', 'lasso' );?>"></li>
598
-		<li class="lasso-clone" title="<?php esc_attr_e( 'Clone', 'lasso' );?>"></li>
599
-		<li class="lasso-delete" title="<?php esc_attr_e( 'Delete', 'lasso' );?>"></li>
595
+	<ul class="lasso-component--controls <?php echo sanitize_html_class($custom_classes); ?>" contenteditable="false">
596
+		<li class="lasso-drag" title="<?php esc_attr_e('Move', 'lasso'); ?>"></li>
597
+		<li id="lasso--wpvideo-edit" class="lasso-settings" title="<?php esc_attr_e('Settings', 'lasso'); ?>"></li>
598
+		<li class="lasso-clone" title="<?php esc_attr_e('Clone', 'lasso'); ?>"></li>
599
+		<li class="lasso-delete" title="<?php esc_attr_e('Delete', 'lasso'); ?>"></li>
600 600
 	</ul>
601 601
 
602 602
 	<?php return ob_get_clean();
@@ -609,16 +609,16 @@  discard block
 block discarded – undo
609 609
  */
610 610
 function lasso_map_form_footer() {
611 611
 
612
-	$nonce = wp_create_nonce( 'lasso-process-map' );
612
+	$nonce = wp_create_nonce('lasso-process-map');
613 613
 
614 614
 	ob_start();
615 615
 
616 616
 	?>
617 617
 	<div class="lasso--map-form__footer">
618
-		<input type="hidden" name="postid" value="<?php echo get_the_ID();?>">
619
-		<input type="hidden" name="nonce" value="<?php echo $nonce;?>">
618
+		<input type="hidden" name="postid" value="<?php echo get_the_ID(); ?>">
619
+		<input type="hidden" name="nonce" value="<?php echo $nonce; ?>">
620 620
 		<input type="hidden" name="action" value="process_map_save">
621
-		<input type="submit" class="lasso--map-form__submit" value="<?php esc_attr_e( 'Save Locations', 'lasso' );?>">
621
+		<input type="submit" class="lasso--map-form__submit" value="<?php esc_attr_e('Save Locations', 'lasso'); ?>">
622 622
 	</div>
623 623
 
624 624
 	<?php return ob_get_clean();
@@ -636,7 +636,7 @@  discard block
 block discarded – undo
636 636
 
637 637
 	?>
638 638
 	<div id="lasso--pagerefresh" class="visible">
639
-		<?php _e( 'Save this post and refesh the page to see these changes.', 'lasso' );?>
639
+		<?php _e('Save this post and refesh the page to see these changes.', 'lasso'); ?>
640 640
 	</div>
641 641
 
642 642
 	<?php return ob_get_clean();
@@ -650,43 +650,43 @@  discard block
 block discarded – undo
650 650
  */
651 651
 function lasso_editor_options_blob() {
652 652
 
653
-	$codes   = function_exists( 'aesop_shortcodes' ) ? aesop_shortcodes() : apply_filters( 'lasso_custom_options', '' );
654
-	$galleries  = function_exists( 'lasso_editor_galleries_exist' ) && lasso_editor_galleries_exist() ? 'has-galleries' : 'creating-gallery';
653
+	$codes = function_exists('aesop_shortcodes') ? aesop_shortcodes() : apply_filters('lasso_custom_options', '');
654
+	$galleries = function_exists('lasso_editor_galleries_exist') && lasso_editor_galleries_exist() ? 'has-galleries' : 'creating-gallery';
655 655
 
656
-	$nonce = wp_create_nonce( 'lasso_gallery' );
656
+	$nonce = wp_create_nonce('lasso_gallery');
657 657
 
658 658
 	$blob = array();
659 659
 
660
-	if ( empty( $codes ) )
660
+	if (empty($codes))
661 661
 		return;
662 662
 
663
-	foreach ( $codes as $slug => $shortcode ) {
663
+	foreach ($codes as $slug => $shortcode) {
664 664
 		$return = '';
665 665
 		// Shortcode has atts
666 666
 
667
-		if ( count( $shortcode['atts'] ) && $shortcode['atts'] ) {
667
+		if (count($shortcode['atts']) && $shortcode['atts']) {
668 668
 
669
-			foreach ( $shortcode['atts'] as $attr_name => $attr_info ) {
669
+			foreach ($shortcode['atts'] as $attr_name => $attr_info) {
670 670
 
671 671
 
672
-				$prefix = isset( $attr_info['prefix'] ) ? sprintf( '<span class="lasso-option-prefix">%s</span>', $attr_info['prefix'] ) : null;
672
+				$prefix = isset($attr_info['prefix']) ? sprintf('<span class="lasso-option-prefix">%s</span>', $attr_info['prefix']) : null;
673 673
 
674 674
 				$return .= '<form id="lasso--component-settings-form" class="'.$galleries.'" method="post">';
675 675
 				$return .= '<p data-option="'.$attr_name.'" class="lasso-option lasso-'.$slug.'-'.$attr_name.'">';
676
-				$return .= '<label for="lasso-generator-attr-' . $attr_name . '">' . $attr_info['desc'] . '</label>';
676
+				$return .= '<label for="lasso-generator-attr-'.$attr_name.'">'.$attr_info['desc'].'</label>';
677 677
 				$return .= '<small class="lasso-option-desc">'.$attr_info['tip'].'</small>';
678 678
 				// Select
679 679
 
680
-				if ( isset( $attr_info['values'] ) ) {
680
+				if (isset($attr_info['values'])) {
681 681
 
682
-					$return .= '<select name="' . $attr_name . '" id="lasso-generator-attr-' . $attr_name . '" class="lasso-generator-attr">';
682
+					$return .= '<select name="'.$attr_name.'" id="lasso-generator-attr-'.$attr_name.'" class="lasso-generator-attr">';
683 683
 
684
-					$i=0;
684
+					$i = 0;
685 685
 
686
-					foreach ( $attr_info['values'] as $attr_value ) {
686
+					foreach ($attr_info['values'] as $attr_value) {
687 687
 						$attr_value_selected = $attr_info['default'] == $attr_value ? ' selected="selected"' : '';
688 688
 
689
-						$return .= '<option value="'.$attr_info['values'][$i]['value'].'" ' . $attr_value_selected . '>'.$attr_info['values'][$i]['name'].'</option>';
689
+						$return .= '<option value="'.$attr_info['values'][$i]['value'].'" '.$attr_value_selected.'>'.$attr_info['values'][$i]['name'].'</option>';
690 690
 
691 691
 						$i++;
692 692
 					}
@@ -695,24 +695,24 @@  discard block
 block discarded – undo
695 695
 
696 696
 				} else {
697 697
 
698
-					$attr_field_type = isset( $attr_info['type'] ) ? $attr_info['type'] : 'text';
698
+					$attr_field_type = isset($attr_info['type']) ? $attr_info['type'] : 'text';
699 699
 
700 700
 					// image upload
701
-					if ( 'media_upload' == $attr_info['type'] ) {
701
+					if ('media_upload' == $attr_info['type']) {
702 702
 
703
-						$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.'" />';
703
+						$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.'" />';
704 704
 						$return .= '<a href="#" id="lasso-upload-img" class="lasso-option-button" /></a>';
705 705
 
706
-					} elseif ( 'color' == $attr_info['type'] ) {
706
+					} elseif ('color' == $attr_info['type']) {
707 707
 
708
-						$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.'" />';
708
+						$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.'" />';
709 709
 
710
-					} elseif ( 'text_area' == $attr_info['type'] ) {
710
+					} elseif ('text_area' == $attr_info['type']) {
711 711
 
712
-						$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.'';
712
+						$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.'';
713 713
 
714 714
 					} else {
715
-						$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.'';
715
+						$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.'';
716 716
 					}
717 717
 				}
718 718
 				$return .= '</p>';
@@ -723,9 +723,9 @@  discard block
 block discarded – undo
723 723
 		///////////////////////////
724 724
 		// START GALLERY AND MAP FRONT END STUFFS
725 725
 		///////////////////////////
726
-		if ( isset( $shortcode['front'] ) && true == $shortcode['front'] ) {
726
+		if (isset($shortcode['front']) && true == $shortcode['front']) {
727 727
 
728
-			if ( 'gallery' == $shortcode['front_type'] ) {
728
+			if ('gallery' == $shortcode['front_type']) {
729 729
 
730 730
 				$return .= lasso_gallery_editor_module();
731 731
 
@@ -736,13 +736,13 @@  discard block
 block discarded – undo
736 736
 		///////////////////////////
737 737
 
738 738
 		// Single shortcode (not closed)
739
-		if ( 'single' == $shortcode['type'] ) {
739
+		if ('single' == $shortcode['type']) {
740 740
 
741 741
 			$return .= '<input type="hidden" name="lasso-generator-content" id="lasso-generator-content" value="false" />';
742 742
 
743 743
 		} else {
744 744
 
745
-			$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>';
745
+			$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>';
746 746
 		}
747 747
 
748 748
 		$return .= '<p class="lasso-buttoninsert-wrap"><a href="#" class="lasso-generator-cancel" id="lasso--sidebar__close">Cancel
@@ -775,7 +775,7 @@  discard block
 block discarded – undo
775 775
 				<div id="lasso--loading" class="lasso--loading"><div class="lasso--loader"></div></div>
776 776
 				<div id="lasso--hide" style="display:none;" class="lasso--post-form">
777 777
 					<i class="lasso-icon lasso-icon-move"></i>
778
-					<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>
778
+					<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>
779 779
 					<div class="lasso--slider_wrap">
780 780
 						<div id="lasso--slider"></div>
781 781
 					</div>
Please login to merge, or discard this patch.
lasso.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -18,27 +18,27 @@
 block discarded – undo
18 18
  */
19 19
 
20 20
 // If this file is called directly, abort.
21
-if ( ! defined( 'WPINC' ) ) {
21
+if (!defined('WPINC')) {
22 22
 	die;
23 23
 }
24 24
 
25 25
 // Set some constants
26
-define( 'LASSO_VERSION', '0.9.10.5' );
27
-define( 'LASSO_DIR', plugin_dir_path( __FILE__ ) );
28
-define( 'LASSO_URL', plugins_url( '', __FILE__ ) );
29
-define( 'LASSO_FILE', __FILE__ );
26
+define('LASSO_VERSION', '0.9.10.5');
27
+define('LASSO_DIR', plugin_dir_path(__FILE__));
28
+define('LASSO_URL', plugins_url('', __FILE__));
29
+define('LASSO_FILE', __FILE__);
30 30
 
31 31
 /**
32 32
  * Load plugin if PHP version is 5.4 or later.
33 33
  */
34
-if ( version_compare( PHP_VERSION, '5.4.0', '>=' ) ) {
34
+if (version_compare(PHP_VERSION, '5.4.0', '>=')) {
35 35
 
36
-	include_once( LASSO_DIR . '/bootstrap.php' );
36
+	include_once(LASSO_DIR.'/bootstrap.php');
37 37
 
38 38
 } else {
39 39
 
40 40
 	add_action('admin_head', 'lasso_fail_notice');
41
-	function lasso_fail_notice(){
41
+	function lasso_fail_notice() {
42 42
 
43 43
 		printf('<div class="error"><p>Lasso requires PHP 5.4 or higher.</p></div>');
44 44
 
Please login to merge, or discard this patch.
admin/includes/menus/settings.php 1 patch
Spacing   +69 added lines, -69 removed lines patch added patch discarded remove patch
@@ -9,9 +9,9 @@  discard block
 block discarded – undo
9 9
 
10 10
 	function __construct() {
11 11
 
12
-		add_action( 'admin_menu',     array( $this, 'menu' ) );
13
-		add_action( 'network_admin_menu',   array( $this, 'menu' ) );
14
-		add_action( 'wp_ajax_lasso-editor-settings', array( $this, 'process_settings' ) );
12
+		add_action('admin_menu', array($this, 'menu'));
13
+		add_action('network_admin_menu', array($this, 'menu'));
14
+		add_action('wp_ajax_lasso-editor-settings', array($this, 'process_settings'));
15 15
 
16 16
 	}
17 17
 
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 	function menu() {
24 24
 
25 25
 		// CHANGED Removed condition.
26
-		add_submenu_page( 'lasso-editor', __( 'Settings', 'lasso' ), __( 'Settings', 'lasso' ), 'manage_options', 'lasso-editor-settings', array( $this, 'settings' ) );
26
+		add_submenu_page('lasso-editor', __('Settings', 'lasso'), __('Settings', 'lasso'), 'manage_options', 'lasso-editor-settings', array($this, 'settings'));
27 27
 
28 28
 	}
29 29
 
@@ -45,22 +45,22 @@  discard block
 block discarded – undo
45 45
 	function process_settings() {
46 46
 
47 47
 		// bail out if current user isn't and administrator and they are not logged in
48
-		if ( !current_user_can( 'manage_options' ) || !is_user_logged_in() )
48
+		if (!current_user_can('manage_options') || !is_user_logged_in())
49 49
 			return;
50 50
 
51
-		if ( isset( $_POST['action'] ) && 'lasso-editor-settings' == $_POST['action'] && check_admin_referer( 'nonce', 'lasso_editor_settings' ) ) {
51
+		if (isset($_POST['action']) && 'lasso-editor-settings' == $_POST['action'] && check_admin_referer('nonce', 'lasso_editor_settings')) {
52 52
 
53
-			$options = isset( $_POST['lasso_editor'] ) ? $_POST['lasso_editor'] : false;
53
+			$options = isset($_POST['lasso_editor']) ? $_POST['lasso_editor'] : false;
54 54
 
55
-			$options = array_map( 'sanitize_text_field', $options );
55
+			$options = array_map('sanitize_text_field', $options);
56 56
 
57
-			if ( function_exists( 'is_multisite' ) && is_multisite() ) {
57
+			if (function_exists('is_multisite') && is_multisite()) {
58 58
 
59
-				update_site_option( 'lasso_editor', $options );
59
+				update_site_option('lasso_editor', $options);
60 60
 
61 61
 			} else {
62 62
 
63
-				update_option( 'lasso_editor', $options );
63
+				update_option('lasso_editor', $options);
64 64
 			}
65 65
 
66 66
 			wp_send_json_success();
@@ -82,150 +82,150 @@  discard block
 block discarded – undo
82 82
 	 */
83 83
 	function lasso_editor_settings_form() {
84 84
 
85
-		if ( !is_user_logged_in() )
85
+		if (!is_user_logged_in())
86 86
 			return;
87 87
 
88
-		$article_object   = lasso_editor_get_option( 'article_class', 'lasso_editor' );
89
-		$featImgClass    = lasso_editor_get_option( 'featimg_class', 'lasso_editor' );
90
-		$titleClass    = lasso_editor_get_option( 'title_class', 'lasso_editor' );
88
+		$article_object = lasso_editor_get_option('article_class', 'lasso_editor');
89
+		$featImgClass = lasso_editor_get_option('featimg_class', 'lasso_editor');
90
+		$titleClass = lasso_editor_get_option('title_class', 'lasso_editor');
91 91
 
92
-		$post_new_disabled   = lasso_editor_get_option( 'post_adding_disabled', 'lasso_editor' );
93
-		$save_to_post_disabled  = lasso_editor_get_option( 'post_save_disabled', 'lasso_editor' );
94
-		$post_settings_disabled = lasso_editor_get_option( 'post_settings_disabled', 'lasso_editor' );
95
-		$shortcodify_disabled  = lasso_editor_get_option( 'shortcodify_disabled', 'lasso_editor' );
96
-		$enable_autosave  = lasso_editor_get_option( 'enable_autosave', 'lasso_editor' );
92
+		$post_new_disabled = lasso_editor_get_option('post_adding_disabled', 'lasso_editor');
93
+		$save_to_post_disabled  = lasso_editor_get_option('post_save_disabled', 'lasso_editor');
94
+		$post_settings_disabled = lasso_editor_get_option('post_settings_disabled', 'lasso_editor');
95
+		$shortcodify_disabled  = lasso_editor_get_option('shortcodify_disabled', 'lasso_editor');
96
+		$enable_autosave = lasso_editor_get_option('enable_autosave', 'lasso_editor');
97 97
 
98
-		$toolbar_headings      = lasso_editor_get_option( 'toolbar_headings', 'lasso_editor' );
99
-		$toolbar_show_color      = lasso_editor_get_option( 'toolbar_show_color', 'lasso_editor' );
100
-		$toolbar_show_alignment  = lasso_editor_get_option( 'toolbar_show_alignment', 'lasso_editor' );
98
+		$toolbar_headings      = lasso_editor_get_option('toolbar_headings', 'lasso_editor');
99
+		$toolbar_show_color      = lasso_editor_get_option('toolbar_show_color', 'lasso_editor');
100
+		$toolbar_show_alignment  = lasso_editor_get_option('toolbar_show_alignment', 'lasso_editor');
101 101
 		
102
-		$objectsNoSave  	= lasso_editor_get_option('dont_save', 'lasso_editor');
103
-		$objectsNonEditable  	= lasso_editor_get_option('non_editable', 'lasso_editor');
102
+		$objectsNoSave = lasso_editor_get_option('dont_save', 'lasso_editor');
103
+		$objectsNonEditable = lasso_editor_get_option('non_editable', 'lasso_editor');
104 104
 
105 105
 ?>
106 106
 		<div class="wrap">
107 107
 
108
-	    	<h2><?php _e( 'Editus Settings', 'lasso' );?></h2>
108
+	    	<h2><?php _e('Editus Settings', 'lasso'); ?></h2>
109 109
 
110 110
 			<form id="lasso-editor-settings-form" class="lasso--form-settings" method="post" enctype="multipart/form-data">
111 111
 
112
-				<?php do_action('lasso_settings_before');?>
112
+				<?php do_action('lasso_settings_before'); ?>
113 113
 
114 114
 				<div class="lasso-editor-settings--option-wrap">
115 115
 					<div class="lasso-editor-settings--option-inner">
116
-						<label><?php _e( 'Article Class', 'lasso' );?></label>
117
-						<span class="lasso--setting-description"><?php _e( 'Provide the CSS class (including the preceding dot) of container that holds the post. This should be the first parent container class that holds the_content.', 'lasso' );?></span>
118
-						<input type="text" name="lasso_editor[article_class]" id="lasso_editor[article_class]" value="<?php echo esc_attr( $article_object );?>" placeholder=".entry-content">
116
+						<label><?php _e('Article Class', 'lasso'); ?></label>
117
+						<span class="lasso--setting-description"><?php _e('Provide the CSS class (including the preceding dot) of container that holds the post. This should be the first parent container class that holds the_content.', 'lasso'); ?></span>
118
+						<input type="text" name="lasso_editor[article_class]" id="lasso_editor[article_class]" value="<?php echo esc_attr($article_object); ?>" placeholder=".entry-content">
119 119
 					</div>
120 120
 				</div>
121 121
 
122 122
 				<div class="lasso-editor-settings--option-wrap">
123 123
 					<div class="lasso-editor-settings--option-inner">
124
-						<label><?php _e( 'Featured Image Class', 'lasso' );?></label>
125
-						<span class="lasso--setting-description"><?php _e( 'Provide the CSS class that uses a featured image as a background image. This currently only supports themes that have the featured image set as background image.', 'lasso' );?></span>
126
-						<input type="text" name="lasso_editor[featimg_class]" id="lasso_editor[featimg_class]" value="<?php echo esc_attr( $featImgClass );?>" placeholder=".entry-content">
124
+						<label><?php _e('Featured Image Class', 'lasso'); ?></label>
125
+						<span class="lasso--setting-description"><?php _e('Provide the CSS class that uses a featured image as a background image. This currently only supports themes that have the featured image set as background image.', 'lasso'); ?></span>
126
+						<input type="text" name="lasso_editor[featimg_class]" id="lasso_editor[featimg_class]" value="<?php echo esc_attr($featImgClass); ?>" placeholder=".entry-content">
127 127
 					</div>
128 128
 				</div>
129 129
 
130 130
 				<div class="lasso-editor-settings--option-wrap">
131 131
 					<div class="lasso-editor-settings--option-inner">
132
-						<label><?php _e( 'Article Title Class', 'lasso' );?></label>
133
-						<span class="lasso--setting-description"><?php _e( 'Provide the CSS class for the post title. This will enable you to update the title of the post by clicking and typing.', 'lasso' );?></span>
134
-						<input type="text" name="lasso_editor[title_class]" id="lasso_editor[title_class]" value="<?php echo esc_attr( $titleClass );?>" placeholder=".entry-content">
132
+						<label><?php _e('Article Title Class', 'lasso'); ?></label>
133
+						<span class="lasso--setting-description"><?php _e('Provide the CSS class for the post title. This will enable you to update the title of the post by clicking and typing.', 'lasso'); ?></span>
134
+						<input type="text" name="lasso_editor[title_class]" id="lasso_editor[title_class]" value="<?php echo esc_attr($titleClass); ?>" placeholder=".entry-content">
135 135
 					</div>
136 136
 				</div>
137 137
 
138 138
 				<!-- Advanced -->
139 139
 				<div class="lasso-editor-settings--option-wrap">
140 140
 					<div class="lasso-editor-settings--option-inner">
141
-						<label><?php _e( 'Ignored Items to Save', 'lasso' );?></label>
142
-						<span class="lasso--setting-description"><?php _e( 'If your post container holds additional markup, list the css class names (comma separated, including the dot) of those items. When you enter the editor, Editus will remove (NOT delete) these items so that it does not save them as HTML.', 'lasso' );?></span>
143
-						<textarea name="lasso_editor[dont_save]" id="lasso_editor[dont_save]" placeholder=".classname, .another-class"><?php echo esc_attr( $objectsNoSave );?></textarea>
141
+						<label><?php _e('Ignored Items to Save', 'lasso'); ?></label>
142
+						<span class="lasso--setting-description"><?php _e('If your post container holds additional markup, list the css class names (comma separated, including the dot) of those items. When you enter the editor, Editus will remove (NOT delete) these items so that it does not save them as HTML.', 'lasso'); ?></span>
143
+						<textarea name="lasso_editor[dont_save]" id="lasso_editor[dont_save]" placeholder=".classname, .another-class"><?php echo esc_attr($objectsNoSave); ?></textarea>
144 144
 					</div>
145 145
 				</div>
146 146
 				
147 147
 				<div class="lasso-editor-settings--option-wrap">
148 148
 					<div class="lasso-editor-settings--option-inner">
149
-						<label><?php _e( 'Read Only Items', 'lasso' );?></label>
150
-						<span class="lasso--setting-description"><?php _e( 'If your post has items that should not be editable, list the css class names (comma separated, including the dot) of those items.', 'lasso' );?></span>
151
-						<textarea name="lasso_editor[non_editable]" id="lasso_editor[non_editable]" placeholder=".classname, .another-class"><?php echo esc_attr( $objectsNonEditable );?></textarea>
149
+						<label><?php _e('Read Only Items', 'lasso'); ?></label>
150
+						<span class="lasso--setting-description"><?php _e('If your post has items that should not be editable, list the css class names (comma separated, including the dot) of those items.', 'lasso'); ?></span>
151
+						<textarea name="lasso_editor[non_editable]" id="lasso_editor[non_editable]" placeholder=".classname, .another-class"><?php echo esc_attr($objectsNonEditable); ?></textarea>
152 152
 					</div>
153 153
 				</div>
154 154
 
155 155
 				<div class="lasso-editor-settings--option-wrap">
156 156
 					<div class="lasso-editor-settings--option-inner">
157
-						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings]" id="lasso_editor[toolbar_headings]" <?php echo checked( $toolbar_headings, 'on' );?> >
158
-						<label for="lasso_editor[toolbar_headings]"><?php _e( 'Enable H2 and H3 Buttons', 'lasso' );?></label>
159
-						<span class="lasso--setting-description"><?php _e( 'Show the buttons to set H2 and H3 settings.', 'lasso' );?></span>
157
+						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings]" id="lasso_editor[toolbar_headings]" <?php echo checked($toolbar_headings, 'on'); ?> >
158
+						<label for="lasso_editor[toolbar_headings]"><?php _e('Enable H2 and H3 Buttons', 'lasso'); ?></label>
159
+						<span class="lasso--setting-description"><?php _e('Show the buttons to set H2 and H3 settings.', 'lasso'); ?></span>
160 160
 
161 161
 					</div>
162 162
 				</div>
163 163
 				
164 164
 				<div class="lasso-editor-settings--option-wrap">
165 165
 					<div class="lasso-editor-settings--option-inner">
166
-						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_color]" id="lasso_editor[toolbar_show_color]" <?php echo checked( $toolbar_show_color, 'on' );?> >
167
-						<label for="lasso_editor[toolbar_show_color]"><?php _e( 'Enable Text Color Buttons', 'lasso' );?></label>
168
-						<span class="lasso--setting-description"><?php _e( 'Show the buttons to set text colors.', 'lasso' );?></span>
166
+						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_color]" id="lasso_editor[toolbar_show_color]" <?php echo checked($toolbar_show_color, 'on'); ?> >
167
+						<label for="lasso_editor[toolbar_show_color]"><?php _e('Enable Text Color Buttons', 'lasso'); ?></label>
168
+						<span class="lasso--setting-description"><?php _e('Show the buttons to set text colors.', 'lasso'); ?></span>
169 169
 
170 170
 					</div>
171 171
 				</div>
172 172
 				
173 173
 				<div class="lasso-editor-settings--option-wrap">
174 174
 					<div class="lasso-editor-settings--option-inner">
175
-						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_alignment]" id="lasso_editor[toolbar_show_alignment]" <?php echo checked( $toolbar_show_alignment, 'on' );?> >
176
-						<label for="lasso_editor[toolbar_show_alignment]"><?php _e( 'Enable Text Align Buttons', 'lasso' );?></label>
177
-						<span class="lasso--setting-description"><?php _e( 'Show the buttons to set text alignment.', 'lasso' );?></span>
175
+						<input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_alignment]" id="lasso_editor[toolbar_show_alignment]" <?php echo checked($toolbar_show_alignment, 'on'); ?> >
176
+						<label for="lasso_editor[toolbar_show_alignment]"><?php _e('Enable Text Align Buttons', 'lasso'); ?></label>
177
+						<span class="lasso--setting-description"><?php _e('Show the buttons to set text alignment.', 'lasso'); ?></span>
178 178
 
179 179
 					</div>
180 180
 				</div>
181 181
 
182 182
 				<div class="lasso-editor-settings--option-wrap">
183 183
 					<div class="lasso-editor-settings--option-inner">
184
-						<input type="checkbox" class="checkbox" name="lasso_editor[post_save_disabled]" id="lasso_editor[post_save_disabled]" <?php echo checked( $save_to_post_disabled, 'on' );?> >
185
-						<label for="lasso_editor[post_save_disabled]"><?php _e( 'Disable Post Saving', 'lasso' );?></label>
186
-						<span class="lasso--setting-description"><?php _e( 'By default the editor will update the database with the post or page it is being used on. Check this box to disable this. If you check this box, it is assumed that you will be using the provided filters to save your own content.', 'lasso' );?></span>
184
+						<input type="checkbox" class="checkbox" name="lasso_editor[post_save_disabled]" id="lasso_editor[post_save_disabled]" <?php echo checked($save_to_post_disabled, 'on'); ?> >
185
+						<label for="lasso_editor[post_save_disabled]"><?php _e('Disable Post Saving', 'lasso'); ?></label>
186
+						<span class="lasso--setting-description"><?php _e('By default the editor will update the database with the post or page it is being used on. Check this box to disable this. If you check this box, it is assumed that you will be using the provided filters to save your own content.', 'lasso'); ?></span>
187 187
 
188 188
 					</div>
189 189
 				</div>
190 190
 
191 191
 				<div class="lasso-editor-settings--option-wrap">
192 192
 					<div class="lasso-editor-settings--option-inner">
193
-						<input type="checkbox" class="checkbox" name="lasso_editor[post_settings_disabled]" id="lasso_editor[post_settings_disabled]" <?php echo checked( $post_settings_disabled, 'on' );?> >
194
-						<label for="lasso_editor[post_settings_disabled]"> <?php _e( 'Disable Post Settings', 'lasso' );?></label>
195
-						<span class="lasso--setting-description"><?php _e( 'Check this to disable users from being able to edit post settings from the front-end.', 'lasso' );?></span>
193
+						<input type="checkbox" class="checkbox" name="lasso_editor[post_settings_disabled]" id="lasso_editor[post_settings_disabled]" <?php echo checked($post_settings_disabled, 'on'); ?> >
194
+						<label for="lasso_editor[post_settings_disabled]"> <?php _e('Disable Post Settings', 'lasso'); ?></label>
195
+						<span class="lasso--setting-description"><?php _e('Check this to disable users from being able to edit post settings from the front-end.', 'lasso'); ?></span>
196 196
 					</div>
197 197
 				</div>
198 198
 
199 199
 				<div class="lasso-editor-settings--option-wrap">
200 200
 					<div class="lasso-editor-settings--option-inner">
201
-						<input type="checkbox" class="checkbox" name="lasso_editor[post_adding_disabled]" id="lasso_editor[post_adding_disabled]" <?php echo checked( $post_new_disabled, 'on' );?> >
202
-						<label for="lasso_editor[post_adding_disabled]"><?php _e( 'Disable Post Adding', 'lasso' );?></label>
203
-						<span class="lasso--setting-description"><?php _e( 'Check this box to disable users from being able to add new posts from the front-end.', 'lasso' );?></span>
201
+						<input type="checkbox" class="checkbox" name="lasso_editor[post_adding_disabled]" id="lasso_editor[post_adding_disabled]" <?php echo checked($post_new_disabled, 'on'); ?> >
202
+						<label for="lasso_editor[post_adding_disabled]"><?php _e('Disable Post Adding', 'lasso'); ?></label>
203
+						<span class="lasso--setting-description"><?php _e('Check this box to disable users from being able to add new posts from the front-end.', 'lasso'); ?></span>
204 204
 					</div>
205 205
 				</div>
206 206
 
207 207
 				<div class="lasso-editor-settings--option-wrap">
208 208
 					<div class="lasso-editor-settings--option-inner">
209
-						<input type="checkbox" class="checkbox" name="lasso_editor[shortcodify_disabled]" id="lasso_editor[shortcodify_disabled]" <?php echo checked( $shortcodify_disabled, 'on' );?> >
210
-						<label for="lasso_editor[shortcodify_disabled]"><?php _e( 'Disable Aesop Component Conversion', 'lasso' );?></label>
211
-						<span class="lasso--setting-description"><?php _e( 'Check this box to disable the conversion process used on Aesop Story Engine components.', 'lasso' );?></span>
209
+						<input type="checkbox" class="checkbox" name="lasso_editor[shortcodify_disabled]" id="lasso_editor[shortcodify_disabled]" <?php echo checked($shortcodify_disabled, 'on'); ?> >
210
+						<label for="lasso_editor[shortcodify_disabled]"><?php _e('Disable Aesop Component Conversion', 'lasso'); ?></label>
211
+						<span class="lasso--setting-description"><?php _e('Check this box to disable the conversion process used on Aesop Story Engine components.', 'lasso'); ?></span>
212 212
 					</div>
213 213
 				</div>
214 214
 				
215 215
 				<div class="lasso-editor-settings--option-wrap last">
216 216
 					<div class="lasso-editor-settings--option-inner">
217
-						<input type="checkbox" class="checkbox" name="lasso_editor[enable_autosave]" id="lasso_editor[enable_autosave]" <?php echo checked( $enable_autosave, 'on' );?> >
218
-						<label for="lasso_editor[enable_autosave]"><?php _e( 'Enable Auto Save', 'lasso' );?></label>
219
-						<span class="lasso--setting-description"><?php _e( 'Check this box to enable auto save.', 'lasso' );?></span>
217
+						<input type="checkbox" class="checkbox" name="lasso_editor[enable_autosave]" id="lasso_editor[enable_autosave]" <?php echo checked($enable_autosave, 'on'); ?> >
218
+						<label for="lasso_editor[enable_autosave]"><?php _e('Enable Auto Save', 'lasso'); ?></label>
219
+						<span class="lasso--setting-description"><?php _e('Check this box to enable auto save.', 'lasso'); ?></span>
220 220
 					</div>
221 221
 				</div>
222 222
 
223
-				<?php do_action('lasso_settings_after');?>
223
+				<?php do_action('lasso_settings_after'); ?>
224 224
 
225 225
 				<div class="lasso-editor-settings--submit">
226 226
 				    <input type="hidden" name="action" value="lasso-editor-settings" />
227
-				    <input type="submit" class="button-primary" value="<?php esc_attr_e( 'Save Settings', 'lasso' );?>" />
228
-					<?php wp_nonce_field( 'nonce', 'lasso_editor_settings' ); ?>
227
+				    <input type="submit" class="button-primary" value="<?php esc_attr_e('Save Settings', 'lasso'); ?>" />
228
+					<?php wp_nonce_field('nonce', 'lasso_editor_settings'); ?>
229 229
 				</div>
230 230
 			</form>
231 231
 
Please login to merge, or discard this patch.
public/includes/components.php 1 patch
Spacing   +52 added lines, -52 removed lines patch added patch discarded remove patch
@@ -16,76 +16,76 @@  discard block
 block discarded – undo
16 16
 
17 17
 	$array = array(
18 18
 		'quote' => array(
19
-			'name'    => __('Quote','lasso'),
19
+			'name'    => __('Quote', 'lasso'),
20 20
 			'content' => lasso_quote_component(),
21 21
 		),
22 22
 		'image' => array(
23
-			'name'    => __('Image','lasso'),
23
+			'name'    => __('Image', 'lasso'),
24 24
 			'content' => lasso_image_component(),
25 25
 		),
26 26
 		'parallax' => array(
27
-			'name'    => __('Parallax','lasso'),
27
+			'name'    => __('Parallax', 'lasso'),
28 28
 			'content' => lasso_parallax_component(),
29 29
 		),
30 30
 		'audio' => array(
31
-			'name'    => __('Audio','lasso'),
31
+			'name'    => __('Audio', 'lasso'),
32 32
 			'content' => lasso_audio_component(),
33 33
 		),
34 34
 		'content' => array(
35
-			'name'    => __('Content','lasso'),
35
+			'name'    => __('Content', 'lasso'),
36 36
 			'content' => lasso_content_component(),
37 37
 		),
38 38
 		'character' => array(
39
-			'name'    => __('Character','lasso'),
39
+			'name'    => __('Character', 'lasso'),
40 40
 			'content' => lasso_character_component(),
41 41
 		),
42 42
 		'collection' => array(
43
-			'name'    => __('Collection','lasso'),
43
+			'name'    => __('Collection', 'lasso'),
44 44
 			'content' => lasso_collections_component(),
45 45
 		),
46 46
 		'document' => array(
47
-			'name'    => __('Document','lasso'),
47
+			'name'    => __('Document', 'lasso'),
48 48
 			'content' => lasso_document_component(),
49 49
 		),
50 50
 		'gallery' => array(
51
-			'name'    => __('Gallery','lasso'),
51
+			'name'    => __('Gallery', 'lasso'),
52 52
 			'content' => lasso_gallery_component(),
53 53
 		),
54 54
 		'chapter' => array(
55
-			'name'    => __('Chapter','lasso'),
55
+			'name'    => __('Chapter', 'lasso'),
56 56
 			'content' => lasso_heading_component(),
57 57
 		),
58 58
 		'map' => array(
59
-			'name'    => __('Map','lasso'),
59
+			'name'    => __('Map', 'lasso'),
60 60
 			'content' => lasso_map_component(),
61 61
 		),
62 62
 		'timeline_stop' => array(
63
-			'name'    => __('Timeline','lasso'),
63
+			'name'    => __('Timeline', 'lasso'),
64 64
 			'content' => lasso_timeline_component(),
65 65
 		),
66 66
 		'video' => array(
67
-			'name'    => __('Video','lasso'),
67
+			'name'    => __('Video', 'lasso'),
68 68
 			'content' => lasso_video_component(),
69 69
 		),
70 70
 		'wpimg' => array(
71
-			'name'    => __('WordPress Image','lasso'),
71
+			'name'    => __('WordPress Image', 'lasso'),
72 72
 			'content' => lasso_wp_image(),
73 73
 		),
74 74
 		'wpquote' => array(
75
-			'name'    => __('WordPress Quote','lasso'),
75
+			'name'    => __('WordPress Quote', 'lasso'),
76 76
 			'content' => lasso_wp_quote(),
77 77
 		),
78 78
 		'gallery_pop' => array(
79
-			'name'    => __('Gallery Pop','lasso'),
79
+			'name'    => __('Gallery Pop', 'lasso'),
80 80
 			'content' => lasso_gallery_pop_component(),
81 81
 		),
82 82
 		'wpvideo' => array(
83
-			'name'    => __('WordPress Image','lasso'),
83
+			'name'    => __('WordPress Image', 'lasso'),
84 84
 			'content' => lasso_wp_video(),
85 85
 		),
86 86
 	);
87 87
 
88
-	return apply_filters( 'lasso_components', $array );
88
+	return apply_filters('lasso_components', $array);
89 89
 }
90 90
 
91 91
 /**
@@ -111,132 +111,132 @@  discard block
 block discarded – undo
111 111
  */
112 112
 
113 113
 // 1
114
-if ( !function_exists( 'lasso_quote_component' ) ):
114
+if (!function_exists('lasso_quote_component')):
115 115
 	function lasso_quote_component() {
116 116
 
117
-		return do_shortcode( '[aesop_quote quote="The Universe is made of stories, not of atoms."]' );
117
+		return do_shortcode('[aesop_quote quote="The Universe is made of stories, not of atoms."]');
118 118
 	}
119 119
 endif;
120 120
 
121 121
 // 2
122
-if ( !function_exists( 'lasso_image_component' ) ):
122
+if (!function_exists('lasso_image_component')):
123 123
 	function lasso_image_component() {
124 124
 
125
-		return do_shortcode( '[aesop_image img="'.LASSO_URL.'/public/assets/img/empty-img.png" align="center" imgwidth="800px"]' );
125
+		return do_shortcode('[aesop_image img="'.LASSO_URL.'/public/assets/img/empty-img.png" align="center" imgwidth="800px"]');
126 126
 	}
127 127
 endif;
128 128
 
129 129
 // 3
130
-if ( !function_exists( 'lasso_parallax_component' ) ):
130
+if (!function_exists('lasso_parallax_component')):
131 131
 	function lasso_parallax_component() {
132 132
 
133
-		return do_shortcode( '[aesop_parallax img="'.LASSO_URL.'/public/assets/img/empty-img.png"]' );
133
+		return do_shortcode('[aesop_parallax img="'.LASSO_URL.'/public/assets/img/empty-img.png"]');
134 134
 	}
135 135
 endif;
136 136
 
137 137
 // 4
138
-if ( !function_exists( 'lasso_audio_component' ) ):
138
+if (!function_exists('lasso_audio_component')):
139 139
 	function lasso_audio_component() {
140 140
 
141
-		return do_shortcode( '[aesop_audio src="http://users.skynet.be/fa046054/home/P22/track06.mp3"]' );
141
+		return do_shortcode('[aesop_audio src="http://users.skynet.be/fa046054/home/P22/track06.mp3"]');
142 142
 
143 143
 	}
144 144
 endif;
145 145
 
146 146
 // 5
147
-if ( !function_exists( 'lasso_content_component' ) ):
147
+if (!function_exists('lasso_content_component')):
148 148
 	function lasso_content_component() {
149 149
 
150
-		return do_shortcode( '[aesop_content]Start typing here...[/aesop_content]' );
150
+		return do_shortcode('[aesop_content]Start typing here...[/aesop_content]');
151 151
 	}
152 152
 endif;
153 153
 
154 154
 // 6
155
-if ( !function_exists( 'lasso_character_component' ) ):
155
+if (!function_exists('lasso_character_component')):
156 156
 	function lasso_character_component() {
157 157
 
158
-		return do_shortcode( '[aesop_character img="'.LASSO_URL.'/public/assets/img/empty-img.png" name="Joes Apartment" width="150px"]' );
158
+		return do_shortcode('[aesop_character img="'.LASSO_URL.'/public/assets/img/empty-img.png" name="Joes Apartment" width="150px"]');
159 159
 
160 160
 	}
161 161
 endif;
162 162
 
163 163
 // 7
164
-if ( !function_exists( 'lasso_collections_component' ) ):
164
+if (!function_exists('lasso_collections_component')):
165 165
 	function lasso_collections_component() {
166 166
 
167
-		return do_shortcode( '[aesop_collection]' );
167
+		return do_shortcode('[aesop_collection]');
168 168
 	}
169 169
 endif;
170 170
 
171 171
 // 8
172
-if ( !function_exists( 'lasso_document_component' ) ):
172
+if (!function_exists('lasso_document_component')):
173 173
 	function lasso_document_component() {
174 174
 
175
-		return do_shortcode( '[aesop_document src="'.LASSO_URL.'/public/assets/img/empty-img.png" ]' );
175
+		return do_shortcode('[aesop_document src="'.LASSO_URL.'/public/assets/img/empty-img.png" ]');
176 176
 
177 177
 	}
178 178
 endif;
179 179
 
180 180
 // 9
181
-if ( !function_exists( 'lasso_gallery_component' ) ):
181
+if (!function_exists('lasso_gallery_component')):
182 182
 	function lasso_gallery_component() {
183 183
 
184
-		return do_shortcode( '[aesop_gallery]' );
184
+		return do_shortcode('[aesop_gallery]');
185 185
 
186 186
 	}
187 187
 endif;
188 188
 
189 189
 // 10
190
-if ( !function_exists( 'lasso_heading_component' ) ):
190
+if (!function_exists('lasso_heading_component')):
191 191
 	function lasso_heading_component() {
192 192
 
193
-		return do_shortcode( '[aesop_chapter title="Chapter One" img="'.LASSO_URL.'/public/assets/img/empty-img.png" full="on"]' );
193
+		return do_shortcode('[aesop_chapter title="Chapter One" img="'.LASSO_URL.'/public/assets/img/empty-img.png" full="on"]');
194 194
 	}
195 195
 endif;
196 196
 
197 197
 // 11
198
-if ( !function_exists( 'lasso_map_component' ) ):
198
+if (!function_exists('lasso_map_component')):
199 199
 	function lasso_map_component() {
200 200
 
201 201
 		return '<form id="lasso--map-form" class="aesop-component aesop-map-component lasso--map-drag-holder" enctype="multipart/form-data">
202 202
 				'.lasso_map_form_footer().'
203
-				'.do_shortcode( '[aesop_map sticky="off"]' ).'
203
+				'.do_shortcode('[aesop_map sticky="off"]').'
204 204
 			</form>';
205 205
 
206 206
 	}
207 207
 endif;
208 208
 
209 209
 // 12
210
-if ( !function_exists( 'lasso_timeline_component' ) ):
210
+if (!function_exists('lasso_timeline_component')):
211 211
 	function lasso_timeline_component() {
212 212
 
213
-		return do_shortcode( '[aesop_timeline_stop num="Title" title="2014"]' );
213
+		return do_shortcode('[aesop_timeline_stop num="Title" title="2014"]');
214 214
 
215 215
 	}
216 216
 endif;
217 217
 
218 218
 // 13
219
-if ( !function_exists( 'lasso_video_component' ) ):
219
+if (!function_exists('lasso_video_component')):
220 220
 	function lasso_video_component() {
221 221
 
222
-		return do_shortcode( '[aesop_video src="vimeo" id="59940289" width="100%" align="center"]' );
222
+		return do_shortcode('[aesop_video src="vimeo" id="59940289" width="100%" align="center"]');
223 223
 
224 224
 	}
225 225
 endif;
226 226
 
227 227
 // 14 - since 0.9.1
228
-if ( !function_exists('lasso_wp_image') ):
228
+if (!function_exists('lasso_wp_image')):
229 229
 
230
-	function lasso_wp_image(){
230
+	function lasso_wp_image() {
231 231
 		return '<div data-component-type="wpimg" class="lasso--wpimg__wrap lasso-component"><img class="wp-image-0" src="'.LASSO_URL.'/public/assets/img/empty-img.png"></div>';
232 232
 	}
233 233
 
234 234
 endif;
235 235
 
236 236
 // 15 - since 0.9.2
237
-if ( !function_exists('lasso_wp_quote') ):
237
+if (!function_exists('lasso_wp_quote')):
238 238
 
239
-	function lasso_wp_quote(){
239
+	function lasso_wp_quote() {
240 240
 		return '<blockquote data-component-type="wpquote" class="lasso--wpquote lasso-component"><p>The universe is made of stories.</p></blockquote>';
241 241
 	}
242 242
 
@@ -244,16 +244,16 @@  discard block
 block discarded – undo
244 244
 
245 245
 // 16 gallery pop added but not fully supported as of 0.9.9.11 
246 246
 
247
-if ( !function_exists( 'lasso_gallery_pop_component' ) ):
247
+if (!function_exists('lasso_gallery_pop_component')):
248 248
 	function lasso_gallery_pop_component() {
249
-		return do_shortcode( '[aesop_gallery_pop]' );
249
+		return do_shortcode('[aesop_gallery_pop]');
250 250
 	}
251 251
 endif;
252 252
 
253 253
 // 17 - work in progress
254
-if ( !function_exists('lasso_wp_video') ):
254
+if (!function_exists('lasso_wp_video')):
255 255
 
256
-	function lasso_wp_video(){
256
+	function lasso_wp_video() {
257 257
 		return '<div data-component-type="wpvideo" class="lasso--wpvideo__wrap lasso-component"><video class="wp-video-0"></video>';
258 258
 	}
259 259
 
Please login to merge, or discard this patch.
public/includes/lasso.php 1 patch
Spacing   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -52,12 +52,12 @@  discard block
 block discarded – undo
52 52
 		require_once LASSO_DIR.'/public/includes/wrap-shortcodes.php';
53 53
 
54 54
 		// Activate plugin when new blog is added
55
-		add_action( 'wpmu_new_blog', array( $this, 'activate_new_site' ) );
55
+		add_action('wpmu_new_blog', array($this, 'activate_new_site'));
56 56
 
57 57
 		// Load plugin text domain
58
-		add_action( 'init', array( $this, 'load_plugin_textdomain' ) );
58
+		add_action('init', array($this, 'load_plugin_textdomain'));
59 59
 		
60
-		add_action( 'wp_ajax_get_aesop_component',     array( $this, 'get_aesop_component' ) );
60
+		add_action('wp_ajax_get_aesop_component', array($this, 'get_aesop_component'));
61 61
 
62 62
 		//enqueue assets
63 63
 		new assets();
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 	public static function get_instance() {
86 86
 
87 87
 		// If the single instance hasn't been set, set it now.
88
-		if ( null == self::$instance ) {
88
+		if (null == self::$instance) {
89 89
 			self::$instance = new self;
90 90
 		}
91 91
 
@@ -102,18 +102,18 @@  discard block
 block discarded – undo
102 102
 	 *                                       WPMU is disabled or plugin is
103 103
 	 *                                       activated on an individual blog.
104 104
 	 */
105
-	public static function activate( $network_wide ) {
105
+	public static function activate($network_wide) {
106 106
 
107
-		if ( function_exists( 'is_multisite' ) && is_multisite() ) {
107
+		if (function_exists('is_multisite') && is_multisite()) {
108 108
 
109
-			if ( $network_wide  ) {
109
+			if ($network_wide) {
110 110
 
111 111
 				// Get all blog ids
112 112
 				$blog_ids = self::get_blog_ids();
113 113
 
114
-				foreach ( $blog_ids as $blog_id ) {
114
+				foreach ($blog_ids as $blog_id) {
115 115
 
116
-					switch_to_blog( $blog_id );
116
+					switch_to_blog($blog_id);
117 117
 					self::single_activate();
118 118
 				}
119 119
 
@@ -139,18 +139,18 @@  discard block
 block discarded – undo
139 139
 	 *                                       WPMU is disabled or plugin is
140 140
 	 *                                       deactivated on an individual blog.
141 141
 	 */
142
-	public static function deactivate( $network_wide ) {
142
+	public static function deactivate($network_wide) {
143 143
 
144
-		if ( function_exists( 'is_multisite' ) && is_multisite() ) {
144
+		if (function_exists('is_multisite') && is_multisite()) {
145 145
 
146
-			if ( $network_wide ) {
146
+			if ($network_wide) {
147 147
 
148 148
 				// Get all blog ids
149 149
 				$blog_ids = self::get_blog_ids();
150 150
 
151
-				foreach ( $blog_ids as $blog_id ) {
151
+				foreach ($blog_ids as $blog_id) {
152 152
 
153
-					switch_to_blog( $blog_id );
153
+					switch_to_blog($blog_id);
154 154
 					self::single_deactivate();
155 155
 
156 156
 				}
@@ -174,13 +174,13 @@  discard block
 block discarded – undo
174 174
 	 *
175 175
 	 * @param int     $blog_id ID of the new blog.
176 176
 	 */
177
-	public function activate_new_site( $blog_id ) {
177
+	public function activate_new_site($blog_id) {
178 178
 
179
-		if ( 1 !== did_action( 'wpmu_new_blog' ) ) {
179
+		if (1 !== did_action('wpmu_new_blog')) {
180 180
 			return;
181 181
 		}
182 182
 
183
-		switch_to_blog( $blog_id );
183
+		switch_to_blog($blog_id);
184 184
 		self::single_activate();
185 185
 		restore_current_blog();
186 186
 
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
 			WHERE archived = '0' AND spam = '0'
206 206
 			AND deleted = '0'";
207 207
 
208
-		return $wpdb->get_col( $sql );
208
+		return $wpdb->get_col($sql);
209 209
 
210 210
 	}
211 211
 
@@ -216,18 +216,18 @@  discard block
 block discarded – undo
216 216
 	 */
217 217
 	private static function single_activate() {
218 218
 
219
-		$curr_version = get_option( 'lasso_version' );
219
+		$curr_version = get_option('lasso_version');
220 220
 
221 221
 		// update upgraded from
222
-		if ( $curr_version ) {
223
-			update_option( 'lasso_updated_from', $curr_version );
222
+		if ($curr_version) {
223
+			update_option('lasso_updated_from', $curr_version);
224 224
 		}
225 225
 
226 226
 		// update lasso version option
227
-		update_option( 'lasso_version', LASSO_VERSION );
227
+		update_option('lasso_version', LASSO_VERSION);
228 228
 
229 229
 		// set transietn for activation welcome
230
-		set_transient( '_lasso_welcome_redirect', true, 30 );
230
+		set_transient('_lasso_welcome_redirect', true, 30);
231 231
 
232 232
 
233 233
 	}
@@ -249,9 +249,9 @@  discard block
 block discarded – undo
249 249
 	public function load_plugin_textdomain() {
250 250
 
251 251
 		$domain = $this->plugin_slug;
252
-		$locale = apply_filters( 'plugin_locale', get_locale(), $domain );
252
+		$locale = apply_filters('plugin_locale', get_locale(), $domain);
253 253
 
254
-		$out = load_textdomain( $domain, trailingslashit( LASSO_DIR ). 'languages/' . $domain . '-' . $locale . '.mo' );
254
+		$out = load_textdomain($domain, trailingslashit(LASSO_DIR).'languages/'.$domain.'-'.$locale.'.mo');
255 255
 	}
256 256
 	
257 257
 	
@@ -259,11 +259,11 @@  discard block
 block discarded – undo
259 259
 	{
260 260
 		
261 261
 		
262
-		$code= $_POST["code"];
262
+		$code = $_POST["code"];
263 263
 		$atts = array(
264 264
 		 );
265 265
 		foreach ($_POST as $key => $value) {
266
-			if ($key !="code" && $key !="action") {
266
+			if ($key != "code" && $key != "action") {
267 267
 			    //$shortcode = $shortcode.$key.'="'.$value.'" ';
268 268
 				$atts[$key] = $value;
269 269
 			}
@@ -274,37 +274,37 @@  discard block
 block discarded – undo
274 274
 		}*/
275 275
 		
276 276
 		if ($code == "aesop_image") {
277
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-image.php');
277
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-image.php');
278 278
 		    echo aesop_image_shortcode($atts);
279 279
 		}
280 280
 		if ($code == "aesop_quote") {
281
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-quote.php');
281
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-quote.php');
282 282
 		    echo aesop_quote_shortcode($atts);
283 283
 		}
284 284
 		
285 285
 		if ($code == "aesop_parallax") {
286
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-parallax.php');
286
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-parallax.php');
287 287
 		    echo aesop_parallax_shortcode($atts);
288 288
 		}
289 289
 		
290 290
 		if ($code == "aesop_character") {
291
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-character.php');
291
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-character.php');
292 292
 		    echo aesop_character_shortcode($atts);
293 293
 		}
294 294
 		
295 295
 		if ($code == "aesop_collection") {
296
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-collections.php');
296
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-collections.php');
297 297
 		    echo aesop_collection_shortcode($atts);
298 298
 		}
299 299
 		
300 300
 		if ($code == "aesop_chapter") {
301
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-heading.php');
301
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-heading.php');
302 302
 		    echo aesop_chapter_shortcode($atts);
303 303
 		}
304 304
 		
305 305
 		if ($code == "aesop_gallery") {
306
-		    require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-gallery.php');
307
-		    echo do_shortcode( '[aesop_gallery id="'.$atts["id"].'"]');
306
+		    require_once(ABSPATH.'/wp-content/plugins/aesop-story-engine/public/includes/components/component-gallery.php');
307
+		    echo do_shortcode('[aesop_gallery id="'.$atts["id"].'"]');
308 308
 		}
309 309
 		
310 310
 		exit; 
Please login to merge, or discard this patch.
public/includes/assets.php 1 patch
Spacing   +70 added lines, -70 removed lines patch added patch discarded remove patch
@@ -10,16 +10,16 @@  discard block
 block discarded – undo
10 10
 
11 11
 class assets {
12 12
 
13
-	public function __construct(){
13
+	public function __construct() {
14 14
 
15
-		add_action('wp_enqueue_scripts', array($this,'scripts'));
15
+		add_action('wp_enqueue_scripts', array($this, 'scripts'));
16 16
 	}
17 17
 
18
-	public function scripts(){
18
+	public function scripts() {
19 19
 
20 20
 	
21 21
         // for now editus is disabled for mobile. it will be reenabled when mobile platforms are better supported
22
-		if ( lasso_user_can('edit_posts')) {
22
+		if (lasso_user_can('edit_posts')) {
23 23
 
24 24
 			wp_enqueue_style('lasso-style', LASSO_URL.'/public/assets/css/lasso.css', LASSO_VERSION, true);
25 25
 
@@ -34,21 +34,21 @@  discard block
 block discarded – undo
34 34
 			// url for json api
35 35
 			$home_url = function_exists('json_get_url_prefix') ? json_get_url_prefix() : false;
36 36
 
37
-			$article_object 	= lasso_editor_get_option('article_class','lasso_editor');
37
+			$article_object 	= lasso_editor_get_option('article_class', 'lasso_editor');
38 38
 
39
-			$article_object 	= empty( $article_object ) && lasso_get_supported_theme_class() ? lasso_get_supported_theme_class() : $article_object;
39
+			$article_object 	= empty($article_object) && lasso_get_supported_theme_class() ? lasso_get_supported_theme_class() : $article_object;
40 40
 
41
-			$featImgClass 		= lasso_editor_get_option('featimg_class','lasso_editor');
42
-			if (empty( $featImgClass )) {
41
+			$featImgClass = lasso_editor_get_option('featimg_class', 'lasso_editor');
42
+			if (empty($featImgClass)) {
43 43
 				$featImgClass = lasso_get_supported_theme_featured_image_class();
44 44
 			}
45
-			$titleClass 		= lasso_editor_get_option('title_class','lasso_editor');
46
-			if (empty( $titleClass )) {
45
+			$titleClass = lasso_editor_get_option('title_class', 'lasso_editor');
46
+			if (empty($titleClass)) {
47 47
 				$titleClass = lasso_get_supported_theme_title_class();
48 48
 			}
49
-			$toolbar_headings  	= lasso_editor_get_option('toolbar_headings', 'lasso_editor');
50
-			$objectsNoSave  	= lasso_editor_get_option('dont_save', 'lasso_editor');
51
-			$objectsNonEditable  	= lasso_editor_get_option('non_editable', 'lasso_editor');
49
+			$toolbar_headings = lasso_editor_get_option('toolbar_headings', 'lasso_editor');
50
+			$objectsNoSave = lasso_editor_get_option('dont_save', 'lasso_editor');
51
+			$objectsNonEditable = lasso_editor_get_option('non_editable', 'lasso_editor');
52 52
 
53 53
 			
54 54
 			//text alignement
@@ -59,74 +59,74 @@  discard block
 block discarded – undo
59 59
 			
60 60
 			if ($show_color) {
61 61
 				//color picker
62
-				wp_enqueue_style( 'wp-color-picker' );
63
-				wp_enqueue_script( 'iris', admin_url( 'js/iris.min.js' ), array( 'jquery-ui-draggable', 'jquery-ui-slider', 'jquery-touch-punch' ), false, 1 );
62
+				wp_enqueue_style('wp-color-picker');
63
+				wp_enqueue_script('iris', admin_url('js/iris.min.js'), array('jquery-ui-draggable', 'jquery-ui-slider', 'jquery-touch-punch'), false, 1);
64 64
 			}
65 65
 
66 66
 
67 67
 
68 68
 			// post id reference
69
-			$postid 			= get_the_ID();
69
+			$postid = get_the_ID();
70 70
 
71 71
 			$strings = array(
72
-				'save' 				=> __('Save','lasso'),
73
-				'saving' 			=> __('Saving...','lasso'),
74
-				'saved'				=> __('Saved!','lasso'),
75
-				'adding' 			=> __('Adding...','lasso'),
76
-				'added'				=> __('Added!','lasso'),
77
-				'loading' 			=> __('Loading...','lasso'),
78
-				'loadMore'			=> __('Load More','lasso'),
79
-				'noPostsFound'		=> __('No more posts found','lasso'),
80
-				'fetchFail'	    	=> __('Fetching failed. REST API plugin may not have been installed or configured correctly.','lasso'),
81
-				'galleryCreated' 	=> __('Gallery Created!','lasso'),
82
-				'galleryUpdated' 	=> __('Gallery Updated!','lasso'),
83
-				'justWrite'			=> __('Just write...','lasso'),
84
-				'chooseImage'		=> __('Choose an image','lasso'),
85
-				'updateImage'		=> __('Update Image','lasso'),
86
-				'insertImage'		=> __('Insert Image','lasso'),
87
-				'selectImage'		=> __('Select Image','lasso'),
88
-				'removeFeatImg'     => __('Remove featured image?','lasso'),
89
-				'updateSelectedImg' => __('Update Selected Image','lasso'),
90
-				'chooseImages'		=> __('Choose images','lasso'),
91
-				'editImage'			=> __('Edit Image','lasso'),
92
-				'addImages'			=> __('Add Images','lasso'),
93
-				'addNewGallery'		=> __('Add New Gallery','lasso'),
94
-				'selectGallery'		=> __('Select Lasso Gallery Image','lasso'),
95
-				'useSelectedImages' => __('Use Selected Images','lasso'),
96
-				'publishPost'		=> __('Publish Post?','lasso'),
97
-				'publishYes'		=> __('Yes, publish it!','lasso'),
98
-				'deletePost'		=> __('Trash Post?','lasso'),
99
-				'deleteYes'			=> __('Yes, trash it!','lasso'),
100
-				'warning'			=> __('Oh snap!','laso'),
101
-				'cancelText'		=> __('O.K. got it!','lasso'),
102
-				'missingClass'		=> __('It looks like we are either missing the Article CSS class, or it is configured incorrectly. Editus will not function correctly without this CSS class.','lasso'),
72
+				'save' 				=> __('Save', 'lasso'),
73
+				'saving' 			=> __('Saving...', 'lasso'),
74
+				'saved'				=> __('Saved!', 'lasso'),
75
+				'adding' 			=> __('Adding...', 'lasso'),
76
+				'added'				=> __('Added!', 'lasso'),
77
+				'loading' 			=> __('Loading...', 'lasso'),
78
+				'loadMore'			=> __('Load More', 'lasso'),
79
+				'noPostsFound'		=> __('No more posts found', 'lasso'),
80
+				'fetchFail'	    	=> __('Fetching failed. REST API plugin may not have been installed or configured correctly.', 'lasso'),
81
+				'galleryCreated' 	=> __('Gallery Created!', 'lasso'),
82
+				'galleryUpdated' 	=> __('Gallery Updated!', 'lasso'),
83
+				'justWrite'			=> __('Just write...', 'lasso'),
84
+				'chooseImage'		=> __('Choose an image', 'lasso'),
85
+				'updateImage'		=> __('Update Image', 'lasso'),
86
+				'insertImage'		=> __('Insert Image', 'lasso'),
87
+				'selectImage'		=> __('Select Image', 'lasso'),
88
+				'removeFeatImg'     => __('Remove featured image?', 'lasso'),
89
+				'updateSelectedImg' => __('Update Selected Image', 'lasso'),
90
+				'chooseImages'		=> __('Choose images', 'lasso'),
91
+				'editImage'			=> __('Edit Image', 'lasso'),
92
+				'addImages'			=> __('Add Images', 'lasso'),
93
+				'addNewGallery'		=> __('Add New Gallery', 'lasso'),
94
+				'selectGallery'		=> __('Select Lasso Gallery Image', 'lasso'),
95
+				'useSelectedImages' => __('Use Selected Images', 'lasso'),
96
+				'publishPost'		=> __('Publish Post?', 'lasso'),
97
+				'publishYes'		=> __('Yes, publish it!', 'lasso'),
98
+				'deletePost'		=> __('Trash Post?', 'lasso'),
99
+				'deleteYes'			=> __('Yes, trash it!', 'lasso'),
100
+				'warning'			=> __('Oh snap!', 'laso'),
101
+				'cancelText'		=> __('O.K. got it!', 'lasso'),
102
+				'missingClass'		=> __('It looks like we are either missing the Article CSS class, or it is configured incorrectly. Editus will not function correctly without this CSS class.', 'lasso'),
103 103
 				'missingConfirm'	=> __('Update Settings', 'lasso'),
104
-				'helperText'		=> __('one more letter','lasso'),
104
+				'helperText'		=> __('one more letter', 'lasso'),
105 105
 				'editingBackup'  	=> __('You are currently editing a backup copy of this post.')
106 106
 			);
107 107
 
108
-			$api_url = trailingslashit( home_url() ) . 'lasso-internal-api';
108
+			$api_url = trailingslashit(home_url()).'lasso-internal-api';
109 109
 
110 110
 			$gallery_class = new gallery();
111 111
 			$gallery_nonce_action = $gallery_class->nonce_action;
112
-			$gallery_nonce = wp_create_nonce( $gallery_nonce_action );
112
+			$gallery_nonce = wp_create_nonce($gallery_nonce_action);
113 113
 
114 114
 			// localized objects
115 115
 			$objects = array(
116
-				'ajaxurl' 			=> esc_url( $api_url ),
117
-				'ajaxurl2' 			=> esc_url( admin_url( 'admin-ajax.php' )),
116
+				'ajaxurl' 			=> esc_url($api_url),
117
+				'ajaxurl2' 			=> esc_url(admin_url('admin-ajax.php')),
118 118
 				'editor' 			=> 'lasso--content', // ID of editable content (without #) DONT CHANGE
119 119
 				'article_object'	=> $article_object,
120 120
 				'featImgClass'		=> $featImgClass,
121 121
 				'titleClass'		=> $titleClass,
122 122
 				'strings'			=> $strings,
123
-				'settingsLink'		=> function_exists('is_multisite') && is_multisite() ? network_admin_url( 'settings.php?page=lasso-editor' ) : admin_url( 'admin.php?page=lasso-editor-settings' ),
124
-				'post_status'		=> get_post_status( $postid ),
123
+				'settingsLink'		=> function_exists('is_multisite') && is_multisite() ? network_admin_url('settings.php?page=lasso-editor') : admin_url('admin.php?page=lasso-editor-settings'),
124
+				'post_status'		=> get_post_status($postid),
125 125
 				'postid'			=> $postid,
126 126
 				'permalink'			=> get_permalink(),
127 127
 				'edit_others_pages'	=> current_user_can('edit_others_pages') ? true : false,
128 128
 				'edit_others_posts'	=> current_user_can('edit_others_posts') ? true : false,
129
-				'userCanEdit'		=> current_user_can('edit_post', $postid ),
129
+				'userCanEdit'		=> current_user_can('edit_post', $postid),
130 130
 				'can_publish_posts'	=> current_user_can('publish_posts'),
131 131
 				'can_publish_pages'	=> current_user_can('publish_pages'),
132 132
 				'author'			=> is_user_logged_in() ? get_current_user_ID() : false,
@@ -160,35 +160,35 @@  discard block
 block discarded – undo
160 160
 				'postTags'    		=> lasso_get_objects('tag'),
161 161
 				'noResultsDiv'		=> lasso_editor_empty_results(),
162 162
 				'noRevisionsDiv'	=> lasso_editor_empty_results('revision'),
163
-				'mapTileProvider'   => function_exists('aesop_map_tile_provider') ? aesop_map_tile_provider( $postid ) : false,
164
-				'mapLocations'		=> get_post_meta( $postid, 'ase_map_component_locations' ),
165
-				'mapStart'			=> get_post_meta( $postid, 'ase_map_component_start_point', true ),
166
-				'mapZoom'			=> get_post_meta( $postid, 'ase_map_component_zoom', true ),
163
+				'mapTileProvider'   => function_exists('aesop_map_tile_provider') ? aesop_map_tile_provider($postid) : false,
164
+				'mapLocations'		=> get_post_meta($postid, 'ase_map_component_locations'),
165
+				'mapStart'			=> get_post_meta($postid, 'ase_map_component_start_point', true),
166
+				'mapZoom'			=> get_post_meta($postid, 'ase_map_component_zoom', true),
167 167
 				'revisionModal' 	=> lasso_editor_revision_modal(),
168 168
 				'isMobile'          => wp_is_mobile(),
169
-				'enableAutoSave'    => lasso_editor_get_option( 'enable_autosave', 'lasso_editor' ),
169
+				'enableAutoSave'    => lasso_editor_get_option('enable_autosave', 'lasso_editor'),
170 170
 				'showColor'         => $show_color,
171 171
 				'showAlignment'  => $show_align
172 172
 			);
173 173
 
174 174
 
175 175
 			// wp api client
176
-			wp_enqueue_script( 'wp-api-js', LASSO_URL.'/public/assets/js/source/util--wp-api.js', array( 'jquery', 'underscore', 'backbone' ), LASSO_VERSION, true );
177
-			$settings = array( 'root' => home_url( $home_url ), 'nonce' => wp_create_nonce( 'wp_json' ) );
178
-			wp_localize_script( 'wp-api-js', 'WP_API_Settings', $settings );
176
+			wp_enqueue_script('wp-api-js', LASSO_URL.'/public/assets/js/source/util--wp-api.js', array('jquery', 'underscore', 'backbone'), LASSO_VERSION, true);
177
+			$settings = array('root' => home_url($home_url), 'nonce' => wp_create_nonce('wp_json'));
178
+			wp_localize_script('wp-api-js', 'WP_API_Settings', $settings);
179 179
 
180
-			$postfix = ( defined( 'SCRIPT_DEBUG' ) && true === SCRIPT_DEBUG ) ? '' : '.min';
180
+			$postfix = (defined('SCRIPT_DEBUG') && true === SCRIPT_DEBUG) ? '' : '.min';
181 181
 			if ($show_color) {
182
-				wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery', 'iris'), LASSO_VERSION, true);
182
+				wp_enqueue_script('lasso', LASSO_URL."/public/assets/js/lasso{$postfix}.js", array('jquery', 'iris'), LASSO_VERSION, true);
183 183
 			} else {
184
-			    wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery'), LASSO_VERSION, true);
184
+			    wp_enqueue_script('lasso', LASSO_URL."/public/assets/js/lasso{$postfix}.js", array('jquery'), LASSO_VERSION, true);
185 185
 			}
186
-			wp_localize_script('lasso', 'lasso_editor', apply_filters('lasso_localized_objects', $objects ) );
186
+			wp_localize_script('lasso', 'lasso_editor', apply_filters('lasso_localized_objects', $objects));
187 187
 			
188 188
 			//enqueue js if tour is not hidden 
189
-            		$tour_hidden = get_user_meta( get_current_user_ID(), 'lasso_hide_tour', true );
190
-    			if ( lasso_user_can() && !$tour_hidden ){
191
-                		wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/tour.js", array('jquery', 'lasso'), LASSO_VERSION, true);
189
+            		$tour_hidden = get_user_meta(get_current_user_ID(), 'lasso_hide_tour', true);
190
+    			if (lasso_user_can() && !$tour_hidden) {
191
+                		wp_enqueue_script('lasso', LASSO_URL."/public/assets/js/tour.js", array('jquery', 'lasso'), LASSO_VERSION, true);
192 192
     			}
193 193
 
194 194
 		}
Please login to merge, or discard this patch.