Inventory_Presser_Plugin::set_default_settings()
Provides default values for the plugin settings stored in an option with name INVP::OPTION_NAME.
Return Return
(void)
Source Source
File: inventory-presser.php
public static function set_default_settings() { $settings = INVP::settings(); // Do not overwrite taxonomies setting if it exists. if ( ! empty( $settings['taxonomies'] ) ) { return; } // If the old show_all_taxonomies is set, maintain that behavior. $show_menu = false; if ( isset( $settings['show_all_taxonomies'] ) ) { $show_menu = $settings['show_all_taxonomies']; unset( $settings['show_all_taxonomies'] ); } if ( ! isset( $settings['taxonomies'] ) ) { $settings['taxonomies'] = Inventory_Presser_Admin_Options::taxonomies_setting_default( $settings ); } update_option( INVP::OPTION_NAME, $settings ); }
Expand full source codeCollapse full source codeView on Github