Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Michael Iseard
Kudos-Donations
Commits
70f85cde
Commit
70f85cde
authored
Oct 10, 2021
by
Michael Iseard
Browse files
Remove unused 'plugin_name' property
parent
b77e0544
Changes
3
Hide whitespace changes
Inline
Side-by-side
app/Controller/Admin.php
View file @
70f85cde
...
...
@@ -21,14 +21,6 @@ use Kudos\Service\TwigService;
use
Kudos\Service\Vendor\MollieVendor
;
class
Admin
{
/**
* The ID of this plugin.
*
* @var string $plugin_name The ID of this plugin.
*/
private
$plugin_name
;
/**
* The version of this plugin.
*
...
...
@@ -68,11 +60,9 @@ class Admin {
/**
* Initialize the class and set its properties.
*
* @param string $plugin_name The name of this plugin.
* @param string $version The version of this plugin.
*/
public
function
__construct
(
string
$plugin_name
,
string
$version
,
MapperService
$mapper
,
TwigService
$twig
,
...
...
@@ -81,8 +71,6 @@ class Admin {
Settings
$settings
,
MollieVendor
$mollie_vendor
)
{
$this
->
plugin_name
=
$plugin_name
;
$this
->
version
=
$version
;
$this
->
mapper
=
$mapper
;
$this
->
twig
=
$twig
;
...
...
@@ -90,7 +78,6 @@ class Admin {
$this
->
activator
=
$activator
;
$this
->
settings
=
$settings
;
$this
->
mollie
=
$mollie_vendor
;
}
/**
...
...
@@ -299,7 +286,7 @@ class Admin {
*/
public
function
settings_page_assets
()
{
$handle
=
$this
->
plugin_name
.
'
-settings'
;
$handle
=
'kudos-donations
-settings'
;
// Enqueue the styles
wp_enqueue_style
(
...
...
@@ -338,7 +325,7 @@ class Admin {
*/
private
function
table_page_assets
():
string
{
$handle
=
$this
->
plugin_name
.
'
-table'
;
$handle
=
'kudos-donations
-table'
;
$table_js
=
Assets
::
get_script
(
'/admin/kudos-admin-table.js'
);
wp_enqueue_script
(
...
...
@@ -360,7 +347,7 @@ class Admin {
$transactions_js
=
Assets
::
get_script
(
'/admin/kudos-admin-transactions.js'
);
wp_enqueue_script
(
$this
->
plugin_name
.
'
-transactions'
,
'kudos-donations
-transactions'
,
$transactions_js
[
'url'
],
$transactions_js
[
'dependencies'
],
$transactions_js
[
'version'
],
...
...
app/Controller/Front.php
View file @
70f85cde
...
...
@@ -43,14 +43,6 @@ class Front {
*/
const
WRAPPER_TEMPLATE
=
'public/wrapper.html.twig'
;
/**
* The ID of this plugin.
*
* @access private
* @var string $plugin_name The ID of this plugin.
*/
private
$plugin_name
;
/**
* The version of this plugin.
*
...
...
@@ -87,12 +79,10 @@ class Front {
/**
* Initialize the class and set its properties.
*
* @param string $plugin_name The name of the plugin.
* @param string $version The version of this plugin.
*
*/
public
function
__construct
(
string
$plugin_name
,
string
$version
,
LoggerService
$logger
,
PaymentService
$payment
,
...
...
@@ -100,8 +90,6 @@ class Front {
MapperService
$mapper
,
Settings
$settings
)
{
$this
->
plugin_name
=
$plugin_name
;
$this
->
version
=
$version
;
$this
->
logger
=
$logger
;
$this
->
payment
=
$payment
;
...
...
app/config.php
View file @
70f85cde
...
...
@@ -10,9 +10,9 @@ use function DI\autowire;
return
[
'ActivatorService'
=>
autowire
(
ActivatorService
::
class
),
'Front'
=>
autowire
(
Front
::
class
)
->
constructor
(
'kudos-donations'
,
KUDOS_VERSION
),
->
constructor
(
KUDOS_VERSION
),
'Admin'
=>
autowire
(
Admin
::
class
)
->
constructor
(
'kudos-donations'
,
KUDOS_VERSION
),
->
constructor
(
KUDOS_VERSION
),
'RestRouteService'
=>
autowire
(
RestRouteService
::
class
),
'PaymentService'
=>
autowire
(
PaymentService
::
class
),
];
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment