From cfbdb688febeed5d01f661ca4b30138c4533f3d3 Mon Sep 17 00:00:00 2001 From: nikitozzzzzzz Date: Sun, 12 Nov 2017 15:55:43 +0200 Subject: [PATCH] - fixed email notifications integration; - fixed small notices; --- includes/class-init.php | 2 +- includes/core/class-access.php | 2 +- includes/core/class-mail.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/class-init.php b/includes/class-init.php index 5139305c..322b7421 100644 --- a/includes/class-init.php +++ b/includes/class-init.php @@ -296,12 +296,12 @@ if ( ! class_exists( 'UM' ) ) { $this->register(); $this->user_posts(); $this->access(); - $this->mail(); $this->members(); $this->logout(); } //common includes + $this->mail(); $this->rest_api(); $this->shortcodes(); $this->roles(); diff --git a/includes/core/class-access.php b/includes/core/class-access.php index 59cb526f..29549a2c 100644 --- a/includes/core/class-access.php +++ b/includes/core/class-access.php @@ -148,7 +148,7 @@ if ( ! class_exists( 'Access' ) ) { $restricted_posts = um_get_option( 'restricted_access_post_metabox' ); - if ( ! empty( $restricted_posts[ $post->post_type ] ) ) { + if ( ! empty( $post->post_type ) && ! empty( $restricted_posts[ $post->post_type ] ) ) { $restriction = get_post_meta( $post->ID, 'um_content_restriction', true ); if ( ! empty( $restriction['_um_custom_access_settings'] ) ) { diff --git a/includes/core/class-mail.php b/includes/core/class-mail.php index f33bbf5a..4d98a860 100644 --- a/includes/core/class-mail.php +++ b/includes/core/class-mail.php @@ -14,7 +14,7 @@ if ( ! class_exists( 'Mail' ) ) { //mandrill compatibility add_filter( 'mandrill_nl2br', array( &$this, 'mandrill_nl2br' ) ); - add_action( 'plugins_loaded', array( &$this, 'init_paths' ) ); + add_action( 'plugins_loaded', array( &$this, 'init_paths' ), 99 ); }