Inventory_Presser_Plugin::flush_rewrite( boolean $network_wide )

Flushes rewrite rules.


Parameters Parameters

$network_wide

(boolean) (Required) True if this plugin is being Network Activated or Network Deactivated by the multisite admin.


Top ↑

Return Return

(void)


Top ↑

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.
		 *