Inventory_Presser_Customize_Dashboard::delete_all_data_and_deactivate()

delete_all_data_and_deactivate


Description Description

This function will operate as an uninstall utility. Removes all the data we have added to the database.


Top ↑

Return Return

(void)


Top ↑

Source Source

File: includes/class-customize-admin-dashboard.php

	 *
	 * @param  array $pieces
	 * @param  WP_Query $query
	 * @return array
	 */
	function enable_order_by_attachment_count( $pieces, $query )
	{
		if( ! is_admin() ) { return $pieces; }

		/**
		 * We only want our code to run in the main WP query
		 * AND if an orderby query variable is designated.
		 */
		if ( $query->is_main_query() && ( $orderby = $query->get( 'orderby' ) ) )
		{
			// Get the order query variable - ASC or DESC
			$order = strtoupper( $query->get( 'order' ) );

			// Make sure the order setting qualifies. If not, set default as ASC
			if ( ! in_array( $order, array( 'ASC', 'DESC' ) ) )
			{
				$order = 'ASC';
			}