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
Issue boards
Milestones
Wiki
Code
Merge requests
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
wpdesk
wp-basic-requirements
Commits
bd8ddd39
Commit
bd8ddd39
authored
5 years ago
by
vasili.guruli
Browse files
Options
Downloads
Patches
Plain Diff
Fixed stupid issue with function call
parent
8673ae27
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!19
Feature/minimum plugin version check demo1
Pipeline
#10040
passed with warnings
5 years ago
Stage: tools
Stage: tests
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/Basic_Requirement_Checker.php
+2
-10
2 additions, 10 deletions
src/Basic_Requirement_Checker.php
src/Basic_Requirement_Checker_Factory.php
+1
-1
1 addition, 1 deletion
src/Basic_Requirement_Checker_Factory.php
with
3 additions
and
11 deletions
src/Basic_Requirement_Checker.php
+
2
−
10
View file @
bd8ddd39
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
const
PLUGIN_INFO_FAKE_REQUIRED_MINIMUM_VERSION
=
'0.0'
;
const
PLUGIN_INFO_FAKE_REQUIRED_MINIMUM_VERSION
=
'0.0'
;
const
PLUGIN_INFO_APPEND_PLUGIN_DATA
=
'required_version'
;
const
PLUGIN_INFO_APPEND_PLUGIN_DATA
=
'required_version'
;
const
PLUGIN_INFO_TRANSIENT_NAME
=
'require_plugins_data'
;
const
PLUGIN_INFO_TRANSIENT_NAME
=
'require_plugins_data'
;
const
PLUGIN_INFO_TRANSIENT_EXPIRATION_TIME
=
0
;
const
PLUGIN_INFO_TRANSIENT_EXPIRATION_TIME
=
16
;
/** @var string */
/** @var string */
protected
$plugin_name
;
protected
$plugin_name
;
...
@@ -577,16 +577,8 @@
...
@@ -577,16 +577,8 @@
*
*
*@return void
*@return void
*/
*/
public
function
transient_delete_on_
deactivated_plugin
()
{
public
function
transient_delete_on_
plugin_version_changed
()
{
add_action
(
self
::
HOOK_PLUGIN_DEACTIVATED_ACTION
,
array
(
$this
,
'handle_transient_delete_action'
)
);
add_action
(
self
::
HOOK_PLUGIN_DEACTIVATED_ACTION
,
array
(
$this
,
'handle_transient_delete_action'
)
);
}
/**
* Triggers the transient delete after plugin activated
*
*@return void
*/
public
function
transient_delete_on_activated_plugin
()
{
add_action
(
self
::
HOOK_PLUGIN_ACTIVATED_ACTION
,
array
(
$this
,
'handle_transient_delete_action'
)
);
add_action
(
self
::
HOOK_PLUGIN_ACTIVATED_ACTION
,
array
(
$this
,
'handle_transient_delete_action'
)
);
}
}
...
...
This diff is collapsed.
Click to expand it.
src/Basic_Requirement_Checker_Factory.php
+
1
−
1
View file @
bd8ddd39
...
@@ -52,7 +52,7 @@
...
@@ -52,7 +52,7 @@
$requirements_checker
->
add_plugin_require
(
$requirement
[
'name'
],
$requirement
[
'nice_name'
],
$requirement
[
'version'
]
);
$requirements_checker
->
add_plugin_require
(
$requirement
[
'name'
],
$requirement
[
'nice_name'
],
$requirement
[
'version'
]
);
}
}
$requirements_checker
->
handle_
transient_delete_
action
();
$requirements_checker
->
transient_delete_
on_plugin_version_changed
();
}
}
if
(
isset
(
$requirements
[
'repo_plugins'
]
)
)
{
if
(
isset
(
$requirements
[
'repo_plugins'
]
)
)
{
...
...
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