@@ -20,10 +20,10 @@ discard block |
||
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 |
||
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'); |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | $tz_offset = get_UTC_offset(); |
114 | 114 | $post_date = get_the_time('U', $postid); |
115 | 115 | $time = (time()+$tz_offset); |
116 | - $delta = $time - $post_date; |
|
116 | + $delta = $time - $post_date; |
|
117 | 117 | |
118 | 118 | $strings = array( |
119 | 119 | 'save' => __('Save','lasso'), |
@@ -168,11 +168,11 @@ discard block |
||
168 | 168 | $gallery_nonce = wp_create_nonce( $gallery_nonce_action ); |
169 | 169 | |
170 | 170 | |
171 | - if ($allow_change_date) { |
|
172 | - $permalink = get_site_url().'/?p='.$postid; |
|
173 | - } else { |
|
174 | - $permalink = get_permalink($postid); |
|
175 | - } |
|
171 | + if ($allow_change_date) { |
|
172 | + $permalink = get_site_url().'/?p='.$postid; |
|
173 | + } else { |
|
174 | + $permalink = get_permalink($postid); |
|
175 | + } |
|
176 | 176 | |
177 | 177 | // rest api |
178 | 178 | $rest_nonce = ''; |
@@ -266,7 +266,7 @@ discard block |
||
266 | 266 | 'customFields' => $custom_fields, |
267 | 267 | 'clickToInsert' => ($insert_comp_ui =='click'), |
268 | 268 | 'buttonOnEmptyP' => ($insert_comp_ui =='mediumcom'), // auto show a button to insert components on an empty paragraph |
269 | - 'rtl' => is_rtl(), |
|
269 | + 'rtl' => is_rtl(), |
|
270 | 270 | 'skipToEdit' =>( $delta < 10 && $delta >=0 ), // if it's a new post, skip to edit mode |
271 | 271 | 'linksEditable' => $links_editable, |
272 | 272 | 'supportPendingStatus' => !$no_pending_status, |
@@ -278,7 +278,7 @@ discard block |
||
278 | 278 | |
279 | 279 | |
280 | 280 | if (!$using_restapiv2) { |
281 | - // enqueue REST API V1 |
|
281 | + // enqueue REST API V1 |
|
282 | 282 | wp_enqueue_script( 'wp-api-js', LASSO_URL.'/public/assets/js/source/util--wp-api.js', array( 'jquery', 'underscore', 'backbone' ), LASSO_VERSION, true ); |
283 | 283 | $settings = array( 'root' => home_url( $home_url ), 'nonce' => wp_create_nonce( 'wp_json' ) ); |
284 | 284 | wp_localize_script( 'wp-api-js', 'WP_API_Settings', $settings ); |
@@ -294,7 +294,7 @@ discard block |
||
294 | 294 | if ($show_color) { |
295 | 295 | wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api','iris'), LASSO_VERSION, true); |
296 | 296 | } else { |
297 | - wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api'), LASSO_VERSION, true); |
|
297 | + wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api'), LASSO_VERSION, true); |
|
298 | 298 | } |
299 | 299 | wp_localize_script('lasso', 'lasso_editor', apply_filters('lasso_localized_objects', $objects ) ); |
300 | 300 |