Skip to content

Commit

Permalink
Merge pull request #186 from pluginever/fix/185
Browse files Browse the repository at this point in the history
Update the plugin framework
  • Loading branch information
kawsarahmedr authored Nov 24, 2024
2 parents 9360522 + 56f06bf commit 82064e9
Show file tree
Hide file tree
Showing 16 changed files with 3,226 additions and 3,446 deletions.
36 changes: 19 additions & 17 deletions .distignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
.gitkeep
.gitmodules
.husky

# Documentation files
readme.md
README.md

Expand All @@ -17,32 +19,33 @@ composer.*
# NPM related files
npm-debug.log
/node_modules/
postcss.config.js
babel.config.js
package.json
package-lock.json
yarn.lock

# Build related files
postcss.config.js
babel.config.js
gruntfile.js
Gruntfile.js
webpack.config.js
yarn.lock
bower.json
bower_components
.*

# Test related files
phpunit.xml
phpunit.xml.dist
tests
*.yml

# Test related files
phpunit.xml
phpunit.xml.dist
tests
.dist
codeception.yml
*.yml

# PHPCS related files
phpcs.xml
phpcs.xml.dist


# IDE related files
.idea
*.iml
Expand All @@ -52,17 +55,15 @@ phpcs.xml.dist
*.tmproj
*.vscode

# Misc files
# Miscellaneous files and folders
.*
.*/
*.lock
*.log
*.sh
*.zip
/bin/


# OS related files
# OS specific files
.DS_Store
.DS_Store?
._*
Expand All @@ -71,12 +72,13 @@ phpcs.xml.dist
ehthumbs.db
Thumbs.db


# Action related files
.wordpress-org

#Assets
# Binary and other directories
/bin/

# Asset related files
*.scss
*.*.map

# Build related files
/assets
27 changes: 14 additions & 13 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# IDEs
# IDE related files
/.settings
/.project
/.idea
Expand All @@ -11,45 +11,46 @@ tmtags
Session.vim
*.swp

# Mac OSX
# Mac OSX specific files
.DS_Store
._*
.Spotlight-V100
.Trashes

# Windows
# Windows specific files
Thumbs.db
Desktop.ini

# NPM packages used by Grunt.js
# NPM and Grunt.js related files
node_modules
bower_components
.idea
*.log
npm-debug.log

# Composer
# Composer related files
/vendor
/vendor-prefixed

# PHPUnit
# PHPUnit related files
/tmp

# Misc
# Miscellaneous files
*.zip
.cache
.sass-cache*
.husky
*.lock

# Tests
# Tests related files
codeception.yml
.env
/tests/_data/dump.sql
.env.testing

# Framework
lib

