@@ -20,12 +20,12 @@ discard block |
||
| 20 | 20 | |
| 21 | 21 | global $post; |
| 22 | 22 | if ( lasso_user_can('edit_posts') |
| 23 | - /* uncomment this line to disable Editus on Gutenberg posts*/ |
|
| 24 | - /* && !( function_exists( 'has_blocks' ) && has_blocks( $post->post_content) && !is_home()) */ |
|
| 25 | - ) { |
|
| 23 | + /* uncomment this line to disable Editus on Gutenberg posts*/ |
|
| 24 | + /* && !( function_exists( 'has_blocks' ) && has_blocks( $post->post_content) && !is_home()) */ |
|
| 25 | + ) { |
|
| 26 | 26 | |
| 27 | 27 | /** Returns the time offset from UTC |
| 28 | - */ |
|
| 28 | + */ |
|
| 29 | 29 | function get_UTC_offset() { |
| 30 | 30 | $timezone_string = get_option( 'timezone_string' ); |
| 31 | 31 | if (empty( $timezone_string ) ) { |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | |
| 41 | 41 | wp_enqueue_style('lasso-style', LASSO_URL.'/public/assets/css/lasso.css', LASSO_VERSION, true); |
| 42 | 42 | |
| 43 | - //don't load autocomplete if it's a stockholm theme |
|
| 43 | + //don't load autocomplete if it's a stockholm theme |
|
| 44 | 44 | $themename = wp_get_theme()->get('Name'); |
| 45 | 45 | if ($themename !='Stockholm' ) { |
| 46 | 46 | wp_enqueue_script('jquery-ui-autocomplete'); |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | $tz_offset = get_UTC_offset(); |
| 116 | 116 | $post_date = get_the_time('U', $postid); |
| 117 | 117 | $time = (time()+$tz_offset); |
| 118 | - $delta = $time - $post_date; |
|
| 118 | + $delta = $time - $post_date; |
|
| 119 | 119 | |
| 120 | 120 | $strings = array( |
| 121 | 121 | 'save' => __('Save','lasso'), |
@@ -170,11 +170,11 @@ discard block |
||
| 170 | 170 | $gallery_nonce = wp_create_nonce( $gallery_nonce_action ); |
| 171 | 171 | |
| 172 | 172 | |
| 173 | - if ($allow_change_date) { |
|
| 174 | - $permalink = get_site_url().'/?p='.$postid; |
|
| 175 | - } else { |
|
| 176 | - $permalink = get_permalink($postid); |
|
| 177 | - } |
|
| 173 | + if ($allow_change_date) { |
|
| 174 | + $permalink = get_site_url().'/?p='.$postid; |
|
| 175 | + } else { |
|
| 176 | + $permalink = get_permalink($postid); |
|
| 177 | + } |
|
| 178 | 178 | |
| 179 | 179 | // rest api |
| 180 | 180 | $rest_nonce = ''; |
@@ -268,12 +268,12 @@ discard block |
||
| 268 | 268 | 'customFields' => $custom_fields, |
| 269 | 269 | 'clickToInsert' => ($insert_comp_ui =='click'), |
| 270 | 270 | 'buttonOnEmptyP' => ($insert_comp_ui =='mediumcom'), // auto show a button to insert components on an empty paragraph |
| 271 | - 'rtl' => is_rtl(), |
|
| 271 | + 'rtl' => is_rtl(), |
|
| 272 | 272 | 'skipToEdit' =>( $delta < 10 && $delta >=0 ), // if it's a new post, skip to edit mode |
| 273 | 273 | 'linksEditable' => $links_editable, |
| 274 | 274 | 'supportPendingStatus' => !$no_pending_status, |
| 275 | 275 | 'tableCode' => apply_filters( 'lasso_table_html_code','<table><tr><th>Cell 1</th><th>Cell 2</th></tr><tr><td>Cell 3</td><td>Cell 4</td></tr></table>'), |
| 276 | - 'hasGutenberg' => (function_exists( 'has_blocks' ) && has_blocks( $post->post_content)) |
|
| 276 | + 'hasGutenberg' => (function_exists( 'has_blocks' ) && has_blocks( $post->post_content)) |
|
| 277 | 277 | ); |
| 278 | 278 | |
| 279 | 279 | |
@@ -281,7 +281,7 @@ discard block |
||
| 281 | 281 | |
| 282 | 282 | |
| 283 | 283 | if (!$using_restapiv2) { |
| 284 | - // enqueue REST API V1 |
|
| 284 | + // enqueue REST API V1 |
|
| 285 | 285 | wp_enqueue_script( 'wp-api-js', LASSO_URL.'/public/assets/js/source/util--wp-api.js', array( 'jquery', 'underscore', 'backbone' ), LASSO_VERSION, true ); |
| 286 | 286 | $settings = array( 'root' => home_url( $home_url ), 'nonce' => wp_create_nonce( 'wp_json' ) ); |
| 287 | 287 | wp_localize_script( 'wp-api-js', 'WP_API_Settings', $settings ); |
@@ -297,7 +297,7 @@ discard block |
||
| 297 | 297 | if ($show_color) { |
| 298 | 298 | wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api','iris'), LASSO_VERSION, true); |
| 299 | 299 | } else { |
| 300 | - wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api'), LASSO_VERSION, true); |
|
| 300 | + wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api'), LASSO_VERSION, true); |
|
| 301 | 301 | } |
| 302 | 302 | wp_localize_script('lasso', 'lasso_editor', apply_filters('lasso_localized_objects', $objects ) ); |
| 303 | 303 | |