Users define their editorial rules in YAML (see Settings -> Secretary) according to a number of built-in rule functions. For example, Secretary can show a warning if you've forgotten to set a Featured Image for your post, by adding the
featured-image
rule to your YAML config.
Secretary comes with a number of rules out of the box, but you can write your own custom plugins for Secretary by calling
SecretaryRules::register
. See example at
https://github.com/ChrisBAshton/secretary-rule-gallery-at-top, and API documentation at
https://github.com/ChrisBAshton/secretary.
- Install the plugin through the WordPress plugins screen directly
- Activate the plugin through the 'Plugins' screen in WordPress
- Use the Settings->Secretary screen to configure the plugin (you can see all available rule configs on the right hand side of the screen)
Example YAML config below:
`
categories:
not:
- Uncategorized
not-only:
- Featured
featured-image:
max-size: 100
format: jpg
dimensions:
width: 760
height: 350
excerpt:
min-length: 30
max-length: 300
scheduled:
publish-time: '15:00'
links:
internal:
open-in-new-tab: false
external:
open-in-new-tab: true
images:
true
html-checker:
risky-html:
- table
- div
- span
- style
- script
`