Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
wp-basic-requirements
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
wpdesk
wp-basic-requirements
Commits
8521cd70
Commit
8521cd70
authored
5 years ago
by
dyszczo
Browse files
Options
Downloads
Patches
Plain Diff
faster check
parent
63f05b22
No related branches found
No related tags found
1 merge request
!14
fixed for get_plugins and msg display
Pipeline
#8856
passed with stages
in 43 seconds
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGELOG.md
+1
-0
1 addition, 0 deletions
CHANGELOG.md
src/Basic_Requirement_Checker.php
+7
-9
7 additions, 9 deletions
src/Basic_Requirement_Checker.php
with
8 additions
and
9 deletions
CHANGELOG.md
+
1
−
0
View file @
8521cd70
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
### Fixed
### Fixed
-
Better new error messages display
-
Better new error messages display
-
get_plugins function loaded from wp-admin
-
get_plugins function loaded from wp-admin
-
Faster checks
## [3.0.0] - 2019-09-17
## [3.0.0] - 2019-09-17
### Changed
### Changed
...
...
This diff is collapsed.
Click to expand it.
src/Basic_Requirement_Checker.php
+
7
−
9
View file @
8521cd70
...
@@ -343,21 +343,19 @@ if ( ! class_exists( 'WPDesk_Basic_Requirement_Checker' ) ) {
...
@@ -343,21 +343,19 @@ if ( ! class_exists( 'WPDesk_Basic_Requirement_Checker' ) ) {
$name
=
$plugin_info
[
self
::
PLUGIN_INFO_KEY_NAME
];
$name
=
$plugin_info
[
self
::
PLUGIN_INFO_KEY_NAME
];
$nice_name
=
$plugin_info
[
self
::
PLUGIN_INFO_KEY_NICE_NAME
];
$nice_name
=
$plugin_info
[
self
::
PLUGIN_INFO_KEY_NICE_NAME
];
if
(
!
self
::
is_wp_plugin_installed
(
$name
)
)
{
$install_url
=
$this
->
prepare_plugin_repository_install_url
(
$plugin_info
);
return
$this
->
prepare_notice_message
(
sprintf
(
wp_kses
(
__
(
'The “%s” plugin requires free %s plugin. <a href="%s">Install %s →</a>'
,
$this
->
get_text_domain
()
),
array
(
'a'
=>
array
(
'href'
=>
array
()
)
)
),
$this
->
plugin_name
,
$nice_name
,
esc_url
(
$install_url
),
$nice_name
)
);
}
if
(
!
self
::
is_wp_plugin_active
(
$name
)
)
{
if
(
!
self
::
is_wp_plugin_active
(
$name
)
)
{
if
(
!
self
::
is_wp_plugin_installed
(
$name
)
)
{
$install_url
=
$this
->
prepare_plugin_repository_install_url
(
$plugin_info
);
return
$this
->
prepare_notice_message
(
sprintf
(
wp_kses
(
__
(
'The “%s” plugin requires free %s plugin. <a href="%s">Install %s →</a>'
,
$this
->
get_text_domain
()
),
array
(
'a'
=>
array
(
'href'
=>
array
()
)
)
),
$this
->
plugin_name
,
$nice_name
,
esc_url
(
$install_url
),
$nice_name
)
);
}
$activate_url
=
'plugins.php?action=activate&plugin='
.
urlencode
(
$plugin_info
[
self
::
PLUGIN_INFO_KEY_NAME
]
)
.
'&plugin_status=all&paged=1&s&_wpnonce='
.
urlencode
(
wp_create_nonce
(
'activate-plugin_'
.
$name
)
);
$activate_url
=
'plugins.php?action=activate&plugin='
.
urlencode
(
$plugin_info
[
self
::
PLUGIN_INFO_KEY_NAME
]
)
.
'&plugin_status=all&paged=1&s&_wpnonce='
.
urlencode
(
wp_create_nonce
(
'activate-plugin_'
.
$name
)
);
return
$this
->
prepare_notice_message
(
sprintf
(
wp_kses
(
__
(
'The “%s” plugin requires activating %s plugin. <a href="%s">Activate %s →</a>'
,
return
$this
->
prepare_notice_message
(
sprintf
(
wp_kses
(
__
(
'The “%s” plugin requires activating %s plugin. <a href="%s">Activate %s →</a>'
,
$this
->
get_text_domain
()
),
array
(
'a'
=>
array
(
'href'
=>
array
()
)
)
),
$this
->
get_text_domain
()
),
array
(
'a'
=>
array
(
'href'
=>
array
()
)
)
),
$this
->
plugin_name
,
$nice_name
,
esc_url
(
admin_url
(
$activate_url
)
),
$nice_name
)
);
$this
->
plugin_name
,
$nice_name
,
esc_url
(
admin_url
(
$activate_url
)
),
$nice_name
)
);
}
}
return
null
;
return
null
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment