Hooks and filters
| Hook | Type | Arguments | Use |
|---|---|---|---|
nbwpas_fem_loaded | action | $plugin | The plugin has finished loading. Register an add-on here. |
nbwpas_fem_entry_created | action | $entry_id, $ctx | An entry was saved. $ctx['imported'] is true for imports. |
nbwpas_fem_entry_updated | action | $entry_id, $changed_fields | An entry was edited. |
nbwpas_fem_entries_deleted | action | $ids | Entries were permanently deleted. |
nbwpas_fem_admin_tabs | filter | $pages | Add or reorder admin tabs (slug => [title, capability]); you render the screen. |
nbwpas_fem_private_dir | filter | $dir | Move the private file folder. |
add_action( 'nbwpas_fem_entry_created', function ( $entry_id, $ctx ) {
if ( ! empty( $ctx['imported'] ) ) {
return; // Ignore imported entries.
}
// $ctx['posted'] holds the submitted values.
}, 10, 2 );
Constants: NBWPAS_FEM_PRIVATE_DIR (path for private files). Capabilities are listed in Who can do what.