@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | * @since 0.9.3 |
119 | 119 | * |
120 | 120 | * @param int $postid The current postid |
121 | - * @param string|bool $value The term slug, or a comma separated list of slugs. Or false to remove all terms set for post. |
|
121 | + * @param string|bool $value The term slug, or a comma separated list of slugs. Or false to remove all terms set for post. |
|
122 | 122 | * @param string $taxonomy The name of the taxonomy to which the term belongs. |
123 | 123 | * |
124 | 124 | * @return bool True if update was successful, false if not. |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | } |
132 | 132 | |
133 | 133 | if ($taxonomy =='category') { |
134 | - // convert from names to category ids |
|
134 | + // convert from names to category ids |
|
135 | 135 | $cats = array(); |
136 | 136 | if (is_array($value)) { |
137 | 137 | foreach ($value as $cat) { |
@@ -243,7 +243,7 @@ discard block |
||
243 | 243 | 'public' => true, |
244 | 244 | ), 'objects' ); |
245 | 245 | $post_types = array_combine( array_keys( $post_types ), wp_list_pluck( $post_types, 'label' ) ); |
246 | - unset( $post_types[ 'attachment' ] ); |
|
246 | + unset( $post_types[ 'attachment' ] ); |
|
247 | 247 | |
248 | 248 | /** |
249 | 249 | * Set which post types are allowed |
@@ -270,7 +270,7 @@ discard block |
||
270 | 270 | $post_types = get_post_types( array( |
271 | 271 | 'public' => true, |
272 | 272 | ), 'names' ); |
273 | - unset( $post_types[ 'attachment' ] ); |
|
273 | + unset( $post_types[ 'attachment' ] ); |
|
274 | 274 | |
275 | 275 | /** |
276 | 276 | * Set which post types are allowed |
@@ -382,7 +382,7 @@ discard block |
||
382 | 382 | */ |
383 | 383 | if ( !function_exists( 'lasso_user_can' ) ): |
384 | 384 | function lasso_user_can( $action = '', $postid = 0 ) { |
385 | - $result = false; |
|
385 | + $result = false; |
|
386 | 386 | if ( empty( $action ) ) |
387 | 387 | $action = 'edit_posts'; |
388 | 388 | |
@@ -397,17 +397,17 @@ discard block |
||
397 | 397 | $allowed_post_types = array_diff($allowed_post_types,array('page')); |
398 | 398 | } |
399 | 399 | |
400 | - if (!empty($allowed_post_types) && !empty($postid)) { |
|
400 | + if (!empty($allowed_post_types) && !empty($postid)) { |
|
401 | 401 | $type = get_post_type( $postid ); |
402 | - $allowed_post_types = apply_filters( 'lasso_allowed_post_types', $allowed_post_types ); |
|
402 | + $allowed_post_types = apply_filters( 'lasso_allowed_post_types', $allowed_post_types ); |
|
403 | 403 | |
404 | - if ( in_array( $type, $allowed_post_types ) ) { |
|
404 | + if ( in_array( $type, $allowed_post_types ) ) { |
|
405 | 405 | $result = true; |
406 | - } |
|
407 | - } else { |
|
408 | - //we are not checking against a post, return true |
|
406 | + } |
|
407 | + } else { |
|
408 | + //we are not checking against a post, return true |
|
409 | 409 | $result = true; |
410 | - } |
|
410 | + } |
|
411 | 411 | } else { |
412 | 412 | $result = false; |
413 | 413 | } |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | add_filter('register_post_type_args', 'lasso_show_in_rest', 10, 2); |
49 | 49 | function lasso_show_in_rest($args, $post_type){ |
50 | 50 | |
51 | - $allowed_post_types = lasso_editor_get_option( 'allowed_post_types', 'lasso_editor', array( ) ); |
|
51 | + $allowed_post_types = lasso_editor_get_option( 'allowed_post_types', 'lasso_editor', array( ) ); |
|
52 | 52 | $allowed_post_types = apply_filters( 'lasso_allowed_post_types', $allowed_post_types ); |
53 | 53 | if (in_array( $post_type,$allowed_post_types)) { |
54 | 54 | $args['show_in_rest'] = true; |
@@ -57,6 +57,6 @@ discard block |
||
57 | 57 | } |
58 | 58 | } |
59 | 59 | |
60 | - return $args; |
|
60 | + return $args; |
|
61 | 61 | } |
62 | 62 |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | $postid = get_the_ID(); |
74 | 74 | |
75 | 75 | $post_date = get_the_time('U', $postid); |
76 | - $delta = time() - $post_date; |
|
76 | + $delta = time() - $post_date; |
|
77 | 77 | |
78 | 78 | $strings = array( |
79 | 79 | 'save' => __('Save','lasso'), |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | |
209 | 209 | |
210 | 210 | if (!$using_restapiv2) { |
211 | - // enqueue REST API V1 |
|
211 | + // enqueue REST API V1 |
|
212 | 212 | wp_enqueue_script( 'wp-api-js', LASSO_URL.'/public/assets/js/source/util--wp-api.js', array( 'jquery', 'underscore', 'backbone' ), LASSO_VERSION, true ); |
213 | 213 | $settings = array( 'root' => home_url( $home_url ), 'nonce' => wp_create_nonce( 'wp_json' ) ); |
214 | 214 | wp_localize_script( 'wp-api-js', 'WP_API_Settings', $settings ); |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | if ($show_color) { |
219 | 219 | wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api','iris'), LASSO_VERSION, true); |
220 | 220 | } else { |
221 | - wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api'), LASSO_VERSION, true); |
|
221 | + wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api'), LASSO_VERSION, true); |
|
222 | 222 | } |
223 | 223 | wp_localize_script('lasso', 'lasso_editor', apply_filters('lasso_localized_objects', $objects ) ); |
224 | 224 |
@@ -259,14 +259,14 @@ discard block |
||
259 | 259 | $out = load_textdomain( $domain, trailingslashit( LASSO_DIR ). 'languages/' . $domain . '-' . $locale . '.mo' ); |
260 | 260 | } |
261 | 261 | |
262 | - // new ajax function to lock post for editing |
|
262 | + // new ajax function to lock post for editing |
|
263 | 263 | public function editus_lock_post() |
264 | 264 | { |
265 | 265 | $post_id= $_POST["postid"]; |
266 | 266 | $locked = wp_check_post_lock($post_id); |
267 | 267 | |
268 | 268 | if (!$locked) { |
269 | - wp_set_post_lock($post_id); |
|
269 | + wp_set_post_lock($post_id); |
|
270 | 270 | echo "true"; |
271 | 271 | } else { |
272 | 272 | $user_info = get_userdata($locked); |
@@ -309,59 +309,59 @@ discard block |
||
309 | 309 | ); |
310 | 310 | foreach ($_POST as $key => $value) { |
311 | 311 | if ($key !="code" && $key !="action") { |
312 | - //$shortcode = $shortcode.$key.'="'.$value.'" '; |
|
312 | + //$shortcode = $shortcode.$key.'="'.$value.'" '; |
|
313 | 313 | $atts[$key] = $value; |
314 | 314 | } |
315 | 315 | } |
316 | 316 | if ($code == "aesop_video") { |
317 | - require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-video.php'); |
|
318 | - echo aesop_video_shortcode($atts); |
|
317 | + require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-video.php'); |
|
318 | + echo aesop_video_shortcode($atts); |
|
319 | 319 | } |
320 | 320 | else if ($code == "aesop_image") { |
321 | - require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-image.php'); |
|
322 | - echo aesop_image_shortcode($atts); |
|
321 | + require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-image.php'); |
|
322 | + echo aesop_image_shortcode($atts); |
|
323 | 323 | } |
324 | 324 | else if ($code == "aesop_quote") { |
325 | - require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-quote.php'); |
|
326 | - echo aesop_quote_shortcode($atts); |
|
325 | + require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-quote.php'); |
|
326 | + echo aesop_quote_shortcode($atts); |
|
327 | 327 | } |
328 | 328 | else if ($code == "aesop_parallax") { |
329 | - require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-parallax.php'); |
|
330 | - echo aesop_parallax_shortcode($atts); |
|
329 | + require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-parallax.php'); |
|
330 | + echo aesop_parallax_shortcode($atts); |
|
331 | 331 | } |
332 | 332 | else if ($code == "aesop_character") { |
333 | - require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-character.php'); |
|
334 | - echo aesop_character_shortcode($atts); |
|
333 | + require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-character.php'); |
|
334 | + echo aesop_character_shortcode($atts); |
|
335 | 335 | } |
336 | 336 | else if ($code == "aesop_collection") { |
337 | - require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-collections.php'); |
|
338 | - echo aesop_collection_shortcode($atts); |
|
337 | + require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-collections.php'); |
|
338 | + echo aesop_collection_shortcode($atts); |
|
339 | 339 | } |
340 | 340 | else if ($code == "aesop_chapter") { |
341 | - require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-heading.php'); |
|
342 | - echo aesop_chapter_shortcode($atts); |
|
341 | + require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-heading.php'); |
|
342 | + echo aesop_chapter_shortcode($atts); |
|
343 | 343 | } |
344 | 344 | else if ($code == "aesop_content") { |
345 | - require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-cbox.php'); |
|
346 | - echo aesop_content_shortcode($atts, $atts['content_data']); |
|
345 | + require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-cbox.php'); |
|
346 | + echo aesop_content_shortcode($atts, $atts['content_data']); |
|
347 | 347 | } |
348 | 348 | else if ($code == "aesop_gallery") { |
349 | - require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-gallery.php'); |
|
350 | - echo do_shortcode( '[aesop_gallery id="'.$atts["id"].'"]'); |
|
349 | + require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-gallery.php'); |
|
350 | + echo do_shortcode( '[aesop_gallery id="'.$atts["id"].'"]'); |
|
351 | 351 | } |
352 | 352 | else if ($code == "aesop_audio") { |
353 | - require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-audio.php'); |
|
354 | - echo aesop_audio_shortcode($atts); |
|
353 | + require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-audio.php'); |
|
354 | + echo aesop_audio_shortcode($atts); |
|
355 | 355 | } |
356 | 356 | else { |
357 | 357 | $code = '['.$code.' '; |
358 | 358 | foreach ($atts as $key => $value) { |
359 | - $code = ''.$key.'="'.$value.'" '; |
|
359 | + $code = ''.$key.'="'.$value.'" '; |
|
360 | 360 | } |
361 | 361 | $code = $code.']'; |
362 | 362 | echo do_shortcode($code); |
363 | - //require_once( ABSPATH . '/wp-content/plugins/aesop-events/public/includes/shortcode.php'); |
|
364 | - //echo aesop_audio_shortcode($atts); |
|
363 | + //require_once( ABSPATH . '/wp-content/plugins/aesop-events/public/includes/shortcode.php'); |
|
364 | + //echo aesop_audio_shortcode($atts); |
|
365 | 365 | } |
366 | 366 | |
367 | 367 | exit; |
@@ -204,49 +204,49 @@ |
||
204 | 204 | */ |
205 | 205 | function required_plugins() { |
206 | 206 | |
207 | - $plugins = array( |
|
208 | - |
|
209 | - array( |
|
210 | - 'name' => __('Aesop Story Engine','lasso'), |
|
211 | - 'slug' => 'aesop-story-engine', |
|
212 | - 'required' => false, |
|
213 | - ), |
|
214 | - |
|
215 | - ); |
|
216 | - |
|
217 | - $config = array( |
|
218 | - 'default_path' => '', // Default absolute path to pre-packaged plugins. |
|
219 | - 'menu' => 'lasso-install-plugins', // Menu slug. |
|
220 | - 'has_notices' => true, // Show admin notices or not. |
|
221 | - 'dismissable' => true, // If false, a user cannot dismiss the nag message. |
|
222 | - 'dismiss_msg' => '', // If 'dismissable' is false, this message will be output at top of nag. |
|
223 | - 'is_automatic' => false, // Automatically activate plugins after installation or not. |
|
224 | - 'message' => '', // Message to output right before the plugins table. |
|
225 | - 'strings' => array( |
|
226 | - 'page_title' => __( 'Install Required Plugins', 'lasso' ), |
|
227 | - 'menu_title' => __( 'Install Plugins', 'lasso' ), |
|
228 | - 'installing' => __( 'Installing Plugin: %s', 'lasso' ), // %s = plugin name. |
|
229 | - 'oops' => __( 'Something went wrong with the plugin API.', 'lasso' ), |
|
230 | - '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). |
|
231 | - '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). |
|
232 | - '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). |
|
233 | - '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). |
|
234 | - '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). |
|
235 | - '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). |
|
236 | - '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). |
|
237 | - '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). |
|
238 | - 'install_link' => _n_noop( 'Begin installing plugin', 'Begin installing plugins' ), |
|
239 | - 'activate_link' => _n_noop( 'Begin activating plugin', 'Begin activating plugins' ), |
|
240 | - 'return' => __( 'Return to Required Plugins Installer', 'lasso' ), |
|
241 | - 'plugin_activated' => __( 'Plugin activated successfully.', 'lasso' ), |
|
242 | - 'complete' => __( 'All plugins installed and activated successfully. %s', 'lasso' ), // %s = dashboard link. |
|
243 | - 'nag_type' => 'updated' // Determines admin notice type - can only be 'updated', 'update-nag' or 'error'. |
|
244 | - ) |
|
245 | - ); |
|
207 | + $plugins = array( |
|
208 | + |
|
209 | + array( |
|
210 | + 'name' => __('Aesop Story Engine','lasso'), |
|
211 | + 'slug' => 'aesop-story-engine', |
|
212 | + 'required' => false, |
|
213 | + ), |
|
214 | + |
|
215 | + ); |
|
216 | + |
|
217 | + $config = array( |
|
218 | + 'default_path' => '', // Default absolute path to pre-packaged plugins. |
|
219 | + 'menu' => 'lasso-install-plugins', // Menu slug. |
|
220 | + 'has_notices' => true, // Show admin notices or not. |
|
221 | + 'dismissable' => true, // If false, a user cannot dismiss the nag message. |
|
222 | + 'dismiss_msg' => '', // If 'dismissable' is false, this message will be output at top of nag. |
|
223 | + 'is_automatic' => false, // Automatically activate plugins after installation or not. |
|
224 | + 'message' => '', // Message to output right before the plugins table. |
|
225 | + 'strings' => array( |
|
226 | + 'page_title' => __( 'Install Required Plugins', 'lasso' ), |
|
227 | + 'menu_title' => __( 'Install Plugins', 'lasso' ), |
|
228 | + 'installing' => __( 'Installing Plugin: %s', 'lasso' ), // %s = plugin name. |
|
229 | + 'oops' => __( 'Something went wrong with the plugin API.', 'lasso' ), |
|
230 | + '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). |
|
231 | + '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). |
|
232 | + '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). |
|
233 | + '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). |
|
234 | + '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). |
|
235 | + '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). |
|
236 | + '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). |
|
237 | + '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). |
|
238 | + 'install_link' => _n_noop( 'Begin installing plugin', 'Begin installing plugins' ), |
|
239 | + 'activate_link' => _n_noop( 'Begin activating plugin', 'Begin activating plugins' ), |
|
240 | + 'return' => __( 'Return to Required Plugins Installer', 'lasso' ), |
|
241 | + 'plugin_activated' => __( 'Plugin activated successfully.', 'lasso' ), |
|
242 | + 'complete' => __( 'All plugins installed and activated successfully. %s', 'lasso' ), // %s = dashboard link. |
|
243 | + 'nag_type' => 'updated' // Determines admin notice type - can only be 'updated', 'update-nag' or 'error'. |
|
244 | + ) |
|
245 | + ); |
|
246 | 246 | |
247 | 247 | $plugins = apply_filters( 'lasso_required_plugins', $plugins ); |
248 | 248 | |
249 | - tgmpa( $plugins, $config ); |
|
249 | + tgmpa( $plugins, $config ); |
|
250 | 250 | |
251 | 251 | } |
252 | 252 | } |