Ajout: plugin status, theme st atus

This commit is contained in:
2018-08-21 19:48:34 +02:00
parent 4e2c0029e9
commit 4f3e90c252
2 changed files with 26 additions and 7 deletions

View File

@@ -112,6 +112,19 @@ wp language plugin update --all --path=$path
# Mettre à jour les traductions de tous les themes:
wp language theme update --all --path=$path
# status
echo -e "\n\033[1mLanguage update...\033[0m"
wp plugin status --path=$path
echo
wp theme status --path=$path
# Maintenance
if [ "$maint" = true ]; then
echo -e "\n"
echo -e "\n\033[1;31mMaintenance...\033[0m"
@@ -152,7 +165,7 @@ if [ "$maint" = true ]; then
spam=$(wp comment list --status=spam --format=ids --path=$path)
if [ -n "$spam" ]; then
wp comment delete "$spam" --path=$path
wp comment delete "$spam" --path=$path
else
echo "No SPAM"
fi
@@ -189,13 +202,21 @@ if [ "$maint" = true ]; then
echo -e "\n\033[1mTrackback list...\033[0m"
trackback=$(wp comment list --type=trackback --format=ids --path=$path)
echo "$trackback"
if [ -n "$trackback" ]; then
wp comment delete "$trackback" --path=$path
else
echo "No trackback post"
fi
#echo -e "\n\033[1mListe des pingback...\033[0m"
echo -e "\n\033[1mPingback list...\033[0m"
pingback=$(wp comment list --type=pingback --format=ids --path=$path)
echo "$pingback"
if [ -n "$pingback" ]; then
wp comment delete "$pingback" --path=$path
else
echo "No pingback post"
fi
fi
@@ -216,4 +237,3 @@ if [ "$maint" = true ]; then
fi
echo -e "\n"