Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
noblogs-cli
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Noblogs
noblogs-cli
Commits
1380b817
Commit
1380b817
authored
7 years ago
by
lucha
Browse files
Options
Downloads
Patches
Plain Diff
added command to uninstall plugin
parent
96ff9129
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bin/noblogs.in
+28
-0
28 additions, 0 deletions
bin/noblogs.in
with
28 additions
and
0 deletions
bin/noblogs.in
+
28
−
0
View file @
1380b817
...
...
@@ -81,6 +81,9 @@ Known commands:
rename-plugins BLOG
Disables old plugins and enables new ones, when there has been a change in names.
uninstall-plugin PLUGIN BLOG
Runs unistall action for PLUGIN.
<?php
exit
(
1
);
}
...
...
@@ -539,6 +542,31 @@ function do_rename_plugins($args){
}
}
function
do_rename_plugins
(
$args
){
include_once
(
NOBLOGS_ROOT
.
'/wp-admin/includes/plugin.php'
);
$plugin
=
array_shift
(
$args
);
if
(
!
$plugin
)
{
echo
"Not enough arguments
\n
"
;
help
();
}
foreach
(
$args
as
$arg
)
{
$blog
=
noblogs_get_blog
(
$arg
);
if
(
!
$blog
)
{
echo
"
{
$arg
}
: blog not found.
\n
"
;
continue
;
}
switch_to_blog
(
$blog
->
blog_id
);
$plugin_dir
=
NOBLOGS_ROOT
.
'/wp-content/plugins/'
;
if
(
is_plugin_active
(
$plugin
)){
deactivate_plugins
(
$plugin_dir
.
$plugin
,
false
,
false
);
}
restore_current_blog
();
}
}
// Command-line parsing.
$cmd
=
$argv
[
1
];
if
(
!
$cmd
)
{
...
...
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