@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | $toolbar_class = $toolbar_headings ? 'toolbar-extended' : false; |
| 151 | 151 | |
| 152 | 152 | // mobile styles |
| 153 | - $mobile_class = $is_mobile ? 'lasso-mobile' : false; |
|
| 153 | + $mobile_class = $is_mobile ? 'lasso-mobile' : false; |
|
| 154 | 154 | $mobile_style =$is_mobile ? 'style="bottom:0px;"' : null; |
| 155 | 155 | |
| 156 | 156 | //show color |
@@ -529,8 +529,8 @@ discard block |
||
| 529 | 529 | global $post; |
| 530 | 530 | |
| 531 | 531 | global $wp_post_types; |
| 532 | - $labels = &$wp_post_types['post']->labels; |
|
| 533 | - $labels->name = 'Articles'; |
|
| 532 | + $labels = &$wp_post_types['post']->labels; |
|
| 533 | + $labels->name = 'Articles'; |
|
| 534 | 534 | |
| 535 | 535 | ob_start(); |
| 536 | 536 | |
@@ -255,14 +255,14 @@ discard block |
||
| 255 | 255 | $out = load_textdomain( $domain, trailingslashit( LASSO_DIR ). 'languages/' . $domain . '-' . $locale . '.mo' ); |
| 256 | 256 | } |
| 257 | 257 | |
| 258 | - // new ajax function to lock post for editing |
|
| 258 | + // new ajax function to lock post for editing |
|
| 259 | 259 | public function editus_lock_post() |
| 260 | 260 | { |
| 261 | 261 | $post_id= $_POST["postid"]; |
| 262 | 262 | $locked = wp_check_post_lock($post_id); |
| 263 | 263 | |
| 264 | 264 | if (!$locked) { |
| 265 | - wp_set_post_lock($post_id); |
|
| 265 | + wp_set_post_lock($post_id); |
|
| 266 | 266 | echo "true"; |
| 267 | 267 | } else { |
| 268 | 268 | $user_info = get_userdata($locked); |
@@ -281,52 +281,52 @@ discard block |
||
| 281 | 281 | ); |
| 282 | 282 | foreach ($_POST as $key => $value) { |
| 283 | 283 | if ($key !="code" && $key !="action") { |
| 284 | - //$shortcode = $shortcode.$key.'="'.$value.'" '; |
|
| 284 | + //$shortcode = $shortcode.$key.'="'.$value.'" '; |
|
| 285 | 285 | $atts[$key] = $value; |
| 286 | 286 | } |
| 287 | 287 | } |
| 288 | 288 | if ($code == "aesop_video") { |
| 289 | - require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-video.php'); |
|
| 290 | - echo aesop_video_shortcode($atts); |
|
| 289 | + require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-video.php'); |
|
| 290 | + echo aesop_video_shortcode($atts); |
|
| 291 | 291 | } |
| 292 | 292 | |
| 293 | 293 | if ($code == "aesop_image") { |
| 294 | - require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-image.php'); |
|
| 295 | - echo aesop_image_shortcode($atts); |
|
| 294 | + require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-image.php'); |
|
| 295 | + echo aesop_image_shortcode($atts); |
|
| 296 | 296 | } |
| 297 | 297 | if ($code == "aesop_quote") { |
| 298 | - require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-quote.php'); |
|
| 299 | - echo aesop_quote_shortcode($atts); |
|
| 298 | + require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-quote.php'); |
|
| 299 | + echo aesop_quote_shortcode($atts); |
|
| 300 | 300 | } |
| 301 | 301 | |
| 302 | 302 | if ($code == "aesop_parallax") { |
| 303 | - require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-parallax.php'); |
|
| 304 | - echo aesop_parallax_shortcode($atts); |
|
| 303 | + require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-parallax.php'); |
|
| 304 | + echo aesop_parallax_shortcode($atts); |
|
| 305 | 305 | } |
| 306 | 306 | |
| 307 | 307 | if ($code == "aesop_character") { |
| 308 | - require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-character.php'); |
|
| 309 | - echo aesop_character_shortcode($atts); |
|
| 308 | + require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-character.php'); |
|
| 309 | + echo aesop_character_shortcode($atts); |
|
| 310 | 310 | } |
| 311 | 311 | |
| 312 | 312 | if ($code == "aesop_collection") { |
| 313 | - require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-collections.php'); |
|
| 314 | - echo aesop_collection_shortcode($atts); |
|
| 313 | + require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-collections.php'); |
|
| 314 | + echo aesop_collection_shortcode($atts); |
|
| 315 | 315 | } |
| 316 | 316 | |
| 317 | 317 | if ($code == "aesop_chapter") { |
| 318 | - require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-heading.php'); |
|
| 319 | - echo aesop_chapter_shortcode($atts); |
|
| 318 | + require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-heading.php'); |
|
| 319 | + echo aesop_chapter_shortcode($atts); |
|
| 320 | 320 | } |
| 321 | 321 | |
| 322 | 322 | if ($code == "aesop_content") { |
| 323 | - require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-cbox.php'); |
|
| 324 | - echo aesop_content_shortcode($atts, $atts['content_data']); |
|
| 323 | + require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-cbox.php'); |
|
| 324 | + echo aesop_content_shortcode($atts, $atts['content_data']); |
|
| 325 | 325 | } |
| 326 | 326 | |
| 327 | 327 | if ($code == "aesop_gallery") { |
| 328 | - require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-gallery.php'); |
|
| 329 | - echo do_shortcode( '[aesop_gallery id="'.$atts["id"].'"]'); |
|
| 328 | + require_once( ABSPATH . '/wp-content/plugins/aesop-story-engine/public/includes/components/component-gallery.php'); |
|
| 329 | + echo do_shortcode( '[aesop_gallery id="'.$atts["id"].'"]'); |
|
| 330 | 330 | } |
| 331 | 331 | |
| 332 | 332 | exit; |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | if ( strpos( $m[2],'aesop_' ) === 0 ) { |
| 69 | 69 | // check against the exceptions |
| 70 | 70 | if (strpos_arr($m[2],$exception_arr1)===false) { |
| 71 | - return $m[0]; |
|
| 71 | + return $m[0]; |
|
| 72 | 72 | } |
| 73 | 73 | } |
| 74 | 74 | if (strpos_arr($m[2],$exception_arr2)!==false) { |
@@ -80,9 +80,9 @@ discard block |
||
| 80 | 80 | |
| 81 | 81 | /* a helper function */ |
| 82 | 82 | function strpos_arr($haystack, $needle) { |
| 83 | - if(!is_array($needle)) $needle = array($needle); |
|
| 84 | - foreach($needle as $what) { |
|
| 85 | - if(($pos = strpos($haystack, $what))!==false) return $pos; |
|
| 86 | - } |
|
| 87 | - return false; |
|
| 83 | + if(!is_array($needle)) $needle = array($needle); |
|
| 84 | + foreach($needle as $what) { |
|
| 85 | + if(($pos = strpos($haystack, $what))!==false) return $pos; |
|
| 86 | + } |
|
| 87 | + return false; |
|
| 88 | 88 | } |
| 89 | 89 | \ No newline at end of file |
@@ -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 |
@@ -271,7 +271,7 @@ discard block |
||
| 271 | 271 | 'public' => true, |
| 272 | 272 | ), 'names' ); |
| 273 | 273 | //$post_types = array_combine( array_keys( $post_types ), wp_list_pluck( $post_types, 'label' ) ); |
| 274 | - unset( $post_types[ 'attachment' ] ); |
|
| 274 | + unset( $post_types[ 'attachment' ] ); |
|
| 275 | 275 | |
| 276 | 276 | /** |
| 277 | 277 | * Set which post types are allowed |
@@ -374,7 +374,7 @@ discard block |
||
| 374 | 374 | */ |
| 375 | 375 | if ( !function_exists( 'lasso_user_can' ) ): |
| 376 | 376 | function lasso_user_can( $action = '', $postid = 0 ) { |
| 377 | - $result = false; |
|
| 377 | + $result = false; |
|
| 378 | 378 | if ( empty( $action ) ) |
| 379 | 379 | $action = 'edit_posts'; |
| 380 | 380 | |
@@ -389,17 +389,17 @@ discard block |
||
| 389 | 389 | $allowed_post_types = array_diff($allowed_post_types,array('page')); |
| 390 | 390 | } |
| 391 | 391 | |
| 392 | - if (!empty($allowed_post_types) && !empty($postid)) { |
|
| 392 | + if (!empty($allowed_post_types) && !empty($postid)) { |
|
| 393 | 393 | $type = get_post_type( $postid ); |
| 394 | - $allowed_post_types = apply_filters( 'lasso_allowed_post_types', $allowed_post_types ); |
|
| 394 | + $allowed_post_types = apply_filters( 'lasso_allowed_post_types', $allowed_post_types ); |
|
| 395 | 395 | |
| 396 | - if ( in_array( $type, $allowed_post_types ) ) { |
|
| 396 | + if ( in_array( $type, $allowed_post_types ) ) { |
|
| 397 | 397 | $result = true; |
| 398 | - } |
|
| 399 | - } else { |
|
| 400 | - //we are not checking against a post, return true |
|
| 398 | + } |
|
| 399 | + } else { |
|
| 400 | + //we are not checking against a post, return true |
|
| 401 | 401 | $result = true; |
| 402 | - } |
|
| 402 | + } |
|
| 403 | 403 | } else { |
| 404 | 404 | $result = false; |
| 405 | 405 | } |