| @@ -6,9 +6,9 @@ | ||
| 6 | 6 | use Elementor\Core\Kits\Documents\Tabs\Global_Colors; |
| 7 | 7 | use Elementor\Core\Kits\Documents\Tabs\Global_Typography; |
| 8 | 8 | use Elementor\Plugin; |
| 9 | 9 | use Elementor\Core\Files\CSS\Post as Post_CSS; |
| 10 | -use Elementor\Core\Files\CSS\Post_Preview; | |
| 10 | +use Elementor\Core\Files\CSS\Post_Preview as Post_Preview; | |
| 11 | 11 | use Elementor\Core\Documents_Manager; |
| 12 | 12 | use Elementor\Core\Kits\Documents\Kit; |
| 13 | 13 | use Elementor\TemplateLibrary\Source_Local; |
| 14 | 14 | use Elementor\Utils; |
| @@ -71,9 +71,9 @@ | ||
| 71 | 71 | /** |
| 72 | 72 | * Returns an empty kit for situation when there is no kit in the site. |
| 73 | 73 | * |
| 74 | 74 | * @return Kit |
| 75 | - * @throws \Exception If the kit instance cannot be created. | |
| 75 | + * @throws \Exception | |
| 76 | 76 | */ |
| 77 | 77 | private function get_empty_kit_instance() { |
| 78 | 78 | return new Kit( [ |
| 79 | 79 | 'settings' => [], |
| @@ -276,9 +276,9 @@ | ||
| 276 | 276 | $is_kit_preview = is_preview() && isset( $_GET['preview_id'] ) && $active_kit->get_main_id() === (int) $_GET['preview_id']; |
| 277 | 277 | |
| 278 | 278 | if ( $is_kit_preview ) { |
| 279 | 279 | $kit = Plugin::$instance->documents->get_doc_or_auto_save( $active_kit->get_main_id(), get_current_user_id() ); |
| 280 | - } elseif ( null !== $active_kit->get_main_post() && 'publish' === $active_kit->get_main_post()->post_status ) { | |
| 280 | + } elseif ( 'publish' === $active_kit->get_main_post()->post_status ) { | |
| 281 | 281 | $kit = $active_kit; |
| 282 | 282 | } |
| 283 | 283 | |
| 284 | 284 | return $kit; |
| @@ -299,9 +299,9 @@ | ||
| 299 | 299 | * Map Scheme To Global |
| 300 | 300 | * |
| 301 | 301 | * Convert a given scheme value to its corresponding default global value |
| 302 | 302 | * |
| 303 | - * @param string $type 'color'/'typography'. | |
| 303 | + * @param string $type 'color'/'typography' | |
| 304 | 304 | * @param $value |
| 305 | 305 | * @return mixed |
| 306 | 306 | */ |
| 307 | 307 | private function map_scheme_to_global( $type, $value ) { |
| @@ -334,9 +334,9 @@ | ||
| 334 | 334 | * @access public |
| 335 | 335 | */ |
| 336 | 336 | public function convert_scheme_to_global( $scheme ) { |
| 337 | 337 | if ( isset( $scheme['type'] ) && isset( $scheme['value'] ) ) { |
| 338 | - // _deprecated_argument( $args['scheme'], '3.0.0', 'Schemes are now deprecated - use $args[\'global\'] instead.' ); | |
| 338 | + //_deprecated_argument( $args['scheme'], '3.0.0', 'Schemes are now deprecated - use $args[\'global\'] instead.' ); | |
| 339 | 339 | return $this->map_scheme_to_global( $scheme['type'], $scheme['value'] ); |
| 340 | 340 | } |
| 341 | 341 | |
| 342 | 342 | // Typography control 'scheme' properties usually only include the string with the typography value ('1'-'4'). |
| @@ -373,10 +373,10 @@ | ||
| 373 | 373 | |
| 374 | 374 | /** |
| 375 | 375 | * Send a confirm message before move a kit to trash, or if delete permanently not for trash. |
| 376 | 376 | * |
| 377 | - * @param $post_id | |
| 378 | - * @param bool $is_permanently_delete | |
| 377 | + * @param $post_id | |
| 378 | + * @param false $is_permanently_delete | |
| 379 | 379 | */ |
| 380 | 380 | private function before_delete_kit( $post_id, $is_permanently_delete = false ) { |
| 381 | 381 | if ( $this->should_skip_trash_kit_confirmation ) { |
| 382 | 382 | return; |
| @@ -423,20 +423,13 @@ | ||
| 423 | 423 | } |
| 424 | 424 | } |
| 425 | 425 | |
| 426 | 426 | if ( $document ) { |
| 427 | - $document_edit_url = add_query_arg( | |
| 428 | - [ | |
| 429 | - 'active-document' => $this->get_active_id(), | |
| 430 | - ], | |
| 431 | - $document->get_edit_url() | |
| 432 | - ); | |
| 433 | - | |
| 434 | 427 | $admin_bar_config['elementor_edit_page']['children'][] = [ |
| 435 | 428 | 'id' => 'elementor_site_settings', |
| 436 | 429 | 'title' => esc_html__( 'Site Settings', 'elementor' ), |
| 437 | 430 | 'sub_title' => esc_html__( 'Site', 'elementor' ), |
| 438 | - 'href' => $document_edit_url, | |
| 431 | + 'href' => $document->get_edit_url() . '#' . self::E_HASH_COMMAND_OPEN_SITE_SETTINGS, | |
| 439 | 432 | 'class' => 'elementor-site-settings', |
| 440 | 433 | 'parent_class' => 'elementor-second-section', |
| 441 | 434 | ]; |
| 442 | 435 | } |