diff --git a/includes/admin/core/class-admin-enqueue.php b/includes/admin/core/class-admin-enqueue.php index e59e5ac4..b592ab90 100644 --- a/includes/admin/core/class-admin-enqueue.php +++ b/includes/admin/core/class-admin-enqueue.php @@ -373,6 +373,9 @@ if ( ! class_exists( 'um\admin\core\Admin_Enqueue' ) ) { UM()->enqueue()->load_modal(); UM()->enqueue()->load_responsive(); + wp_register_script( 'um_raty', um_url . 'assets/js/um-raty' . UM()->enqueue()->suffix . '.js', array( 'jquery' ), ultimatemember_version, true ); + wp_register_style( 'um_raty', um_url . 'assets/css/um-raty.css', array(), ultimatemember_version ); + wp_register_style( 'um_default_css', um_url . 'assets/css/um-old-default.css', '', ultimatemember_version, 'all' ); wp_enqueue_style( 'um_default_css' ); @@ -380,7 +383,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Enqueue' ) ) { wp_register_style( 'um_admin_rtl', $this->css_url . 'um-admin-rtl.css' ); wp_enqueue_style( 'um_admin_rtl' ); } - + } else { $this->load_global_scripts(); diff --git a/includes/core/class-plugin-updater.php b/includes/core/class-plugin-updater.php index e8dc4c51..54c30af3 100644 --- a/includes/core/class-plugin-updater.php +++ b/includes/core/class-plugin-updater.php @@ -63,10 +63,6 @@ if ( ! class_exists( 'um\core\Plugin_Updater' ) ) { 'key' => 'instagram', 'title' => 'Instagram', ), - 'um-invitations/um-invitations.php' => array( - 'key' => 'invitations', - 'title' => 'Invitations', - ), 'um-mailchimp/um-mailchimp.php' => array( 'key' => 'mailchimp', 'title' => 'MailChimp', @@ -125,18 +121,45 @@ if ( ! class_exists( 'um\core\Plugin_Updater' ) ) { ), ); - $the_plugs = get_option( 'active_plugins' ); $active_um_plugins = array(); - foreach ( $the_plugs as $key => $value ) { + if ( is_multisite() ) { + // Per site activated + $sites = get_sites(); - if ( in_array( $value, array_keys( $paid_extensions ) ) ) { - $license = UM()->options()->get( "um_{$paid_extensions[ $value ]['key']}_license_key" ); + foreach ( $sites as $site ) { + switch_to_blog( $site->blog_id ); - if ( empty( $license ) ) - continue; + $the_plugs = get_option( 'active_plugins' ); + foreach ( $the_plugs as $key => $value ) { - $active_um_plugins[ $value ] = $paid_extensions[ $value ]; - $active_um_plugins[ $value ]['license'] = $license; + if ( in_array( $value, array_keys( $paid_extensions ) ) ) { + $license = UM()->options()->get( "um_{$paid_extensions[ $value ]['key']}_license_key" ); + + if ( empty( $license ) ) { + continue; + } + + $active_um_plugins[ $value ] = $paid_extensions[ $value ]; + $active_um_plugins[ $value ]['license'] = $license; + } + } + + restore_current_blog(); + } + + } else { + $the_plugs = get_option( 'active_plugins' ); + foreach ( $the_plugs as $key => $value ) { + + if ( in_array( $value, array_keys( $paid_extensions ) ) ) { + $license = UM()->options()->get( "um_{$paid_extensions[ $value ]['key']}_license_key" ); + + if ( empty( $license ) ) + continue; + + $active_um_plugins[ $value ] = $paid_extensions[ $value ]; + $active_um_plugins[ $value ]['license'] = $license; + } } } diff --git a/includes/core/um-actions-login.php b/includes/core/um-actions-login.php index 1bfe11ca..5e6ec0d1 100644 --- a/includes/core/um-actions-login.php +++ b/includes/core/um-actions-login.php @@ -1,6 +1,4 @@ -form()->count_errors() > 0 ) { $errors = UM()->form()->errors; // hook for other plugins to display error @@ -340,9 +336,10 @@ add_action( 'um_submit_form_login', 'um_submit_form_login', 10 ); */ function um_add_submit_button_to_login( $args ) { // DO NOT add when reviewing user's details - if ( UM()->user()->preview == true && is_admin() ) return; + if ( UM()->user()->preview == true && is_admin() ) { + return; + } - $primary_btn_word = $args['primary_btn_word']; /** * UM hook * @@ -365,9 +362,8 @@ function um_add_submit_button_to_login( $args ) { * } * ?> */ - $primary_btn_word = apply_filters('um_login_form_button_one', $primary_btn_word, $args ); + $primary_btn_word = apply_filters('um_login_form_button_one', $args['primary_btn_word'], $args ); - $secondary_btn_word = $args['secondary_btn_word']; /** * UM hook * @@ -390,7 +386,7 @@ function um_add_submit_button_to_login( $args ) { * } * ?> */ - $secondary_btn_word = apply_filters('um_login_form_button_two', $secondary_btn_word, $args ); + $secondary_btn_word = apply_filters('um_login_form_button_two', $args['secondary_btn_word'], $args ); $secondary_btn_url = ( isset( $args['secondary_btn_url'] ) && $args['secondary_btn_url'] ) ? $args['secondary_btn_url'] : um_get_core_page('register'); /** @@ -420,18 +416,26 @@ function um_add_submit_button_to_login( $args ) {