# Build
assets
# Language files
languages/*.

# Build related files
/bin/strauss.phar
build
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
44 changes: 20 additions & 24 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,28 @@
"homepage": "https://pluginever.com/",
"type": "wordpress-plugin",
"license": "GPL v2 or later",
"prefer-stable": true,
"minimum-stability": "dev",
"require": {
"php": ">=7.4"
"byteever/bytekit-plugin": "^1.0",
"byteever/bytekit-settings": "^1.0"
},
"require-dev": {
"byteever/byteever-sniffs": "dev-master",
"byteever/bytekit-plugin": "dev-master",
"byteever/bytekit-settings": "dev-master",
"coenjacobs/mozart": "^0.7.1"
"byteever/byteever-sniffs": "dev-master"
},
"autoload": {
"psr-4": {
"WooCommerceMinMaxQuantities\\": ["includes/", "lib/"]
"WooCommerceMinMaxQuantities\\": ["includes/"]
}
},
"autoload-dev": {},
"config": {
"optimize-autoloader": true,
"sort-packages": true,
"allow-plugins": {
"composer/*": true,
"dealerdirect/phpcodesniffer-composer-installer": true
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"repositories": [
{
"type": "github",
Expand All @@ -40,24 +37,23 @@
}
],
"scripts": {
"post-install-cmd": [
"\"vendor/bin/mozart\" compose",
"composer dump-autoload"
],
"post-update-cmd": [
"\"vendor/bin/mozart\" compose",
"composer dump-autoload"
],
"post-install-cmd":"@strauss",
"post-update-cmd": "@strauss",
"phpcs": "@php ./vendor/bin/phpcs --standard=phpcs.xml -s -v",
"phpcbf": "@php ./vendor/bin/phpcbf --standard=phpcs.xml -v"
"phpcbf": "@php ./vendor/bin/phpcbf --standard=phpcs.xml -v",
"strauss": [
"test -d ./bin || mkdir bin",
"test -f ./bin/strauss.phar || curl -o bin/strauss.phar -L -C - https://github.com/BrianHenryIE/strauss/releases/latest/download/strauss.phar",
"@php bin/strauss.phar"
]
},
"extra": {
"mozart": {
"dep_namespace": "WooCommerceMinMaxQuantities\\",
"dep_directory": "/lib/",
"classmap_directory": "/lib/classes/",
"classmap_prefix": "WooCommerceMinMaxQuantities_",
"delete_vendor_directories": true,
"strauss": {
"target_directory": "vendor-prefixed",
"classmap_prefix": "WooCommerceMinMaxQuantities__",
"namespace_prefix": "WooCommerceMinMaxQuantities",
"delete_vendor_packages": true,
"delete_vendor_files": true,
"packages": [
"byteever/bytekit-plugin",
"byteever/bytekit-settings"
Expand Down
2 changes: 1 addition & 1 deletion includes/Admin/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function init() {
wc_min_max_quantities()->set( 'settings', Settings::instance() );
wc_min_max_quantities()->set( 'meta_boxes', MetaBoxes::class );
wc_min_max_quantities()->set( 'actions', Actions::class );
// TODO: Need to include Notices class: wc_min_max_quantities()->set( 'notices', Notices::class );.
wc_min_max_quantities()->set( 'notices', Notices::class );
}

/**
Expand Down
5 changes: 2 additions & 3 deletions includes/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* @since 1.1.4
* @package WooCommerceMinMaxQuantities
*/
final class Plugin extends ByteKit\Plugin {
final class Plugin extends \WooCommerceMinMaxQuantities\ByteKit\Plugin {

/**
* Plugin constructor.
Expand Down Expand Up @@ -69,7 +69,7 @@ public function init_hooks() {
*
* @param array $links The plugin action links.
*
* @since 1.0.0
* @since 2.0.3
* @return array
*/
public function plugin_action_links( $links ) {
Expand Down Expand Up @@ -107,7 +107,6 @@ public function init() {
// Admin only classes.
if ( is_admin() ) {
$this->set( Admin\Admin::class );
$this->set( Admin\Notices::class );
}

// Do action after plugin loaded.
Expand Down
54 changes: 26 additions & 28 deletions languages/wc-min-max-quantities.pot
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WC Min Max Quantities 2.0.2\n"
"Report-Msgid-Bugs-To: https://pluginever.com/support/\n"
"POT-Creation-Date: 2024-11-24 05:06:43+00:00\n"
"POT-Creation-Date: 2024-11-24 06:40:43+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
Expand Down Expand Up @@ -218,7 +218,8 @@ msgstr ""
msgid "Get Premium"
msgstr ""

#: includes/Admin/Settings.php:201 lib/ByteKit/Traits/HasPlugin.php:216
#: includes/Admin/Settings.php:201
#: vendor-prefixed/byteever/bytekit-plugin/src/Traits/HasPlugin.php:216
msgid "Documentation"
msgstr ""

Expand Down Expand Up @@ -367,59 +368,56 @@ msgstr ""
msgid "%1$s updated to version %2$s successfully."
msgstr ""

#: includes/Plugin.php:79
#. translators: 1: plugin name 2: WooCommerce
msgid "%1$s requires %2$s to be installed and active."
#: includes/Plugin.php:77
msgid "Go Pro"
msgstr ""

#: includes/Plugin.php:81
msgid "WooCommerce"
#: vendor-prefixed/byteever/bytekit-plugin/src/Admin/Notices.php:130
msgid "Dismiss this notice"
msgstr ""

#: lib/ByteKit/Admin/Notices.php:130
msgid "Dismiss this notice"
#: vendor-prefixed/byteever/bytekit-plugin/src/Traits/HasPlugin.php:223
msgid "Support"
msgstr ""

#: vendor-prefixed/byteever/bytekit-plugin/src/Traits/HasPlugin.php:230
msgid "Review"
msgstr ""

#: vendor-prefixed/byteever/bytekit-plugin/src/Traits/HasPlugin.php:255
msgid "Settings"
msgstr ""

#: lib/ByteKit/Admin/Settings.php:90
#: vendor-prefixed/byteever/bytekit-settings/src/Admin/Settings.php:90
msgid "Settings saved."
msgstr ""

#: lib/ByteKit/Admin/Settings.php:254 lib/ByteKit/Admin/Settings.php:349
#: vendor-prefixed/byteever/bytekit-settings/src/Admin/Settings.php:254
#: vendor-prefixed/byteever/bytekit-settings/src/Admin/Settings.php:349
msgid "Recommended"
msgstr ""

#: lib/ByteKit/Admin/Settings.php:255 lib/ByteKit/Admin/Settings.php:350
#: vendor-prefixed/byteever/bytekit-settings/src/Admin/Settings.php:255
#: vendor-prefixed/byteever/bytekit-settings/src/Admin/Settings.php:350
msgid "Install Now"
msgstr ""

#: lib/ByteKit/Admin/Settings.php:318
#: vendor-prefixed/byteever/bytekit-settings/src/Admin/Settings.php:318
msgid "Need Help?"
msgstr ""

#: lib/ByteKit/Admin/Settings.php:364
#: vendor-prefixed/byteever/bytekit-settings/src/Admin/Settings.php:364
msgid "Join our Community"
msgstr ""

#: lib/ByteKit/Admin/Settings.php:368
#: vendor-prefixed/byteever/bytekit-settings/src/Admin/Settings.php:368
msgid "Request a Feature"
msgstr ""

#: lib/ByteKit/Admin/Settings.php:372
#: vendor-prefixed/byteever/bytekit-settings/src/Admin/Settings.php:372
msgid "Report a Bug"
msgstr ""

#: lib/ByteKit/Traits/HasPlugin.php:223
msgid "Support"
msgstr ""

#: lib/ByteKit/Traits/HasPlugin.php:230
msgid "Review"
msgstr ""

#: lib/ByteKit/Traits/HasPlugin.php:255
msgid "Settings"
msgstr ""

#. Plugin Name of the plugin/theme
msgid "WC Min Max Quantities"
msgstr ""
Expand Down
Loading

0 comments on commit 82064e9

Please sign in to comment.