|
...
|
...
|
@@ -21,11 +21,12 @@ class Class_Rucy_Setting {
|
|
21
|
21
|
&& ( isset( $_POST['_wpnonce'] ) && wp_verify_nonce( $_POST['_wpnonce'], 'update-options' ) )
|
|
22
|
22
|
) {
|
|
23
|
23
|
// update post
|
|
24
|
|
- if( count( array_diff($support_post_type, $_POST['rc_support_post_types']) ) ) {
|
|
|
24
|
+ $post_support_posts = ( isset($_POST['rc_support_post_types']) ) ? $_POST['rc_support_post_types'] : array();
|
|
|
25
|
+ if( count( array_diff( $support_post_type, $post_support_posts ) ) ) {
|
|
25
|
26
|
// different data before post
|
|
26
|
27
|
$is_different = true;
|
|
27
|
28
|
}
|
|
28
|
|
- $is_update = $component->update_support_post_type( $_POST['rc_support_post_types'] );
|
|
|
29
|
+ $is_update = $component->update_support_post_type( $post_support_posts );
|
|
29
|
30
|
if ( $is_different && $is_update ) {
|
|
30
|
31
|
// 更新完了
|
|
31
|
32
|
} else if ( $is_different && !$is_update ) {
|