Completed
Push — master ( 790191...86abac )
by
unknown
01:45
created
public/includes/assets.php 2 patches
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -20,10 +20,10 @@  discard block
 block discarded – undo
20 20
 	
21 21
 		global $post;
22 22
 		if ( lasso_user_can('edit_posts') && 
23
-		     !( function_exists( 'is_gutenberg_page' ) && has_blocks( $post->post_content) )) {// bail if the post has Gutenberg bloc
23
+			 !( function_exists( 'is_gutenberg_page' ) && has_blocks( $post->post_content) )) {// bail if the post has Gutenberg bloc
24 24
 			
25 25
 			/**    Returns the time offset from UTC
26
-			*/
26
+			 */
27 27
 			function get_UTC_offset() {
28 28
 				$timezone_string = get_option( 'timezone_string' );
29 29
 				if (empty( $timezone_string ) ) {
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 
39 39
 			wp_enqueue_style('lasso-style', LASSO_URL.'/public/assets/css/lasso.css', LASSO_VERSION, true);
40 40
 
41
-            //don't load autocomplete if it's a stockholm theme
41
+			//don't load autocomplete if it's a stockholm theme
42 42
 			$themename  	= wp_get_theme()->get('Name');
43 43
 			if ($themename !='Stockholm' ) {
44 44
 				wp_enqueue_script('jquery-ui-autocomplete');
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 			$tz_offset = get_UTC_offset();
107 107
 			$post_date = get_the_time('U', $postid);
108 108
 			$time = (time()+$tz_offset);
109
-            $delta = $time - $post_date;
109
+			$delta = $time - $post_date;
110 110
 
111 111
 			$strings = array(
112 112
 				'save' 				=> __('Save','lasso'),
@@ -158,11 +158,11 @@  discard block
 block discarded – undo
158 158
 			$gallery_nonce = wp_create_nonce( $gallery_nonce_action );
159 159
 			
160 160
 			
161
-            if ($allow_change_date) {
162
-			    $permalink = get_site_url().'/?p='.$postid;
163
-            } else {
164
-                $permalink = get_permalink($postid);
165
-            }
161
+			if ($allow_change_date) {
162
+				$permalink = get_site_url().'/?p='.$postid;
163
+			} else {
164
+				$permalink = get_permalink($postid);
165
+			}
166 166
 			
167 167
 			// rest api
168 168
 			$rest_nonce = '';
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
 				'customFields'      => $custom_fields,
255 255
 				'clickToInsert'     => ($insert_comp_ui =='click'),
256 256
 				'buttonOnEmptyP'     => ($insert_comp_ui =='mediumcom'),      // auto show a button to insert components on an empty paragraph      
257
-                'rtl'               => is_rtl(),				
257
+				'rtl'               => is_rtl(),				
258 258
 				'skipToEdit'        =>( $delta < 10 && $delta >=0 ), // if it's a new post, skip to edit mode
259 259
 			);
260 260
 
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
 			
264 264
 			
265 265
 			if (!$using_restapiv2) {
266
-               // enqueue REST API V1
266
+			   // enqueue REST API V1
267 267
 			   wp_enqueue_script( 'wp-api-js', LASSO_URL.'/public/assets/js/source/util--wp-api.js', array( 'jquery', 'underscore', 'backbone' ), LASSO_VERSION, true );
268 268
 			   $settings = array( 'root' => home_url( $home_url ), 'nonce' => wp_create_nonce( 'wp_json' ) );
269 269
 			   wp_localize_script( 'wp-api-js', 'WP_API_Settings', $settings );
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
 			if ($show_color) {
280 280
 				wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api','iris'), LASSO_VERSION, true);
281 281
 			} else {
282
-			    wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api'), LASSO_VERSION, true);
282
+				wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api'), LASSO_VERSION, true);
283 283
 			}
284 284
 			wp_localize_script('lasso', 'lasso_editor', apply_filters('lasso_localized_objects', $objects ) );
285 285
 
Please login to merge, or discard this patch.
Spacing   +91 added lines, -91 removed lines patch added patch discarded remove patch
@@ -10,24 +10,24 @@  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
 		global $post;
22
-		if ( lasso_user_can('edit_posts') && 
23
-		     !( function_exists( 'is_gutenberg_page' ) && has_blocks( $post->post_content) )) {// bail if the post has Gutenberg bloc
22
+		if (lasso_user_can('edit_posts') && 
23
+		     !(function_exists('is_gutenberg_page') && has_blocks($post->post_content))) {// bail if the post has Gutenberg bloc
24 24
 			
25 25
 			/**    Returns the time offset from UTC
26 26
 			*/
27 27
 			function get_UTC_offset() {
28
-				$timezone_string = get_option( 'timezone_string' );
29
-				if (empty( $timezone_string ) ) {
30
-					return get_option('gmt_offset')*3600;
28
+				$timezone_string = get_option('timezone_string');
29
+				if (empty($timezone_string)) {
30
+					return get_option('gmt_offset') * 3600;
31 31
 				}
32 32
 				
33 33
 				$origin_dtz = new \DateTimeZone($timezone_string);				
@@ -39,8 +39,8 @@  discard block
 block discarded – undo
39 39
 			wp_enqueue_style('lasso-style', LASSO_URL.'/public/assets/css/lasso.css', LASSO_VERSION, true);
40 40
 
41 41
             //don't load autocomplete if it's a stockholm theme
42
-			$themename  	= wp_get_theme()->get('Name');
43
-			if ($themename !='Stockholm' ) {
42
+			$themename = wp_get_theme()->get('Name');
43
+			if ($themename != 'Stockholm') {
44 44
 				wp_enqueue_script('jquery-ui-autocomplete');
45 45
 			}
46 46
 			wp_enqueue_script('jquery-ui-draggable');
@@ -53,27 +53,27 @@  discard block
 block discarded – undo
53 53
 			// url for json api
54 54
 			$home_url = function_exists('json_get_url_prefix') ? json_get_url_prefix() : false;
55 55
 
56
-			$article_object 	= lasso_editor_get_option('article_class','lasso_editor');
56
+			$article_object 	= lasso_editor_get_option('article_class', 'lasso_editor');
57 57
 
58
-			$article_object 	= empty( $article_object ) && lasso_get_supported_theme_class() ? lasso_get_supported_theme_class() : $article_object;
58
+			$article_object 	= empty($article_object) && lasso_get_supported_theme_class() ? lasso_get_supported_theme_class() : $article_object;
59 59
 
60
-			$featImgClass 		= lasso_editor_get_option('featimg_class','lasso_editor');
61
-			if (empty( $featImgClass )) {
60
+			$featImgClass = lasso_editor_get_option('featimg_class', 'lasso_editor');
61
+			if (empty($featImgClass)) {
62 62
 				$featImgClass = lasso_get_supported_theme_featured_image_class();
63 63
 			}
64
-			$titleClass 		= lasso_editor_get_option('title_class','lasso_editor');
65
-			if (empty( $titleClass )) {
64
+			$titleClass = lasso_editor_get_option('title_class', 'lasso_editor');
65
+			if (empty($titleClass)) {
66 66
 				$titleClass = lasso_get_supported_theme_title_class();
67 67
 			}
68
-			$toolbar_headings  	= lasso_editor_get_option('toolbar_headings', 'lasso_editor');
69
-			$toolbar_headings_h4  	= lasso_editor_get_option('toolbar_headings_h4', 'lasso_editor');
68
+			$toolbar_headings = lasso_editor_get_option('toolbar_headings', 'lasso_editor');
69
+			$toolbar_headings_h4 = lasso_editor_get_option('toolbar_headings_h4', 'lasso_editor');
70 70
 			$objectsNoSave  	= lasso_editor_get_option('dont_save', 'lasso_editor');
71
-			$objectsNonEditable  	= lasso_editor_get_option('non_editable', 'lasso_editor');
71
+			$objectsNonEditable = lasso_editor_get_option('non_editable', 'lasso_editor');
72 72
 			$disableRESTSave = lasso_editor_get_option('save_using_rest_disabled', 'lasso_editor');
73
-			$save_to_post_disabled  = lasso_editor_get_option( 'post_save_disabled', 'lasso_editor' );
73
+			$save_to_post_disabled = lasso_editor_get_option('post_save_disabled', 'lasso_editor');
74 74
 			
75
-			$bold_tag = lasso_editor_get_option('bold_tag', 'lasso_editor','b');
76
-			$i_tag = lasso_editor_get_option('i_tag', 'lasso_editor','i');
75
+			$bold_tag = lasso_editor_get_option('bold_tag', 'lasso_editor', 'b');
76
+			$i_tag = lasso_editor_get_option('i_tag', 'lasso_editor', 'i');
77 77
 
78 78
 			
79 79
 			//text alignement
@@ -87,8 +87,8 @@  discard block
 block discarded – undo
87 87
 			
88 88
 			if ($show_color) {
89 89
 				//color picker
90
-				wp_enqueue_style( 'wp-color-picker' );
91
-				wp_enqueue_script( 'iris', admin_url( 'js/iris.min.js' ), array( 'jquery-ui-draggable', 'jquery-ui-slider', 'jquery-touch-punch' ), false, 1 );
90
+				wp_enqueue_style('wp-color-picker');
91
+				wp_enqueue_script('iris', admin_url('js/iris.min.js'), array('jquery-ui-draggable', 'jquery-ui-slider', 'jquery-touch-punch'), false, 1);
92 92
 			}
93 93
 			
94 94
 			// click to insert components, not drag and drop
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 			
98 98
 			// custom fields
99 99
 			
100
-			$custom_fields = apply_filters( 'editus_custom_fields', null ); //array('testFieldName' => '#field1');
100
+			$custom_fields = apply_filters('editus_custom_fields', null); //array('testFieldName' => '#field1');
101 101
 
102 102
 
103 103
 
@@ -105,57 +105,57 @@  discard block
 block discarded – undo
105 105
 			$postid 			= get_the_ID();
106 106
 			$tz_offset = get_UTC_offset();
107 107
 			$post_date = get_the_time('U', $postid);
108
-			$time = (time()+$tz_offset);
108
+			$time = (time() + $tz_offset);
109 109
             $delta = $time - $post_date;
110 110
 
111 111
 			$strings = array(
112
-				'save' 				=> __('Save','lasso'),
113
-				'selectText'	  	=> __('Please Select Text First.','lasso'),
114
-				'cancel' 			=> __('Cancel','lasso'),
115
-				'exiteditor' 		=> __('Exit Editor','lasso'),
116
-				'saving' 			=> __('Saving...','lasso'),
117
-				'saved'				=> __('Saved!','lasso'),
118
-				'adding' 			=> __('Adding...','lasso'),
119
-				'added'				=> __('Added!','lasso'),
120
-				'loading' 			=> __('Loading...','lasso'),
121
-				'loadMore'			=> __('Load More','lasso'),
122
-				'close'			=> __('Close','lasso'),
123
-				'noPostsFound'		=> __('No more posts found','lasso'),
124
-				'fetchFail'	    	=> __('Fetching failed.','lasso'),
125
-				'galleryCreated' 	=> __('Gallery Created!','lasso'),
126
-				'galleryUpdated' 	=> __('Gallery Updated!','lasso'),
127
-				'justWrite'			=> __('Just write...','lasso'),
128
-				'chooseImage'		=> __('Choose an image','lasso'),
129
-				'updateImage'		=> __('Update Image','lasso'),
130
-				'insertImage'		=> __('Insert Image','lasso'),
131
-				'selectImage'		=> __('Select Image','lasso'),
132
-				'removeFeatImg'     => __('Remove featured image?','lasso'),
133
-				'updateSelectedImg' => __('Update Selected Image','lasso'),
134
-				'chooseImages'		=> __('Choose images','lasso'),
135
-				'editImage'			=> __('Edit Image','lasso'),
136
-				'addImages'			=> __('Add Images','lasso'),
137
-				'addNewGallery'		=> __('Add New Gallery','lasso'),
138
-				'selectGallery'		=> __('Select Lasso Gallery Image','lasso'),
139
-				'useSelectedImages' => __('Use Selected Images','lasso'),
140
-				'publishPost'		=> __('Publish Post?','lasso'),
141
-				'publishYes'		=> __('Yes, publish it!','lasso'),
142
-				'deletePost'		=> __('Trash Post?','lasso'),
143
-				'deleteYes'			=> __('Yes, trash it!','lasso'),
144
-				'warning'			=> __('Oh snap!','laso'),
145
-				'cancelText'		=> __('O.K. got it!','lasso'),
146
-				'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'),
112
+				'save' 				=> __('Save', 'lasso'),
113
+				'selectText'	  	=> __('Please Select Text First.', 'lasso'),
114
+				'cancel' 			=> __('Cancel', 'lasso'),
115
+				'exiteditor' 		=> __('Exit Editor', 'lasso'),
116
+				'saving' 			=> __('Saving...', 'lasso'),
117
+				'saved'				=> __('Saved!', 'lasso'),
118
+				'adding' 			=> __('Adding...', 'lasso'),
119
+				'added'				=> __('Added!', 'lasso'),
120
+				'loading' 			=> __('Loading...', 'lasso'),
121
+				'loadMore'			=> __('Load More', 'lasso'),
122
+				'close'			=> __('Close', 'lasso'),
123
+				'noPostsFound'		=> __('No more posts found', 'lasso'),
124
+				'fetchFail'	    	=> __('Fetching failed.', 'lasso'),
125
+				'galleryCreated' 	=> __('Gallery Created!', 'lasso'),
126
+				'galleryUpdated' 	=> __('Gallery Updated!', 'lasso'),
127
+				'justWrite'			=> __('Just write...', 'lasso'),
128
+				'chooseImage'		=> __('Choose an image', 'lasso'),
129
+				'updateImage'		=> __('Update Image', 'lasso'),
130
+				'insertImage'		=> __('Insert Image', 'lasso'),
131
+				'selectImage'		=> __('Select Image', 'lasso'),
132
+				'removeFeatImg'     => __('Remove featured image?', 'lasso'),
133
+				'updateSelectedImg' => __('Update Selected Image', 'lasso'),
134
+				'chooseImages'		=> __('Choose images', 'lasso'),
135
+				'editImage'			=> __('Edit Image', 'lasso'),
136
+				'addImages'			=> __('Add Images', 'lasso'),
137
+				'addNewGallery'		=> __('Add New Gallery', 'lasso'),
138
+				'selectGallery'		=> __('Select Lasso Gallery Image', 'lasso'),
139
+				'useSelectedImages' => __('Use Selected Images', 'lasso'),
140
+				'publishPost'		=> __('Publish Post?', 'lasso'),
141
+				'publishYes'		=> __('Yes, publish it!', 'lasso'),
142
+				'deletePost'		=> __('Trash Post?', 'lasso'),
143
+				'deleteYes'			=> __('Yes, trash it!', 'lasso'),
144
+				'warning'			=> __('Oh snap!', 'laso'),
145
+				'cancelText'		=> __('O.K. got it!', 'lasso'),
146
+				'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'),
147 147
 				'missingConfirm'	=> __('Update Settings', 'lasso'),
148
-				'helperText'		=> __('one more letter','lasso'),
148
+				'helperText'		=> __('one more letter', 'lasso'),
149 149
 				'editingBackup'  	=> __('You are currently editing a backup copy of this post.'),
150 150
 				
151 151
 				
152 152
 			);
153 153
 
154
-			$api_url = trailingslashit( home_url() ) . 'lasso-internal-api';
154
+			$api_url = trailingslashit(home_url()).'lasso-internal-api';
155 155
 
156 156
 			$gallery_class = new gallery();
157 157
 			$gallery_nonce_action = $gallery_class->nonce_action;
158
-			$gallery_nonce = wp_create_nonce( $gallery_nonce_action );
158
+			$gallery_nonce = wp_create_nonce($gallery_nonce_action);
159 159
 			
160 160
 			
161 161
             if ($allow_change_date) {
@@ -170,13 +170,13 @@  discard block
 block discarded – undo
170 170
 			  
171 171
 			if (function_exists('rest_url')) {
172 172
 				//$rest_root = esc_url_raw( rest_url());
173
-				$rest_nonce = wp_create_nonce( 'wp_rest' );
174
-				$settings = array( 'root' => $rest_root, 'nonce' => $rest_nonce );
175
-				wp_enqueue_script( 'wp-api', '', array( 'jquery', 'underscore', 'backbone' ), LASSO_VERSION, true );
176
-				wp_localize_script( 'wp-api', 'wpApiSettings', $settings );
177
-				wp_localize_script( 'wp-api', 'WP_API_Settings', $settings );
173
+				$rest_nonce = wp_create_nonce('wp_rest');
174
+				$settings = array('root' => $rest_root, 'nonce' => $rest_nonce);
175
+				wp_enqueue_script('wp-api', '', array('jquery', 'underscore', 'backbone'), LASSO_VERSION, true);
176
+				wp_localize_script('wp-api', 'wpApiSettings', $settings);
177
+				wp_localize_script('wp-api', 'WP_API_Settings', $settings);
178 178
 				
179
-				if ( class_exists( 'WP_REST_Controller' )) {
179
+				if (class_exists('WP_REST_Controller')) {
180 180
 					// we are using REST API V2
181 181
 					$using_restapiv2 = true;
182 182
 				}
@@ -184,8 +184,8 @@  discard block
 block discarded – undo
184 184
 
185 185
 			// localized objects
186 186
 			$objects = array(
187
-				'ajaxurl' 			=> esc_url( $api_url ),
188
-				'ajaxurl2' 			=> esc_url( admin_url( 'admin-ajax.php' )),
187
+				'ajaxurl' 			=> esc_url($api_url),
188
+				'ajaxurl2' 			=> esc_url(admin_url('admin-ajax.php')),
189 189
 				'rest_root'         => $rest_root,
190 190
 				'rest_nonce'        => $rest_nonce,
191 191
 				'editor' 			=> 'lasso--content', // ID of editable content (without #) DONT CHANGE
@@ -193,13 +193,13 @@  discard block
 block discarded – undo
193 193
 				'featImgClass'		=> $featImgClass,
194 194
 				'titleClass'		=> $titleClass,
195 195
 				'strings'			=> $strings,
196
-				'settingsLink'		=> function_exists('is_multisite') && is_multisite() ? network_admin_url( 'settings.php?page=lasso-editor' ) : admin_url( 'admin.php?page=lasso-editor-settings' ),
197
-				'post_status'		=> get_post_status( $postid ),
196
+				'settingsLink'		=> function_exists('is_multisite') && is_multisite() ? network_admin_url('settings.php?page=lasso-editor') : admin_url('admin.php?page=lasso-editor-settings'),
197
+				'post_status'		=> get_post_status($postid),
198 198
 				'postid'			=> $postid,
199 199
 				'permalink'			=> $permalink,
200 200
 				'edit_others_pages'	=> current_user_can('edit_others_pages') ? true : false,
201 201
 				'edit_others_posts'	=> current_user_can('edit_others_posts') ? true : false,
202
-				'userCanEdit'		=> current_user_can('edit_post', $postid ),
202
+				'userCanEdit'		=> current_user_can('edit_post', $postid),
203 203
 				'can_publish'		=> is_page() ? current_user_can('publish_pages') : current_user_can('publish_posts'),
204 204
 				//'can_publish_posts'	=> current_user_can('publish_posts'),
205 205
 				//'can_publish_pages'	=> current_user_can('publish_pages'),
@@ -235,27 +235,27 @@  discard block
 block discarded – undo
235 235
 				'postTags'    		=> lasso_get_objects('tag'),
236 236
 				'noResultsDiv'		=> lasso_editor_empty_results(),
237 237
 				'noRevisionsDiv'	=> lasso_editor_empty_results('revision'),
238
-				'mapTileProvider'   => function_exists('aesop_map_tile_provider') ? aesop_map_tile_provider( $postid ) : false,
239
-				'mapLocations'		=> get_post_meta( $postid, 'ase_map_component_locations' ),
240
-				'mapStart'			=> get_post_meta( $postid, 'ase_map_component_start_point', true ),
241
-				'mapZoom'			=> get_post_meta( $postid, 'ase_map_component_zoom', true ),
238
+				'mapTileProvider'   => function_exists('aesop_map_tile_provider') ? aesop_map_tile_provider($postid) : false,
239
+				'mapLocations'		=> get_post_meta($postid, 'ase_map_component_locations'),
240
+				'mapStart'			=> get_post_meta($postid, 'ase_map_component_start_point', true),
241
+				'mapZoom'			=> get_post_meta($postid, 'ase_map_component_zoom', true),
242 242
 				'revisionModal' 	=> lasso_editor_revision_modal(),
243 243
 				'isMobile'          => wp_is_mobile(),
244
-				'enableAutoSave'    => lasso_editor_get_option( 'enable_autosave', 'lasso_editor' ),
244
+				'enableAutoSave'    => lasso_editor_get_option('enable_autosave', 'lasso_editor'),
245 245
 				'showColor'         => $show_color,
246 246
 				'showAlignment'     => $show_align,
247 247
 				'showIgnoredItems'  => lasso_editor_get_option('show_ignored_items', 'lasso_editor'),
248 248
 				'restapi2'          => $using_restapiv2,
249 249
 				'saveusingrest'     => $using_restapiv2 && !$disableRESTSave,
250
-				'newObjectContent'  => '<p>'.apply_filters( 'lasso_new_object_content', __( 'Once upon a time...','lasso') ).'</p>',
250
+				'newObjectContent'  => '<p>'.apply_filters('lasso_new_object_content', __('Once upon a time...', 'lasso')).'</p>',
251 251
 				'disableSavePost'   => $save_to_post_disabled,
252 252
 				'boldTag'           => $bold_tag,
253 253
 				'iTag'           	=> $i_tag,
254 254
 				'customFields'      => $custom_fields,
255
-				'clickToInsert'     => ($insert_comp_ui =='click'),
256
-				'buttonOnEmptyP'     => ($insert_comp_ui =='mediumcom'),      // auto show a button to insert components on an empty paragraph      
255
+				'clickToInsert'     => ($insert_comp_ui == 'click'),
256
+				'buttonOnEmptyP'     => ($insert_comp_ui == 'mediumcom'), // auto show a button to insert components on an empty paragraph      
257 257
                 'rtl'               => is_rtl(),				
258
-				'skipToEdit'        =>( $delta < 10 && $delta >=0 ), // if it's a new post, skip to edit mode
258
+				'skipToEdit'        =>($delta < 10 && $delta >= 0), // if it's a new post, skip to edit mode
259 259
 			);
260 260
 
261 261
 
@@ -264,9 +264,9 @@  discard block
 block discarded – undo
264 264
 			
265 265
 			if (!$using_restapiv2) {
266 266
                // enqueue REST API V1
267
-			   wp_enqueue_script( 'wp-api-js', LASSO_URL.'/public/assets/js/source/util--wp-api.js', array( 'jquery', 'underscore', 'backbone' ), LASSO_VERSION, true );
268
-			   $settings = array( 'root' => home_url( $home_url ), 'nonce' => wp_create_nonce( 'wp_json' ) );
269
-			   wp_localize_script( 'wp-api-js', 'WP_API_Settings', $settings );
267
+			   wp_enqueue_script('wp-api-js', LASSO_URL.'/public/assets/js/source/util--wp-api.js', array('jquery', 'underscore', 'backbone'), LASSO_VERSION, true);
268
+			   $settings = array('root' => home_url($home_url), 'nonce' => wp_create_nonce('wp_json'));
269
+			   wp_localize_script('wp-api-js', 'WP_API_Settings', $settings);
270 270
 			}
271 271
 			
272 272
 			if ($allow_change_date) {
@@ -275,13 +275,13 @@  discard block
 block discarded – undo
275 275
 				wp_enqueue_style('jquery-ui');
276 276
 			}
277 277
 
278
-			$postfix = ( defined( 'SCRIPT_DEBUG' ) && true === SCRIPT_DEBUG ) ? '' : '.min';
278
+			$postfix = (defined('SCRIPT_DEBUG') && true === SCRIPT_DEBUG) ? '' : '.min';
279 279
 			if ($show_color) {
280
-				wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api','iris'), LASSO_VERSION, true);
280
+				wp_enqueue_script('lasso', LASSO_URL."/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api', 'iris'), LASSO_VERSION, true);
281 281
 			} else {
282
-			    wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api'), LASSO_VERSION, true);
282
+			    wp_enqueue_script('lasso', LASSO_URL."/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api'), LASSO_VERSION, true);
283 283
 			}
284
-			wp_localize_script('lasso', 'lasso_editor', apply_filters('lasso_localized_objects', $objects ) );
284
+			wp_localize_script('lasso', 'lasso_editor', apply_filters('lasso_localized_objects', $objects));
285 285
 
286 286
 
287 287
 		}
Please login to merge, or discard this patch.
admin/includes/menus/welcome.php 1 patch
Spacing   +81 added lines, -81 removed lines patch added patch discarded remove patch
@@ -10,30 +10,30 @@  discard block
 block discarded – undo
10 10
 
11 11
 	function __construct() {
12 12
 
13
-		add_action( 'admin_init',   array( $this, 'redirect' ) );
14
-		add_action( 'admin_menu',   array( $this, 'lasso_welcome' ) );
15
-		add_action( 'network_admin_menu',   array( $this, 'lasso_welcome' ) );  // CHANGED Added hook.
13
+		add_action('admin_init', array($this, 'redirect'));
14
+		add_action('admin_menu', array($this, 'lasso_welcome'));
15
+		add_action('network_admin_menu', array($this, 'lasso_welcome')); // CHANGED Added hook.
16 16
 
17
-		add_action( 'tgmpa_register',  array( $this,'required_plugins' ));
17
+		add_action('tgmpa_register', array($this, 'required_plugins'));
18 18
 
19 19
 	}
20 20
 
21 21
 	function redirect() {
22 22
 
23 23
 		// Bail if no activation redirect
24
-		if ( !get_transient( '_lasso_welcome_redirect' ) ) {
24
+		if (!get_transient('_lasso_welcome_redirect')) {
25 25
 			return;
26 26
 		}
27 27
 
28 28
 		// Delete the redirect transient
29
-		delete_transient( '_lasso_welcome_redirect' );
29
+		delete_transient('_lasso_welcome_redirect');
30 30
 
31 31
 		// Bail if activating from network, or bulk
32
-		if ( is_network_admin() || isset( $_GET['activate-multi'] ) ) {
32
+		if (is_network_admin() || isset($_GET['activate-multi'])) {
33 33
 			return;
34 34
 		}
35 35
 
36
-		wp_safe_redirect( esc_url_raw( add_query_arg( array( 'page' => 'lasso-editor' ), admin_url( 'admin.php' ) ) ) );
36
+		wp_safe_redirect(esc_url_raw(add_query_arg(array('page' => 'lasso-editor'), admin_url('admin.php'))));
37 37
 
38 38
 	}
39 39
 
@@ -45,8 +45,8 @@  discard block
 block discarded – undo
45 45
 	function lasso_welcome() {
46 46
 
47 47
 		// CHANGED Removed condition.
48
-		add_menu_page( __( 'Editus', 'lasso' ), __( 'Editus', 'lasso' ), 'manage_options', 'lasso-editor', '', LASSO_URL.'/admin/assets/img/menu-icon.png' );
49
-		add_submenu_page( 'lasso-editor', __( 'Welcome', 'lasso' ), __( 'Status', 'lasso' ), 'manage_options', 'lasso-editor', array( $this, 'welcome' ) );
48
+		add_menu_page(__('Editus', 'lasso'), __('Editus', 'lasso'), 'manage_options', 'lasso-editor', '', LASSO_URL.'/admin/assets/img/menu-icon.png');
49
+		add_submenu_page('lasso-editor', __('Welcome', 'lasso'), __('Status', 'lasso'), 'manage_options', 'lasso-editor', array($this, 'welcome'));
50 50
 
51 51
 	}
52 52
 
@@ -60,24 +60,24 @@  discard block
 block discarded – undo
60 60
 		?>
61 61
 		  <div class="wrap lasso--welcome">
62 62
 
63
-		  		<?php self::header();?>
63
+		  		<?php self::header(); ?>
64 64
 
65 65
 		  		<ul class="lasso--welcome__steps">
66 66
 
67 67
 		  		<?php // CHANGED Added the is_network_admin condition. ?>
68
-			  		<?php if ( is_network_admin() ) : ?>
68
+			  		<?php if (is_network_admin()) : ?>
69 69
 
70 70
 			  			<li>
71
-			  				<p><?php _e( 'We will check the current theme on every site in your network and give you a quick status feedback here. You can see the status by visiting the Editus menu on each site.', 'lasso' );?></p>
71
+			  				<p><?php _e('We will check the current theme on every site in your network and give you a quick status feedback here. You can see the status by visiting the Editus menu on each site.', 'lasso'); ?></p>
72 72
 			  			</li>
73 73
 
74 74
 			  		<?php else :
75 75
 
76 76
 					$checks = self::lasso_preflight_check();
77 77
 
78
-					if ( $checks && !defined( 'LASSO_AGENCY_MODE' ) ):
78
+					if ($checks && !defined('LASSO_AGENCY_MODE')):
79 79
 
80
-						foreach ( (array) $checks as $key => $check ) {
80
+						foreach ((array) $checks as $key => $check) {
81 81
 
82 82
 							echo $check;
83 83
 						}
@@ -87,11 +87,11 @@  discard block
 block discarded – undo
87 87
 							// pre-flight is go for flight
88 88
 						?>
89 89
 						<li class="success">
90
-							<h3><?php _e( 'You\'re Ready to Rock!', 'lasso' );?></h3>
91
-							<?php if ( lasso_get_supported_theme_class() ) { ?>
92
-							<p><?php _e( 'Your theme is automatically supported. No additional setup is needed.', 'lasso' );?></p>
90
+							<h3><?php _e('You\'re Ready to Rock!', 'lasso'); ?></h3>
91
+							<?php if (lasso_get_supported_theme_class()) { ?>
92
+							<p><?php _e('Your theme is automatically supported. No additional setup is needed.', 'lasso'); ?></p>
93 93
 							<?php } ?>
94
-			  				<p><?php _e( 'Editus will place a small menu on the bottom of your site. While on a single post or page, click the "pen" icon to go into edit mode. Press escape to get out of edit mode.', 'lasso' );?></p>
94
+			  				<p><?php _e('Editus will place a small menu on the bottom of your site. While on a single post or page, click the "pen" icon to go into edit mode. Press escape to get out of edit mode.', 'lasso'); ?></p>
95 95
 			  			</li>
96 96
 			  			<?php
97 97
 			  			endif;
@@ -113,16 +113,16 @@  discard block
 block discarded – undo
113 113
 
114 114
 	  		<div class="lasso--welcome__top">
115 115
 
116
-	  			<img style="width:125px;" src="<?php echo LASSO_URL.'/admin/assets/img/logo.png';?>">
117
-	    		<h1><?php _e( 'Welcome to Editus', 'lasso' );?></h1>
118
-	    		<p><?php _e( 'Version', 'lasso' );echo '<span> '.LASSO_VERSION.'</span>';?></p>
116
+	  			<img style="width:125px;" src="<?php echo LASSO_URL.'/admin/assets/img/logo.png'; ?>">
117
+	    		<h1><?php _e('Welcome to Editus', 'lasso'); ?></h1>
118
+	    		<p><?php _e('Version', 'lasso'); echo '<span> '.LASSO_VERSION.'</span>'; ?></p>
119 119
 
120
-	    		<?php if ( !defined( 'LASSO_AGENCY_MODE' ) ): ?>
120
+	    		<?php if (!defined('LASSO_AGENCY_MODE')): ?>
121 121
 
122 122
 			    	<ul class="lasso--welcome__social">
123
-			    		<li><a href="https://edituswp.com/help" target="_blank"><i class="dashicons dashicons-sos"></i> <?php _e( 'Help', 'lasso' );?></a></li>
124
-			    		<li><a href="http://twitter.com/aesopinteractiv" target="_blank"><i class="dashicons dashicons-twitter"></i> <?php _e( 'Twitter', 'lasso' );?></a></li>
125
-			    		<li><a href="http://facebook.com/aesopinteractive" target="_blank"><i class="dashicons dashicons-facebook"></i> <?php _e( 'Facebook', 'lasso' );?></a></li>
123
+			    		<li><a href="https://edituswp.com/help" target="_blank"><i class="dashicons dashicons-sos"></i> <?php _e('Help', 'lasso'); ?></a></li>
124
+			    		<li><a href="http://twitter.com/aesopinteractiv" target="_blank"><i class="dashicons dashicons-twitter"></i> <?php _e('Twitter', 'lasso'); ?></a></li>
125
+			    		<li><a href="http://facebook.com/aesopinteractive" target="_blank"><i class="dashicons dashicons-facebook"></i> <?php _e('Facebook', 'lasso'); ?></a></li>
126 126
 			    	</ul>
127 127
 
128 128
 			    <?php endif; ?>
@@ -139,68 +139,68 @@  discard block
 block discarded – undo
139 139
 	 */
140 140
 	function lasso_preflight_check() {
141 141
 
142
-		$notices 		= array();
142
+		$notices = array();
143 143
 
144
-		$article_object = lasso_editor_get_option( 'article_class', 'lasso_editor' );
144
+		$article_object = lasso_editor_get_option('article_class', 'lasso_editor');
145 145
 
146
-		$theme_name  	= wp_get_theme()->get('Name');
147
-		$theme_class  	= lasso_get_supported_theme_class();
146
+		$theme_name = wp_get_theme()->get('Name');
147
+		$theme_class = lasso_get_supported_theme_class();
148 148
 
149
-		$license   		= get_option( 'lasso_license_key' );
150
-		$status   		= get_option( 'lasso_license_status' );
149
+		$license = get_option('lasso_license_key');
150
+		$status = get_option('lasso_license_status');
151 151
 		
152 152
 		// Gutenberg Not Supported
153
-		if( function_exists( 'is_gutenberg_page' )) {
153
+		if (function_exists('is_gutenberg_page')) {
154 154
 			$notices[] = '<li class="info"><h3>Gutenberg Not Supported.</h3>
155
-							<p>'.__( 'Currently Editus does not support Gutenberg. It will be disabled on Gutenberg enabled posts.', 'lasso' ).'</p>
155
+							<p>'.__('Currently Editus does not support Gutenberg. It will be disabled on Gutenberg enabled posts.', 'lasso').'</p>
156 156
 							</li>';
157 157
 		}
158 158
 
159 159
 		// if the required CSS class has not been saved and we're not a supported theme
160
-		if ( empty( $article_object ) && false == $theme_class ) {
160
+		if (empty($article_object) && false == $theme_class) {
161 161
 
162 162
 			// we dont automatically support this theme so show them otherwise
163 163
 			$notices[] = sprintf('<li class="error">
164
-							<h3>'.__( 'Article CSS Class Needed!', 'lasso' ).'</h3>
165
-							<p>'.__( 'Before using Editus,', 'lasso' ).' <a href="%s">'.__( 'enter and save', 'lasso' ).'</a> '.__( 'the CSS class of the container that holds your post and page content. You can <a href="https://dl.dropboxusercontent.com/u/5594632/lasso-media/doc-movies/using-inspector-lasso.gif" target="_blank">use a tool like inspector</a> in Chrome or Firefox to find this CSS class, or ', 'lasso' ).' <a href="mailto:[email protected]">'.__( 'email us.', 'lasso' ).'</a> '.__( 'with a link to a public URL with the theme and we\'ll find it for you.', 'lasso' ).'</p>
166
-							</li>', admin_url( 'admin.php?page=lasso-editor-settings' ) );
164
+							<h3>'.__('Article CSS Class Needed!', 'lasso').'</h3>
165
+							<p>'.__('Before using Editus,', 'lasso').' <a href="%s">'.__('enter and save', 'lasso').'</a> '.__('the CSS class of the container that holds your post and page content. You can <a href="https://dl.dropboxusercontent.com/u/5594632/lasso-media/doc-movies/using-inspector-lasso.gif" target="_blank">use a tool like inspector</a> in Chrome or Firefox to find this CSS class, or ', 'lasso').' <a href="mailto:[email protected]">'.__('email us.', 'lasso').'</a> '.__('with a link to a public URL with the theme and we\'ll find it for you.', 'lasso').'</p>
166
+							</li>', admin_url('admin.php?page=lasso-editor-settings'));
167 167
 		}
168 168
 
169 169
 		// WP REST API not active
170
-		if ( !function_exists( 'json_get_url_prefix' ) &&  !function_exists( 'rest_url' )) {
170
+		if (!function_exists('json_get_url_prefix') && !function_exists('rest_url')) {
171 171
 			$notices[] = '<li class="info"><h3>WP REST API not Activated!</h3>
172
-							<p>'.__( 'Just a heads up that the WP REST API isn\'t activated. This is required to list the posts and pages on the front-end.', 'lasso' ).'</p>
172
+							<p>'.__('Just a heads up that the WP REST API isn\'t activated. This is required to list the posts and pages on the front-end.', 'lasso').'</p>
173 173
 							</li>';
174 174
 		}
175 175
 
176 176
 		// aesop story engine isnt active
177
-		if ( !class_exists( 'Aesop_Core' ) ) {
178
-			$notices[] = sprintf( '<li class="info"><h3>Aesop Story Engine not Activated!</h3>
179
-							<p>'.__( 'Just a heads up that ', 'lasso' ).'<a href="%s" target="_blank
180
-							">'.__( 'Aesop Story Engine', 'lasso' ).'</a> '.__( 'isn\'t activated. It\'s not required to use Editus, but you won\'t get the cool drag and drop components without it activated. It\'s free!', 'lasso' ).'</p>
181
-							</li>', admin_url('plugin-install.php?tab=search&s=aesop+story+engine') );
177
+		if (!class_exists('Aesop_Core')) {
178
+			$notices[] = sprintf('<li class="info"><h3>Aesop Story Engine not Activated!</h3>
179
+							<p>'.__('Just a heads up that ', 'lasso').'<a href="%s" target="_blank
180
+							">'.__('Aesop Story Engine', 'lasso').'</a> '.__('isn\'t activated. It\'s not required to use Editus, but you won\'t get the cool drag and drop components without it activated. It\'s free!', 'lasso').'</p>
181
+							</li>', admin_url('plugin-install.php?tab=search&s=aesop+story+engine'));
182 182
 		}
183 183
 
184 184
 		// we dont really get along with wp side comments because of the section ids that get applied dynamically. since we save our html, it'll get saved along with the post as HTML
185
-		if ( class_exists( 'WP_Side_Comments' ) ) {
186
-			$notices[] = '<li class="error"><h3>'.__( 'WP Side Comments Compatibility Warning!', 'lasso' ).'</h3>
187
-							<p>'.__( 'Since Editus saves the HTML of a post, this may cause undesired issues. We\'re working to resolve incompatibilities faster than a jack rabbit in a hot greasy griddle in the middle of August.', 'lasso' ).'</p>
185
+		if (class_exists('WP_Side_Comments')) {
186
+			$notices[] = '<li class="error"><h3>'.__('WP Side Comments Compatibility Warning!', 'lasso').'</h3>
187
+							<p>'.__('Since Editus saves the HTML of a post, this may cause undesired issues. We\'re working to resolve incompatibilities faster than a jack rabbit in a hot greasy griddle in the middle of August.', 'lasso').'</p>
188 188
 							</li>';
189 189
 		}
190 190
 
191 191
 		// if the license key isnt activated
192
-		if ( empty( $license ) ) {
193
-			$notices[] = '<li class="info"><h3>'.__( 'License Key Not Activated', 'lasso' ).'</h3>
194
-							<p>'.__( 'Just a heads up, your license key isn\'t activated. Enter your license key into the License tab on the left in order to receive plugin update notifications.', 'lasso' ).'</p>
192
+		if (empty($license)) {
193
+			$notices[] = '<li class="info"><h3>'.__('License Key Not Activated', 'lasso').'</h3>
194
+							<p>'.__('Just a heads up, your license key isn\'t activated. Enter your license key into the License tab on the left in order to receive plugin update notifications.', 'lasso').'</p>
195 195
 							</li>';
196 196
 		}
197
-		if ( !empty( $license ) && 'invalid' == $status ) {
198
-			$notices[] = '<li class="error"><h3>'.__( 'License Key Invalid', 'lasso' ).'</h3>
199
-							<p>'.__( 'The license key that you entered is ', 'lasso' ).'<strong>'.__( 'invalid', 'lasso' ).'</strong>'.__( '. It may have been entered incorreclty, or may have expired.', 'lasso' ).'</p>
197
+		if (!empty($license) && 'invalid' == $status) {
198
+			$notices[] = '<li class="error"><h3>'.__('License Key Invalid', 'lasso').'</h3>
199
+							<p>'.__('The license key that you entered is ', 'lasso').'<strong>'.__('invalid', 'lasso').'</strong>'.__('. It may have been entered incorreclty, or may have expired.', 'lasso').'</p>
200 200
 							</li>';
201 201
 		}
202 202
 
203
-		return apply_filters( 'lasso_preflight_notices', $notices );
203
+		return apply_filters('lasso_preflight_notices', $notices);
204 204
 
205 205
 	}
206 206
 
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
 	    $plugins = array(
215 215
 
216 216
 	        array(
217
-	            'name'      => __('Aesop Story Engine','lasso'),
217
+	            'name'      => __('Aesop Story Engine', 'lasso'),
218 218
 	            'slug'      => 'aesop-story-engine',
219 219
 	            'required'  => false,
220 220
 	        ),
@@ -222,38 +222,38 @@  discard block
 block discarded – undo
222 222
 	    );
223 223
 
224 224
 	    $config = array(
225
-	        'default_path' => '',                      // Default absolute path to pre-packaged plugins.
225
+	        'default_path' => '', // Default absolute path to pre-packaged plugins.
226 226
 	        'menu'         => 'lasso-install-plugins', // Menu slug.
227
-	        'has_notices'  => true,                    // Show admin notices or not.
228
-	        'dismissable'  => true,                    // If false, a user cannot dismiss the nag message.
229
-	        'dismiss_msg'  => '',                      // If 'dismissable' is false, this message will be output at top of nag.
230
-	        'is_automatic' => false,                   // Automatically activate plugins after installation or not.
231
-	        'message'      => '',                      // Message to output right before the plugins table.
227
+	        'has_notices'  => true, // Show admin notices or not.
228
+	        'dismissable'  => true, // If false, a user cannot dismiss the nag message.
229
+	        'dismiss_msg'  => '', // If 'dismissable' is false, this message will be output at top of nag.
230
+	        'is_automatic' => false, // Automatically activate plugins after installation or not.
231
+	        'message'      => '', // Message to output right before the plugins table.
232 232
 	        'strings'      => array(
233
-	            'page_title'                      => __( 'Install Required Plugins', 'lasso' ),
234
-	            'menu_title'                      => __( 'Install Plugins', 'lasso' ),
235
-	            'installing'                      => __( 'Installing Plugin: %s', 'lasso' ), // %s = plugin name.
236
-	            'oops'                            => __( 'Something went wrong with the plugin API.', 'lasso' ),
237
-	            'notice_can_install_required'     => _n_noop( 'This plugin requires the following plugin: %1$s.', 'This plugin requires the following plugins: %1$s.' ), // %1$s = plugin name(s).
238
-	            'notice_can_install_recommended'  => _n_noop( 'This plugin recommends the following plugin: %1$s.', 'This plugin recommends the following plugins: %1$s.' ), // %1$s = plugin name(s).
239
-	            'notice_cannot_install'           => _n_noop( 'Sorry, but you do not have the correct permissions to install the %s plugin. Contact the administrator of this site for help on getting the plugin installed.', 'Sorry, but you do not have the correct permissions to install the %s plugins. Contact the administrator of this site for help on getting the plugins installed.' ), // %1$s = plugin name(s).
240
-	            'notice_can_activate_required'    => _n_noop( 'The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.' ), // %1$s = plugin name(s).
241
-	            'notice_can_activate_recommended' => _n_noop( 'The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.' ), // %1$s = plugin name(s).
242
-	            'notice_cannot_activate'          => _n_noop( 'Sorry, but you do not have the correct permissions to activate the %s plugin. Contact the administrator of this site for help on getting the plugin activated.', 'Sorry, but you do not have the correct permissions to activate the %s plugins. Contact the administrator of this site for help on getting the plugins activated.' ), // %1$s = plugin name(s).
243
-	            'notice_ask_to_update'            => _n_noop( 'The following plugin needs to be updated to its latest version to ensure maximum compatibility with this plugin: %1$s.', 'The following plugins need to be updated to their latest version to ensure maximum compatibility with this plugin: %1$s.' ), // %1$s = plugin name(s).
244
-	            'notice_cannot_update'            => _n_noop( 'Sorry, but you do not have the correct permissions to update the %s plugin. Contact the administrator of this site for help on getting the plugin updated.', 'Sorry, but you do not have the correct permissions to update the %s plugins. Contact the administrator of this site for help on getting the plugins updated.' ), // %1$s = plugin name(s).
245
-	            'install_link'                    => _n_noop( 'Begin installing plugin', 'Begin installing plugins' ),
246
-	            'activate_link'                   => _n_noop( 'Begin activating plugin', 'Begin activating plugins' ),
247
-	            'return'                          => __( 'Return to Required Plugins Installer', 'lasso' ),
248
-	            'plugin_activated'                => __( 'Plugin activated successfully.', 'lasso' ),
249
-	            'complete'                        => __( 'All plugins installed and activated successfully. %s', 'lasso' ), // %s = dashboard link.
233
+	            'page_title'                      => __('Install Required Plugins', 'lasso'),
234
+	            'menu_title'                      => __('Install Plugins', 'lasso'),
235
+	            'installing'                      => __('Installing Plugin: %s', 'lasso'), // %s = plugin name.
236
+	            'oops'                            => __('Something went wrong with the plugin API.', 'lasso'),
237
+	            'notice_can_install_required'     => _n_noop('This plugin requires the following plugin: %1$s.', 'This plugin requires the following plugins: %1$s.'), // %1$s = plugin name(s).
238
+	            'notice_can_install_recommended'  => _n_noop('This plugin recommends the following plugin: %1$s.', 'This plugin recommends the following plugins: %1$s.'), // %1$s = plugin name(s).
239
+	            'notice_cannot_install'           => _n_noop('Sorry, but you do not have the correct permissions to install the %s plugin. Contact the administrator of this site for help on getting the plugin installed.', 'Sorry, but you do not have the correct permissions to install the %s plugins. Contact the administrator of this site for help on getting the plugins installed.'), // %1$s = plugin name(s).
240
+	            'notice_can_activate_required'    => _n_noop('The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.'), // %1$s = plugin name(s).
241
+	            'notice_can_activate_recommended' => _n_noop('The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.'), // %1$s = plugin name(s).
242
+	            'notice_cannot_activate'          => _n_noop('Sorry, but you do not have the correct permissions to activate the %s plugin. Contact the administrator of this site for help on getting the plugin activated.', 'Sorry, but you do not have the correct permissions to activate the %s plugins. Contact the administrator of this site for help on getting the plugins activated.'), // %1$s = plugin name(s).
243
+	            'notice_ask_to_update'            => _n_noop('The following plugin needs to be updated to its latest version to ensure maximum compatibility with this plugin: %1$s.', 'The following plugins need to be updated to their latest version to ensure maximum compatibility with this plugin: %1$s.'), // %1$s = plugin name(s).
244
+	            'notice_cannot_update'            => _n_noop('Sorry, but you do not have the correct permissions to update the %s plugin. Contact the administrator of this site for help on getting the plugin updated.', 'Sorry, but you do not have the correct permissions to update the %s plugins. Contact the administrator of this site for help on getting the plugins updated.'), // %1$s = plugin name(s).
245
+	            'install_link'                    => _n_noop('Begin installing plugin', 'Begin installing plugins'),
246
+	            'activate_link'                   => _n_noop('Begin activating plugin', 'Begin activating plugins'),
247
+	            'return'                          => __('Return to Required Plugins Installer', 'lasso'),
248
+	            'plugin_activated'                => __('Plugin activated successfully.', 'lasso'),
249
+	            'complete'                        => __('All plugins installed and activated successfully. %s', 'lasso'), // %s = dashboard link.
250 250
 	            'nag_type'                        => 'updated' // Determines admin notice type - can only be 'updated', 'update-nag' or 'error'.
251 251
 	        )
252 252
 	    );
253 253
 		
254
-		$plugins = apply_filters( 'lasso_required_plugins', $plugins );
254
+		$plugins = apply_filters('lasso_required_plugins', $plugins);
255 255
 
256
-	    tgmpa( $plugins, $config );
256
+	    tgmpa($plugins, $config);
257 257
 
258 258
 	}
259 259
 }
Please login to merge, or discard this patch.