- settings optimization;

This commit is contained in:
nikitozzzzzzz
2017-12-11 09:53:38 +02:00
parent 9e4a0b5309
commit e36c3ca841
51 changed files with 540 additions and 631 deletions
+2 -2
View File
@@ -24,12 +24,12 @@ remove_all_filters( 'um_core_pages' );
require_once plugin_dir_path( __FILE__ ) . 'includes/class-functions.php';
require_once plugin_dir_path( __FILE__ ) . 'includes/class-init.php';
$delete_options = UM()->um_get_option( 'uninstall_on_delete' );
$delete_options = UM()->options()->get( 'uninstall_on_delete' );
if ( ! empty( $delete_options ) ) {
//remove core pages
foreach ( UM()->config()->core_pages as $page_key => $page_value ) {
$page_id = UM()->um_get_option( apply_filters( 'um_core_page_id_filter', 'core_' . $page_key ) );
$page_id = UM()->options()->get( apply_filters( 'um_core_page_id_filter', 'core_' . $page_key ) );
if ( ! empty( $page_id ) )
wp_delete_post( $page_id, true );
}