Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove old GUI #271

Merged
merged 1 commit into from
Oct 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,874 changes: 0 additions & 1,874 deletions assets/css/admin.css

This file was deleted.

1 change: 0 additions & 1 deletion assets/js/admin.js

This file was deleted.

2 changes: 0 additions & 2 deletions inc/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
use TLA_Media\GTM_Kit\Admin\Analytics;
use TLA_Media\GTM_Kit\Admin\HelpOptionsPage;
use TLA_Media\GTM_Kit\Admin\IntegrationsOptionsPage;
use TLA_Media\GTM_Kit\Admin\MetaBox;
use TLA_Media\GTM_Kit\Admin\SetupWizard;
use TLA_Media\GTM_Kit\Common\RestAPIServer;
use TLA_Media\GTM_Kit\Common\Util;
Expand Down Expand Up @@ -135,7 +134,6 @@ function gtmkit_admin_init(): void {
$util = new Util( $rest_api_server );

( new SetupWizard( $options, $util ) )->hooks();
MetaBox::register( $options );
Analytics::register( $options, $util );
GeneralOptionsPage::register( $options, $util );
IntegrationsOptionsPage::register( $options, $util );
Expand Down
9 changes: 3 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,29 +21,26 @@
},
"scripts": {
"build": "wp-scripts build src/js/frontend/woocommerce-blocks.js --output-path=build/frontend",
"build:assets": "npm run clean:assets && npm run build:css && npm run build:js && npm run copy:images",
"build:css": "npm run compile:sass && postcss assets/css/admin.css --output assets/css/admin.css",
"build:js": "npm run uglify:woocommerce && npm run uglify:woocommerce-checkout && npm run uglify:edd && npm run uglify:edd-checkout && npm run uglify:cf7 && npm run uglify:admin",
"build:assets": "npm run clean:assets && npm run build:js && npm run copy:images",
"build:js": "npm run uglify:woocommerce && npm run uglify:woocommerce-checkout && npm run uglify:edd && npm run uglify:edd-checkout && npm run uglify:cf7",
"clean:assets": "del assets",
"i18n:textdomain": "wpi18n addtextdomain",
"i18n:pot": "wp i18n make-pot ./ languages/gtm-kit.pot",
"change-version": "./bin/change-version.sh $npm_package_version",
"zip-package": "./bin/zip-package.sh",
"compile:sass": "sass src/scss/admin.scss:assets/css/admin.css",
"compile:tailwind": "npx tailwindcss -i ./src/scss/tailwind.scss -o ./src/scss/_tailwind-compiled.scss --watch",
"uglify:woocommerce": "mkdirp assets/js && uglifyjs src/js/woocommerce.js --compress --mangle --output assets/js/woocommerce.js",
"uglify:woocommerce-checkout": "mkdirp assets/js && uglifyjs src/js/woocommerce-checkout.js --compress --mangle --output assets/js/woocommerce-checkout.js",
"uglify:edd": "mkdirp assets/js && uglifyjs src/js/edd.js --compress --mangle --output assets/js/edd.js",
"uglify:edd-checkout": "mkdirp assets/js && uglifyjs src/js/edd-checkout.js --compress --mangle --output assets/js/edd-checkout.js",
"uglify:cf7": "mkdirp assets/js && uglifyjs src/js/contact-form-7.js --compress --mangle --output assets/js/contact-form-7.js",
"uglify:admin": "mkdirp assets/js && uglifyjs src/js/admin.js --compress --mangle --output assets/js/admin.js",
"copy:images": "node ./bin/copy-images.js",
"format": "wp-scripts format",
"lint:css": "wp-scripts lint-style",
"lint:js": "wp-scripts lint-js",
"lint:js:src": "wp-scripts lint-js ./src/js",
"lint:js-fix": "wp-scripts lint-js --fix",
"watch": "wp-scripts start src/js/frontend/woocommerce-blocks.js --output-path=build/frontend",
"watch:tailwind": "npx tailwindcss -i ./src/scss/tailwind.scss -o ./src/scss/_tailwind-compiled.scss --watch",
"audit:prod": "npm audit --omit=dev",
"lint:pkg-json": "wp-scripts lint-pkg-json",
"packages-update": "wp-scripts packages-update",
Expand Down
34 changes: 0 additions & 34 deletions src/Admin/AbstractOptionsPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,40 +141,6 @@ protected function get_position(): ?int {
return null;
}

/**
* Enqueue admin area scripts and styles.
*
* @param string $hook Current hook.
*/
public function admin_enqueue_scripts( string $hook ) {

if ( \strpos( $hook, GTMKIT_ADMIN_SLUG ) === true ) {
// General styles and js.
wp_enqueue_style(
'gtmkit-admin-css',
GTMKIT_URL . 'assets/css/admin.css',
false,
$this->util->get_plugin_version()
);
wp_enqueue_script(
'gtmkit-admin',
GTMKIT_URL . 'assets/js/admin.js',
[ 'jquery' ],
$this->util->get_plugin_version(),
true
);

$script_data = [
'plugin_url' => GTMKIT_URL,
'nonce' => wp_create_nonce( 'gtmkit-admin' ),
'ajax_url' => admin_url( 'admin-ajax.php' ),
];

wp_localize_script( 'gtmkit-admin', 'gtmkit', $script_data );

}
}

/**
* Enqueue admin page scripts and styles.
*
Expand Down
121 changes: 0 additions & 121 deletions src/Admin/MetaBox.php

This file was deleted.

114 changes: 0 additions & 114 deletions src/Admin/OptionTab.php

This file was deleted.

Loading
Loading