Skip to content

Wordpress tools


wpPluginSource

Wordpress Plugin PHP Source

Usage

wpPluginSource [ --help ] [ --handler handler ] [ directory ]

Fetch the source PHP file for a Wordpress plugin Looks for: - directoryName + .php - plugin.php - Any *.php file containing `Plugin Name' on a line

Location: bin/build/tools/wordpress.sh

Arguments

  • --help - Flag. Optional. Display this help.
  • --handler handler - Function. Optional. Use this error handler instead of the default error handler.
  • directory - Directory. Optional. Directory to find the plugin source. Usually ./wp-content/plugins/pluginName/

Writes to standard output

File

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

wpPluginSetting

Fetch a named setting from a Wordpress plugin

Usage

wpPluginSetting [ target ] [ --name settingName ]

Settings are trimmed using textTrim. A directory target is converted to a file using wpPluginSource. Some known valid setting names are: - Version - Author - Author URI - Description - License - Plugin Name - Plugin URI - Update URI

Location: bin/build/tools/wordpress.sh

Arguments

  • target - Exists. Optional. Wordpress plugin source or directory to fetch a setting from.
  • --name settingName - String. Optional. Setting name to fetch. If not specified gets Version.

Writes to standard output

String

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

See Also

wpPluginUpdate

Wordpress Plugin Updater

Usage

wpPluginUpdate source target ...

Copies plugin source from a source to a target cleanly with annotation. Copies source to path and outputs old versions before copying

Location: bin/build/tools/wordpress.sh

Arguments

  • source - Directory. Required. Plugin source.
  • target ... - Directory. Required. OneOrMore. Plugin target path.

Writes to standard output

ConsoleText

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

wpPluginVersionCompare

Status codes:

Usage

wpPluginVersionCompare sourcePluginPath targetPluginPath [ --code ]

Status codes:

  • missing - Target path is missing (or not a path)
  • no-source - Target path exists but no source PHP found
  • no-version - Target path exists but version not found in PHP source
  • newer - targetPluginPath plugin is newer than sourcePluginPath
  • older - targetPluginPath plugin is older than sourcePluginPath

Location: bin/build/tools/wordpress.sh

Arguments

  • sourcePluginPath - Directory. Required. Plugin path to compare. (e.g. ./wp-content/plugins/pluginPath/)
  • targetPluginPath - Directory. Required. Plugin path to compare to sourcePluginPath. (e.g. ../another-site/wp-content/plugins/pluginPath/)
  • --code - Flag. Optional. Output the status code for each targetPluginPath instead, one per line.

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

wpPluginVersionsCompare

Compare Wordpress Plugin Versions across installations

Usage

wpPluginVersionsCompare [ sourcePluginPath ] [ targetPluginPath ... ]

Output a report showing the versions and the most recent version highlighted using the success style.

Location: bin/build/tools/wordpress.sh

Arguments

  • sourcePluginPath - Directory. The source plugin path to compare. (e.g. ./wp-content/plugins)
  • targetPluginPath ... - Directory. One or more target plugin paths to compare. (e.g. ../another-site/wp-content/plugins)

Writes to standard output

ConsoleText

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

wpInstallCLI

Install the Wordpress CLI tool

Usage

wpInstallCLI [ --verbose ] [ --quiet ] [ --skip-verify ] [ --prefix prefixURL ] --target targetPath [ --log verifyFile ]

Install the Wordpress CLI tool

Location: bin/build/tools/wp-cli.sh

Arguments

  • --verbose - Flag. Optional. Output extra details about the installation process.
  • --quiet - Flag. Optional. Do not output extra details about the installation process.
  • --skip-verify - Flag. Optional. Do not verify the gpg signature of the wp command-line code.
  • --prefix prefixURL - URL. Optional. The URL to fetch the CLI phar file.
  • --target targetPath - FileDirectory. Required. File or path to install the binary.
  • --log verifyFile - File. Optional. Log GPG signature verification log to this file.

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

See Also


🛠️ Tools · ⬅ Top