@@ -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'), |
@@ -165,11 +165,11 @@ discard block |
||
165 | 165 | $gallery_nonce = wp_create_nonce( $gallery_nonce_action ); |
166 | 166 | |
167 | 167 | |
168 | - if ($allow_change_date) { |
|
169 | - $permalink = get_site_url().'/?p='.$postid; |
|
170 | - } else { |
|
171 | - $permalink = get_permalink($postid); |
|
172 | - } |
|
168 | + if ($allow_change_date) { |
|
169 | + $permalink = get_site_url().'/?p='.$postid; |
|
170 | + } else { |
|
171 | + $permalink = get_permalink($postid); |
|
172 | + } |
|
173 | 173 | |
174 | 174 | // rest api |
175 | 175 | $rest_nonce = ''; |
@@ -263,7 +263,7 @@ discard block |
||
263 | 263 | 'customFields' => $custom_fields, |
264 | 264 | 'clickToInsert' => ($insert_comp_ui =='click'), |
265 | 265 | 'buttonOnEmptyP' => ($insert_comp_ui =='mediumcom'), // auto show a button to insert components on an empty paragraph |
266 | - 'rtl' => is_rtl(), |
|
266 | + 'rtl' => is_rtl(), |
|
267 | 267 | 'skipToEdit' =>( $delta < 10 && $delta >=0 ), // if it's a new post, skip to edit mode |
268 | 268 | 'linksEditable' => $links_editable, |
269 | 269 | 'supportPendingStatus' => !$no_pending_status |
@@ -274,7 +274,7 @@ discard block |
||
274 | 274 | |
275 | 275 | |
276 | 276 | if (!$using_restapiv2) { |
277 | - // enqueue REST API V1 |
|
277 | + // enqueue REST API V1 |
|
278 | 278 | wp_enqueue_script( 'wp-api-js', LASSO_URL.'/public/assets/js/source/util--wp-api.js', array( 'jquery', 'underscore', 'backbone' ), LASSO_VERSION, true ); |
279 | 279 | $settings = array( 'root' => home_url( $home_url ), 'nonce' => wp_create_nonce( 'wp_json' ) ); |
280 | 280 | wp_localize_script( 'wp-api-js', 'WP_API_Settings', $settings ); |
@@ -290,7 +290,7 @@ discard block |
||
290 | 290 | if ($show_color) { |
291 | 291 | wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api','iris'), LASSO_VERSION, true); |
292 | 292 | } else { |
293 | - wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api'), LASSO_VERSION, true); |
|
293 | + wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery', 'wp-api'), LASSO_VERSION, true); |
|
294 | 294 | } |
295 | 295 | wp_localize_script('lasso', 'lasso_editor', apply_filters('lasso_localized_objects', $objects ) ); |
296 | 296 |