2015 is an exciting time for WP-CLIWP-CLI WP-CLI is the Command Line Interface for WordPress, used to do administrative and development tasks in a programmatic way. The project page is http://wp-cli.org/ https://make.wordpress.org/cli/. WP-APIAPI An API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways. is days away from 2.0-beta1, and brings with it a powerful new interface to WordPress. In the near future, we’ll start exploring how WP-CLI can use WP-API internally. If all goes well, WP-CLI could see just one more 0.x.0 release before the big 1.0.0.
PluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party. scaffolding
wp plugin scaffold is a great way to get started on your next WordPress plugin. It automates many procedural steps you can easily forget to do, or need to copy and paste out of another plugin. v0.19.0 brings these improvements:
bin/install-wp-tests.shwill use either cURL or wget, depending on which is available. The script is also more fault tolerant.- Use the
--dir=<path-to-dir>argument to scaffold your new plugin to an arbitrary directory (e.g. mu-plugins or a theme folder). - For custom projects, use the
--activate-networkflag to network activate the plugin after creation. - Generates a Gruntfile with two helpful tasks:
grunt readmeto build aREADME.mdfrom yourreadme.txt, andgrunt i18nto create a.potfile. - The default
.travis.ymlhas increased maximum tested PHPPHP PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML. https://www.php.net/manual/en/index.php version to 5.5, is more smart about the build matrix it generates, and changes notifications preferences to only email developers on build failures.
Other changes in v0.19.0
Enhancements:
wp option listlists all options, or searching for specific options based on a pattern. Use--format=total_bytesto get the total bytes for the matching options.- Use
--all-tablesflag forwp search-replaceto perform replacements against all tables in the database. In 0.17.0, we changed the behavior ofwp search-replaceto only affect tables registered to$wpdb. This new flag permits users to opt-in to all tables. - When scaffolding a child themeChild theme A Child Theme is a customized theme based upon a Parent Theme. It’s considered best practice to create a child theme if you want to modify the CSS of your theme. https://developer.wordpress.org/themes/advanced-topics/child-themes/, the parent theme’s stylesheet is enqueued, instead of being loaded via
@import. - Added a
wp core language updatecommand to update language files. - Added a
--dashiconargument towp scaffold post-typewhich will specify the icon for the post type. - Added a
--sassifyargument towp scaffold _sto download the SASS version of_s. - MySQLMySQL MySQL is a relational database management system. A database is a structured collection of data where content, configuration and other options are stored. https://www.mysql.com binary commands execute with
--no-auto-rehashfor a substantial performance boost on larger databases. - On export, taxonomyTaxonomy A taxonomy is a way to group things together. In WordPress, some common taxonomies are category, link, tag, or post format. https://codex.wordpress.org/Taxonomies#Default_Taxonomies. terms with missing parents are explicitly identified to make them easier to fix.
- When updating an option or post/user/comment metaMeta Meta is a term that refers to the inside workings of a group. For us, this is the team that works on internal WordPress sites like WordCamp Central and Make WordPress. and the supplied value is the same as the stored value, the success message indicates such.
- Added
--format=idstowp post term list. - Added
--skip-deleteflag towp media regenerate. This is helpful on sites where thumbnails might’ve been linked to within post content. Skipping deletion prevents breaking image references. - Added
after_invokehook for any post-command execution tasks. - Supports filtering by site value in
wp site list. - Added archive/unarchive, activate/deactivate and spam/not-spam subcommands to
wp site. - Added a summary table to output of
wp theme updateandwp plugin update. This makes it easier to parse the final results when you’re updating a number of themes or plugins in one go. - On multisiteMultisite Multisite is a WordPress feature which allows users to create a network of sites on a single WordPress installation. Available since WordPress version 3.0, Multisite is a continuation of WPMU or WordPress Multiuser project. WordPress MultiUser project was discontinued and its features were included into WordPress core. Advanced Administration Handbook -> Create A Network., user creation is run through
wpmu_validate_user_signup()andwpmu_create_user(), which perform multisite-specific validation rules. - The object cache is periodically cleared on import to prevent excess memory usage.
- Nightly builds are accompanied by checksums.
Bug fixes:
- Introduces
WP_CLIUtilsget_flag_value()helper function to fix a systemic problem throughout WP-CLI. Read through this issue for the full details. - Provides a human-friendly error when an invalid class is specified for a command. The prior behavior was to fatal error.
- Correctly sets
sslverifyargument when testing WP-Cron. - Importer throws a hard error if process to import a file returns
WP_Error.create_author_mapping_file()usesWP_Errorto report that an author mapping file needs to be updated. However, when importing a directory of WXR files, the prior logic to useWP_CLI::warning()means the second file will use the author mapping file of the first, which should’ve been edited. - Comment meta values are wrapped in CDATA tags on export.
wp core multisite-installandwp core multisite-convertwill properly includedefine( 'WP_ALLOW_MULTISITE', true );constant.- httpsHTTPS HTTPS is an acronym for Hyper Text Transfer Protocol Secure. HTTPS is the secure version of HTTP, the protocol over which data is sent between your browser and the website that you are connected to. The ‘S’ at the end of HTTPS stands for ‘Secure’. It means all communications between your browser and the website are encrypted. This is especially helpful for protecting sensitive data like banking information. scheme is honored for the
--urlargument. wp post term listdisplays error for an invalid taxonomy.WP_CLI::error()respects$exitargument.- Provides a human-friendly error when an incorrect version or locale was supplied for
wp core downloadThe prior behavior was to fatal error. wp cron event schedulerespects the<next-run>argument.- Child themes aren’t permitted to be activated without their parent installed.
- Themes are network enabled based on stylesheet value, not template. Previously, it wasn’t possible to network-enable a child theme because of this bug.
You can browse the full list of resolved issues on GithubGitHub GitHub is a website that offers online implementation of git repositories that can easily be shared, copied and modified by other developers. Public repositories are free to host, private repositories require a paid subscription. GitHub introduced the concept of the ‘pull request’ where code changes done in branches by contributors can be reviewed and discussed before being merged by the repository owner. https://github.com/.
Contributors to this release: 2ndkauboy, acusti, bobbywalters, bmackinney, danielbachhuber, francescolaffi, heiglandreas, hirozed, jeichorn, johnbillion, joshbetz, jpry, keeth, mavin, morganestes, mwithheld, nyordanov, rodrigoprimo, sebastiaandegeus, szepeviktor, wrnx, yivi