Provides a series of wp cli tasks for manipulating data used by the old Today-Bootstrap theme to work with the new theme and associated plugins.
Provides a series of wp cli tasks for manipulating data used by the old Today-Bootstrap theme to work with the new theme and associated plugins.
wp today migrate externalstories
- Converts
externalstories
posts toucf_resource_link
posts and translates meta keys.
- Converts
wp today migrate sources
- Updates the meta key used for source images.
wp today migrate content
- Updates various post values including the post template used, removal of unwanted HTML tags and the addition of the
post_header_publish_date
meta.
- Updates various post values including the post template used, removal of unwanted HTML tags and the addition of the
wp today migrate meta
- Converts post_meta keys from the ones used on the old Today site to the keys used in the new site.
wp today migrate featured
- Copies the featured image id of each post to a custom post_meta field.
wp today migrate classes
- Performs a simple regex search/replace using an array of CSS Classes to update old classes to ones available in Athena.
wp today migrate tags
- Removes all tags that have one or fewer posts assigned to them.
wp today migrate duplicate-images
- If a story has a featured image and contains that exact image within the content, the image in the content is removed.
wp today migrate all
- Runs all the above commands in sequence.
Enhancements:
- Added duplicate image removal command
- Added meta migration command
- Added post content migration command
- Added source migration command
- Added tag removal command
Bug Fixes:
- Removed WPINC check as this will be false when using this as a wp cli package.
- Initial release
n/a
Enabling debug mode in your wp-config.php
file is recommended during development to help catch warnings and bugs.
- node
- gulp-cli
- wp cli
-
Clone the Today-Migration-Plugin repo into your local development environment, within your WordPress installation's
plugins/
directory:git clone https://github.com/UCF/Today-Migration-Plugin.git
-
cd
into the new Today-Migration-Plugin directory, and runnpm install
to install required packages for development intonode_modules/
within the repo -
Optional: If you'd like to enable BrowserSync for local development, or make other changes to this project's default gulp configuration, copy
gulp-config.template.json
, make any desired changes, and save asgulp-config.json
.To enable BrowserSync, set
sync
totrue
and assignsyncTarget
the base URL of a site on your local WordPress instance that will use this plugin, such ashttp://localhost/wordpress/my-site/
. YoursyncTarget
value will vary depending on your local host setup.The full list of modifiable config values can be viewed in
gulpfile.js
(seeconfig
variable). -
Run
gulp default
to process front-end assets. -
If you haven't already done so, create a new WordPress site on your development environment to test this plugin against.
-
Activate this plugin on your development WordPress site.
- Install using
wp package install git@github.com:UCF/Today-Migration-Plugin.git
orwp package install https://github.com/UCF/Today-Migration-Plugin.git
.
Note: If you get a WP-CLI ran out of memory
error when trying to install, you can either increase the memory_limit
parameter in your php.ini
file, or you can run the following command for a temporary workaround:
php -d memory_limit=512M "$(which wp)" package install git@github.com:UCF/Today-Migration-Plugin.git
- This plugin's README.md file is automatically generated. Please only make modifications to the README.txt file, and make sure the
gulp readme
command has been run before committing README changes. See the contributing guidelines for more information.
Want to submit a bug report or feature request? Check out our contributing guidelines for more information. We'd love to hear from you!