A useful tool for populating the WP block editor title and content.
Download from WordPress plugin repository.
You can also get the latest version from any of our release tags.
As a WP engineer, you may often find yourself creating posts to test a feature you're working on. This can get very tiresome, especially if you always have to create a title and content for every single post just to enable you accurately test a new feature.
This plugin makes it super easy for you to populate the title and content of your new post, so that you can just focus on testing out your new feature. It's that simple!
make-post-dirty-mov.mp4
This custom hook (filter) provides a way to filter the admin fields presented on the options page of the plugin.
add_filter( 'make_post_dirty_admin_fields', [ $this, 'custom_admin_fields' ] );
public function custom_admin_fields( $fields ): array {
$fields[] = [
'name' => 'name_of_your_control',
'label' => __( 'Control Label', 'your-text-domain' ),
'cb' => [ $this, 'name_of_your_control_callback' ],
'page' => 'make-post-dirty',
'section' => 'make-post-dirty-section',
];
return $fields;
}Parameters
- fields
{array}By default this will be an array containing key, value options for the control.
This custom hook (filter) provides a way to customise the settings used by the notification bar.
add_filter( 'make_post_dirty_settings', [ $this, 'custom_bar_settings' ] );
public function custom_bar_settings( $settings ): array {
$settings['title'] = esc_html(
'The Amazing Great Gatsby...'
);
return $settings;
}Parameters
- settings
{array}By default this will be an associative array containing key, value options of the settings used by the notification bar on the front-end.
Contributions are welcome and will be fully credited. To contribute, please fork this repo and raise a PR (Pull Request) against the master branch.
You should have the following tools before proceeding to the next steps:
- Composer
- Yarn
- Docker
To enable you start development, please run:
yarn startThis should spin up a local WP env instance for you to work with at:
http://make-post-dirty.localhost:9525You should now have a functioning local WP env to work with. To login to the wp-admin backend, please use admin for username & password for password.
Awesome! - Thanks for being interested in contributing your time and code to this project!