INVP::delete_all_data()
This function will operate as an uninstall utility. Removes all the data we have added to the database including vehicle posts, their attachments, the option that holds settings, and terms in custom taxonomies.
Return Return
(void)
Source Source
File: includes/class-invp.php
__( 'Grey', 'inventory-presser' ), __( 'Green', 'inventory-presser' ), __( 'Ivory', 'inventory-presser' ), __( 'Orange', 'inventory-presser' ), __( 'Purple', 'inventory-presser' ), __( 'Red', 'inventory-presser' ), __( 'Silver', 'inventory-presser' ), __( 'White', 'inventory-presser' ), __( 'Yellow', 'inventory-presser' ), ) ); } /** * Returns the currency symbol. Default is a United States dollar sign. * * @return string */ public static function currency_symbol() { return apply_filters( 'invp_currency_symbol', '$' ); } /** * This function will operate as an uninstall utility. Removes all the * data we have added to the database including vehicle posts, their * attachments, the option that holds settings, and terms in custom * taxonomies. * * @return void */ public static function delete_all_data() { // During uninstall.php runs, the main plugin file is not loaded. if ( ! defined( 'INVP_PLUGIN_FILE_PATH' ) ) { define( 'INVP_PLUGIN_FILE_PATH', dirname( __DIR__ ) . '/inventory-presser.php' ); } // delete all the vehicles. self::delete_all_inventory(); // delete unattached photos with meta keys that identify them as vehicle photos. self::delete_attachment_orphans(); // delete pages created during activation. // uninstall.php doesn't load the whole plugin but calls this method. if ( ! class_exists( 'Inventory_Presser_Allow_Inventory_As_Home_Page' ) ) { include_once plugin_dir_path( INVP_PLUGIN_FILE_PATH ) . 'includes/class-allow-inventory-as-home-page.php';
Expand full source codeCollapse full source codeView on Github