You appear to be a bot. Output may be restricted
Description
Delete a component's posts
Delete the posts that may be regenerated when the API reference is regenerated
post type | post meta | Delete parsed source? |
---|---|---|
oik_api | _oik_api_plugin | Yes |
oik_hook | _oik_hook_plugin | No |
oik_class | _oik_api_plugin | Yes |
oik_file | _oik_api_plugin | Yes |
oik_parsed_source | _oik_sourceref | No |
We delete in the order shown since this will prevent other post types that have not yet been deleted from referencing posts that no longer exist. We don't delete other post types that reference the component: plugin versions, shortcodes, theme versions
Usage
oiksc_delete_posts( $component_preloaded );
Parameters
- $component_preloaded
- ( mixed ) required –
Returns
void
Source
File name: oik-shortcodes/admin/oik-create-apis.php
Lines:
1 to 9 of 9
function oiksc_delete_posts( $component_preloaded ) { $id = $component_preloaded->ID; //bw_trace2(); echo "Deleting posts: $id" . PHP_EOL; oiksc_delete_referenced_posts( $id, "oik_api", "_oik_api_plugin", true ); oiksc_delete_referenced_posts( $id, "oik_hook", "_oik_hook_plugin" ); oiksc_delete_referenced_posts( $id, "oik_class", "_oik_api_plugin", true ); oiksc_delete_referenced_posts( $id, "oik_file", "_oik_api_plugin", true ); }