Skip to content

Commit

Permalink
Merge branch 'main' into wp-rest-api
Browse files Browse the repository at this point in the history
  • Loading branch information
matipojo authored Jan 9, 2025
2 parents 7551640 + 0fca164 commit 5b98a60
Show file tree
Hide file tree
Showing 216 changed files with 844 additions and 967 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/lint-php-changes-only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,5 @@ jobs:
env:
PHP_CHANGED_FILES: ${{ needs.php-file-diff.outputs.all_changed_files }}
run: |
composer lint $(echo "${PHP_CHANGED_FILES}" | tr '\n' ' ')
#composer lint $(echo "${PHP_CHANGED_FILES}" | tr '\n' ' ')
vendor/bin/phpcs --extensions=php --standard=./ruleset.xml --warning-severity=0 $(echo "${PHP_CHANGED_FILES}" | tr '\n' ' ')
21 changes: 21 additions & 0 deletions .github/workflows/pr-checks-noop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,24 @@ jobs:
steps:
- run: |
exit 0
JS-Lint:
runs-on: ubuntu-latest
steps:
- run: |
exit 0
PHP-Lint:
runs-on: ubuntu-latest
steps:
- run: |
exit 0
lighthouse:
runs-on: ubuntu-latest
steps:
- run: |
exit 0
test-result-lighthouse:
name: Lighthouse - Test Results
runs-on: ubuntu-latest
steps:
- run: |
exit 0
7 changes: 4 additions & 3 deletions app/modules/import-export/module.php
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,7 @@ private function register_actions() {
* Prevent the creation of the default WooCommerce pages (Cart, Checkout, etc.)
*
* TODO 18/04/2023 : This needs to be moved to the runner itself after https://elementor.atlassian.net/browse/HTS-434 is done.
*
* @return array
*/
public function empty_pages(): array {
Expand Down Expand Up @@ -808,9 +809,9 @@ public function should_show_revert_section( $last_imported_kit ) {
}

// TODO: BC - remove in the future
// The 'templates' runner was in core and moved to the Pro plugin. (Part of it still exits in the Core for BC)
// The runner that is in the core version is missing the revert functionality,
// therefore we shouldn't display the revert section if the import process done with the core version.
// The 'templates' runner was in core and moved to the Pro plugin. (Part of it still exits in the Core for BC)
// The runner that is in the core version is missing the revert functionality,
// therefore we shouldn't display the revert section if the import process done with the core version.
$is_import_templates_ran = isset( $last_imported_kit['runners']['templates'] );
if ( $this->has_pro() && $is_import_templates_ran ) {
$has_imported_templates = ! empty( $last_imported_kit['runners']['templates'] );
Expand Down
2 changes: 1 addition & 1 deletion app/modules/import-export/processes/import.php
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,7 @@ private function get_default_settings_include() {
*
* @return array{post_ids: array, term_ids: array}
*/
private function get_imported_data_replacements() : array {
private function get_imported_data_replacements(): array {
return [
'post_ids' => Utils::map_old_new_post_ids( $this->imported_data ),
'term_ids' => Utils::map_old_new_term_ids( $this->imported_data ),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public function __construct() {
$this->init_page_on_front_data();
}

public static function get_name() : string {
public static function get_name(): string {
return 'elementor-content';
}

Expand Down
2 changes: 1 addition & 1 deletion app/modules/import-export/runners/export/plugins.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

class Plugins extends Export_Runner_Base {

public static function get_name() : string {
public static function get_name(): string {
return 'plugins';
}

Expand Down
2 changes: 1 addition & 1 deletion app/modules/import-export/runners/export/site-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

class Site_Settings extends Export_Runner_Base {

public static function get_name() : string {
public static function get_name(): string {
return 'site-settings';
}

Expand Down
7 changes: 4 additions & 3 deletions app/modules/import-export/runners/export/taxonomies.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

class Taxonomies extends Export_Runner_Base {

public static function get_name() : string {
public static function get_name(): string {
return 'taxonomies';
}

Expand Down Expand Up @@ -97,8 +97,9 @@ private function export_terms( $taxonomy ) {

return $data;
}

// Put terms in order with no child going before its parent.
/**
* Put terms in order with no child going before its parent.
*/
private function order_terms( array $terms ) {
$ordered_terms = [];

Expand Down
2 changes: 1 addition & 1 deletion app/modules/import-export/runners/export/templates.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class Templates extends Export_Runner_Base {

public static function get_name() : string {
public static function get_name(): string {
return 'templates';
}

Expand Down
2 changes: 1 addition & 1 deletion app/modules/import-export/runners/export/wp-content.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class Wp_Content extends Export_Runner_Base {

public static function get_name() : string {
public static function get_name(): string {
return 'wp-content';
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function __construct() {
$this->init_page_on_front_data();
}

public static function get_name() : string {
public static function get_name(): string {
return 'elementor-content';
}

Expand Down Expand Up @@ -151,7 +151,7 @@ private function set_page_on_front( $page_id ) {
}
}

public function get_import_session_metadata() : array {
public function get_import_session_metadata(): array {
return [
'page_on_front' => $this->page_on_front_id ?? 0,
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ abstract public function should_import( array $data );
*/
abstract public function import( array $data, array $imported_data );

public function get_import_session_metadata() : array {
public function get_import_session_metadata(): array {
return [];
}

Expand Down
2 changes: 1 addition & 1 deletion app/modules/import-export/runners/import/plugins.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function __construct( $plugins_manager = null ) {
}
}

public static function get_name() : string {
public static function get_name(): string {
return 'plugins';
}

Expand Down
4 changes: 2 additions & 2 deletions app/modules/import-export/runners/import/site-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class Site_Settings extends Import_Runner_Base {
*/
private $imported_kit_id;

public static function get_name() : string {
public static function get_name(): string {
return 'site-settings';
}

Expand Down Expand Up @@ -75,7 +75,7 @@ public function import( array $data, array $imported_data ) {
return $result;
}

public function get_import_session_metadata() : array {
public function get_import_session_metadata(): array {
return [
'previous_kit_id' => $this->previous_kit_id,
'active_kit_id' => $this->active_kit_id,
Expand Down
2 changes: 1 addition & 1 deletion app/modules/import-export/runners/import/taxonomies.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class Taxonomies extends Import_Runner_Base {

private $import_session_id;

public static function get_name() : string {
public static function get_name(): string {
return 'taxonomies';
}

Expand Down
2 changes: 1 addition & 1 deletion app/modules/import-export/runners/import/templates.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
class Templates extends Import_Runner_Base {
private $import_session_id;

public static function get_name() : string {
public static function get_name(): string {
return 'templates';
}

Expand Down
4 changes: 2 additions & 2 deletions app/modules/import-export/runners/import/wp-content.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Wp_Content extends Import_Runner_Base {
*/
private $selected_custom_post_types = [];

public static function get_name() : string {
public static function get_name(): string {
return 'wp-content';
}

Expand Down Expand Up @@ -100,7 +100,7 @@ private function filter_post_types( $selected_custom_post_types = [] ) {
return $post_types;
}

public function get_import_session_metadata() : array {
public function get_import_session_metadata(): array {
return [
'custom_post_types' => $this->selected_custom_post_types,
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ public function __construct() {
$this->init_page_on_front_data();
}

public static function get_name() : string {
public static function get_name(): string {
return 'elementor-content';
}

public function should_revert( array $data ) : bool {
public function should_revert( array $data ): bool {
return (
isset( $data['runners'] ) &&
array_key_exists( static::get_name(), $data['runners'] )
Expand Down
4 changes: 2 additions & 2 deletions app/modules/import-export/runners/revert/plugins.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

class Plugins extends Revert_Runner_Base {

public static function get_name() : string {
public static function get_name(): string {
return 'plugins';
}

public function should_revert( array $data ) : bool {
public function should_revert( array $data ): bool {
return false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ abstract class Revert_Runner_Base implements Runner_Interface {
*
* @return bool
*/
abstract public function should_revert( array $data ) : bool;
abstract public function should_revert( array $data ): bool;

/**
* Main function of the runner revert process.
Expand Down
4 changes: 2 additions & 2 deletions app/modules/import-export/runners/revert/site-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@

class Site_Settings extends Revert_Runner_Base {

public static function get_name() : string {
public static function get_name(): string {
return 'site-settings';
}

public function should_revert( array $data ) : bool {
public function should_revert( array $data ): bool {
return (
isset( $data['runners'] ) &&
array_key_exists( static::get_name(), $data['runners'] )
Expand Down
4 changes: 2 additions & 2 deletions app/modules/import-export/runners/revert/taxonomies.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

class Taxonomies extends Revert_Runner_Base {

public static function get_name() : string {
public static function get_name(): string {
return 'taxonomies';
}

public function should_revert( array $data ) : bool {
public function should_revert( array $data ): bool {
return (
isset( $data['runners'] ) &&
array_key_exists( static::get_name(), $data['runners'] )
Expand Down
7 changes: 3 additions & 4 deletions app/modules/import-export/runners/revert/templates.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@
namespace Elementor\App\Modules\ImportExport\Runners\Revert;

class Templates extends Revert_Runner_Base {
/*
/**
* The implement of this runner is part of the Pro plugin.
*/

public static function get_name() : string {
public static function get_name(): string {
return 'templates';
}

public function should_revert( array $data ) : bool {
public function should_revert( array $data ): bool {
return false;
}

Expand Down
4 changes: 2 additions & 2 deletions app/modules/import-export/runners/revert/wp-content.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@

class Wp_Content extends Revert_Runner_Base {

public static function get_name() : string {
public static function get_name(): string {
return 'wp-content';
}

public function should_revert( array $data ) : bool {
public function should_revert( array $data ): bool {
return (
isset( $data['runners'] ) &&
array_key_exists( static::get_name(), $data['runners'] )
Expand Down
2 changes: 1 addition & 1 deletion app/modules/import-export/runners/runner-interface.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ interface Runner_Interface {
*
* @return string
*/
public static function get_name() : string;
public static function get_name(): string;
}
2 changes: 1 addition & 1 deletion app/modules/import-export/utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use Elementor\Core\Utils\Str;
use Elementor\Modules\LandingPages\Module as Landing_Pages_Module;
use \Elementor\Modules\FloatingButtons\Module as Floating_Buttons_Module;
use Elementor\Modules\FloatingButtons\Module as Floating_Buttons_Module;
use Elementor\TemplateLibrary\Source_Local;
use Elementor\Utils as ElementorUtils;

Expand Down
1 change: 0 additions & 1 deletion app/modules/kit-library/data/repository.php
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,6 @@ private function transform_kit_api_response( $kit, $manifest = null ) {
'popularity_index' => isset( $kit->popularity_index ) ? $kit->popularity_index : 0,
'created_at' => isset( $kit->created_at ) ? $kit->created_at : null,
'updated_at' => isset( $kit->updated_at ) ? $kit->updated_at : null,
//
],
$manifest ? $this->transform_manifest_api_response( $manifest ) : []
);
Expand Down
1 change: 1 addition & 0 deletions app/modules/onboarding/module.php
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,7 @@ private function maybe_update_onboarding_db_option() {
* Maybe Handle Ajax
*
* This method checks if there are any AJAX actions being
*
* @since 3.6.0
*
* @return array|null
Expand Down
3 changes: 3 additions & 0 deletions assets/dev/js/editor/editor-base.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,9 @@ export default class EditorBase extends Marionette.Application {
BaseWidget: require( 'elementor-elements/views/base-widget' ),
Widget: require( 'elementor-elements/views/widget' ),
},
components: {
AddSectionView: require( 'elementor-views/add-section/inline' ),
},
},
layouts: {
panel: {
Expand Down
2 changes: 0 additions & 2 deletions assets/dev/js/frontend/modules.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import StretchedElement from './handlers/stretched-element';
import BaseHandler from './handlers/base';
import SwiperBase from './handlers/base-swiper';
import CarouselBase from './handlers/base-carousel';
import NestedTabs from 'elementor/modules/nested-tabs/assets/js/frontend/handlers/nested-tabs';

elementorModules.frontend = {
Document,
Expand All @@ -17,6 +16,5 @@ elementorModules.frontend = {
StretchedElement,
SwiperBase,
CarouselBase,
NestedTabs,
},
};
1 change: 0 additions & 1 deletion assets/dev/js/frontend/utils/assets-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ AssetsLoader.assets = {
},
},
style: {
// TODO: Remove 'swiper' in v3.28.0 [ED-16258].
swiper: {
src: `${ assetsUrl }lib/swiper/v8/css/swiper${ fileSuffix }.css?ver=8.4.5`,
parent: 'head',
Expand Down
2 changes: 1 addition & 1 deletion assets/dev/js/frontend/utils/lightbox/lightbox-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default class LightboxManager extends elementorModules.ViewModule {
dialogScriptPromise = elementorFrontend.utils.assetsLoader.load( 'script', 'dialog' ),
dialogStylePromise = elementorFrontend.utils.assetsLoader.load( 'style', 'dialog' ),
shareLinkPromise = elementorFrontend.utils.assetsLoader.load( 'script', 'share-link' ),
swiperStylePromise = elementorFrontend.utils.assetsLoader.load( 'style', 'swiper' ), // TODO: Remove in v3.28.0 [ED-16258].
swiperStylePromise = elementorFrontend.utils.assetsLoader.load( 'style', 'swiper' ),
lightboxStylePromise = elementorFrontend.utils.assetsLoader.load( 'style', 'e-lightbox' );

return Promise.all( [
Expand Down
Loading

0 comments on commit 5b98a60

Please sign in to comment.