Inventory_Presser_Plugin::flush_rewrite( boolean $network_wide )
Flushes rewrite rules.
On This Page
Parameters Parameters
- $network_wide
-
(boolean) (Required) True if this plugin is being Network Activated or Network Deactivated by the multisite admin.
Return Return
(void)
Source Source
File: inventory-presser.php
} } /** * Changes the attachment post type args just before the type is registered. * Changes hierarchical to true so that `parent` is exposed in the REST API. * * @param array $args Array of arguments for registering a post type. See the register_post_type() function for accepted arguments. * @param string $type Post type key. * @return array */ public function edit_attachment_post_type( $args, $type ) { if ( 'attachment' !== $type ) { return $args; } $args['hierarchical'] = true; return $args; } /** * Flushes rewrite rules. *
Expand full source codeCollapse full source codeView on Github