diff --git a/wp b/wp new file mode 160000 index 0000000..3b3ff6e --- /dev/null +++ b/wp @@ -0,0 +1 @@ +Subproject commit 3b3ff6eeecb48f064b11fb01e65decbd57693645 diff --git a/wp-admin/authorize-application.php b/wp-admin/authorize-application.php index 8d931f4..a5c0e02 100644 --- a/wp-admin/authorize-application.php +++ b/wp-admin/authorize-application.php @@ -91,7 +91,7 @@ if ( wp_is_site_protected_by_basic_auth( 'front' ) ) { wp_die( - __( 'Your website appears to use Basic Authentication, which is not currently compatible with application passwords.' ), + __( 'Your website appears to use Basic Authentication, which is not currently compatible with application passwords!!.' ), __( 'Cannot Authorize Application' ), array( 'response' => 501, @@ -320,7 +320,7 @@ '' . esc_html( $reject_url ) . '' ); } else { - _e( 'You will be returned to the WordPress Dashboard, and no changes will be made.' ); + _e( 'You will be returned to the WordPress Dashboard, and no changes will be made!!!!!.' ); } ?>

diff --git a/wp-admin/edit-comments.php b/wp-admin/edit-comments.php index 262e2d9..d50f32b 100644 --- a/wp-admin/edit-comments.php +++ b/wp-admin/edit-comments.php @@ -10,7 +10,7 @@ require_once __DIR__ . '/admin.php'; if ( ! current_user_can( 'edit_posts' ) ) { wp_die( - '

' . __( 'You need a higher level of permission.' ) . '

' . + '

' . __( 'You need a higher level of permission你需要更高的权限才可以!!.' ) . '

' . '

' . __( 'Sorry, you are not allowed to edit comments.' ) . '

', 403 ); @@ -393,7 +393,7 @@ if ( $comment ) { switch ( $comment->comment_approved ) { case '1': - $messages[] = __( 'This comment is already approved.' ) . sprintf( + $messages[] = __( 'This comment is already approved!!!!!.' ) . sprintf( ' %2$s', esc_url( admin_url( "comment.php?action=editcomment&c=$same" ) ), __( 'Edit comment' ) diff --git a/wp-admin/edit-form-comment.php b/wp-admin/edit-form-comment.php index 134c8bb..015ea6e 100644 --- a/wp-admin/edit-form-comment.php +++ b/wp-admin/edit-form-comment.php @@ -71,6 +71,15 @@ + + + + + + + + + diff --git a/wp-admin/edit.php b/wp-admin/edit.php index 6e4a05e..3823568 100644 --- a/wp-admin/edit.php +++ b/wp-admin/edit.php @@ -74,7 +74,8 @@ $doaction = $wp_list_table->current_action(); if ( $doaction ) { - check_admin_referer( 'bulk-posts' ); + //notes 20250526 + check_admin_referer( 'bulk-posts' );//出于防御csrf攻击的目的,wordpress引入了nonce安全机制,只有请求中_wpnonce和预期相等,请求才会被处理。 $sendback = remove_query_arg( array( 'trashed', 'untrashed', 'deleted', 'locked', 'ids' ), wp_get_referer() ); if ( ! $sendback ) { diff --git a/wp-admin/includes/ajax-actions.php b/wp-admin/includes/ajax-actions.php index 30aab70..0985e9c 100644 --- a/wp-admin/includes/ajax-actions.php +++ b/wp-admin/includes/ajax-actions.php @@ -1374,6 +1374,8 @@ function wp_ajax_replyto_comment( $action ) { 'comment_author', 'comment_author_email', 'comment_author_url', + //新規入力tel + 'comment_author_tel', 'comment_content', 'comment_type', 'comment_parent', diff --git a/wp-admin/includes/comment.php b/wp-admin/includes/comment.php index ffec90c..86d78f7 100644 --- a/wp-admin/includes/comment.php +++ b/wp-admin/includes/comment.php @@ -64,6 +64,11 @@ function edit_comment() { if ( isset( $_POST['newcomment_author_url'] ) ) { $_POST['comment_author_url'] = $_POST['newcomment_author_url']; } + //tel + if ( isset( $_POST['newcomment_author_tel'] ) ) { + $_POST['comment_author_tel'] = $_POST['newcomment_author_tel']; + } + //tel if ( isset( $_POST['comment_status'] ) ) { $_POST['comment_approved'] = $_POST['comment_status']; } diff --git a/wp-admin/includes/export.php b/wp-admin/includes/export.php index d05f98f..1be133b 100644 --- a/wp-admin/includes/export.php +++ b/wp-admin/includes/export.php @@ -686,6 +686,9 @@ function wxr_filter_postmeta( $return_me, $meta_key ) { comment_author ); ?> comment_author_email ); ?> comment_author_url ); ?> + //新規入力tel + comment_author_tel ); ?> + //新規入力tel comment_author_IP ); ?> comment_date ); ?> comment_date_gmt ); ?> diff --git a/wp-admin/includes/schema.php b/wp-admin/includes/schema.php index 63655cc..8e43469 100644 --- a/wp-admin/includes/schema.php +++ b/wp-admin/includes/schema.php @@ -104,9 +104,14 @@ function wp_get_db_schema( $scope = 'all', $blog_id = null ) { comment_author tinytext NOT NULL, comment_author_email varchar(100) NOT NULL default '', comment_author_url varchar(200) NOT NULL default '', + comment_author_tel int(11) NOT NULL default '', /* tel新規DBで入力*/ comment_author_IP varchar(100) NOT NULL default '', + /* default delete comment_date datetime NOT NULL default '0000-00-00 00:00:00', comment_date_gmt datetime NOT NULL default '0000-00-00 00:00:00', + */ + comment_date datetime NOT NULL default '', + comment_date_gmt datetime NOT NULL default '', comment_content text NOT NULL, comment_karma int(11) NOT NULL default '0', comment_approved varchar(20) NOT NULL default '1', diff --git a/wp-admin/options-general.php b/wp-admin/options-general.php index 28aa16c..903b4cf 100644 --- a/wp-admin/options-general.php +++ b/wp-admin/options-general.php @@ -226,6 +226,11 @@ class="" class="regular-text code" /> + + +" /> + + class="regular-text code" /> diff --git a/wp-comments-post.php b/wp-comments-post.php index 6042ac1..1ac6fb1 100644 --- a/wp-comments-post.php +++ b/wp-comments-post.php @@ -9,6 +9,7 @@ $protocol = $_SERVER['SERVER_PROTOCOL']; if ( ! in_array( $protocol, array( 'HTTP/1.1', 'HTTP/2', 'HTTP/2.0', 'HTTP/3' ), true ) ) { $protocol = 'HTTP/1.0'; + } header( 'Allow: POST' ); @@ -45,7 +46,7 @@ /** * Fires after comment cookies are set. * - * @since 3.4.0 + * @since 3.4.0WordPress Address * @since 4.9.6 The `$cookies_consent` parameter was added. * * @param WP_Comment $comment Comment object. diff --git a/wp-config.php b/wp-config.php index e347e9c..8639120 100644 --- a/wp-config.php +++ b/wp-config.php @@ -20,7 +20,7 @@ // ** Database settings - You can get this info from your web host ** // /** The name of the database for WordPress */ -define( 'DB_NAME', 'wd-php' ); +define( 'DB_NAME', 'nothing' ); //0517 /** Database username */ define( 'DB_USER', 'root' ); diff --git a/wp-content/plugins/akismet/class.akismet-admin.php b/wp-content/plugins/akismet/class.akismet-admin.php index dd39104..87b5862 100644 --- a/wp-content/plugins/akismet/class.akismet-admin.php +++ b/wp-content/plugins/akismet/class.akismet-admin.php @@ -584,7 +584,7 @@ public static function comment_row_action( $a, $comment ) { $show_user_comments = $show_user_comments === 'false' ? false : $show_user_comments; //option used to be saved as 'false' / 'true' if ( $show_user_comments ) { - $comment_count = Akismet::get_user_comments_approved( $comment->user_id, $comment->comment_author_email, $comment->comment_author, $comment->comment_author_url ); + $comment_count = Akismet::get_user_comments_approved( $comment->user_id, $comment->comment_author_email, $comment->comment_author, $comment->comment_author_url , $comment->comment_author_tel); $comment_count = intval( $comment_count ); echo ''; } diff --git a/wp-content/plugins/loginpress/classes/class-loginpress-addons-meta.php b/wp-content/plugins/loginpress/classes/class-loginpress-addons-meta.php new file mode 100644 index 0000000..60a4b25 --- /dev/null +++ b/wp-content/plugins/loginpress/classes/class-loginpress-addons-meta.php @@ -0,0 +1,153 @@ +addons_options_array(); + } + + /** + * The addons options array. + * + * @since 3.0.5 + */ + public static function addons_options_array() { + + $addons_array = array( + 'login-logout-menu' => array( + 'title' => __( 'Login Logout Menu', 'loginpress' ), + 'short_desc' => __( 'Login Logout Menu Section', 'loginpress' ), + 'slug' => 'login-logout-menu', + 'is_free' => true, + 'is_active' => false, + ), + 'auto-login' => array( + 'title' => __( 'Auto Login', 'loginpress' ), + 'short_desc' => __( 'No More Manual Login', 'loginpress' ), + 'slug' => 'auto-login', + 'is_free' => false, + 'is_active' => false, + ), + 'login-redirects' => array( + 'title' => __( 'Login Redirects', 'loginpress' ), + 'short_desc' => __( 'Automatically redirects the login', 'loginpress' ), + 'slug' => 'login-redirects', + 'is_free' => false, + 'is_active' => false, + ), + 'limit-login-attempts' => array( + 'title' => __( 'Limit Login Attempts', 'loginpress' ), + 'short_desc' => __( 'Limits for login attempts', 'loginpress' ), + 'slug' => 'limit-login-attempts', + 'is_free' => false, + 'is_active' => false, + ), + 'hide-login' => array( + 'title' => __( 'Hide Login', 'loginpress' ), + 'short_desc' => __( 'Hide your login page', 'loginpress' ), + 'slug' => 'hide-login', + 'is_free' => false, + 'is_active' => false, + ), + 'social-login' => array( + 'title' => __( 'Social Login', 'loginpress' ), + 'short_desc' => __( 'Third Party login access', 'loginpress' ), + 'slug' => 'social-login', + 'is_free' => false, + 'is_active' => false, + ), + 'login-widget' => array( + 'title' => __( 'Login Widget', 'loginpress' ), + 'short_desc' => __( 'Creates a login widget', 'loginpress' ), + 'slug' => 'login-widget', + 'is_free' => false, + 'is_active' => false, + ), + // 'protect-content' => array( + // 'title' => __( 'Protect Content', 'loginpress' ), + // 'short_desc' => __( 'Protected Contents', 'loginpress' ), + // 'slug' => 'protect-content', + // 'is_free' => false, + // 'is_active' => false, + // ), + // 'custom-fields' => array( + // 'title' => __( 'Custom Registration Fields', 'loginpress' ), + // 'short_desc' => __( 'Custom Registration Fields', 'loginpress' ), + // 'slug' => 'custom-fields', + // 'is_free' => false, + // 'is_active' => false, + // ), + ); + + if ( ! get_option( 'loginpress_pro_addons' ) ) { + add_option( 'loginpress_pro_addons', $addons_array ); + } + + if ( sizeof( $addons_array ) != sizeof( get_option( 'loginpress_pro_addons' ) ) ) { + update_option( 'loginpress_pro_addons', $addons_array ); + } + } + + /** + * The addon details. + * + * @since 3.0.5 + * @return void + */ + public static function addons_details() { + + $addons_details_array = array( + 'login-logout-menu' => array( + 'title' => 'Login Logout Menu', + 'excerpt' => __( 'Login Logout Menu is a handy plugin which allows you to add login, logout, register and profile menu items in your selected menu.', 'loginpress' ), + ), + 'login-redirects' => array( + 'title' => 'Login Redirects', + 'excerpt' => __( 'Redirects users based on their roles. This is helpful, If you have an editor and want to redirect him to his editor stats page. Restrict your subscribers, guests or even customers to certain pages instead of wp-admin. This add-on has a cool UX/UI to manage all the login redirects you have created on your site.', 'loginpress' ), + ), + 'social-login' => array( + 'title' => 'Social Login', + 'excerpt' => __( 'Social login from LoginPress is an add-on which provides facility your users to log in and Register via Facebook, Google, and Twitter. This add-on will eliminate the Spam and Bot registrations. This add-on will help your users to hassle-free registrations/logins on your site.', 'loginpress' ), + ), + 'login-widget' => array( + 'title' => 'Login Widget', + 'excerpt' => __( 'This LoginPress add-on is a widget you can use into your blog sidebar. It uses an Ajax way to login via the sidebar. You may need to know HTML/CSS to give it style according to your site even we have styled it in general.', 'loginpress' ), + ), + 'limit-login-attempts' => array( + 'title' => 'Limit Login Attempts', + 'excerpt' => __( 'Everybody needs a control of their Login page. This will help you to track your login attempts by each user. You can limit the login attempts for each user. Brute force attacks are the most common way to gain access to your website. This add-on acts as a sheild to these hacking attacks and gives you control to set the time between each login attempts.', 'loginpress' ), + ), + 'auto-login' => array( + 'title' => 'Auto Login', + 'excerpt' => __( 'This LoginPress add-on lets you (Administrator) generates a unique URL for your certain users who you dont want to provide a password to login to your site. This Pro add-on gives you a list of all the users who you have given auto-generated login links. You can disable someones access and delete certain users.', 'loginpress' ), + ), + 'hide-login' => array( + 'title' => 'Hide Login', + 'excerpt' => __( 'This LoginPress add-on lets you change the login page URL to anything you want. It will give a hard time to spammers who keep hitting to your login page. This is helpful for Brute force attacks. One caution to use this add-on is you need to remember the custom login url after you change it. We have an option to email your custom login url so you remember it.', 'loginpress' ), + ), + // 'protect-content' => array( + // 'title' => 'Protect Content', + // 'excerpt' => __( 'Protect Content add-on allows you to protect your page/post/CPT specific content.', 'loginpress' ), + // ), + // 'custom-fields' => array( + // 'title' => 'Custom Registration Fields', + // 'excerpt' => __( 'This addon lets you create custom fields like text,radio button, checkboxes even an image.', 'loginpress' ), + // ), + ); + return $addons_details_array; + } + } // Enf of Class. + +endif; +new LoginPress_Addons_Meta(); diff --git a/wp-content/plugins/loginpress/classes/class-loginpress-addons.php b/wp-content/plugins/loginpress/classes/class-loginpress-addons.php new file mode 100644 index 0000000..dc1b77f --- /dev/null +++ b/wp-content/plugins/loginpress/classes/class-loginpress-addons.php @@ -0,0 +1,911 @@ +includes(); + $this->addons_array_construct(); + $this->plugins_list = get_plugins(); + $this->addons_array = get_option( 'loginpress_pro_addons' ); + } + + private function includes() { + require_once LOGINPRESS_DIR_PATH . 'classes/class-loginpress-addons-meta.php'; + } + + /** + * Construct addons array. + * + * @since 3.0.5 + */ + public function addons_array_construct() { + + // Don't uncomment this bleow unless you know what you are doing. + // delete_option( 'loginpress_pro_addons' ); + + $this->addons_array = get_option( 'loginpress_pro_addons' ); + $this->addons_meta = LoginPress_Addons_Meta::addons_details(); + } + + /** + * Render addons page. + * + * @since 1.0.19 + * @version 3.0.5 + * @return void HTML + */ + public function show_addon_page() { + + if ( class_exists( 'LoginPress_Pro' ) ) { + + if ( LoginPress_Pro::is_activated() ) { + + $expiration_date = LoginPress_Pro::get_expiration_date(); + + if ( 'lifetime' == $expiration_date ) { + echo esc_html__( 'You have a lifetime license, it will never expire.', 'loginpress' ); + } else { + echo '
' . sprintf( + esc_html__( 'Your (%2$s) license key is valid until %1$s.', 'loginpress' ), + '' . date_i18n( get_option( 'date_format' ), strtotime( $expiration_date, current_time( 'timestamp' ) ) ) . '', + LoginPress_Pro::get_license_type() + ) . '
'; + } ?> + +
+ addons_array ) && ! empty( $this->addons_array ) ) { + foreach ( $this->addons_array as $addon ) { + $this->addon_card( $addon ); + } + } + ?> +
+ ' . sprintf( esc_html__( 'Your license key has been expired on %1$s.', 'loginpress' ), date_i18n( get_option( 'date_format' ), strtotime( $expiration_date, current_time( 'timestamp' ) ) ) ) . ''; + } else { + echo '
' . sprintf( esc_html__( 'You need to activate your license to use the following add-ons.', 'loginpress' ) ) . '
'; + + } + + ?> +
+ addons_array ) && ! empty( $this->addons_array ) ) { + foreach ( $this->addons_array as $addon ) { + $this->addon_card_free( $addon ); + } + } + ?> +
+ ' . sprintf( esc_html__( 'You need to upgrade to LoginPress Pro to access these add-ons.', 'loginpress' ) ) . ''; + ?> + +
+ addons_array ) && ! empty( $this->addons_array ) ) { + foreach ( $this->addons_array as $addon ) { + $this->addon_card_free( $addon ); + } + } + ?> +
+ + + +
+ +

+ class="logoinpress_addons_thumbnails"/> + addons_meta[ $addon_slug ]['title'] ); ?> +

+
+ ' . $this->addons_meta[ $addon_slug ]['excerpt'] . '

'; ?> +

check_addon_status( $addon ); ?>

+

ajax_responce( $this->addons_meta[ $addon_slug ]['title'], $addon['slug'] ); ?>

+
+ license_life( $slug ) ) { + $message = __( $text . ' Something Wrong.', 'loginpress' ); + } else { + $message = __( 'Your License Key isn\'t valid', 'loginpress' ); + } + + $html = ''; + $html .= ''; + $html .= ''; + $html .= ''; + $html .= ''; + + return $html; + } + + /** + * Render free addons cards. + * + * @param array $addon + * @since 1.0.19 + * @version 3.0.5 + * @return void HTML + */ + function addon_card_free( $addon ) { + $addon_slug = $addon['slug']; + $addon_thumb = LOGINPRESS_DIR_URL . 'img/addons/' . $addon_slug . '.png'; + ?> + +
+ +

+ class="logoinpress_addons_thumbnails"/> + addons_meta[ $addon_slug ]['title'] ); ?> +

+
+ ' . $this->addons_meta[ $addon_slug ]['excerpt'] . '

'; + $this->check_free_addon_status( $addon ); + echo $this->ajax_responce( $this->addons_meta[ $addon_slug ]['title'], $addon['slug'] ); + ?> +
+ 20 ) ); + + if ( ! is_wp_error( $response ) ) { + + // Decode the data that we got. + $data = json_decode( wp_remote_retrieve_body( $response ) ); + + if ( ! empty( $data ) && is_array( $data ) ) { + + // Store the data for a week. + set_transient( 'loginpress_api_addons', $data, 7 * DAY_IN_SECONDS ); + + return $data; + } + } + + return false; + } + + /** + * Convert the slug into an array + * + * @param object $categories + * @since 3.0.5 + * @return array $arr + */ + function convert_to_array( $categories ) { + + $arr = array(); + foreach ( $categories as $category ) { + $arr[] = $category->slug; + } + return $arr; + } + + /** + * Check the life of the license, Is it legal or not. + * + * @param string $slug slug of the addon + * @since 3.0.5 + * @return boolean + */ + public function license_life( $slug ) { + + $response = $this->_get_addons(); + if ( is_array( $response ) ) { + foreach ( $response as $key => $value ) { + + if ( 'loginpress-' . $slug == $value->slug ) { + return $this->is_addon_licensed( $this->convert_to_array( $value->categories ) ); + } + } + } + return false; + } + + /** + * Check addon status. + * + * @since 1.0.19 + * @version 3.0.5 + * + * @return void HTML + */ + public function check_addon_status( $addon ) { + $slug = $addon['slug']; + + if ( $addon['is_free'] ) { + $this->check_free_addon_status( $addon ); + } elseif ( $this->license_life( $slug ) ) { + if ( true === $addon['is_active'] ) { + ?> + + + + + + + + + + + + + + + +

+ + + + + + + + plugins_list ) ) { ?> + + + + + + + + + + + + + + +

+ + + + +
+

+
+ show_addon_page(); ?> +
+
+ false, + 'import' => false, + 'help' => false, + 'deactivate' => false, + 'optout_yes' => false, + 'presets' => false, + 'video_url' => false, + 'youtube_video_url' => false, + 'activate_addon' => false, + 'deactivate_addon' => false, + ); + + foreach ( $ajax_calls as $ajax_call => $no_priv ) { + + add_action( 'wp_ajax_loginpress_' . $ajax_call, array( $this, $ajax_call ) ); + + if ( $no_priv ) { + add_action( 'wp_ajax_nopriv_loginpress_' . $ajax_call, array( $this, $ajax_call ) ); + } + } + } + + /** + * Activate Plugins. + * + * @since 1.2.2 + * @version 3.0.6 + */ + function activate_addon() { + + $plugin_slug = sanitize_text_field( $_POST['slug'] ); + + check_ajax_referer( 'install-plugin_' . $plugin_slug, '_wpnonce' ); + + if ( ! current_user_can( 'manage_options' ) ) { + wp_die( 'No cheating, huh!' ); + } + if ( defined( 'LOGINPRESS_PRO_VERSION' ) && version_compare( LOGINPRESS_PRO_VERSION, '3.0.0', '>=' ) ) { + $addons = get_option( 'loginpress_pro_addons' ); + + if ( $addons ) { + + foreach ( $addons as $addon ) { + if ( $plugin_slug == $addon['slug'] ) { + + if ( true == $addon['is_free'] ) { + activate_plugins( $addon['slug'] . '/' . $addon['slug'] . '.php' ); + + echo wp_create_nonce( 'uninstall_' . $plugin_slug ); + } + + $addons[ $plugin_slug ]['is_active'] = true; + break; + } + } + if ( class_exists( 'LoginPress_Pro' ) && $plugin_slug !== 'login-logout-menu' ) { + if ( LoginPress_Pro::addon_wrapper( $plugin_slug ) ) { + + update_option( 'loginpress_pro_addons', $addons ); + do_action( 'loginpress_pro_addon_activation', $plugin_slug ); + echo wp_create_nonce( 'uninstall_' . $plugin_slug ); + + } else { + echo 'erroneous'; + } + } + } else { + echo 'erroneous'; + } + } else { + $free_slug = 'login-logout-menu' == $plugin_slug ? $plugin_slug . '/' . $plugin_slug . '.php' : $plugin_slug; + if ( ! is_plugin_active( $free_slug ) ) { + activate_plugins( $free_slug ); + } + + echo wp_create_nonce( 'uninstall_' . $plugin_slug ); + } + wp_die(); + } + + /** + * Deactivate Plugins. + * + * @since 1.2.2 + * @version 3.0.0 + */ + function deactivate_addon() { + + $plugin_slug = esc_html( $_POST['slug'] ); + + check_ajax_referer( 'uninstall_' . $plugin_slug, '_wpnonce' ); + + if ( ! current_user_can( 'manage_options' ) ) { + wp_die( 'No cheating, huh!' ); + } + if ( defined('LOGINPRESS_PRO_VERSION') && version_compare( LOGINPRESS_PRO_VERSION, '3.0.0', '>=' ) ) { + + $addons = get_option( 'loginpress_pro_addons' ); + + if ( $addons ) { + + foreach ( $addons as $addon ) { + if ( $plugin_slug === $addon['slug'] ) { + + if ( true == $addon['is_free'] ) { + deactivate_plugins( $addon['slug'] . '/' . $addon['slug'] . '.php' ); + } + + $addons[ $plugin_slug ]['is_active'] = false; + + break; + } + } + + update_option( 'loginpress_pro_addons', $addons ); + } + + echo wp_create_nonce( 'install-plugin_' . $plugin_slug ); + } else { + $free_slug = 'login-logout-menu' === $plugin_slug ? $plugin_slug . '/' . $plugin_slug . '.php' : $plugin_slug; + + deactivate_plugins( $free_slug ); + + echo wp_create_nonce( 'install-plugin_' . $free_slug ); + } + wp_die(); + } + + /** + * Import LoginPress Settings, update loginPress settings meta. + * + * @since 1.0.19 + * @version 3.0.0 + */ + public function import() { + + check_ajax_referer( 'loginpress-import-nonce', 'security' ); + + if ( ! current_user_can( 'manage_options' ) ) { + wp_die( 'No cheating, huh!' ); + } + + $lg_imp_tmp_name = $_FILES['file']['tmp_name']; + $lg_file_content = file_get_contents( $lg_imp_tmp_name ); + $loginpress_json = json_decode( $lg_file_content, true ); + + if ( json_last_error() == JSON_ERROR_NONE ) { + + foreach ( $loginpress_json as $object => $array ) { + + // Check for LoginPress customizer images. + if ( 'loginpress_customization' == $object ) { + + update_option( $object, $array ); + + foreach ( $array as $key => $value ) { + + // Array of loginpress customizer images. + $imagesCheck = array( 'setting_logo', 'setting_background', 'setting_form_background', 'forget_form_background', 'gallery_background' ); + + /** + * [if json fetched data has array of $imagesCheck] + * + * @var [array] + */ + if ( in_array( $key, $imagesCheck ) ) { + + global $wpdb; + // Count the $value of that $key from {$wpdb->posts}. + // $query = "SELECT COUNT(*) FROM {$wpdb->posts} WHERE guid='$value'"; + $count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM {$wpdb->posts} WHERE guid='%s'", $value ) ); + + if ( $count < 1 && ! empty( $value ) ) { + $file = array(); + $file['name'] = basename( $value ); + $file['tmp_name'] = download_url( $value ); // Downloads a url to a local temporary file. + + if ( is_wp_error( $file['tmp_name'] ) ) { + @unlink( $file['tmp_name'] ); + // return new WP_Error( 'lpimgurl', 'Could not download image from remote source' ); + } else { + $id = media_handle_sideload( $file, 0 ); // Handles a sideloaded file. + $src = wp_get_attachment_url( $id ); // Returns a full URI for an attachment file. + $loginpress_options = get_option( 'loginpress_customization' ); // Get option that was updated previously. + + // Change the options array properly. + $loginpress_options[ "$key" ] = $src; + + // Update entire array again for save the attachment w.r.t $key. + update_option( $object, $loginpress_options ); + } + } // media_upload. + } // images chaeck. + } // inner foreach. + } // loginpress_customization check. + + if ( 'loginpress_setting' == $object ) { + + $loginpress_options = get_option( 'loginpress_setting' ); + // Check $loginpress_options is exists. + if ( isset( $loginpress_options ) && ! empty( $loginpress_options ) ) { + + foreach ( $array as $key => $value ) { + + // Array of loginpress Settings that doesn't import. + $setting_array = array( 'captcha_enable', 'captcha_language', 'captcha_theme', 'recaptcha_type', 'secret_key', 'secret_key_v2_invisible', 'secret_key_v3', 'site_key', 'site_key_v2_invisible', 'site_key_v3', 'good_score', 'enable_repatcha' ); + + if ( ! in_array( $key, $setting_array ) ) { + + // Change the options array properly. + $loginpress_options[ "$key" ] = $value; + // Update array w.r.t $key exists. + update_option( $object, $loginpress_options ); + } + } // inner foreach. + } else { + + update_option( $object, $array ); + } + } // loginpress_setting check. + + if ( 'customize_presets_settings' == $object ) { + + update_option( 'customize_presets_settings', $array ); + + } + } // endforeach. + } else { + echo 'error'; + } + wp_die(); + } + + /** + * Export LoginPress Settings + * + * @since 1.0.19 + * @version 3.0.0 + * @return json $loginpress_db settings of the loginPress in json format. + */ + public function export() { + + check_ajax_referer( 'loginpress-export-nonce', 'security' ); + + if ( ! current_user_can( 'manage_options' ) ) { + wp_die( 'No cheating, huh!' ); + } + + $loginpress_db = array(); + $loginpress_setting_opt = array(); + $loginpress_customization = get_option( 'loginpress_customization' ); + $loginpress_setting = get_option( 'loginpress_setting' ); + $loginpress_preset = get_option( 'customize_presets_settings' ); + $loginpress_setting_fetch = array( 'captcha_enable', 'captcha_language', 'captcha_theme', 'recaptcha_type', 'secret_key', 'secret_key_v2_invisible', 'secret_key_v3', 'site_key', 'site_key_v2_invisible', 'site_key_v3', 'good_score', 'enable_repatcha' ); + + if ( $loginpress_customization ) { + + $loginpress_db['loginpress_customization'] = $loginpress_customization; + } + if ( $loginpress_setting ) { + + foreach ( $loginpress_setting as $key => $value ) { + if ( ! in_array( $key, $loginpress_setting_fetch ) ) { + $loginpress_setting_opt[ $key ] = $value; + } + } + + $loginpress_db['loginpress_setting'] = $loginpress_setting_opt; + } + + if ( $loginpress_preset ) { + + $loginpress_db['customize_presets_settings'] = $loginpress_preset; + } + + $loginpress_db = json_encode( $loginpress_db ); + + echo $loginpress_db; + + wp_die(); + } + + /** + * Download the log file from Help page. + * + * @since 1.0.19 + * @version 3.0.0 + * @return string + */ + public function help() { + + check_ajax_referer( 'loginpress-log-nonce', 'security' ); + + if ( ! current_user_can( 'manage_options' ) ) { + wp_die( 'No cheating, huh!' ); + } + + include LOGINPRESS_DIR_PATH . 'classes/class-loginpress-log.php'; + + echo LoginPress_Log_Info::get_sysinfo(); + + wp_die(); + } + + /** + * Get response from user on plugin deactivation. + * + * @since 1.0.15 + * @version 3.0.0 + * @return response + */ + public function deactivate() { + + check_ajax_referer( 'loginpress-deactivate-nonce', 'security' ); + + if ( ! current_user_can( 'manage_options' ) ) { + wp_die( 'No cheating, huh!' ); + } + + $email = get_option( 'admin_email' ); + $_reason = sanitize_text_field( wp_unslash( $_POST['reason'] ) ); + $reason_detail = sanitize_text_field( wp_unslash( $_POST['reason_detail'] ) ); + $reason = ''; + + if ( $_reason == '1' ) { + $reason = 'I only needed the plugin for a short period'; + } elseif ( $_reason == '2' ) { + $reason = 'I found a better plugin'; + } elseif ( $_reason == '3' ) { + $reason = 'The plugin broke my site'; + } elseif ( $_reason == '4' ) { + $reason = 'The plugin suddenly stopped working'; + } elseif ( $_reason == '5' ) { + $reason = 'I no longer need the plugin'; + } elseif ( $_reason == '6' ) { + $reason = 'It\'s a temporary deactivation. I\'m just debugging an issue.'; + } elseif ( $_reason == '7' ) { + $reason = 'Other'; + } + $fields = array( + 'email' => $email, + 'website' => get_site_url(), + 'action' => 'Deactivate', + 'reason' => $reason, + 'reason_detail' => $reason_detail, + 'blog_language' => get_bloginfo( 'language' ), + 'wordpress_version' => get_bloginfo( 'version' ), + 'php_version' => PHP_VERSION, + 'plugin_version' => LOGINPRESS_VERSION, + 'plugin_name' => 'LoginPress Free', + ); + + $response = wp_remote_post( + LOGINPRESS_FEEDBACK_SERVER, + array( + 'method' => 'POST', + 'timeout' => 5, + 'httpversion' => '1.0', + 'blocking' => false, + 'headers' => array(), + 'body' => $fields, + ) + ); + + wp_die(); + } + + /** + * Opt-out + * + * @since 1.0.15 + * @version 3.0.0 + */ + function optout_yes() { + + check_ajax_referer( 'loginpress-optout-nonce', 'security' ); + + if ( ! current_user_can( 'manage_options' ) ) { + wp_die( 'No cheating, huh!' ); + } + + update_option( '_loginpress_optin', 'no' ); + wp_die(); + } + + static function presets() { + + check_ajax_referer( 'loginpress-preset-nonce', 'security' ); + + if ( ! current_user_can( 'manage_options' ) ) { + wp_die( 'No cheating, huh!' ); + } + + $selected_preset = get_option( 'customize_presets_settings', true ); + + if ( $selected_preset == 'default1' ) { + include_once LOGINPRESS_ROOT_PATH . 'css/themes/default-1.php'; + echo first_presets(); + } elseif ( $selected_preset == 'minimalist' ) { + include_once LOGINPRESS_ROOT_PATH . 'css/themes/free-minimalist.php'; + echo free_minimalist_presets(); + } else { + do_action( 'loginpress_add_pro_theme', $selected_preset ); + } + wp_die(); + } + + /** + * video_url + * + * @since 1.1.22 + * @version 3.0.0 + * @return string attachment URL. + */ + static function video_url() { + + check_ajax_referer( 'loginpress-attachment-nonce', 'security' ); + + if ( ! current_user_can( 'manage_options' ) ) { + wp_die( 'No cheating, huh!' ); + } + + echo wp_get_attachment_url( (int) $_POST['src'] ); + + wp_die(); + } + /** + * YouTube Video URL. + * + * @return void + */ + static function youtube_video_url() { + check_ajax_referer( 'loginpress-attachment-nonce', 'security' ); + + if ( ! current_user_can( 'manage_options' ) ) { + wp_die( 'No cheating, huh!' ); + } + $video_id = sanitize_text_field( $_POST['src'] ); + $url = 'https://img.youtube.com/vi/' . $video_id . '/maxresdefault.jpg'; + $response = wp_remote_get( $url ); + if ( 200 === $response['response']['code'] ) { + echo $video_id; + } else { + echo '0'; + } + wp_die(); + } + } + +endif; +new LoginPress_AJAX(); diff --git a/wp-content/plugins/loginpress/classes/class-loginpress-custom-password.php b/wp-content/plugins/loginpress/classes/class-loginpress-custom-password.php new file mode 100644 index 0000000..cc11854 --- /dev/null +++ b/wp-content/plugins/loginpress/classes/class-loginpress-custom-password.php @@ -0,0 +1,150 @@ +loginpress_key = get_option( 'loginpress_customization' ); + $this->_hooks(); + } + + public function _hooks() { + + add_action( 'register_form', array( $this, 'loginpress_reg_password_fields' ) ); + add_filter( 'random_password', array( $this, 'loginpress_set_password' ) ); + add_action( 'register_new_user', array( $this, 'loginpress_default_password_nag' ) ); + add_filter( 'registration_errors', array( $this, 'loginpress_reg_pass_errors' ), 10, 3 ); + add_filter( 'wp_new_user_notification_email', array( $this, 'loginpress_new_user_email_notification' ) ); + } + + /** + * Custom Password Fields on Registration Form. + * + * @since 1.0.22 + * @access public + * @return string html. + */ + public function loginpress_reg_password_fields() { + ?> +

+ +

+ +
+ + +
+ +

+ +

+ +
+ + +
+ add( 'empty_password', sprintf( __( '%1$sError:%2$s Please enter your password twice.', 'loginpress' ), '', '' ) ); + + // Ensure passwords are matched. + } elseif ( $_POST['loginpress-reg-pass'] != $_POST['loginpress-reg-pass-2'] ) { + + //if passwords are not matched then set default passwords don't match message or show customized message + $password_mismatch = array_key_exists( 'password_mismatch', $this->loginpress_key ) && ! empty( $this->loginpress_key['password_mismatch'] ) ? $this->loginpress_key['password_mismatch'] : sprintf( __( '%1$sError:%2$s Passwords don\'t match.', 'loginpress' ), '', '' ); + + //Show error message of passwords don't match message + $errors->add( 'password_mismatch', __( $password_mismatch, 'loginpress' ) ); + + // Password Set? assign password to a user_pass + } else { + $_POST['user_pass'] = sanitize_text_field( $_POST['loginpress-reg-pass'] ); + } + + return $errors; + } + + /** + * Let's set the user password. + * + * @param string $password Auto-generated password passed in from filter. + * @since 1.0.22 + * @version 3.0.0 + * @return string Password Choose by User. + */ + public function loginpress_set_password( $password ) { + + // Make sure password field isn't empty. + if ( isset( $_POST['user_pass'] ) && ! empty( $_POST['user_pass'] ) ) { + $password = $_POST['user_pass']; + } + return esc_html( $password ); + } + + /** + * Sets the value of default password nag. + * + * @param int $user_id. + * @since 1.0.22 + * @version 3.0.0 + */ + public function loginpress_default_password_nag( $user_id ) { + + // False => User not using WordPress default password. + update_user_meta( $user_id, 'default_password_nag', false ); + } + + /** + * Filter the new user email notification. + * + * @param array $email The new user email notification parameters. + * @since 1.4.0 + * @version 3.0.0 + * @return array The new user email notification parameters. + */ + function loginpress_new_user_email_notification( $email ) { + + $email['message'] .= "\r\n" . __( 'If you have already set your own password, you may disregard this email and use the password you have already set.', 'loginpress' ); + + return $email; + } + + } + +endif; diff --git a/wp-content/plugins/loginpress/classes/class-loginpress-deprecated-addons.php b/wp-content/plugins/loginpress/classes/class-loginpress-deprecated-addons.php new file mode 100644 index 0000000..e3c8070 --- /dev/null +++ b/wp-content/plugins/loginpress/classes/class-loginpress-deprecated-addons.php @@ -0,0 +1,1042 @@ +plugins_list = get_plugins(); + } + + /** + * The Addons listings from the plugin API. + * + * @since 3.0.5 + * @return array $plugins_list The plugins list array. + */ + public function _get_addons() { + + // For Testing + // delete_transient( 'loginpress_api_addons' ); + // Get the transient where the addons are stored on-site. + $data = get_transient( 'loginpress_api_addons' ); + + // If we already have data, return it. + if ( ! empty( $data ) && is_array( $data ) ) { + return $data; + } + + // Make sure this matches the exact URL from your site. + $url = 'https://wpbrigade.com/wp-json/wpbrigade/v1/plugins?addons=loginpress-pro-add-ons'; + + // Get data from the remote URL. + $response = wp_remote_get( $url, array( 'timeout' => 20 ) ); + + if ( ! is_wp_error( $response ) ) { + + // Decode the data that we got. + $data = json_decode( wp_remote_retrieve_body( $response ) ); + + if ( ! empty( $data ) && is_array( $data ) ) { + + // Store the data for a week. + set_transient( 'loginpress_api_addons', $data, 7 * DAY_IN_SECONDS ); + + return $data; + } else { + return array( 'error_message' => __( 'Something went wrong in loading the Add-Ons, Try again later!', 'loginpress' ) ); + } + } + + return array( 'error_message' => __( 'Something went wrong in loading the Add-Ons, Try again later!', 'loginpress' ) ); + } + + /** + * Addon card for a specific addon. + * + * @since 3.0.5 + * @param object $addon The LoginPress addon object. + * @return void + */ + public function _addon_card( $addon ) { + $extra_class = ''; + if ( in_array( 'loginpress-free-add-ons', $this->convert_to_array( $addon->categories ) ) ) { + $extra_class = ' loginpress-free-add-ons'; + } + ?> +
+ + +

media->icon->url ) { + echo esc_url( $addon->media->icon->url ); + } else { + echo plugins_url( '../img/thumbnail/gray-loginpress.png', __FILE__ ); + } + ?> + class="loginpress_addons_thumbnails"/>title ); ?>

+
+ + excerpt ) ); ?> +

+ check_plugin_status( $addon->id, $addon->slug, $this->convert_to_array( $addon->categories ) ); + $this->sa_check_plugin_status( $addon->id, $addon->slug, $this->convert_to_array( $addon->categories ) ); + ?> +

+ _ajax_response( $addon->title, $addon->slug ); + ?> +
+ + +
+ loginpress + + + +
+

' . __( 'Activating ' . $text . '...', 'loginpress' ) . '

+ '; + + $html .= ''; + + $html .= ''; + + $html .= ''; + + $html .= ''; + + return $html; + } + + /** + * The free addon card of LoginPress. + * + * @since 3.0.5 + * @param object $addon The object of the addon. + * @return string $html The html of the card. + */ + public function _addon_card_free( $addon ) { + $extra_class = ''; + if ( in_array( 'loginpress-free-add-ons', $this->convert_to_array( $addon->categories ) ) ) { + $extra_class = ' loginpress-free-add-ons'; + } + ?> +
+ + +

media->icon->url ) { + echo esc_url( $addon->media->icon->url ); + } else { + echo plugins_url( '../img/thumbnail/gray-loginpress.png', __FILE__ ); + } + ?> + class="loginpress_addons_thumbnails"/>title ); ?>

+
+ + excerpt ) ); + $slug_id = $addon->slug; + if ( in_array( 'loginpress-free-add-ons', $this->convert_to_array( $addon->categories ) ) ) { + $slug = $addon->slug . '/' . $addon->slug . '.php'; + + if ( is_plugin_active( $slug ) ) { + ?> + + + + + + + + ', '' ); + } elseif ( array_key_exists( $slug, $this->plugins_list ) ) { + ?> + + + + + + + + 'activate', 'plugin' => $slug ), admin_url( 'plugins.php' ) ), 'activate-plugin_' . $slug ) ; + // echo sprintf( esc_html__( '%1$s Activate Plugin %2$s', 'loginpress' ), '', '' ); + } else { + + $action = 'install-plugin'; + $slug = 'login-logout-menu'; + $link = wp_nonce_url( + add_query_arg( + array( + 'action' => $action, + 'plugin' => $slug, + ), + admin_url( 'update.php' ) + ), + $action . '_' . $slug + ); + ?> + + + + + +

+ +

+ + _ajax_response( $addon->title, $addon->slug ); ?> +
+ + slug; + } + } + return $arr; + } + + /** + * Get the addon link for downloading. + * + * @since 3.0.5 + * @return string $link The link for downloading. + */ + function get_addons_link() { + + $addons = $this->get_addons_name(); + if ( $addons ) { + foreach ( $addons as $addon ) { + + $action = 'install-plugin'; + $slug = $addon['key']; + $link = wp_nonce_url( + add_query_arg( + array( + 'action' => $action, + 'plugin' => $slug, + 'lgp' => 1, + ), + admin_url( 'update.php' ) + ), + $action . '_' . $slug + ); + } + } + } + + + /** + * Is the addon license valid and belongs to the category? + * + * @since 3.0.5 + * @param array $categories The categories of the addon. + * @return boolean $valid The validity of the addon. + */ + function is_addon_licensed( $categories ) { + + if ( LoginPress_Pro::get_license_id() === '2' && in_array( 'loginpress-pro-small-business', $categories ) ) { + return true; + } elseif ( LoginPress_Pro::get_license_id() === '3' && in_array( 'loginpress-pro-agency', $categories ) ) { + return true; + } elseif ( LoginPress_Pro::get_license_id() === '4' && in_array( 'loginpress-pro-agency', $categories ) ) { + return true; + } elseif ( LoginPress_Pro::get_license_id() === '5' ) { + return true; + } elseif ( LoginPress_Pro::get_license_id() === '6' ) { + return true; + } elseif ( LoginPress_Pro::get_license_id() === '7' && in_array( 'loginpress-pro-agency', $categories ) ) { + return true; + } elseif ( LoginPress_Pro::get_license_id() === '8' && in_array( 'loginpress-pro-agency', $categories ) ) { + return true; + } elseif ( LoginPress_Pro::get_license_id() === '9' && in_array( 'loginpress-pro-agency', $categories ) ) { + return true; + } elseif ( LoginPress_Pro::get_license_id() === '1' && in_array( 'loginpress-free-add-ons', $categories ) ) { + return true; + } else { + return false; + } + } + + /** + * Check plugin status + * + * @since 3.0.5 + * @return array + */ + public function check_plugin_status( $id, $slug, $categories = array() ) { + + $slug = $slug . '/' . $slug . '.php'; + + if ( $this->is_addon_licensed( $categories ) ) { + + if ( is_plugin_active( $slug ) ) { + ?> + + + + + + ', '' ); + } elseif ( array_key_exists( $slug, $this->plugins_list ) ) { + ?> + + + + + + 'activate', 'plugin' => $slug ), admin_url( 'plugins.php' ) ), 'activate-plugin_' . $slug ) ; + // echo sprintf( esc_html__( '%1$s Activate Plugin %2$s', 'loginpress' ), '', '' ); + } else { + // $link = wp_nonce_url( add_query_arg( array( 'action' => 'install-plugin', 'plugin' => $slug, 'lgp' => 1, 'id' => $id), admin_url( 'update.php' ) ), 'install-plugin_' . $slug ); + // echo sprintf( esc_html__( '%1$s Install %2$s', 'loginpress' ), '', '' ); + + ?> + + + + + + + is_addon_licensed( $categories ) ) { + + if ( is_plugin_active( $slug ) ) { + ?> + + + + + + + + + ', '' ); + } elseif ( array_key_exists( $slug, $this->plugins_list ) ) { + ?> + + + + + + + + 'activate', 'plugin' => $slug ), admin_url( 'plugins.php' ) ), 'activate-plugin_' . $slug ) ; + // echo sprintf( esc_html__( '%1$s Activate Plugin %2$s', 'loginpress' ), '', '' ); + } else { + // $link = wp_nonce_url( add_query_arg( array( 'action' => 'install-plugin', 'plugin' => $slug, 'lgp' => 1, 'id' => $id), admin_url( 'update.php' ) ), 'install-plugin_' . $slug ); + // echo sprintf( esc_html__( '%1$s Install %2$s', 'loginpress' ), '', '' ); + + ?> + + + + + + + + _get_addons(); + + if ( class_exists( 'LoginPress_Pro' ) ) { + + if ( LoginPress_Pro::is_activated() ) { + + $expiration_date = LoginPress_Pro::get_expiration_date(); + + if ( 'lifetime' == $expiration_date ) { + echo '
' . esc_html__( 'You have a lifetime license, it will never expire.', 'loginpress-pro' ) . '
'; + } else { + echo '
' . sprintf( + esc_html__( 'Your (%2$s) license key is valid until %1$s.', 'loginpress-pro' ), + '' . date_i18n( get_option( 'date_format' ), strtotime( $expiration_date, current_time( 'timestamp' ) ) ) . '', + LoginPress_Pro::get_license_type() + ) . '
'; + } + + ?> +
+ $addon ) { + if ( 'error_message' === $key ) { + include_once LOGINPRESS_DIR_PATH . 'include/loginpress-static-addons.php'; + if ( class_exists( 'LoginPress_Pro' ) && LoginPress_Pro::is_activated() && LoginPress_Pro::get_license_type() ) { + LoginPress_Static_Addons::pro_static_addon_cards(); + } else { + LoginPress_Static_Addons::free_static_addon_cards(); + } + return; + } + $this->_addon_card( $addon ); + } + ?> +
+ ' . sprintf( esc_html__( 'You need to activate your license to download the following add-ons.', 'loginpress-pro' ) ) . ''; + + // Show full list of add-ons + ?> +
+ $addon ) { + if ( 'error_message' === $key ) { + include_once LOGINPRESS_DIR_PATH . 'include/loginpress-static-addons.php'; + if ( class_exists( 'LoginPress_Pro' ) && LoginPress_Pro::is_activated() && LoginPress_Pro::get_license_type() ) { + LoginPress_Static_Addons::pro_static_addon_cards(); + } else { + LoginPress_Static_Addons::free_static_addon_cards(); + } + return; + } + $this->_addon_card_free( $addon ); + } + ?> +
+ ' . esc_html__( 'You need to upgrade to LoginPress Pro to access these add-ons.', 'loginpress-pro' ) . ''; + + // Show full list of add-ons + echo '
'; + foreach ( $addons_list as $key => $addon ) { + if ( 'error_message' === $key ) { + include_once LOGINPRESS_DIR_PATH . 'include/loginpress-static-addons.php'; + if ( class_exists( 'LoginPress_Pro' ) && LoginPress_Pro::is_activated() && LoginPress_Pro::get_license_type() ) { + LoginPress_Static_Addons::pro_static_addon_cards(); + } else { + LoginPress_Static_Addons::free_static_addon_cards(); + } + return; + } + $this->_addon_card_free( $addon ); + } + echo '
'; + } + } + + /** + * Addon card. + * + * @since 3.0.5 + * @return void + */ + function _addon_html() { + + ?> + + + + +
+

+ +

+
+ show_addon_page(); ?> +
+
+ _hooks(); + } + + /** + * Hooks function for Remember me. + * + * @return void + */ + public function _hooks(){ + + add_filter( 'loginpress_remember_me', array( $this, 'loginpress_remember_me_callback' ), 10, 1 ); + } + + /** + * Turn off the remember me option from WordPress login form. + * + * @param bool $activate Is activated ot not. + * @since 1.1.7 + */ + public function loginpress_remember_me_callback( $activate ) { + + if ( ! $activate ) { + return; + } + + // Add the hook into the login_form + add_action( 'login_form', array( $this, 'loginpress_login_form' ), 99 ); + + // Reset any attempt to set the remember option + add_action( 'login_head', array( $this, 'unset_remember_me_option' ), 99 ); + } + + /** + * unset remember me option. + * + * @return void + */ + function unset_remember_me_option() { + + // Remove the remember me post value + if ( isset( $_POST['rememberme'] ) ) { + unset( $_POST['rememberme'] ); + } + } + + /** + * Login Form customization for remember me. + * + * @return void + */ + function loginpress_login_form() { + + ob_start( array( $this, 'remove_forgetmenot_class' ) ); + } + + /** + * Forget me not class removal. + * + * @param string $content The content being removed. + * @return string $content Update content. + */ + function remove_forgetmenot_class( $content ) { + + $content = preg_replace( '/

(.*)<\/p>/', '', $content); + return $content; + } + + } + +} +$loginpress_developer_hooks = new LoginPress_Developer_Hooks(); +?> diff --git a/wp-content/plugins/loginpress/classes/class-loginpress-filter-plugin.php b/wp-content/plugins/loginpress/classes/class-loginpress-filter-plugin.php new file mode 100644 index 0000000..285b9c3 --- /dev/null +++ b/wp-content/plugins/loginpress/classes/class-loginpress-filter-plugin.php @@ -0,0 +1,230 @@ +%s'; + + if ( ! empty( $links[0] ) && preg_match( '/install-now/', $links[0] ) ) { + $links[0] = sprintf( + $link, + 'button', + esc_url( $plugin['buy-now'] ), + esc_attr( sprintf( __( 'Buy %s now', 'loginpress' ), $plugin['name'] ) ), + esc_html__( 'Buy Now', 'loginpress' ) + ); + } + + // $links[] = sprintf( + // $link, + // 'thickbox open-plugin-details-modal', + // esc_url( $plugin['buy-now'] . '#TB_iframe=true&width=600&height=550' ), + // esc_attr( sprintf( __( 'More information about %s', 'loginpress' ), $plugin['name'] ) ), + // esc_html__( 'More Details', 'loginpress' ) + // ); + } + + return $links; + } + + + /** + * Filter Plugin search result + * + * @since 1.0.19 + * @version 3.0.0 + */ + function filter_api_result( $result, $action, $args ) { + + if ( empty( $args->browse ) ) { + return $result; + } + + if ( 'featured' !== $args->browse && 'recommended' !== $args->browse ) { + return $result; + } + + if ( ! isset( $result->info['page'] ) || 1 < $result->info['page'] ) { + return $result; + } + + $result_slugs = wp_list_pluck( $result->plugins, 'slug' ); + $products = $this->get_products(); + $count = 0; + $products_to_inject = array(); + + foreach ( $products as $key => $product ) { + + $products[ $key ] = $product = $this->build_product_data( $product ); + + // if the product is already installed, skip it + if ( $product['is_activated'] || $product['is_installed'] ) { + continue; + } + + // if the product is already in the results, skip it + if ( in_array( $product['slug'], $result_slugs ) ) { + continue; + } + + $products_to_inject[] = $product; + + $count++; + + // no of products to show + if ( 3 === $count ) { + break; + } + } + + // prepend the products that we wish to inject + for ( $i = count( $products_to_inject ) - 1; 0 <= $i; $i-- ) { + array_unshift( $result->plugins, $products_to_inject[ $i ] ); + } + return $result; + } + + + + /** + * Set plugin data structure acording to code. + * + * @since 1.0.19 + * @version 3.0.0 + */ + function build_product_data( $product_data ) { + $defaults = array( + 'name' => null, + 'slug' => null, + 'version' => null, + 'author' => 'WPBrigade', + 'author_profile' => null, + 'requires' => '3.9', + 'tested' => '4.8', + 'rating' => 100, + 'ratings' => array(), + 'num_ratings' => null, + 'support_threads' => null, + 'support_threads_resolved' => null, + 'active_installs' => null, + 'downloaded' => array(), + 'last_updated' => null, + 'added' => null, + 'homepage' => '', + 'sections' => array(), + 'short_description' => null, + 'download_link' => '', + 'screenshots' => array(), + 'tags' => array(), + 'versions' => array(), + 'donate_link' => null, + 'contributors' => array(), + 'loginpress-result' => true, + 'is_activated' => false, + 'is_installed' => false, + 'icons' => array( 'default' => null ), + ); + + $product = array_merge( $defaults, $product_data ); + + if ( ! empty( $product['title'] ) && empty( $product['name'] ) ) { + $product['name'] = $product['title']; + } + + if ( ! empty( $product['description'] ) && empty( $product['short_description'] ) ) { + $product['short_description'] = wp_trim_words( $product['description'], 27 ); + } + + if ( ! empty( $product['image'] ) && empty( $product['icons']['default'] ) ) { + if ( 0 === strpos( $product['image'], 'http' ) ) { + $product['icons']['default'] = $product['image']; + } + } + + return $product; + } + + + /** + * Get product info + * + * @since 1.0.19 + */ + function get_products() { + $products = array( + 'wp-analytify' => array( + 'title' => __( 'Analytify', 'loginpress' ), + 'slug' => 'wp-analytify', + 'link' => 'https://analytify.io/', + 'image' => 'https://ps.w.org/wp-analytify/assets/icon-128x128.png?rev=1299138', + 'is_activated' => class_exists( 'WP_Analytify' ), + 'is_installed' => file_exists( WP_PLUGIN_DIR . '/wp-analytify/wp-analytify.php' ), + 'active_installs' => '10000', + 'num_ratings' => 75, + 'last_updated' => '2017-07-06 7:07pm GMT', + 'description' => __( 'Analytify is reshaping Google Analytics in WordPress. See Social Media, Keywords, Realtime, Country, Mobile and Browsers Statistics under pages and posts.', 'loginpress' ), + ), + 'related-posts-thumbnails' => array( + 'title' => __( 'Related Posts', 'loginpress' ), + 'slug' => 'related-posts-thumbnails', + 'link' => 'https://wpbrigade.com/wordpress/plugins/related-posts/', + 'image' => 'https://ps.w.org/related-posts-thumbnails/assets/icon-128x128.png?rev=1299138', + 'is_activated' => class_exists( 'RelatedPostsThumbnails' ), + 'is_installed' => file_exists( WP_PLUGIN_DIR . '/related-posts-thumbnails/related-posts-thumbnails.php' ), + 'active_installs' => '30000', + 'num_ratings' => 28, + 'last_updated' => '2017-06-14 8:37pm GMT', + 'description' => __( 'Related Post Thumbnails plugin is for those who want the showcase of their related posts after the post detail. The plugin allows customizing thumbnail sizes, display settings, and type of relations. The plugin is using original WordPress taxonomy. It returns generated HTML, that is essential for page load speed of blogs that use many Javascript widgets.', 'loginpress' ), + ), + 'loginpress-pro' => array( + 'title' => __( 'LoginPress Pro', 'loginpress' ), + 'slug' => 'loginpress-pro', + 'link' => 'https://wpbrigade.com/wordpress/plugins/loginpress/', + 'image' => 'https://ps.w.org/loginpress/assets/icon-128x128.png?rev=1299138', + 'is_activated' => class_exists( 'LoginPress_Pro' ), + 'is_installed' => file_exists( WP_PLUGIN_DIR . '/loginpress-pro/loginpress-pro.php' ), + 'active_installs' => '1000', + 'buy-now' => 'https://wpbrigade.com/wordpress/plugins/loginpress/?utm_source=loginpress-lite&utm_medium=featured-filter&utm_campaign=pro-upgrade', + 'num_ratings' => 51, + 'last_updated' => '2017-07-06 7:07pm GMT', + 'description' => __( 'LoginPress Plugin by WPBrigade holds a lot of customization fields to change the layout of the login page of WordPress. You can modify the look and feel of login page completely even the login error messages, forgot error messages, registration error messages, forget password hint message and many more.', 'loginpress' ), + ), + ); + + return $products; + } + } +endif; +new LoginPress_Filter_API(); diff --git a/wp-content/plugins/loginpress/classes/class-loginpress-force-reset-pass.php b/wp-content/plugins/loginpress/classes/class-loginpress-force-reset-pass.php new file mode 100644 index 0000000..32060bc --- /dev/null +++ b/wp-content/plugins/loginpress/classes/class-loginpress-force-reset-pass.php @@ -0,0 +1,215 @@ +loginpress_get_limit(); + + if ( $time_limit === false ) { + return; + } + + $this->_loginpress_password_reset_time_limit = array( + 'loginpress_password_reset_time_limit' => $time_limit + ); + + $this->_hooks(); + } + + /** + * Action Hooks. + * + * @since 3.0.0 + * @return void + */ + public function _hooks() { + + add_action( 'register_new_user', array( $this, 'loginpress_update_expire_duration' ) ); + add_action( 'after_password_reset', array( $this, 'loginpress_update_expire_duration' ), 10 ); + add_action( 'profile_update', array( $this, 'loginpress_user_profile_update' ), 10 ); + add_action( 'wp_login', array( $this, 'loginpress_user_login_check' ), 10, 2 ); + add_action( 'login_message', array( $this, 'loginpress_reset_pass_message_text' ), 0, 1 ); + } + + /** + * Return the password age limit setting. + * + * @since 3.0.0 + * @return int $limit The password age limit. + */ + public function loginpress_get_limit() { + + $_loginpress_Setting = get_option( 'loginpress_setting' ); + + if ( empty( $_loginpress_Setting['loginpress_password_reset_time_limit'] ) || ! isset( $_loginpress_Setting['loginpress_password_reset_time_limit'] ) ) { + return false; + } + + // By default if value is empty or equal to 0 add 182 Days by default. + $limit = ( absint( $_loginpress_Setting['loginpress_password_reset_time_limit'] ) === 0 || empty( $_loginpress_Setting['loginpress_password_reset_time_limit'] ) ) ? 182 : absint( $_loginpress_Setting['loginpress_password_reset_time_limit'] ); + + return esc_html( strtotime( "$limit days" ) ); + } + + /** + * Updates User meta for force change password + * + * @since 3.0.0 + * @param [mixed object/int] $user User ID or User Object. + * @return void + */ + public function loginpress_update_expire_duration( $user ) { + + if ( is_object( $user ) ) { + $user_id = $user->ID; + } else { + $user_id = $user; + } + + // Update User meta with 6 months time-frame. + update_user_meta( $user_id, 'loginpress_password_reset_limit', $this->_loginpress_password_reset_time_limit ); + } + + /** + * Callback function which Fires Fires after the user’s password is reset + * + * @param WP_User $user The User object of the user whose password was reset. + * + * @return void + */ + public function loginpress_user_profile_update( $user_id ) { + + // Returns if Password is unchanged during Profile Update + if ( ! isset( $_POST['pass1'] ) ) { + return; + } + + // Update User meta with 6 months time-frame. + update_user_meta( $user_id, 'loginpress_password_reset_limit', $this->_loginpress_password_reset_time_limit ); + } + + /** + * Fires on login submit to check if user have reset the password less than 6 months ago. + * + * @since 3.0.0 + * @param string $user_login The user login name. + * @param WP_User $user WP_User object of the logged-in user. + * @return void + */ + public function loginpress_user_login_check( $user_login, $user ) { + + $_loginpress_Setting = get_option( 'loginpress_setting' ); + $enable_password_reset = isset( $_loginpress_Setting['enable_password_reset'] ) && ! empty( $_loginpress_Setting['enable_password_reset'] ) ? $_loginpress_Setting['enable_password_reset'] : 'off'; + + if ( $enable_password_reset !== 'off' ) { + + $restricted_roles = isset( $_loginpress_Setting['roles_for_password_reset'] ) && ! empty( $_loginpress_Setting['roles_for_password_reset'] ) ? $_loginpress_Setting['roles_for_password_reset'] : array( false ); + + // Get the meta of the user since when user last reset password. + $user_meta = get_user_meta( $user->ID, 'loginpress_password_reset_limit', true ); + $reset_time_left = ! empty( $user_meta ) && isset( $user_meta['loginpress_password_reset_time_limit'] ) ? $user_meta['loginpress_password_reset_time_limit'] : '' ; + $loginpress_reset_for_all = (bool) apply_filters( 'loginpress_password_reset_for_all', false ); + + // If current date is less 6 Months than that of stored before then take the user to lost password page. + if ( ( strtotime( 'now' ) > $reset_time_left ) ) { + if ( $loginpress_reset_for_all || in_array( ucfirst( $user->roles[0] ), $restricted_roles ) ) { + + // Logout the user. + wp_logout(); + + // redirect user to lost password page. + wp_safe_redirect( add_query_arg( array( + 'action' => 'lostpassword', + 'expired' => 'expired', + ), wp_login_url() ), 302 ) ; + + exit; + } + } + } + } + + /** + * Function to convert simple days to years, months and days depending on input + * + * @version 3.0.0 + * @return string $time_frame time converted to days, months and years. + */ + public function loginpress_convert_days() { + + $loginpress_Setting = get_option( 'loginpress_setting' ); + $limit = isset( $loginpress_Setting['loginpress_password_reset_time_limit'] ) && ! empty( $loginpress_Setting['loginpress_password_reset_time_limit'] ) ? $loginpress_Setting['loginpress_password_reset_time_limit'] : ''; + + $years = ( $limit / 365 ) ; // days / 365 days + $years = floor( $years ); // Remove all decimals + $month = ( $limit % 365 ) / 30.5; // I choose 30.5 for Month (30,31) ;) + $month = floor( $month ); // Remove all decimals + $days = ( $limit % 365 ) % 30.5; // the rest of days + + if ( $years != 0 ) { + $year_string = 1 === absint( $years ) ? __( 'Year', 'loginpress' ) : __( 'Years', 'loginpress' ); + $month_string = 1 === absint( $month ) ? __( 'Month', 'loginpress' ) : __( 'Months', 'loginpress' ); + $day_string = 1 === absint( $days ) ? __( 'Day', 'loginpress' ) : __( 'Days', 'loginpress' ); + + return sprintf( __( '%1$s %2$s, %3$s %4$s and %5$s %6$s', 'loginpress' ), $years, $year_string, $month, $month_string, $days, $day_string ); + + } else if ( $month != 0 ) { + $month_string = 1 === $month ? 'Month' : 'Months'; + $day_string = 1 === $days ? 'Day' : 'Days'; + + return sprintf( __( '%1$s %2$s and %3$s %4$s', 'loginpress' ), $month, $month_string, $days, $day_string ); + + } else { + $remain_string = 1 === $days ? __( 'Day', 'loginpress' ) : __( 'Days', 'loginpress' ); + return sprintf( '%1$s %2$s', $days, $remain_string ); + } + } + + /** + * Function callback to change the Message upon Lost password + * + * @version 3.0.0 + * @param string $user_login The user login name. + * @param WP_User $user WP_User object of the logged-in user. + * @return void + */ + public function loginpress_reset_pass_message_text( $message ) { + + $status = isset( $_GET['expired'] ) && ! empty( $_GET['expired'] ) ? sanitize_text_field( $_GET['expired'] ) : ''; + + if ( 'expired' === $status ) { + $limit = $this->loginpress_convert_days(); + $default_message = sprintf( __( 'It\'s been %1$s%2$s%3$s since you last updated your password. Kindly update your password.', 'loginpress' ), '', $limit, '', '
' ); + $message = apply_filters( 'loginpress_change_reset_message', $default_message, $limit ); + return '

' . wp_kses_post( $message ) .'

'; + } + + return $message; + } +} diff --git a/wp-content/plugins/loginpress/classes/class-loginpress-log.php b/wp-content/plugins/loginpress/classes/class-loginpress-log.php new file mode 100644 index 0000000..a1d8d15 --- /dev/null +++ b/wp-content/plugins/loginpress/classes/class-loginpress-log.php @@ -0,0 +1,190 @@ +=' ) && ! empty( get_available_languages() ) ) { + $lang_switcher = isset( $loginpress_setting['enable_language_switcher'] ) ? $loginpress_setting['enable_language_switcher'] : 'Off'; + } + $pci_compliance = isset( $loginpress_setting['enable_pci_compliance'] ) ? $loginpress_setting['enable_pci_compliance'] : 'Off'; + $_loginpassword_url = ( $lostpassword_url == 'on' ) ? 'WordPress Default' : "WooCommerce Custom URL"; + $loginpress_uninstall = isset( $loginpress_setting['loginpress_uninstall'] ) ? $loginpress_setting['loginpress_uninstall'] : 'Off'; + $disable_default_style = (bool) apply_filters( 'loginpress_disable_default_style', false ); + $enable_password_reset = isset( $loginpress_setting['enable_password_reset'] ) ? $loginpress_setting['enable_password_reset'] : 'Off'; + + $html = '### Begin System Info ###' . "\n\n"; + + // Basic site info + $html = '-- WordPress Configuration --' . "\n\n"; + $html .= 'Site URL: ' . site_url() . "\n"; + $html .= 'Home URL: ' . home_url() . "\n"; + $html .= 'Multisite: ' . ( is_multisite() ? 'Yes' : 'No' ) . "\n"; + $html .= 'Version: ' . get_bloginfo( 'version' ) . "\n"; + $html .= 'Language: ' . get_locale() . "\n"; + $html .= 'Table Prefix: ' . 'Length: ' . strlen( $wpdb->prefix ) . "\n"; + $html .= 'WP_DEBUG: ' . ( defined( 'WP_DEBUG' ) ? ( WP_DEBUG ? 'Enabled' : 'Disabled' ) : 'Not set' ) . "\n"; + $html .= 'Memory Limit: ' . WP_MEMORY_LIMIT . "\n"; + + /** + * Add a filter to disable the LoginPress default template style. + * + * @since 1.6.4 + */ + if ( $disable_default_style ) { + $html .= "\n" . '-- *LoginPress Default Style is disabled by using Hook* --' . "\n"; + } + + // Plugin Configuration + $html .= "\n" . '-- LoginPress Configuration --' . "\n\n"; + $html .= 'Plugin Version: ' . LOGINPRESS_VERSION . "\n"; + $html .= 'Expiration: ' . $session_expiration . "\n"; + $html .= 'Login Order: ' . ucfirst( $login_order ) . "\n"; + $html .= 'PCI Compliance: ' . ucfirst( $pci_compliance ) . "\n"; + $html .= 'Force Password Reset: ' . ucfirst( $enable_password_reset ) . "\n"; + + if ( class_exists( 'WooCommerce' ) ) { + $html .= 'Lost Password URL: ' . $_loginpassword_url . "\n"; + } + + /** + * Add a filter to disable the LoginPress default template style. + * + * @since 1.6.4 + */ + if ( $disable_default_style ) { + $html .= "\n" . '-- *LoginPress Default Style is disabled by using Hook* --' . "\n"; + } + + /** + * Add option to remove language switcher option + * + * @since 1.5.13 + */ + if ( version_compare( $GLOBALS['wp_version'], '5.9', '>=' ) && ! empty( get_available_languages() ) ) { + $html .= 'Language Switcher: ' . ucfirst( $lang_switcher ) . "\n"; + } + $html .= 'Uninstallation: ' . $loginpress_uninstall . "\n"; + $html .= 'Total Customized Fields: ' . count( $loginpress_config ) . "\n"; + $html .= 'Customization Detail: ' . $customization . "\n"; + + // Pro Plugin Configuration + if ( class_exists( 'LoginPress_Pro' ) ) { + + $enable_recaptcha = ( isset( $loginpress_setting['enable_repatcha'] ) ) ? $loginpress_setting['enable_repatcha'] : 'Off'; + $enable_force = ( isset( $loginpress_setting['force_login'] ) ) ? $loginpress_setting['force_login'] : 'Off'; + $loginpress_preset = get_option( 'customize_presets_settings', true ); + $license_key = LoginPress_Pro::get_registered_license_status(); + + $html .= "\n" . '-- LoginPress Pro Configuration --' . "\n\n"; + $html .= 'Plugin Version: ' . LOGINPRESS_PRO_VERSION . "\n"; + $html .= 'LoginPress Template: ' . $loginpress_preset . "\n"; + $html .= 'License Status: ' . $license_key . "\n"; + $html .= 'Force Login: ' . $enable_force . "\n"; + $html .= 'Google Recaptcha Status: ' . $enable_recaptcha . "\n"; + + if ( 'on' == $enable_recaptcha ) { + $site_key = ( isset( $loginpress_setting['site_key'] ) ) ? $loginpress_setting['site_key'] : 'Not Set'; + $secret_key = ( isset( $loginpress_setting['secret_key'] ) ) ? $loginpress_setting['secret_key'] : 'Not Set'; + $captcha_theme = ( isset( $loginpress_setting['captcha_theme'] ) ) ? $loginpress_setting['captcha_theme'] : 'Light'; + $captcha_language = ( isset( $loginpress_setting['captcha_language'] ) ) ? $loginpress_setting['captcha_language'] : 'English (US)'; + $captcha_enable_on = ( isset( $loginpress_setting['captcha_enable'] ) ) ? $loginpress_setting['captcha_enable'] : 'Not Set'; + + $html .= 'Recaptcha Site Key: ' . LoginPress_Pro::mask_license( $site_key ) . "\n"; + $html .= 'Recaptcha Secret Key: ' . LoginPress_Pro::mask_license( $secret_key ) . "\n"; + $html .= 'Recaptcha Theme Used: ' . $captcha_theme . "\n"; + $html .= 'Recaptcha Language Used: ' . $captcha_language . "\n"; + if ( is_array( $captcha_enable_on ) ) { + foreach ( $captcha_enable_on as $key ) { + $html .= 'Recaptcha Enable On: ' . ucfirst( str_replace( "_", " ", $key ) ) . "\n"; + } + } + } + } + // Server Configuration + $html .= "\n" . '-- Server Configuration --' . "\n\n"; + $html .= 'Operating System: ' . php_uname( 's' ) . "\n"; + $html .= 'PHP Version: ' . PHP_VERSION . "\n"; + $html .= 'MySQL Version: ' . $wpdb->db_version() . "\n"; + + $html .= 'Server Software: ' . $_SERVER['SERVER_SOFTWARE'] . "\n"; + + // PHP configs... now we're getting to the important stuff + $html .= "\n" . '-- PHP Configuration --' . "\n\n"; + // $html .= 'Safe Mode: ' . ( ini_get( 'safe_mode' ) ? 'Enabled' : 'Disabled' . "\n" ); + $html .= 'Memory Limit: ' . ini_get( 'memory_limit' ) . "\n"; + $html .= 'Post Max Size: ' . ini_get( 'post_max_size' ) . "\n"; + $html .= 'Upload Max Filesize: ' . ini_get( 'upload_max_filesize' ) . "\n"; + $html .= 'Time Limit: ' . ini_get( 'max_execution_time' ) . "\n"; + $html .= 'Max Input Vars: ' . ini_get( 'max_input_vars' ) . "\n"; + $html .= 'Display Errors: ' . ( ini_get( 'display_errors' ) ? 'On (' . ini_get( 'display_errors' ) . ')' : 'N/A' ) . "\n"; + + // WordPress active themes + $html .= "\n" . '-- WordPress Active Theme --' . "\n\n"; + $my_theme = wp_get_theme(); + $html .= 'Name: ' . $my_theme->get( 'Name' ) . "\n"; + $html .= 'URI: ' . $my_theme->get( 'ThemeURI' ) . "\n"; + $html .= 'Author: ' . $my_theme->get( 'Author' ) . "\n"; + $html .= 'Version: ' . $my_theme->get( 'Version' ) . "\n"; + + // WordPress active plugins + $html .= "\n" . '-- WordPress Active Plugins --' . "\n\n"; + $plugins = get_plugins(); + $active_plugins = get_option( 'active_plugins', array() ); + foreach( $plugins as $plugin_path => $plugin ) { + if( !in_array( $plugin_path, $active_plugins ) ) + continue; + $html .= $plugin['Name'] . ': v(' . $plugin['Version'] . ")\n"; + } + + // WordPress inactive plugins + $html .= "\n" . '-- WordPress Inactive Plugins --' . "\n\n"; + foreach( $plugins as $plugin_path => $plugin ) { + if( in_array( $plugin_path, $active_plugins ) ) + continue; + $html .= $plugin['Name'] . ': v(' . $plugin['Version'] . ")\n"; + } + + if( is_multisite() ) { + // WordPress Multisite active plugins + $html .= "\n" . '-- Network Active Plugins --' . "\n\n"; + $plugins = wp_get_active_network_plugins(); + $active_plugins = get_site_option( 'active_sitewide_plugins', array() ); + foreach( $plugins as $plugin_path ) { + $plugin_base = plugin_basename( $plugin_path ); + if( ! array_key_exists( $plugin_base, $active_plugins ) ) + continue; + $plugin = get_plugin_data( $plugin_path ); + $html .= $plugin['Name'] . ': v(' . $plugin['Version'] . ")\n"; + } + } + + $html .= "\n" . '### End System Info ###'; + return $html; + } +} // End of Class. diff --git a/wp-content/plugins/loginpress/classes/class-loginpress-login-order.php b/wp-content/plugins/loginpress/classes/class-loginpress-login-order.php new file mode 100644 index 0000000..a219cd8 --- /dev/null +++ b/wp-content/plugins/loginpress/classes/class-loginpress-login-order.php @@ -0,0 +1,160 @@ +loginpress_key = get_option( 'loginpress_customization' ); + $this->_hooks(); + } + + /** + * Hooks for the Login Order Class. + * + * @since 1.0.18 + * @version 3.0.0 + */ + public function _hooks() { + + $wp_version = get_bloginfo( 'version' ); + $loginpress_setting = get_option( 'loginpress_setting' ); + $login_order = isset( $loginpress_setting['login_order'] ) ? $loginpress_setting['login_order'] : ''; + + if ( ! empty( $login_order ) ) { + remove_filter( 'authenticate', 'wp_authenticate_username_password', 20, 3 ); + } + + add_filter( 'authenticate', array( $this, 'loginpress_login_order' ), 20, 3 ); + + if ( 'username' == $login_order && '4.5.0' < $wp_version ) { + // For WP 4.5.0 remove email authentication. + remove_filter( 'authenticate', 'wp_authenticate_email_password', 20 ); + } + } + + /** + * If an email address is entered in the username field, then look up the matching username and authenticate as per normal, using that. + * + * @param string $user + * @param string $username + * @param string $password + * @since 1.0.18 + * @version 1.0.22 + * + * @return Results of authenticating via wp_authenticate_username_password(), using the username found when looking up via email. + */ + public function loginpress_login_order( $user, $username, $password ) { + + if ( $user instanceof WP_User ) { + return $user; + } + + // Is username or password field empty? + if ( empty( $username ) || empty( $password ) ) { + + if ( is_wp_error( $user ) ) + return $user; + + $error = new WP_Error(); + + $empty_username = isset( $this->loginpress_key['empty_username'] ) && ! empty( $this->loginpress_key['empty_username'] ) ? $this->loginpress_key['empty_username'] : sprintf( __( '%1$sError:%2$s The username field is empty.', 'loginpress' ), '', '' ); + + $empty_password = isset( $this->loginpress_key['empty_password'] ) && ! empty( $this->loginpress_key['empty_password'] ) ? $this->loginpress_key['empty_password'] : sprintf( __( '%1$sError:%2$s The password field is empty.', 'loginpress' ), '', '' ); + + if ( empty( $username ) ) + $error->add( 'empty_username', $empty_username ); + + if ( empty( $password ) ) + $error->add( 'empty_password', $empty_password ); + + return $error; + } + + $loginpress_setting = get_option( 'loginpress_setting' ); + $login_order = isset( $loginpress_setting['login_order'] ) ? $loginpress_setting['login_order'] : ''; + + // Is login order is set to be 'email'. + if ( 'email' === $login_order ) { + + if ( ! empty( $username ) && ! is_email( $username ) ) { + + $error = new WP_Error(); + + $force_email_login= isset( $this->loginpress_key['force_email_login'] ) && ! empty( $this->loginpress_key['force_email_login'] ) ? $this->loginpress_key['force_email_login'] : sprintf( __( '%1$sError:%2$s Invalid Email Address', 'loginpress' ), '', '' ); + + $error->add( 'loginpress_use_email', $force_email_login ); + + return $error; + } + + if ( ! empty( $username ) && is_email( $username ) ) { + + $username = str_replace( '&', '&', stripslashes( $username ) ); + $user = get_user_by( 'email', $username ); + + if ( isset( $user, $user->user_login, $user->user_status ) && 0 === intval( $user->user_status ) ) + $username = $user->user_login; + return wp_authenticate_username_password( null, $username, $password ); + } + } // login order 'email'. + + // Is login order is set to be 'username'. + if ( 'username' === $login_order ) { + $user = get_user_by('login', $username); + + $invalid_usrname = array_key_exists( 'incorrect_username', $this->loginpress_key ) && ! empty( $this->loginpress_key['incorrect_username'] ) ? $this->loginpress_key['incorrect_username'] : sprintf( __( '%1$sError:%2$s Invalid Username.', 'loginpress' ), '', '' ); + + if ( ! $user ) { + return new WP_Error( 'invalid_username', $invalid_usrname ); + } + + if ( ! empty( $username ) || ! empty( $password ) ) { + + $username = str_replace( '&', '&', stripslashes( $username ) ); + $user = get_user_by( 'login', $username ); + + if ( isset( $user, $user->user_login, $user->user_status ) && 0 === intval( $user->user_status ) ) + $username = $user->user_login; + if ( ! empty( $username ) && is_email( $username ) ) { + return wp_authenticate_username_password( null, '', '' ); + } else { + return wp_authenticate_username_password( null, $username, $password ); + } + + } + } // login order 'username'. + } + } // End Of Class. +endif; diff --git a/wp-content/plugins/loginpress/classes/class-loginpress-notifications.php b/wp-content/plugins/loginpress/classes/class-loginpress-notifications.php new file mode 100644 index 0000000..2ce0934 --- /dev/null +++ b/wp-content/plugins/loginpress/classes/class-loginpress-notifications.php @@ -0,0 +1,420 @@ +_hooks(); + } + + /** + * Hook into actions and filters + * + * @since 1.0.0 + * @version 3.0.0 + */ + private function _hooks() { + add_action( 'admin_init', array( $this, 'loginpress_review_notice' ) ); + + // if ( defined( 'LOGINPRESS_PRO_VERSION' ) && LOGINPRESS_PRO_VERSION < '3.0' ) { + // add_action( 'admin_notices' , array( $this, 'loginpress_pro30_install_notice' ) ); + // } + + // add_action( 'admin_init' , array( $this, 'loginpress_addon_notice' ) ); + // add_action( 'admin_init', array( $this, 'loginpress_friday_sale_notice' ) ); + // add_action( 'admin_init', array( $this, 'loginpress_appsumo_notice' ) ); + } + + /** + * Ask users to review our plugin on wordpress.org + * + * @since 1.0.11 + * @version 3.0.0 + */ + public function loginpress_review_notice() { + + $this->loginpress_review_dismissal(); + $this->loginpress_review_pending(); + + $activation_time = get_site_option( 'loginpress_active_time' ); + $review_dismissal = get_site_option( 'loginpress_review_dismiss' ); + + // Update the $review_dismissal value in 3.0.0 + if ( 'yes_v3' == $review_dismissal ) { + return; + } + + if ( ! $activation_time ) { + $activation_time = time(); + add_site_option( 'loginpress_active_time', $activation_time ); + } + + // 1296000 = 15 Days in seconds. + if ( ( time() - $activation_time > 1296000 ) && current_user_can( 'manage_options' ) ) { + wp_enqueue_style( 'loginpress_review_style', plugins_url( '../css/style-review.css', __FILE__ ), array(), LOGINPRESS_VERSION ); + add_action( 'admin_notices' , array( $this, 'loginpress_review_notice_message' ) ); + } + } + + /** + * Check and Dismiss review message. + * + * @since 1.0.11 + * @version 3.0.0 + */ + private function loginpress_review_dismissal() { + + if ( ! is_admin() || + ! current_user_can( 'manage_options' ) || + ! isset( $_GET['_wpnonce'] ) || + ! wp_verify_nonce( sanitize_key( wp_unslash( $_GET['_wpnonce'] ) ), 'loginpress-review-nonce' ) || + ! isset( $_GET['loginpress_review_dismiss'] ) ) { + + return; + } + + // Update the $review_dismissal value in 3.0.0 + update_site_option( 'loginpress_review_dismiss', 'yes_v3' ); + } + + /** + * Set time to current so review notice will popup after 14 days + * + * @since 1.0.11 + * @version 3.0.0 + */ + function loginpress_review_pending() { + + if ( ! is_admin() || + ! current_user_can( 'manage_options' ) || + ! isset( $_GET['_wpnonce'] ) || + ! wp_verify_nonce( sanitize_key( wp_unslash( $_GET['_wpnonce'] ) ), 'loginpress-review-nonce' ) || + ! isset( $_GET['loginpress_review_later'] ) ) : + + return; + endif; + + // Reset Time to current time. + update_site_option( 'loginpress_active_time', time() ); + } + + /** + * Review notice message + * + * @since 1.0.11 + * @version 3.0.0 + */ + public function loginpress_review_notice_message() { + + $scheme = ( wp_parse_url( $_SERVER['REQUEST_URI'], PHP_URL_QUERY ) ) ? '&' : '?'; + // Update the $review_dismissal value in 3.0.0 + $url = $_SERVER['REQUEST_URI'] . $scheme . 'loginpress_review_dismiss=yes_v3'; + $dismiss_url = wp_nonce_url( $url, 'loginpress-review-nonce' ); + + $_later_link = $_SERVER['REQUEST_URI'] . $scheme . 'loginpress_review_later=yes'; + $later_url = wp_nonce_url( $_later_link, 'loginpress-review-nonce' ); ?> + +
+
+ notification-logo +
+
+

+

+ +
+
+ +
+ + +
+ Notification Logo +
+
+
+

+

+
+
+
+
+ +
+
+

%3$s %4$s

', + esc_attr( 'notice notice-error' ), + get_site_url() . '/wp-admin/update.php?action=upgrade-plugin&plugin=loginpress-pro/loginpress-pro.php&_wpnonce=' . wp_create_nonce( "upgrade-plugin_loginpress-pro/loginpress-pro.php" ), + esc_html__( 'Upgrade', 'loginpress' ), + esc_html__( 'to LoginPress Pro 3.0', 'loginpress' ) + ); + } + + /** + * Check and Dismiss addon message. + * + * @since 1.1.3 + * @version 3.0.0 + */ + private function loginpress_addon_dismissal() { + + if ( ! is_admin() || + ! current_user_can( 'manage_options' ) || + ! isset( $_GET['_wpnonce'] ) || + ! wp_verify_nonce( sanitize_key( wp_unslash( $_GET['_wpnonce'] ) ), 'loginpress-addon-nonce' ) || + ! isset( $_GET['loginpress_addon_dismiss_1'] ) ) : + + return; + endif; + + add_site_option( 'loginpress_addon_dismiss_1', 'yes' ); + } + + /** + * Ask users to review our plugin on wordpress.org + * + * @since 1.1.3 + * @version 3.0.0 + */ + public function loginpress_addon_notice() { + + $this->loginpress_addon_dismissal(); + + $activation_time = get_site_option( 'loginpress_addon_active_time' ); + $addon_dismissal = get_site_option( 'loginpress_addon_dismiss_1' ); + + if ( 'yes' == $addon_dismissal ) return; + + if ( ! $activation_time ) : + + $activation_time = time(); + add_site_option( 'loginpress_addon_active_time', $activation_time ); + endif; + + // 432000 = 5 Days in seconds. + // if ( time() - $activation_time > 432000 ) : + + add_action( 'admin_notices' , array( $this, 'loginpress_addon_notice_text' ) ); + // endif; + + } + + /** + * Ask users to review our plugin on wordpress.org + * + * @since 1.1.3 + * @version 3.0.0 + */ + public function loginpress_friday_sale_notice() { + + $this->loginpress_deals_notice_dismiss( 'loginpress-friday-sale-nonce', 'loginpress_friday_21_sale_dismiss' ); + + $activation_time = get_site_option( 'loginpress_friday_sale_active_time' ); + $addon_dismissal = get_site_option( 'loginpress_friday_21_sale_dismiss' ); + + if ( 'yes' == $addon_dismissal ) return; + + if ( ! $activation_time ) : + + $activation_time = time(); + add_site_option( 'loginpress_friday_sale_active_time', $activation_time ); + endif; + + if ( ! has_action( 'loginpress_pro_add_template' ) ) : + // add_action( 'admin_notices' , array( $this, 'loginpress_friday_sale_notice_text' ) ); // turn off on update v1.5.10 + // add_action( 'admin_notices', array( $this, 'new_loginpress_friday_sale_notice_text' ) ); // turn off on update 1.1.19 + endif; + } + + /** + * Ask users to review our plugin on wordpress.org + * + * @since 1.2.1 + * @version 3.0.0 + */ + public function loginpress_appsumo_notice() { + + $this->loginpress_deals_notice_dismiss( 'loginpress-appsumo-nonce', 'loginpress_appsumo_dismiss' ); + + $activation_time = get_site_option( 'loginpress_appsumo_active_time' ); + $addon_dismissal = get_site_option( 'loginpress_appsumo_dismiss' ); + + if ( 'yes' == $addon_dismissal ) return; + + if ( ! $activation_time ) : + + $activation_time = time(); + add_site_option( 'loginpress_appsumo_active_time', $activation_time ); + endif; + + if ( ! has_action( 'loginpress_pro_add_template' ) ) : + add_action( 'admin_notices', array( $this, 'loginpress_appsumo_notice_text' ) ); + endif; + } + + /** + * Review notice message + * + * @since 1.1.14 + * @version 3.0.0 + */ + public function loginpress_friday_sale_notice_text() { + + $scheme = ( wp_parse_url( $_SERVER['REQUEST_URI'], PHP_URL_QUERY ) ) ? '&' : '?'; + $url = $_SERVER['REQUEST_URI'] . $scheme . 'loginpress_friday_21_sale_dismiss=yes'; + $dismiss_url = wp_nonce_url( $url, 'loginpress-friday-sale-nonce' ); + + wp_enqueue_style( 'loginpress_review_style', plugins_url( '../css/style-review.css', __FILE__ ), array(), LOGINPRESS_VERSION ); + ?> +
+ + +
+ Notification Logo +
+
+ Black Friday 2021 +
+ +
+
+ +
+ '; + $message .= sprintf (__( 'Biggest Winter Deal in the WordPress Universe! Get LoginPress Pro and all Premium Add-ons with 20%% OFF [Limited Availability]. Grab The Deal + I\'m good with free version' ), $dismiss_url ); + $message .= "

"; + $class = 'loginpress-notice-success'; + $this->loginpress_admin_notice( $message, $class ); + } + } + + /** + * HTML for AppSumo Deal Notice + * + * @since 1.2.1 + * @version 3.0.0 + */ + function loginpress_appsumo_notice_text() { + + $scheme = ( wp_parse_url( $_SERVER['REQUEST_URI'], PHP_URL_QUERY ) ) ? '&' : '?'; + $url = $_SERVER['REQUEST_URI'] . $scheme . 'loginpress_appsumo_dismiss=yes'; + $dismiss_url = wp_nonce_url( $url, 'loginpress-appsumo-nonce' ); + + if ( current_user_can( 'install_plugins' ) && ! has_action( 'loginpress_pro_add_template' ) ) { + + wp_enqueue_style( 'loginpress_review_style', plugins_url( '../css/style-review.css', __FILE__ ), array(), LOGINPRESS_VERSION ); + + $message = '

'; + $message .= sprintf (__( 'Biggest Summer Deal in the WordPress Universe! Get LoginPress Pro and all Premium Add-ons with 20%% OFF [Limited Availability]. Grab The Deal + I\'m good with free version' ), $dismiss_url ); + $message .= "

"; + $class = 'loginpress-notice-success'; + $this->loginpress_admin_notice( $message, $class ); + } + } + + /** + * Add custom admin notice + * @param string $message Custom Message + * @param string $class loginpress-notice-success,loginpress-notice-danger + * + * @since 1.1.15 + * @version 3.0.0 + */ + function loginpress_admin_notice( $message, $class = 'loginpress-notice-success' ) { + echo '
+ + +
+

' . $message .'

+
+
'; + } + + /** + * Check and Dismiss addon message. + * + * @since 1.1.3 + * @version 3.0.0 + */ + private function loginpress_deals_notice_dismiss( $nonce, $option ) { + //delete_site_option( $option ); + if ( ! is_admin() || + ! current_user_can( 'manage_options' ) || + ! isset( $_GET['_wpnonce'] ) || + ! wp_verify_nonce( sanitize_key( wp_unslash( $_GET['_wpnonce'] ) ), $nonce ) || + ! isset( $_GET[$option] ) ) : + + return; + endif; + + add_site_option( $option, 'yes' ); + } + } +endif; +new LoginPress_Notification(); diff --git a/wp-content/plugins/loginpress/classes/class-loginpress-promo.php b/wp-content/plugins/loginpress/classes/class-loginpress-promo.php new file mode 100644 index 0000000..ccfba1f --- /dev/null +++ b/wp-content/plugins/loginpress/classes/class-loginpress-promo.php @@ -0,0 +1,66 @@ +add_section( 'lpcustomize_google_font', array( + 'title' => __( 'Google Fonts', 'loginpress-pro' ), +// 'description' => __( 'Select Google Font', 'loginpress-pro' ), + 'priority' => 49, + 'panel' => 'loginpress_panel', +) ); + +$wp_customize->add_setting( 'loginpress_customization[google_font]', array( + 'default' => '', + 'type' => 'option', + 'capability' => 'manage_options', + 'transport' => 'postMessage' +) ); + +$wp_customize->add_control( new LoginPress_Promo( $wp_customize, 'loginpress_customization[google_font]', array( + 'section' => 'lpcustomize_google_font', + 'thumbnail' => plugins_url( 'img/promo/font_promo.png', LOGINPRESS_ROOT_FILE ), + 'promo_text' => __( 'Unlock Premium Feature', 'loginpress' ), + 'link' => 'https://loginpress.pro/pricing/?utm_source=loginpress-lite&utm_medium=fonts&utm_campaign=pro-upgrade' +) ) ); + +$wp_customize->add_section( 'customize_recaptcha', array( + 'title' => __( 'reCAPTCHA', 'loginpress-pro' ), +// 'description' => __( 'reCAPTCHA Setting', 'loginpress-pro' ), + 'priority' => 24, + 'panel' => 'loginpress_panel', +) ); + +$wp_customize->add_setting( "loginpress_customization[recaptcha_error_message]", array( + 'type' => 'option', + 'capability' => 'manage_options', + 'transport' => 'postMessage' +) ); + +$wp_customize->add_control( new LoginPress_Promo( $wp_customize, 'loginpress_customization[recaptcha_error_message]', array( + 'section' => 'customize_recaptcha', + 'thumbnail' => plugins_url( 'img/promo/recaptcha_option_promo.png', LOGINPRESS_ROOT_FILE ), + 'promo_text' => __( 'Unlock Premium Feature', 'loginpress' ), + 'link' => 'https://loginpress.pro/pricing/?utm_source=loginpress-lite&utm_medium=recaptcha&utm_campaign=pro-upgrade' +) ) ); + +// $wp_customize->add_setting( "loginpress_customization[reset_hint_text]", array( +// 'type' => 'option', +// 'capability' => 'manage_options', +// 'transport' => 'postMessage' +// ) ); + +// $wp_customize->add_control( new LoginPress_Promo( $wp_customize, 'loginpress_customization[reset_hint_text]', array( +// 'section' => 'section_welcome', +// 'thumbnail' => plugins_url( 'img/promo/hint_promo.png', LOGINPRESS_ROOT_FILE ), +// 'promo_text' => __( 'Unlock Premium Feature', 'loginpress' ), +// 'priority' => 32, +// 'link' => 'https://loginpress.pro/pricing/?utm_source=loginpress-lite&utm_medium=hint&utm_campaign=pro-upgrade' +// ) ) ); +?> diff --git a/wp-content/plugins/loginpress/classes/class-loginpress-promotion.php b/wp-content/plugins/loginpress/classes/class-loginpress-promotion.php new file mode 100644 index 0000000..bb28503 --- /dev/null +++ b/wp-content/plugins/loginpress/classes/class-loginpress-promotion.php @@ -0,0 +1,138 @@ +_hooks(); + } + + /** + * Promotion hooks. + * + * @return void + */ + public function _hooks(){ + add_filter( 'loginpress_settings_tab', array( $this, 'loginpress_promotion_tab' ), 10, 1 ); + } + + /** + * Loginpress_login_redirects_tab Setting tab for Login Redirects. + * @param array $loginpress_tabs Tabs of free version. + * @return array $loginpress_promotion_tab Promotion tabs. + * @since 1.1.24 + * @version 1.4.5 + */ + public function loginpress_promotion_tab( $loginpress_tabs ) { + $_loginpress_promotion_tab = array( + + array( + 'id' => 'loginpress_autologin', + 'title' => __( 'Auto Login', 'loginpress' ), + 'sub-title' => __( 'No More Manual Login', 'loginpress' ), + 'desc' => $this->_tabs_description( 'loginpress-auto-login' ) + ), + array( + 'id' => 'loginpress_hidelogin', + 'title' => __( 'Hide Login', 'loginpress' ), + 'sub-title' => __( 'Hide your login page', 'loginpress' ), + 'desc' => $this->_tabs_description( 'loginpress-hide-login' ) + ), + array( + 'id' => 'loginpress_limit_login_attempts', + 'title' => __( 'Limit Login Attempts', 'loginpress' ), + 'sub-title' => __( 'Limits for login attempts', 'loginpress' ), + 'desc' => $this->_tabs_description( 'loginpress-limit-login-attempts' ) + ), + array( + 'id' => 'loginpress_login_redirects', + 'title' => __( 'Login Redirects', 'loginpress' ), + 'sub-title' => __( 'Automatically redirects the login', 'loginpress' ), + 'desc' => $this->_tabs_description( 'loginpress-login-redirects' ) + ), + array( + 'id' => 'loginpress_social_logins', + 'title' => __( 'Social Login', 'loginpress' ), + 'sub-title' => __( 'Third Party login access', 'loginpress' ), + 'desc' => $this->_tabs_description( 'loginpress-social-login' ) + ), + array( + 'id' => 'loginpress_premium', + 'title' => sprintf( __( 'Upgrade to Pro%1$s for More Features%2$s', 'loginpress' ), '', '' ) + ), + ); + $loginpress_promotion_tab = array_merge( $loginpress_tabs, $_loginpress_promotion_tab ); + return $loginpress_promotion_tab; + } + + /** + * Return promoted Add-on description. + * + * @since 1.1.24 + * @version 3.0.0 + * @return string + */ + public function _tabs_description( $slug, $button = true ) { + + $desc = ''; + + if ( 'loginpress-hide-login' === $slug ) { + + $desc .= '

' . esc_html__( 'This LoginPress add-on lets you change the login page URL to anything you want. It will give a hard time to spammers who keep hitting to your login page. This is helpful for Brute force attacks. One caution to use this add-on is you need to remember the custom login url after you change it. We have an option to email your custom login url so you remember it.', 'loginpress' ) . '

' . $this->_addon_video( 'How Hide Login Works', 'FSE2BH_biZg' ) . $this->upgrade_now( 'utm_source=loginpress-hide-login&utm_medium=addons-coming-soon&utm_campaign=pro-upgrade', $button ); + } else if ( 'loginpress-limit-login-attempts' === $slug ) { + + $desc .= '

' . esc_html__( 'Everybody needs a control of their Login page. This will help you to track your login attempts by each user. You can limit the login attempts for each user. Brute force attacks are the most common way to gain access to your website. This add-on acts as a sheild to these hacking attacks and gives you control to set the time between each login attempts.', 'loginpress' ) . '

' . $this->_addon_video( 'How Limit Login Login Attempts Works', '1-L14gHC8R0' ) . $this->upgrade_now( 'utm_source=loginpress-limit-login-attempts&utm_medium=addons-coming-soon&utm_campaign=pro-upgrade', $button ); + } else if ( 'loginpress-social-login' === $slug ) { + + $desc .= '

' . esc_html__( 'Social login from LoginPress is an add-on which provides facility your users to login and Register via Facebook, Google and Twitter. This add-on will eliminate the Spam and Bot registrations. This add-on will help your users to hassle free registrations/logins on your site.', 'loginpress' ) . '

' . $this->_addon_video( 'How Social Logins Works', 'EReYVYmdyeY' ) . $this->upgrade_now( 'utm_source=loginpress-social-login&utm_medium=addons-coming-soon&utm_campaign=pro-upgrade', $button ); + } else if ( 'loginpress-login-redirects' === $slug ) { + + $desc .= '

' . esc_html__( 'Redirect users based on their roles and specific usernames. This is helpful, If you have an editor and want to redirect him to his editor stats page. Restrict your subscribers, guests or even customers to certain pages instead of wp-admin. This add-on has a cool UX/UI to manage all the login redirects you have created on your site.', 'loginpress' ) . '

' . $this->_addon_video( 'How Login Redirects Works', 'EYqt8-iegeQ' ) . $this->upgrade_now( 'utm_source=loginpress-login-redirects&utm_medium=addons-coming-soon&utm_campaign=pro-upgrade', $button ); + } else if ( 'loginpress-auto-login' === $slug ) { + + $desc .= '

' . esc_html__( 'This LoginPress add-on lets you (Adminstrator) generates a unique URL for your certain users who you don\'t want to provide a password to login into your site. This Pro add-on gives you a list of all the users who you have given auto generated login links. You can disable someones access and delete certain users.', 'loginpress' ) . '

' . $this->_addon_video( 'How Auto Login Works', 'M2M3G2TB9Dk' ) . $this->upgrade_now( 'utm_source=loginpress-auto-login&utm_medium=addons-coming-soon&utm_campaign=pro-upgrade', $button ); + } + return $desc; + } + + /** + * Return video of the Add-on. + * + * @return string + */ + public function _addon_video( $title, $code ) { + return '
+

  ' . esc_html__( $title, 'loginpress' ) . '

+
+ +
+
'; + } + + /** + * Return Upgrade Button of the promoted Add-on. + * + * @return string + */ + public function upgrade_now( $url, $button ) { + + if ( $button ) { + return '
' . esc_html__( 'UPGRADE NOW', 'loginpress' ) . '
'; + } + } + } // Enf of Class. + +endif; +$loginpress_promotion_tabs = new LoginPress_Promotion_tabs; diff --git a/wp-content/plugins/loginpress/classes/class-loginpress-settings-api.php b/wp-content/plugins/loginpress/classes/class-loginpress-settings-api.php new file mode 100644 index 0000000..f1d49a4 --- /dev/null +++ b/wp-content/plugins/loginpress/classes/class-loginpress-settings-api.php @@ -0,0 +1,836 @@ +settings_sections = $sections; + + return $this; + } + + /** + * Add a single section or multiple sections. + * + * @param array $section section array to add. + */ + function add_section( $section ) { + + $this->settings_sections[] = $section; + + return $this; + } + + /** + * Set settings fields + * + * @param array $fields settings fields array + */ + function set_fields( $fields ) { + + $this->settings_fields = $fields; + + return $this; + } + + /** + * Add settings field + * + * @param string $section settings section name + * @param string $field settings field name + * + * @return array settings fields + */ + function add_field( $section, $field ) { + + $defaults = array( + 'name' => '', + 'label' => '', + 'desc' => '', + 'type' => 'text' + ); + + $arg = wp_parse_args( $field, $defaults ); + $this->settings_fields[$section][] = $arg; + + return $this; + } + + /** + * Initialize and registers the settings sections and fileds to WordPress + * + * Usually this should be called at `admin_init` hook. + * + * This function gets the initiated settings sections and fields. Then + * registers them to WordPress and ready for use. + */ + function admin_init() { + + //register settings sections + foreach ( $this->settings_sections as $section ) { + if ( false == get_option( $section['id'] ) ) { + add_option( $section['id'] ); + } + $video_link = ''; + if( isset( $section['video_link'] ) && !empty( $section['video_link'] ) ) { + $video_link = '
' . __( 'Getting Started Video', 'loginpress' ) . '
'; + } + if ( isset( $section['desc'] ) && !empty( $section['desc'] ) ) { + $section['desc'] = '
' . $section['desc'] . '
' . $video_link . '
'; + $callback = call_user_func( array( $this, 'get_description' ), $section['desc'] ); + } else if ( isset( $section['callback'] ) ) { + $callback = $section['callback']; + } else { + $callback = null; + } + + add_settings_section( $section['id'], $section['title'], $callback, $section['id'] ); + } + + /** + * register settings fields + */ + foreach ( $this->settings_fields as $section => $field ) { + foreach ( $field as $option ) { + + $name = $option['name']; + $type = isset( $option['type'] ) ? $option['type'] : 'text'; + $label = isset( $option['label'] ) ? $option['label'] : ''; + $callback = isset( $option['callback'] ) ? $option['callback'] : array( $this, 'callback_' . $type ); + + $args = array( + 'id' => $name, + 'class' => isset( $option['class'] ) ? $option['class'] : $name, + 'label_for' => "{$section}[{$name}]", + 'desc' => isset( $option['desc'] ) ? $option['desc'] : '', + 'name' => $label, + 'section' => $section, + 'size' => isset( $option['size'] ) ? $option['size'] : null, + 'options' => isset( $option['options'] ) ? $option['options'] : '', + 'std' => isset( $option['default'] ) ? $option['default'] : '', + 'sanitize_callback' => isset( $option['sanitize_callback'] ) ? $option['sanitize_callback'] : '', + 'type' => $type, + 'placeholder' => isset( $option['placeholder'] ) ? $option['placeholder'] : '', + 'min' => isset( $option['min'] ) ? $option['min'] : '', + 'max' => isset( $option['max'] ) ? $option['max'] : '', + 'step' => isset( $option['step'] ) ? $option['step'] : '', + 'multiple' => isset( $option['multiple'] ) ? $option['multiple'] : '', + ); + + add_settings_field( "{$section}[{$name}]", $label, $callback, $section, $section, $args ); + } + } + + // creates our settings in the options table + foreach ( $this->settings_sections as $section ) { + register_setting( $section['id'], $section['id'], array( $this, 'sanitize_options' ) ); + } + } + + /** + * Get field description for display. + * + * @param array $args settings field args. + */ + public function get_field_description( $args ) { + if ( ! empty( $args['desc'] ) ) { + $desc = sprintf( '

%s

', $args['desc'] ); + } else { + $desc = ''; + } + + return $desc; + } + + /** + * Displays a text field for a settings field + * + * @param array $args settings field args + */ + function callback_text( $args ) { + + $value = esc_attr( $this->get_option( $args['id'], $args['section'], $args['std'] ) ); + $size = isset( $args['size'] ) && !is_null( $args['size'] ) ? $args['size'] : 'regular'; + $type = isset( $args['type'] ) ? $args['type'] : 'text'; + $placeholder = empty( $args['placeholder'] ) ? '' : ' placeholder="' . $args['placeholder'] . '"'; + + $html = sprintf( '', $type, $size, $args['section'], $args['id'], $value, $placeholder ); + $html .= $this->get_field_description( $args ); + + echo $html; + } + + /** + * Displays a text field for a settings field with type email. + * + * @param array $args settings field args + * @since 1.2.5 + */ + function callback_email( $args ) { + + $value = esc_attr( $this->get_option( $args['id'], $args['section'], $args['std'] ) ); + $size = isset( $args['size'] ) && !is_null( $args['size'] ) ? $args['size'] : 'regular'; + $type = isset( $args['type'] ) ? $args['type'] : 'email'; + $placeholder = empty( $args['placeholder'] ) ? '' : ' placeholder="' . $args['placeholder'] . '"'; + $multiple = empty( $args['multiple'] ) ? '' : 'multiple'; + + $html = sprintf( '', $type, $size, $args['section'], $args['id'], $value, $placeholder, $multiple ); + $html .= $this->get_field_description( $args ); + + echo $html; + } + + /** + * Displays a url field for a settings field + * + * @param array $args settings field args + */ + function callback_url( $args ) { + $value = esc_url( $this->get_option( $args['id'], $args['section'], $args['std'] ) ); + $size = isset( $args['size'] ) && !is_null( $args['size'] ) ? $args['size'] : 'regular'; + $type = isset( $args['type'] ) ? $args['type'] : 'text'; + $placeholder = empty( $args['placeholder'] ) ? '' : ' placeholder="' . $args['placeholder'] . '"'; + + $html = sprintf( '', $type, $size, $args['section'], $args['id'], $value, $placeholder ); + $html .= $this->get_field_description( $args ); + + echo $html; + } + + /** + * Displays a number field for a settings field + * + * @param array $args settings field args + */ + function callback_number( $args ) { + $value = esc_attr( $this->get_option( $args['id'], $args['section'], $args['std'] ) ); + $size = isset( $args['size'] ) && !is_null( $args['size'] ) ? $args['size'] : 'regular'; + $type = isset( $args['type'] ) ? $args['type'] : 'number'; + $placeholder = empty( $args['placeholder'] ) ? '' : ' placeholder="' . $args['placeholder'] . '"'; + $min = !isset( $args['min'] ) ? '' : ' min="' . $args['min'] . '"'; + $max = empty( $args['max'] ) ? '' : ' max="' . $args['max'] . '"'; + $step = empty( $args['max'] ) ? '' : ' step="' . $args['step'] . '"'; + + $html = sprintf( '', $type, $size, $args['section'], $args['id'], $value, $placeholder, $min, $max, $step ); + $html .= $this->get_field_description( $args ); + + echo $html; + } + + /** + * Displays a checkbox for a settings field + * + * @param array $args settings field args + * @version 1.0.23 + */ + function callback_checkbox( $args ) { + + $value = esc_attr( $this->get_option( $args['id'], $args['section'], $args['std'] ) ); + + $html = '
'; + $html .= sprintf( '', $args['desc'], '', '

', '

' ); + $html .= '
'; + + echo $html; + } + + /** + * Displays a multicheckbox a settings field + * + * @param array $args settings field args + * @version 1.0.23 + */ + function callback_multicheck( $args ) { + + $br = ( 'roles_for_password_reset' == $args['id'] ) ? '' : '
'; + $value = $this->get_option( $args['id'], $args['section'], $args['std'] ); + $html = '
'; + $html .= sprintf( '', $args['section'], $args['id'] ); + foreach ( $args['options'] as $key => $label ) { + $checked = isset( $value[$key] ) ? $value[$key] : '0'; + $html .= sprintf( '%3$s', $label, '', $br ); + } + + $html .= $this->get_field_description( $args ); + $html .= '
'; + + echo $html; + } + + /** + * Displays a multicheckbox a settings field + * + * @param array $args settings field args + */ + function callback_radio( $args ) { + + $value = $this->get_option( $args['id'], $args['section'], $args['std'] ); + $html = '
'; + + foreach ( $args['options'] as $key => $label ) { + $html .= sprintf( '
', $label ); + } + + $html .= $this->get_field_description( $args ); + $html .= '
'; + + echo $html; + } + + /** + * Displays a selectbox for a settings field + * + * @param array $args settings field args + */ + function callback_select( $args ) { + + $value = esc_attr( $this->get_option( $args['id'], $args['section'], $args['std'] ) ); + $size = isset( $args['size'] ) && !is_null( $args['size'] ) ? $args['size'] : 'regular'; + $html = sprintf( '' ); + $html .= $this->get_field_description( $args ); + + echo $html; + } + + /** + * Displays a textarea for a settings field + * + * @param array $args settings field args + */ + function callback_textarea( $args ) { + + $value = esc_textarea( $this->get_option( $args['id'], $args['section'], $args['std'] ) ); + $size = isset( $args['size'] ) && !is_null( $args['size'] ) ? $args['size'] : 'regular'; + $placeholder = empty( $args['placeholder'] ) ? '' : ' placeholder="'.$args['placeholder'].'"'; + + $html = sprintf( '', $size, $args['section'], $args['id'], $placeholder, $value ); + $html .= $this->get_field_description( $args ); + + echo $html; + } + + + /** + * Displays a textarea for a settings field + * + * @param array $args settings field args + * @return string $html the html to be displayed. + * @since 1.0.0 + */ + function callback_html( $args ) { + + echo $this->get_field_description( $args ); + } + + /** + * Displays a rich text textarea for a settings field + * + * @param array $args settings field args + * @return string $html the html to be displayed. + */ + function callback_wysiwyg( $args ) { + + $value = $this->get_option( $args['id'], $args['section'], $args['std'] ); + $size = isset( $args['size'] ) && !is_null( $args['size'] ) ? $args['size'] : '500px'; + + echo '
'; + + $editor_settings = array( + 'teeny' => true, + 'textarea_name' => $args['section'] . '[' . $args['id'] . ']', + 'textarea_rows' => 10, + 'media_buttons' => false, + ); + + if ( isset( $args['options'] ) && is_array( $args['options'] ) ) { + $editor_settings = array_merge( $editor_settings, $args['options'] ); + } + + wp_editor( $value, $args['section'] . '-' . $args['id'], $editor_settings ); + + echo '
'; + + echo $this->get_field_description( $args ); + } + + /** + * Displays a file upload field for a settings field + * + * @param array $args settings field args + */ + function callback_file( $args ) { + + $value = esc_attr( $this->get_option( $args['id'], $args['section'], $args['std'] ) ); + $size = isset( $args['size'] ) && !is_null( $args['size'] ) ? $args['size'] : 'regular'; + $id = $args['section'] . '[' . $args['id'] . ']'; + $label = isset( $args['options']['button_label'] ) ? $args['options']['button_label'] : __( 'Choose File' ); + + $html = sprintf( '', $size, $args['section'], $args['id'], $value ); + $html .= ''; + $html .= $this->get_field_description( $args ); + + echo $html; + } + + /** + * Displays a password field for a settings field. + * + * @param array $args settings field args. + */ + function callback_password( $args ) { + + $value = esc_attr( $this->get_option( $args['id'], $args['section'], $args['std'] ) ); + $size = isset( $args['size'] ) && !is_null( $args['size'] ) ? $args['size'] : 'regular'; + + $html = sprintf( '', $size, $args['section'], $args['id'], $value ); + $html .= $this->get_field_description( $args ); + + echo $html; + } + + /** + * Displays a color picker field for a settings field. + * + * @param array $args settings field args. + */ + function callback_color( $args ) { + + $value = esc_attr( $this->get_option( $args['id'], $args['section'], $args['std'] ) ); + $size = isset( $args['size'] ) && !is_null( $args['size'] ) ? $args['size'] : 'regular'; + + $html = sprintf( '', $size, $args['section'], $args['id'], $value, $args['std'] ); + $html .= $this->get_field_description( $args ); + + echo $html; + } + + /** + * Displays a search field for a autologin field. + * + * @param array $args settings field args. + */ + function callback_autologin( $args ) { + + $html = apply_filters( 'loginpress_autologin', $args ); + $html .= $this->get_field_description( $args ); + + echo $html; + } + + /** + * Displays a text field for a hidelogin field + * + * @param array $args settings field args + */ + function callback_hidelogin( $args ) { + + $value = esc_attr( $this->get_option( $args['id'], $args['section'], $args['std'] ) ); + $html = apply_filters( 'loginpress_hidelogin', $args, $value ); + $html .= $this->get_field_description( $args ); + + echo $html; + } + + /** + * Displays a search field for a login redirects. + * + * @param array $args settings field args + * @since 1.0.23 + */ + function callback_login_redirect( $args ) { + + $html = apply_filters( 'loginpress_login_redirects', $args ); + $html .= $this->get_field_description( $args ); + + echo $html; + } + + /** + * Displays a search field for a Register Fields. + * + * @param array $args settings field args + * @since 1.0.23 + */ + function callback_register_fields( $args ) { + + $html = apply_filters( 'loginpress_register_fields', $args ); + $html .= $this->get_field_description( $args ); + + echo $html; + } + + /** + * Sanitize callback for Settings API + * + * @param array $options The options array. + * @return mixed + */ + function sanitize_options( $options ) { + + if ( !$options ) { + return $options; + } + + foreach( $options as $option_slug => $option_value ) { + $sanitize_callback = $this->get_sanitize_callback( $option_slug ); + + // If callback is set and not false returned, call the sanitization function accordingly + if ( $sanitize_callback !== false ) { + $options[ $option_slug ] = call_user_func( $sanitize_callback, $option_value ); + continue; + } + } + + return $options; + } + + /** + * Get sanitization callback for given option slug + * + * @param string $slug option slug + * + * @return mixed string or bool false + */ + function get_sanitize_callback( $slug = '' ) { + if ( empty( $slug ) ) { + return false; + } + + // Iterate over registered fields and see if we can find proper callback + foreach( $this->settings_fields as $section => $options ) { + foreach ( $options as $option ) { + if ( $option['name'] != $slug ) { + continue; + } + + // Return the callback name + return isset( $option['sanitize_callback'] ) && is_callable( $option['sanitize_callback'] ) ? $option['sanitize_callback'] : false; + } + } + + return false; + } + + /** + * Get the value of a settings field + * + * @param string $option settings field name + * @param string $section the section name this field belongs to + * @param string $default default text if it's not found + * @return string + */ + function get_option( $option, $section, $default = '' ) { + + $options = get_option( $section ); + + if ( isset( $options[$option] ) ) { + return $options[$option]; + } + + return $default; + } + + /** + * Show navigation as tab + * + * Shows all the settings section labels as tab. + * + * @since 1.0.0 + * @return $html The html output. + */ + function show_navigation() { + + $html = '
Menu
'; + + echo $html; + } + + /** + * Show the section settings forms + * + * This function displays every sections in a different form. + * @since 1.0.9 + * @version 1.1.6 + */ + function show_forms() { ?> + +
+ settings_sections as $form ) : ?> + + + +
+ + script(); + } + + /** + * Tabulable JavaScript codes & Initiate Color Picker + * + * This code uses local-storage for displaying active tabs + */ + function script() { ?> + + + _style_fix(); + } + + /** + * Fixing the style conflict of color picker. + * + * @return void + */ + function _style_fix() { + + global $wp_version; + + if ( version_compare( $wp_version, '3.8', '<=' ) ) : ?> + + {$section['title']}\n"; + echo $section['callback'] ; + if ( !isset( $wp_settings_fields ) || !isset( $wp_settings_fields[$page] ) || !isset( $wp_settings_fields[$page][$section['id']] ) ) + continue; + echo ''; + do_settings_fields($page, $section['id']); + echo '
'; + } + } + } +endif; diff --git a/wp-content/plugins/loginpress/classes/class-loginpress-setup.php b/wp-content/plugins/loginpress/classes/class-loginpress-setup.php new file mode 100644 index 0000000..14ac38a --- /dev/null +++ b/wp-content/plugins/loginpress/classes/class-loginpress-setup.php @@ -0,0 +1,637 @@ +settings_api = new LoginPress_Settings_API; + + add_action( 'admin_init', array( $this, 'loginpress_setting_init' ) ); + add_action( 'admin_menu', array( $this, 'loginpress_setting_menu' ) ); + } + + /** + * Initialize the settings + * + * @return void + */ + function loginpress_setting_init() { + + //set the settings. + $this->settings_api->set_sections( $this->get_settings_sections() ); + $this->settings_api->set_fields( $this->get_settings_fields() ); + + //initialize settings. + $this->settings_api->admin_init(); + + //reset settings. + $this->load_default_settings(); + } + + /** + * Load the default settings + * + * @return void + */ + function load_default_settings() { + + $_loginpress_Setting = get_option( 'loginpress_setting' ); + if ( isset( $_loginpress_Setting['reset_settings'] ) && 'on' == $_loginpress_Setting['reset_settings'] ) { + + $loginpress_last_reset = array( 'last_reset_on' => date('Y-m-d') ); + update_option( 'loginpress_customization', $loginpress_last_reset ); + update_option( 'customize_presets_settings', 'minimalist' ); + $_loginpress_Setting['reset_settings'] = 'off'; + update_option( 'loginpress_setting', $_loginpress_Setting ); + add_action( 'admin_notices', array( $this, 'settings_reset_message' ) ); + } + } + + /** + * Reset settings message + * + * @return void + */ + function settings_reset_message() { + + $class = 'notice notice-success'; + $message = __( 'Default Settings Restored', 'loginpress' ); + + printf( '

%2$s

', $class, $message ); + } + + /** + * Code for add loginpress icon in admin bar. + * + * @since 1.0.9 + * @return void + */ + function loginpress_setting_menu() { + + /** + * The White-labeling to hide the sidebar menu for specific user/s. + */ + if ( apply_filters( 'loginpress_sidebar_hide_menu_item', false ) ) { + return; + } + + add_action('admin_head', 'loginpressicon'); // admin_head is a hook loginpressicon is a function we are adding it to the hook + + // LoginPress Dashicon + function loginpressicon() { + $ttf = plugins_url( '../loginpressfonts/loginpress.ttf?gb7unf', __FILE__ ); + $woff = plugins_url( '../loginpressfonts/loginpress.woff?gb7unf', __FILE__ ); + $svg = plugins_url( '../loginpressfonts/loginpress.svg?gb7unf', __FILE__ ); + $eotie = plugins_url( '../loginpressfonts/loginpress.eot?gb7unf#iefix', __FILE__ ); + $eot = plugins_url( '../loginpressfonts/loginpress.eot?gb7unf', __FILE__ ); + echo ""; + } + + // Create LoginPress Parent Page. + add_menu_page( + __( 'LoginPress', 'loginpress' ), + 'LoginPress', + 'manage_options', + "loginpress-settings", + array( $this, 'plugin_page' ), + false, + 50 + ); + + // Create Submenu for LoginPress > Settings Page. + add_submenu_page( + 'loginpress-settings', + __( 'Settings', 'loginpress' ), + __( 'Settings', 'loginpress' ), + 'manage_options', + "loginpress-settings", + array( $this, 'plugin_page' ) + ); + + // Create Submenu for LoginPress > Customizer Page. + add_submenu_page( + 'loginpress-settings', + __( 'Customizer', 'loginpress' ), + __( 'Customizer', 'loginpress' ), + 'manage_options', + "loginpress", + '__return_null' + ); + + // Create Submenu for LoginPress > Help Page. + add_submenu_page( + 'loginpress-settings', + __( 'Help', 'loginpress' ), + __( 'Help', 'loginpress' ), + 'manage_options', + "loginpress-help", + array( $this, 'loginpress_help_page' ) + ); + + // Create Submenu for LoginPress > Import / Export Page. + add_submenu_page( + 'loginpress-settings', + __( 'Import/Export LoginPress Settings', 'loginpress' ), + __( 'Import / Export', 'loginpress' ), + 'manage_options', + "loginpress-import-export", + array( $this, 'loginpress_import_export_page' ) + ); + + // Create Submenu for LoginPress > Add-Ons Page. + add_submenu_page( + 'loginpress-settings', + __( 'Add-Ons', 'loginpress' ), + __( 'Add-Ons', 'loginpress' ), + 'manage_options', + "loginpress-addons", + array( $this, 'loginpress_addons_page' ) + ); + + } + + /** + * Render the settings section for LoginPress. + * + * @since 1.0.0 + * @version 3.0.0 + * + * @return void + */ + function get_settings_sections() { + + /** + * Add a general settings section of LoginPress. + * id: unique section id + * title: Title of the section + * sub-title: Sub title of the section + * description: Description of the section + * video link: Video link for the section + */ + $loginpress_general_tab = array( + array( + 'id' => 'loginpress_setting', + 'title' => __( 'Settings', 'loginpress' ), + 'sub-title' => __( 'Login Page Setting', 'loginpress' ), + 'desc' => sprintf( __( '%3$sEverything else is customizable through %1$sWordPress Customizer%2$s.%4$s', 'loginpress' ), '', '', '

', '

' ), + 'video_link' => 'GMAwsHomJlE', + + ), + ); + + /** + * Add Promotion tabs in settings page. + * + * @since 1.1.22 + * @version 1.1.24 + */ + if ( ! has_action( 'loginpress_pro_add_template' ) ) { + + include LOGINPRESS_DIR_PATH . 'classes/class-loginpress-promotion.php'; + } + + $sections = apply_filters( 'loginpress_settings_tab', $loginpress_general_tab ); + + return $sections; + } + + /** + * Returns all the settings fields + * + * @since 1.0.9 + * @version 3.0.0 + * @return array settings fields + */ + function get_settings_fields() { + + /** + * @param array $_free_fields array of free fields. + * @var array + */ + $_free_fields = array( + array( + 'name' => 'enable_password_reset', + 'label' => __( 'Force Password Reset', 'loginpress' ), + 'desc' => __( 'Enable to enforce password reset after certain duration.', 'loginpress' ), + 'extra_desc' => __( 'Enable to enforce password reset after certain duration.', 'loginpress' ), + 'type' => 'checkbox' + ), + array( + 'name' => 'loginpress_password_reset_time_limit', + 'label' => __( 'Password Reset Duration', 'loginpress' ), + 'desc' => __( 'Set the duration in days after which the user will be forced to change password again. e.g 10.', 'loginpress' ), + 'placeholder' => __( '10', 'loginpress' ), + 'min' => 0, + 'max' => $this->change_force_time_limit( 500 ), + 'step' => '1', + 'type' => 'number', + 'default' => 0, + 'sanitize_callback' => 'absint' + ), + array( + 'name' => 'roles_for_password_reset', + 'label' => __( 'Password Reset For', 'loginpress' ), + 'desc' => __( 'Choose the roles for password reset forcefully to secure the site\'s security.', 'loginpress' ), + 'type' => 'multicheck', + 'options' => $this->get_all_roles(), + ), + array( + 'name' => 'session_expiration', + 'label' => __( 'Session Expire', 'loginpress' ), + + + 'desc' => sprintf( __( 'Set the session expiration time in minutes. e.g: 10', 'loginpress' ) ), //
When you set the time, here you need to set the expiration cookies. for this, you just need to logout at least one time. After login again, it should be working fine.
For removing the session expiration just pass empty value in “Expiration” field and save it. Now clear the expiration cookies by logout at least one time. + 'placeholder' => __( '10', 'loginpress' ), + 'min' => 0, + // 'max' => 100, + 'step' => '1', + 'type' => 'number', + 'default' => 'Title', + 'sanitize_callback' => 'absint' + ), + // array( + // 'name' => 'enable_privacy_policy', + // 'label' => __( 'Enable Privacy Policy', 'loginpress' ), + // 'desc' => __( 'Enable Privacy Policy checkbox on registration page.', 'loginpress' ), + // 'type' => 'checkbox' + // ), + // array( + // 'name' => 'privacy_policy', + // 'label' => __( 'Privacy & Policy', 'loginpress' ), + // 'desc' => __( 'Right down the privacy and policy description.', 'loginpress' ), + // 'type' => 'wysiwyg', + // 'default' => __( sprintf( __( '%1$sPrivacy Policy%2$s.', 'loginpress' ), '', '' ) ) + // ), + array( + 'name' => 'auto_remember_me', + 'label' => __( 'Auto Remember Me', 'loginpress' ), + 'desc' => sprintf( __( 'Enable to keep the %1$sRemember Me%2$s option always checked on the Login Page.', 'loginpress' ), '', '' ), + 'type' => 'checkbox' + ), + array( + 'name' => 'enable_reg_pass_field', + 'label' => __( 'Custom Password Fields', 'loginpress' ), + 'desc' => sprintf( __( 'Enable to add %1$sCustom Password Fields%2$s to the Registration Form.', 'loginpress' ), '', '' ), + 'type' => 'checkbox' + ), + array( + 'name' => 'login_order', + 'label' => __( 'Login Order', 'loginpress' ), + // 'desc' => __( 'Enable users to login using their username and/or email address.', 'loginpress' ), + 'type' => 'radio', + 'default' => 'default', + 'options' => array( + 'default' => __( 'Both Username Or Email Address', 'loginpress' ), + 'username' => __( 'Only Username', 'loginpress' ), + 'email' => __( 'Only Email Address', 'loginpress' ) + ) + ), + array( + 'name' => 'enable_pci_compliance', + 'label' => __( 'Enable PCI Compliance', 'loginpress' ), + 'desc' => sprintf( __( 'Enable to add %1$sPCI Compliance%2$s to WordPress Login Forms.', 'loginpress' ), '', '' ), + 'type' => 'checkbox' + ), + // array( + // 'name' => 'login_with_email', + // 'label' => __( 'Login with Email', 'loginpress' ), + // 'desc' => __( 'Force user to login with Email Only Instead Username.', 'loginpress' ), + // 'type' => 'checkbox' + // ), + array( + 'name' => 'reset_settings', + 'label' => __( 'Reset customizer settings', 'loginpress' ), + 'desc' => sprintf( __( 'Enable to reset customizer settings.%1$sNote: All your customization will be reverted back to the LoginPress default theme.%2$s', 'loginpress' ), '', '' ), + 'type' => 'checkbox' + ), + ); + + // Hide Advertisement in version 1.1.3 + // if ( ! has_action( 'loginpress_pro_add_template' ) ) { + // array_unshift( $_free_fields , array( + // 'name' => 'enable_recaptcha_promo', + // 'label' => __( 'Enable reCAPTCHA', 'loginpress' ), + // 'desc' => __( 'Enable LoginPress reCaptcha', 'loginpress' ), + // 'type' => 'checkbox' + // ) ); + // } + + /** + * Add option to remove language switcher option + * + * @since 1.5.11 + */ + if ( version_compare( $GLOBALS['wp_version'], '5.9', '>=' ) && ! empty( get_available_languages() ) ) { + $_free_fields = $this->loginpress_language_switcher( $_free_fields ); + } + + /** + * Add WooCommerce lostpassword_url field. + * + * @since 1.1.7 + */ + if ( class_exists( 'WooCommerce' ) ) { + $_free_fields = $this->loginpress_woocommerce_lostpasword_url( $_free_fields ); + } + + // Add loginpress_uninstall field in version 1.1.9 + $_free_fields = $this->loginpress_uninstallation_tool( $_free_fields ); + $_settings_fields = apply_filters( 'loginpress_pro_settings', $_free_fields ); + $settings_fields = array( 'loginpress_setting' => $_settings_fields ); + $tab = apply_filters( 'loginpress_settings_fields', $settings_fields ); + + return $tab; + } + + /** + * get all roles for force rest password after six months in settings section + * @since 3.0.0 + * + * @return array + */ + function get_all_roles() { + + global $wp_roles; + $loginpress_force_reset_roles = array(); + + foreach( $wp_roles->roles as $role => $val ) { + + $loginpress_force_reset_roles[ $val['name'] ] = sanitize_text_field( $val['name'] ); + } + return $loginpress_force_reset_roles; + } + + /** + * Main settings page content. + * @since 1.0.19 + * @version 3.0.0 + */ + function plugin_page() { + + echo $this::loginpress_admin_page_header(); + echo '
'; + echo '
'; + echo '

'; + esc_html_e( 'LoginPress - Rebranding your boring WordPress Login pages', 'loginpress' ); + echo '

'; + echo '
'; + $this->settings_api->show_navigation(); + $this->settings_api->show_forms(); + + echo '
'; + echo '
'; + } + + /** + * [loginpress_help_page callback function for sub-page Help] + * @since 1.0.19 + * @version 3.0.0 + */ + function loginpress_help_page(){ + + echo LoginPress_Settings::loginpress_admin_page_header(); + include LOGINPRESS_DIR_PATH . 'classes/class-loginpress-log.php'; + + $html = '
'; + $html .= '

' . esc_html__( 'Help & Troubleshooting', 'loginpress' ) . '

'; + $html .="

"; + $html .= sprintf( __( 'Free plugin support is available on the %1$s plugin support forums%2$s.', 'loginpress' ), '', '' ); + $html .="
"; + + if ( ! class_exists( 'LoginPress_Pro' ) ) { + $html .= sprintf( __( 'For premium features, add-ons and priority email support, %1$s upgrade to pro%2$s.', 'loginpress' ), '', '' ); + } else { + $html .= sprintf( __( 'For premium features, add-ons and priority email support, Please submit a question %1$shere%2$s!', 'loginpress' ), '','' ); + } + + $html .="
"; + $html .= sprintf( __( 'Found a bug or have a feature request? Please submit an issue %1$shere%2$s!', 'loginpress' ), '','' ); + $html .="

"; + $html .= '
'; + $html .= ''; + $html .= ''; + $html .= '' . __( 'LoginPress Log File Downloaded Successfully!' ) . ''; + $html .= '
'; + echo $html; + } + + /** + * [loginpress_import_export_page callback function for sub-page Import / Export] + * @since 1.0.19 + * @version 3.0.0 + */ + function loginpress_import_export_page(){ + + echo LoginPress_Settings::loginpress_admin_page_header(); + include LOGINPRESS_DIR_PATH . 'include/loginpress-import-export.php'; + } + + /** + * [loginpress_addons_page callback function for sub-page Add-ons] + * @since 1.0.19 + * @version 3.0.0 + */ + function loginpress_addons_page() { + + echo LoginPress_Settings::loginpress_admin_page_header(); + $active_plugins = get_option('active_plugins'); + + if ( in_array( 'loginpress-pro/loginpress-pro.php', $active_plugins ) && version_compare( LOGINPRESS_PRO_VERSION, '3.0.0', '<' ) ) { + include LOGINPRESS_DIR_PATH . 'classes/class-loginpress-deprecated-addons.php'; + } else { + include LOGINPRESS_DIR_PATH . 'classes/class-loginpress-addons.php'; + } + $obj_loginpress_addons = new LoginPress_Addons(); + $obj_loginpress_addons->_addon_html(); + } + + /** + * Get all the pages + * + * @return array page names with key value pairs + */ + function get_pages() { + $pages = get_pages(); + $pages_options = array(); + if ( $pages ) { + foreach ($pages as $page) { + $pages_options[$page->ID] = $page->post_title; + } + } + + return $pages_options; + } + + /** + * loginpress_woocommerce_lostpasword_url [merge a woocommerce lostpassword url field with the last element of array.] + * @param array $fields_list + * @since 1.1.7 + * @return array + */ + function loginpress_woocommerce_lostpasword_url( $fields_list ) { + + $array_elements = array_slice( $fields_list, 0, -1 ); //slice a last element of array. + $last_element = end( $fields_list ); // last element of array. + $lostpassword_url = array( + 'name' => 'lostpassword_url', + 'label' => __( 'Lost Password URL', 'loginpress' ), + 'desc' => __( 'Use WordPress default lost password URL instead of WooCommerce custom lost password URL.', 'loginpress' ), + 'type' => 'checkbox' + ); + $last_two_elements = array_merge( array( $lostpassword_url, $last_element ) ); // merge last 2 elements of array. + return array_merge( $array_elements, $last_two_elements ); // merge an array and return. + } + + /** + * loginpress_language_switcher [merge a language switcher in the settings element of array.] + * + * @param array $fields_list The free fields of LoginPress. + * @since 1.5.11 + * @return array the total fields including the added field of language switcher + */ + function loginpress_language_switcher( $fields_list ) { + + $array_elements = array_slice( $fields_list, 0, -1 ); //slice a last element of array. + $last_element = end( $fields_list ); // last element of array. + $switcher_option = array( + 'name' => 'enable_language_switcher', + 'label' => __( 'Language Switcher', 'loginpress' ), + 'desc' => sprintf( __( 'Enable to remove %1$sLanguage Switcher Dropdown%2$s on Login Forms.', 'loginpress' ), '', '' ), + 'type' => 'checkbox' + ); + $lang_switch_element = array_merge( array( $switcher_option , $last_element ) ); // merge last 2 elements of array. + return array_merge( $array_elements, $lang_switch_element ); // merge an array and return. + } + + /** + * loginpress_uninstallation_filed [merge a uninstall loginpress field with array of element.] + * @param array $fields_list + * @since 1.1.9 + * @return array + */ + function loginpress_uninstallation_filed( $fields_list ) { + + $loginpress_page_check = ''; + if ( is_multisite() ) { + $loginpress_page_check = __( 'and LoginPress page', 'loginpress' ); + } + + $loginpress_db_check = array( array( + 'name' => 'loginpress_uninstall', + 'label' => __( 'Remove Settings On Uninstall', 'loginpress' ), + 'desc' => sprintf( esc_html__( 'Enable to remove all custom settings made %1$s by LoginPress upon uninstall.' ), $loginpress_page_check ), + 'type' => 'checkbox' + ) ); + + return array_merge( $fields_list, $loginpress_db_check ); // merge an array and return. + } + + /** + * loginpress_uninstallation_tool [Pass return true in loginpress_multisite_uninstallation_tool filter's callback for enable uninsatalltion control on each site.] + * @param array $_free_fields + * @since 1.1.9 + * @return array + */ + function loginpress_uninstallation_tool( $_free_fields ) { + + if ( is_multisite() && ! apply_filters( 'loginpress_multisite_uninstallation_tool', false ) ) { + if ( get_current_blog_id() == '1' ) { + $_free_fields = $this->loginpress_uninstallation_filed( $_free_fields ); + } + } else { + $_free_fields = $this->loginpress_uninstallation_filed( $_free_fields ); + } + + return $_free_fields; + } + + /** + * Filter to increase days for force reset password in settings + * @param int $days + * @since 3.0.0 + * @return int $days + */ + function change_force_time_limit( $days ) { + + $force_reset_duration = absint( apply_filters( 'increase_force_time_limit', $days ) ); + $force_reset_duration = 0 === $force_reset_duration ? 182 : $force_reset_duration; + return $force_reset_duration; + } + + /** + * Header HTML. + * Call on LoginPress pages at dashboard. + * + * @since 3.0.0 + */ + public static function loginpress_admin_page_header() { + + if ( ! has_action( 'loginpress_pro_add_template' ) ) { + $button_text = '' . sprintf( __( 'Upgrade%1$s to Pro%2$s', 'loginpress' ), '', '' ) . ''; + } else { + $button_text = '' . esc_html__( 'Support', 'loginpress' ) . ''; + } + ?> +
+
+ +
+ + +
+
+
+ choices ) ) + return; + + $name = 'loginpress_preset-' . $this->id; ?> + + + label ); ?> + description ) ) : ?> + description ); ?> + + + value() ) ? explode( ',', $this->value() ) : $this->value(); ?> +
+ + choices as $val ) : ?> + + + + +
+ class="image-select" type="radio" value="" id="id . $val['id']; ?>" name="" value(), $val['id'] ); ?> /> + + + + + + + + + + +
+ + +
+ + link(); ?> value="value(); ?>" /> + + + + diff --git a/wp-content/plugins/loginpress/classes/control-promo.php b/wp-content/plugins/loginpress/classes/control-promo.php new file mode 100644 index 0000000..5798ac4 --- /dev/null +++ b/wp-content/plugins/loginpress/classes/control-promo.php @@ -0,0 +1,167 @@ + Controler. + * + * @since 1.0.17 + * @access public + * @var string + */ + public $promo_text; + + /** + * Promotion link for the Controler + * + * @since 1.0.17 + * @access public + * @var string + */ + public $link; + + /** + * Enqueue scripts/styles. + * + * @since 1.0.17 + * @access public + * @return void + */ + public function enqueue() { + // wp_enqueue_script( 'jt-customize-controls', plugins_url( '/customize-controls.js' , __FILE__ ), array( 'jquery' ) ); + // wp_enqueue_script( 'jquery-ui-button' ); + } + + /** + * Displays the control content. + * + * @since 1.0.17 + * @access public + * @return void + */ + public function render_content() { ?> + + + label ); ?> + description ) ) : ?> + description ); ?> + + +
+ +
+ +
+ promo_text ); ?> +
+ <?php echo esc_attr( $this->id ); ?> +
+
+
+ + + diff --git a/wp-content/plugins/loginpress/classes/controls/background-gallery.php b/wp-content/plugins/loginpress/classes/controls/background-gallery.php new file mode 100644 index 0000000..492857f --- /dev/null +++ b/wp-content/plugins/loginpress/classes/controls/background-gallery.php @@ -0,0 +1,127 @@ +choices ) ) { + return; + } + + $name = 'loginpress_gallery-' . $this->id; ?> + + label ); ?> + description ) ) : ?> + description ); ?> + + + + + link(); ?> value="value(); ?>" /> + + + diff --git a/wp-content/plugins/loginpress/classes/controls/group.php b/wp-content/plugins/loginpress/classes/controls/group.php new file mode 100644 index 0000000..0772e84 --- /dev/null +++ b/wp-content/plugins/loginpress/classes/controls/group.php @@ -0,0 +1,61 @@ + + +
+

label ); ?>

+
+

+ info_text ); ?> +

+
+
+ type ) { + default: + + case 'hr' : + echo '
'; + break; + } + } +} diff --git a/wp-content/plugins/loginpress/classes/controls/radio-button.php b/wp-content/plugins/loginpress/classes/controls/radio-button.php new file mode 100644 index 0000000..8ca8801 --- /dev/null +++ b/wp-content/plugins/loginpress/classes/controls/radio-button.php @@ -0,0 +1,92 @@ + + + + + loginpress_key ) && empty( $this->loginpress_setting ) ) ? 'minimalist' : 'default1'; + + /** + * @var loginpress_array get_option + * @since 1.0.0 + * @since 3.0.3 + */ +$loginpress_array = (array) get_option( 'loginpress_customization' ); +$loginpress_preset = get_option( 'customize_presets_settings', $loginpress_default_theme ); + +/** + * [loginpress_get_option_key Check the key of customizer option and return it's value.] + * @param string $loginpress_key Key of the customizer setting option. + * @param array $loginpress_array LoginPress customizer options. + * + * @return string value of the customizer setting option. + * + * @since 1.0.0 + * @version 1.5.2 + */ +if ( ! function_exists( 'loginpress_get_option_key' ) ) { + + function loginpress_get_option_key( $loginpress_key, $loginpress_array ) { + + if ( array_key_exists( $loginpress_key, $loginpress_array ) ) { + + if ( 'loginpress_custom_css' == $loginpress_key ) { + return $loginpress_array[ $loginpress_key ]; + } else { + return esc_js( $loginpress_array[ $loginpress_key ] ); + } + + } + } +} + +/** + * [loginpress_bg_option Check the background image of the template.] + * @param string $loginpress_key [description] + * @param array $loginpress_array [description] + * @return string [description] + * @since 1.1.0 + * @version 1.5.2 + */ +if ( ! function_exists( 'loginpress_bg_option' ) ) { + + function loginpress_bg_option( $loginpress_key, $loginpress_array ) { + + if ( array_key_exists( $loginpress_key, $loginpress_array ) ) { + return $loginpress_array[ $loginpress_key ]; + } else { + return true; + } + } +} + +/** + * [loginpress_check_px Return the value with 'px'] + * @param string $value [description] + * @return string [description] + * @since 1.1.0 + * @version 1.5.2 + */ +if ( ! function_exists( 'loginpress_check_px' ) ) { + + function loginpress_check_px( $value ) { + + if ( isset( $value ) && ! empty( $value ) && strpos( $value, "px" ) ) { + return $value; + } else { + if ( ! empty( $value ) ) { + return $value . 'px'; + } + } + } +} + +/** + * [loginpress_check_percentage Return the value with '%'] + * @param string $value [description] + * @return string [description] + * @since 1.1.0 + * @version 1.5.2 + */ +if ( ! function_exists( 'loginpress_check_percentage' ) ) { + + function loginpress_check_percentage( $value ) { + + if ( strpos( $value, "%" ) ) { + return $value; + } else { + if ( ! empty( $value ) ) { + return $value . '%'; + } + } + } +} + +/** + * [if for login page background] + * @since 1.1.0 + * @version 1.1.2 + * @return string + */ +$loginpress_custom_background = loginpress_get_option_key( 'setting_background', $loginpress_array ); +$loginpress_gallery_background = loginpress_get_option_key( 'gallery_background', $loginpress_array ); +if ( ! empty ( $loginpress_custom_background ) ) { // Use Custom Background + $loginpress_background_img = $loginpress_custom_background; +} else if ( ! empty ( $loginpress_gallery_background ) ) { // Background from Gallery Control. + if ( LOGINPRESS_DIR_URL . 'img/gallery/img-1.jpg' == $loginpress_gallery_background ) { // If user select 1st image from gallery control then show template's default image. + $loginpress_background_img = ''; + } else { // Use selected image from gallery control. + $loginpress_background_img = $loginpress_gallery_background; + } +} else { // exceptional case (use default image). + $loginpress_background_img = ''; +} + +$loginpress_background_img = empty( $loginpress_background_img ) ? '' : str_replace( '&', '&', $loginpress_background_img ); + +/** + * Add !important with property's value. To avoid overriding from theme. + * @return string + * @since 1.1.2 + * @version 1.5.2 + */ +if ( ! function_exists( 'loginpress_important' ) ) { + + function loginpress_important() { + + $important = ''; + if ( ! is_customize_preview() ) { // Avoid !important in customizer previewer. + $important = ' !important'; + } + return $important; + } +} + +$loginpress_logo_img = loginpress_get_option_key( 'setting_logo', $loginpress_array ); +$loginpress_logo_display = loginpress_get_option_key( 'setting_logo_display', $loginpress_array ); +$loginpress_get_logo_width = loginpress_get_option_key( 'customize_logo_width', $loginpress_array ); +$loginpress_logo_width = loginpress_check_px( $loginpress_get_logo_width ); +$loginpress_get_logo_height = loginpress_get_option_key( 'customize_logo_height', $loginpress_array ); +$loginpress_logo_height = loginpress_check_px( $loginpress_get_logo_height ); +$loginpress_get_logo_padding = loginpress_get_option_key( 'customize_logo_padding', $loginpress_array ); +$loginpress_logo_padding = loginpress_check_px( $loginpress_get_logo_padding ); +$loginpress_btn_bg = loginpress_get_option_key( 'custom_button_color', $loginpress_array ); +$loginpress_btn_border = loginpress_get_option_key( 'button_border_color', $loginpress_array ); +$loginpress_btn_shadow = loginpress_get_option_key( 'custom_button_shadow', $loginpress_array ); +$loginpress_btn_color = loginpress_get_option_key( 'button_text_color', $loginpress_array ); +$loginpress_btn_hover_color = loginpress_get_option_key( 'button_hover_text_color', $loginpress_array ); +$loginpress_btn_hover_bg = loginpress_get_option_key( 'button_hover_color', $loginpress_array ); +$loginpress_btn_hover_border = loginpress_get_option_key( 'button_hover_border', $loginpress_array ); +// $loginpress_background_img = loginpress_get_option_key( 'setting_background', $loginpress_array ); +$loginpress_background_color = loginpress_get_option_key( 'setting_background_color', $loginpress_array ); +$loginpress_background_repeat = loginpress_get_option_key( 'background_repeat_radio', $loginpress_array ); +$loginpress_background_position = loginpress_get_option_key( 'background_position', $loginpress_array ); +$loginpress_background_position = isset( $loginpress_background_position ) ? str_replace( '-', ' ', $loginpress_background_position ) : ''; +$loginpress_background_image_size = loginpress_get_option_key( 'background_image_size', $loginpress_array ); +$loginpress_form_background_img = loginpress_get_option_key( 'setting_form_background', $loginpress_array ); +$loginpress_form_display_bg = loginpress_get_option_key( 'setting_form_display_bg', $loginpress_array ); +$loginpress_form_background_clr = loginpress_get_option_key( 'form_background_color', $loginpress_array ); +$loginpress_forget_form_bg_img = loginpress_get_option_key( 'forget_form_background', $loginpress_array ); +$loginpress_forget_form_bg_clr = loginpress_get_option_key( 'forget_form_background_color', $loginpress_array ); +$loginpress_form_width = loginpress_get_option_key( 'customize_form_width', $loginpress_array ); +$loginpress_get_form_height = loginpress_get_option_key( 'customize_form_height', $loginpress_array ); +$loginpress_form_height = loginpress_check_px( $loginpress_get_form_height ); +$loginpress_form_padding = loginpress_get_option_key( 'customize_form_padding', $loginpress_array ); +$loginpress_form_border = loginpress_get_option_key( 'customize_form_border', $loginpress_array ); +$loginpress_form_field_width = loginpress_get_option_key( 'textfield_width', $loginpress_array ); +$loginpress_form_field_margin = loginpress_get_option_key( 'textfield_margin', $loginpress_array ); +$loginpress_form_field_bg = loginpress_get_option_key( 'textfield_background_color', $loginpress_array ); +$loginpress_form_field_color = loginpress_get_option_key( 'textfield_color', $loginpress_array ); +$loginpress_form_field_label = loginpress_get_option_key( 'textfield_label_color', $loginpress_array ); +$loginpress_form_remember_label = loginpress_get_option_key( 'remember_me_label_size', $loginpress_array ); +$loginpress_welcome_bg_color = loginpress_get_option_key( 'message_background_color', $loginpress_array ); +$loginpress_welcome_bg_border = loginpress_get_option_key( 'message_background_border', $loginpress_array ); +$loginpress_footer_display = loginpress_get_option_key( 'footer_display_text', $loginpress_array ); +$loginpress_footer_decoration = loginpress_get_option_key( 'login_footer_text_decoration', $loginpress_array ); +$loginpress_footer_text_color = loginpress_get_option_key( 'login_footer_color', $loginpress_array ); +$loginpress_footer_text_hover = loginpress_get_option_key( 'login_footer_color_hover', $loginpress_array ); +$loginpress_get_footer_font_size = loginpress_get_option_key( 'login_footer_font_size', $loginpress_array ); +$loginpress_footer_font_size = loginpress_check_px( $loginpress_get_footer_font_size ); +$loginpress_remember_me_font_size = loginpress_get_option_key( 'remember_me_font_size', $loginpress_array ); +$loginpress_form_label_font_size = loginpress_get_option_key( 'customize_form_label', $loginpress_array ); +$loginpress_login_button_top = loginpress_get_option_key( 'login_button_top', $loginpress_array ); +$loginpress_login_button_bottom = loginpress_get_option_key( 'login_button_bottom', $loginpress_array ); +$loginpress_login_button_radius = loginpress_get_option_key( 'login_button_radius', $loginpress_array ); +$loginpress_login_button_shadow = loginpress_get_option_key( 'login_button_shadow', $loginpress_array ); +$loginpress_login_button_shadow_opacity = loginpress_get_option_key( 'login_button_shadow_opacity', $loginpress_array ); +$loginpress_login_button_width = loginpress_get_option_key( 'login_button_size', $loginpress_array ); +$loginpress_login_form_radius = loginpress_get_option_key( 'customize_form_radius', $loginpress_array ); +$loginpress_login_form_shadow = loginpress_get_option_key( 'customize_form_shadow', $loginpress_array ); +$loginpress_login_form_inset = loginpress_get_option_key( 'textfield_inset_shadow', $loginpress_array ); +$loginpress_login_form_opacity = loginpress_get_option_key( 'customize_form_opacity', $loginpress_array ); +$loginpress_login_textfield_radius = loginpress_get_option_key( 'textfield_radius', $loginpress_array ); +$loginpress_login_button_text_size = loginpress_get_option_key( 'login_button_text_size', $loginpress_array ); +$loginpress_textfield_shadow = loginpress_get_option_key( 'textfield_shadow', $loginpress_array ); +$loginpress_textfield_shadow_opacity= loginpress_get_option_key( 'textfield_shadow_opacity', $loginpress_array ); +$loginpress_footer_bg_color = loginpress_get_option_key( 'login_footer_bg_color', $loginpress_array ); +$loginpress_footer_links_font_size = loginpress_get_option_key( 'login_footer_links_text_size', $loginpress_array ); +$loginpress_footer_links_hover_size = loginpress_get_option_key( 'login_footer_links_hover_size', $loginpress_array ); +$loginpress_header_text_color = loginpress_get_option_key( 'login_head_color', $loginpress_array ); +$loginpress_header_text_hover = loginpress_get_option_key( 'login_head_color_hover', $loginpress_array ); +$loginpress_header_font_size = loginpress_get_option_key( 'login_head_font_size', $loginpress_array ); +$loginpress_header_bg_color = loginpress_get_option_key( 'login_head_bg_color', $loginpress_array ); +$loginpress_back_display = loginpress_get_option_key( 'back_display_text', $loginpress_array ); +$loginpress_back_decoration = loginpress_get_option_key( 'login_back_text_decoration', $loginpress_array ); +$loginpress_back_text_color = loginpress_get_option_key( 'login_back_color', $loginpress_array ); +$loginpress_back_text_hover = loginpress_get_option_key( 'login_back_color_hover', $loginpress_array ); +$loginpress_get_back_font_size = loginpress_get_option_key( 'login_back_font_size', $loginpress_array ); +$loginpress_back_font_size = loginpress_check_px( $loginpress_get_back_font_size ); +$copyright_background_color = loginpress_get_option_key( 'copyright_background_color', $loginpress_array ); +$copyright_text_color = loginpress_get_option_key( 'copyright_text_color', $loginpress_array ); +// $show_some_love_text_color = loginpress_get_option_key( 'show_some_love_text_color', $loginpress_array ); +$loginpress_back_bg_color = loginpress_get_option_key( 'login_back_bg_color', $loginpress_array ); +$loginpress_footer_link_color = loginpress_get_option_key( 'login_footer_text_color', $loginpress_array ); +$loginpress_footer_link_hover = loginpress_get_option_key( 'login_footer_text_hover', $loginpress_array ); +$loginpress_footer_link_bg_clr = loginpress_get_option_key( 'login_footer_backgroung_hover', $loginpress_array ); +$loginpress_custom_css = loginpress_get_option_key( 'loginpress_custom_css', $loginpress_array ); +$loginpress_display_bg = loginpress_bg_option( 'loginpress_display_bg', $loginpress_array ); +$loginpress_display_bg_video = loginpress_bg_option( 'loginpress_display_bg_video', $loginpress_array ); +$loginpress_bg_video = loginpress_get_option_key( 'background_video', $loginpress_array ); +$loginpress_bg_video_medium = loginpress_get_option_key( 'bg_video_medium', $loginpress_array ); +$loginpress_bg_yt_video_id = loginpress_get_option_key( 'yt_video_id', $loginpress_array ); +$loginpress_bg_video = wp_get_attachment_url( $loginpress_bg_video ); +$loginpress_bg_video_size = loginpress_get_option_key( 'background_video_object', $loginpress_array ); +$loginpress_bg_video_position = loginpress_get_option_key( 'video_obj_position', $loginpress_array ); +$loginpress_bg_video_muted = loginpress_bg_option( 'background_video_muted', $loginpress_array ); +$loginpress_theme_tem = get_option( 'customize_presets_settings', true ); +$loginpress_theme_tem = $loginpress_theme_tem == 1 ? 'default1' : $loginpress_theme_tem; +$loginpress_video_voice = ( 1 == $loginpress_bg_video_muted ) ? 'muted' : ''; +$login_copy_right_display = loginpress_get_option_key( 'login_copy_right_display', $loginpress_array ); + +/** + * loginpress_box_shadow [if user pass 0 then we're not going to set the value of box-shadow because it effects the pro templates.] + * @param integer $shadow [Shadow Value] + * @param integer $opacity [Opacity Value] + * @param integer $default_shadow [Set shadow's default value] + * @param boolean $inset [description] + * @return string [box-border value] + * @since 1.1.3 + */ +$loginpress_inset = $loginpress_login_form_inset ? true : false; //var_dump($loginpress_inset); +function loginpress_box_shadow( $shadow, $opacity, $default_shadow = 0, $inset = false ) { + + $loginpress_shadow = ! empty( $shadow ) ? $shadow : $default_shadow; + $loginpress_opacity = ! empty( $opacity ) ? $opacity : 80; + $inset = $inset ? ' inset' : ''; + $opacity_conversion = $loginpress_opacity / 100; + $loginpress_rgba = 'rgba( 0,0,0,' . $opacity_conversion . ' )'; + + return '0 0 ' . $loginpress_shadow . 'px ' . $loginpress_rgba . $inset . ';'; +} +// ob_start(); +?> + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/wp-content/plugins/loginpress/css/style-presets.php b/wp-content/plugins/loginpress/css/style-presets.php new file mode 100644 index 0000000..de1d908 --- /dev/null +++ b/wp-content/plugins/loginpress/css/style-presets.php @@ -0,0 +1,25 @@ +loginpress_key ) && empty( $this->loginpress_setting ) ) ? 'minimalist' : 'default1'; + +$selected_preset = get_option( 'customize_presets_settings', $loginpress_default_theme ); + +if ( $selected_preset == 'default1' ) { + include_once LOGINPRESS_ROOT_PATH . 'css/themes/default-1.php'; + echo first_presets(); +} elseif ( $selected_preset == 'minimalist' ) { + include_once LOGINPRESS_ROOT_PATH . 'css/themes/free-minimalist.php'; + echo free_minimalist_presets(); +} else { + do_action( 'loginpress_add_pro_theme', $selected_preset ); +} diff --git a/wp-content/plugins/loginpress/css/style-previewer.css b/wp-content/plugins/loginpress/css/style-previewer.css new file mode 100644 index 0000000..dedf79c --- /dev/null +++ b/wp-content/plugins/loginpress/css/style-previewer.css @@ -0,0 +1,147 @@ +/** + * Style Sheet for Customizer Previewer. + * @since 1.0.23 + */ +.login form .forgetmenot{ + float: none; +} + +.login form .input, .login input[type=text],.login form input[type=checkbox]{ + border-radius: 0; +} + +#loginform input[type="text"], #loginform input[type="password"]{ + display: block !important; +} + +.login h1,#login .submit, .login form,#nav{ + position: relative; +} + +body:hover .customize-partial-edit-shortcut button{ + opacity: 1; +} + +.login h1 .customize-partial-edit-shortcut{ + position: absolute; + top: -8px; + left: 50%; + margin-left: 15px; + height: 30px; + width: 30px; +} + +.customize-partial-edit-shortcut{ + height: 34px; + width: 34px; + cursor: pointer; + z-index: 99; +} + +.customize-partial-edit-shortcut button{ + left: 0; +} + +.loginpress-presets-partial{ + position: absolute; + top: 10px; + left: 10px; + cursor: pointer; +} + +.loginpress-background-partial{ + position: absolute; + top: 55px; + left: 10px; + cursor: pointer; +} + +.loginpress-footer-partial{ + position: absolute; + bottom: 5px; + left: 10px; + cursor: pointer; + z-index: 12; +} + +.loginpress-button-partial{ + position: absolute; + right: 5px; + bottom: 15px; +} + +.loginpress-nav-partial{ + position: absolute; + top: -10px; + right: 10px; +} + +.login form .loginpress-input-partial{ + position: absolute; + top: 0; + right: 25px; +} + +#login form p.submit:after{ + content: ''; + display: table; + clear: both; +} + +.loginpress-partial:after { + content: attr(data-title); + background: rgba(51, 56, 61, 0.9); + color: #fff; + display: inline-block; + font-size: 14px; + width: 100px; + padding: 5px 10px; + position: absolute; + left: 100%; + top: 50%; + transform: translateY(-50%); + border-radius: 5px; + -webkit-transition:all 0.3s ease-in-out; + transition:all 0.3s ease-in-out; + opacity: 0; + text-align: center; + -webkit-box-shadow: 0 0 9px 0px rgba(0, 0, 0, 0.20); + box-shadow: 0 0 9px 0px rgba(0, 0, 0, 0.20); + margin-left: 5px; + font-weight: normal; + visibility: hidden; +} + +.loginpress-partial:before{ + content: ''; + width: 0; + height: 0; + border-style: solid; + border-width: 5px 5px 5px 0; + border-color: transparent rgba(51, 56, 61, 0.9) transparent transparent; + position: absolute; + top: 50%; + left: 100%; + margin-left: 0; + margin-top: -5px; + -webkit-transition:all 0.3s ease-in-out; + transition:all 0.3s ease-in-out; + opacity: 0; + z-index: 1; + visibility: hidden; +} + +.loginpress-partial:hover:before, +.loginpress-partial:hover:after{ + opacity: 1; + visibility: visible; +} + +#loginform{ + overflow: visible; +} + +html[dir="rtl"] .customize-partial-edit-shortcut button, +html[dir="rtl"] .widget .customize-partial-edit-shortcut button{ + right: 0; +} diff --git a/wp-content/plugins/loginpress/css/style-review.css b/wp-content/plugins/loginpress/css/style-review.css new file mode 100644 index 0000000..e725dd1 --- /dev/null +++ b/wp-content/plugins/loginpress/css/style-review.css @@ -0,0 +1,297 @@ +.loginpress-review-notice{ + padding: 15px 15px 15px 0; + background-color: #fff; + border-radius: 3px; + margin: 20px 20px 0 0; + border-left: 4px solid transparent; +} + +.loginpress-review-notice:after{ + content: ''; + display: table; + clear: both; +} + +.loginpress-review-thumbnail{ + width: 114px; + float: left; + line-height: 80px; + text-align: center; + border-right: 4px solid transparent; +} + +.loginpress-review-thumbnail img{ + width: 68px; + vertical-align: middle; +} + +.loginpress-review-text{ + overflow: hidden; +} + +.loginpress-review-text h3{ + font-size: 24px; + margin: 0 0 5px; + font-weight: 400; + line-height: 1.3; +} + +.loginpress-review-text p{ + font-size: 13px; + margin: 0 0 5px; +} + +.loginpress-review-ul{ + margin: 0; + padding: 0; +} + +.loginpress-review-ul li{ + display: inline-block; + margin-right: 15px; +} + +.loginpress-review-ul li a{ + display: inline-block; + color: #10738B; + text-decoration: none; + padding-left: 26px; + position: relative; + line-height: 18px; +} + +.loginpress-review-ul li a span{ + position: absolute; + left: 0; + top: -1px; +} + +#update-nag, .update-nag{ + margin-left: 20px; +} + +.loginpress-dashboard-pro-link{ + color: #0cbb0c; +} + +/* LoginPress Add-ons CSS @since 1.1.3 */ + +.black_friday_notice .loginpress-alert-text { + padding: 16px 10px 16px 80px; +} + +.black_friday{ + background: #000 !important; + text-align: center; +} + +.black_friday:after{ + display: none; +} + +.black_friday_notice .loginpress-alert-text { + display: flex; + align-items: center; +} + +.black_friday_notice .loginpress-alert-button-section { + width: 450px; +} + +.loginpress-addon-notice-link:focus{ + outline: none; + box-shadow: none; +} + +.loginpress-alert-text h3{ + font-size: 20px; + line-height: 24px; + margin: 0 0 10px; + color: #fff; +} + +#wpcontent .loginpress-alert-text p{ + font-size: 16px; + margin: 0; + color: #fff; +} + +.black_friday_sale_btn .loginpress-alert-button { + display: inline-block; + padding: 24px 20px; + font-size: 38px; + background-color: #24afe9; + color: #000; + border-radius: 0px; + text-decoration: none; + font-weight: bold; +} + +.loginpress-alert-button-section{ + width: 300px; + text-align: center; + position: relative; +} + +.loginpress-alert-button{ + height: auto; + padding: 0; + color: #1a5fa4; + border: 0; + border-radius: 5px; + background: none; + font-size: 16px; + font-weight: bold; + text-decoration: underline; + cursor: pointer; +} + +.loginpress-alert-button:focus{ + outline: none; + box-shadow: none; +} + +.wp-core-ui .loginpress-alert-notice.notice.is-dismissible{ + padding: 0px; + border-left: 0px; +} + +.loginpress-alert-notice .notice-dismiss{ + text-decoration: none; + z-index: 1; +} + +.loginpress-addon-notice-link{ + display: flex; + align-items: center; + flex: 1; + text-decoration: none; +} + +.loginpress-notice-logo{ + width: 72px; + text-align: center; + position: relative; + margin: 10px; +} + +.loginpress-notice-logo img{ + width: 50px; + vertical-align: middle; +} + +.loginpress-notice-description{ + overflow: hidden; + width: calc(100% - 50px); +} + +.loginpress-notification.loginpress-notice-success{ + border:1px solid #6ab074; + background: #e6f0e8; + margin: 36px 20px 0 0; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; +} + +.loginpress-notice-success .loginpress-notice-description p{ + color: #21573a; +} + +.loginpress-notification.loginpress-notice-success .loginpress-notification-close:before{ + color: #21573a; +} + +.loginpress-alert-text{ + display: flex; + align-items: center; +} +[dir="rtl"] .rpt-review-notice, +[dir="rtl"] .loginpress-review-notice{ + padding: 15px 30px 15px 0; + margin: 20px 0 0 20px; +} +.loginpress-v-text{ + background: rgba(255,255,255,.1); + padding: 18px 73px; + font-style: normal; + font-weight: bold; + font-size: 73.2727px; + line-height: 62px; + color: #fff; + margin-right: 20px; + clip-path: polygon( 0 100%, 28px 0px, 100% 0, 100% 0, calc( 100% - 28px ) 100%, 0 100% ); +} + +.loginpress-alert-button{ + background: #28296A; + border-radius: 3px; + padding: 20px 32px; + font-weight: 600; + font-size: 22px; + line-height: 22px; + /* identical to box height, or 100% */ + text-transform: uppercase; + color: #FFFFFF; + display: inline-block; + text-decoration: none; +} + +.loginpress-alert-button:hover{ + background: #F6366A; + color: #FFFFFF; +} + +@media screen and (max-width: 1600px) { + .loginpress-v-text{ + font-size: 52px; + padding: 18px 40px; + } +} + +@media screen and (max-width: 1300px) { + .loginpress-alert-thumbnail{ + width: 200px; + } + + .loginpress-alert-thumbnail img{ + width: 170px; + } + + .loginpress-alert-button-section{ + width: 250px; + } +} + +@media screen and (max-width: 1100px) { + .loginpress-v-text{ + display: none; + } + + .loginpress-alert-thumbnail{ + display: none; + } + + .loginpress-alert-thumbnail img{ + width: 150px; + } + + .loginpress-alert-text{ + padding-left: 30px; + clip-path: polygon( 0 100%, 0px 0px, 100% 0, 100% 0, calc( 100% - 28px ) 100%, 0 100% ); + } + + .loginpress-alert-text:before,.loginpress-alert-text:after{ + display: none; + } +} + +@media screen and (max-width: 782px) { + .black_friday_sale_btn .loginpress-alert-button{ + width: 310px; + text-align: center; + } +} diff --git a/wp-content/plugins/loginpress/css/style.css b/wp-content/plugins/loginpress/css/style.css new file mode 100644 index 0000000..6b56d9f --- /dev/null +++ b/wp-content/plugins/loginpress/css/style.css @@ -0,0 +1,3298 @@ +@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap'); + + +/* + * LoginPress Style for Settings Page. + */ +.loginpress-admin-setting *, +.login-action-login #login *, +.login-action-lostpassword #login *, +.login-action-register #login * { + box-sizing: border-box; +} + +.loginpress_page_loginpress-settings #normal-sortables { + padding-top: 20px; +} + +#loginpress_setting .recaptcha_type, +#loginpress_setting .site_key, +#loginpress_setting .secret_key, +#loginpress_setting .site_key_v2_invisible, +#loginpress_setting .secret_key_v2_invisible, +#loginpress_setting .site_key_v3, +#loginpress_setting .secret_key_v3, +#loginpress_setting .good_score, +#loginpress_setting .captcha_theme, +#loginpress_setting .captcha_language, +#loginpress_setting .captcha_enable, +#loginpress_setting .loginpress_password_reset_time_limit, +#loginpress_setting .roles_for_password_reset { + display: none; +} + +.toplevel_page_loginpress-settings .inside [class*="tab-wrapper"] { + border-bottom: 2px solid #EAEDF4; +} + +body .add_white_list, #loginpress_limit_login_log td .loginpress-attempts-whitelist { + display: inline-block; + background-color: #ffffff !important; + color: #3a3a3a !important; + border: 1px solid #a5a5a5 !important; + cursor: pointer; + box-shadow: none; + border-radius: 5px !important; + padding: 12px 20px 10px !important; + font-size: 14px; + line-height: 21px; + font-family: "Poppins", sans-serif; + font-weight: 600; + transition: all 0.3s; +} +body[class*="toplevel_page_loginpress"] #wpbody-content{ + display: flex; + flex-direction: column; +} +body[class*="toplevel_page_loginpress"] .loginpress-header-wrapper{ + order: -2; + margin-bottom: 10px; +} +body[class*="toplevel_page_loginpress"] .loginpress-alert-notice{ + order: -1; +} +.loginpress_autologin_actions .lp-tbody-cell { + width: 100% !important; +} + +.loginpress_autologin_users tr td:last-child input { + margin-top: 0 !important; + margin-bottom: 0 !important; +} + +th.loginpress_action { + text-align: left !important; +} + +body .add_black_list, .loginpress-attempts-blacklist { + display: inline-block; + background-color: #000 !important; + color: #fff !important; + border: 1px solid #000; + cursor: pointer; + border: none !important; + box-shadow: none; + border-radius: 5px !important; + padding: 12px 20px 10px !important; + font-size: 14px; + line-height: 21px; + font-family: "Poppins", sans-serif; + font-weight: 600; + transition: all 0.3s; +} + +.add_black_list:hover, .loginpress-attempts-blacklist:hover { + background-color: #555 !important; +} + +body .add_white_list:before, #loginpress_limit_login_log td .loginpress-attempts-whitelist:before, +body .add_black_list:before, td .loginpress-attempts-blacklist:before{ + content: ""; + width: 14px; + height: 14px; + display: inline-block; + margin-right: 5px; + background: url(../img/icons-sprite.png) -102px -93px no-repeat; + background-size: auto; + vertical-align: middle; + margin-top: -1px; +} + +body .add_black_list:before, td .loginpress-attempts-blacklist:before{ + background-position: -62px 0px; +} + +tr.rename_login_slug .regular-text { + align-items: center; + padding: 13px 15px; + line-height: 2; + min-height: 30px; + border: 2px solid #D2DDF2; + height: 50px; + width: 50%; + font-family: "Poppins", sans-serif; + max-width: 450px; + color: #2B3D54; + font-size: 14px; + line-height: 24px; + border-radius: 5px; + outline: none !important; + box-shadow: none !important; + transition: all 0.3s; + +} + +body.add_white_list:hover, +#loginpress_limit_login_log .loginpress-attempts-whitelist:hover, +#loginpress_limit_login_attempts .loginpress-attempts-whitelist:hover, +body .loginpress-user-redirects-update:hover, +body .loginpress-redirects-role-update:hover { + background-color: #dbdbdb !important; + color: #000 !important; +} + +body #loginpress_create_new_hidelogin_slug { + margin: 15px 15px 15px 15px !important; +} + +[dir="rtl"] body[class*="loginpress_page_"] p, +[dir="rtl"] body[class*="loginpress_page_"] .description, +[dir="rtl"] body[class*="loginpress_page_"] a, +[dir="rtl"] body[class*="loginpress_page_"] th, +[dir="rtl"] body[class*="loginpress_page_"] td, +[dir="rtl"] body[class*="loginpress_page_"] button, +[dir="rtl"] body[class*="loginpress_page_"] [type="submit"], +[dir="rtl"] body[class*="loginpress_page_"] [type="button"]{ + line-height: 1.8 !important; +} + +body #loginpress_reset_login_slug { + margin-top: 15px; +} + +body #loginpress_create_new_hidelogin_slug, +body #loginpress_reset_login_slug { + border: none; + background-color: #516885; + padding: 15px 15px; + font-size: 14px; + line-height: 20px; + font-weight: 600; + color: #fff; + font-family: "Poppins", sans-serif; + transition: all 0.3s; + border-radius: 5px; + cursor: pointer; +} + +body #loginpress_create_new_hidelogin_slug:hover, +body #loginpress_reset_login_slug:hover { + border: none; + background-color: #2B3D54; +} + +.bulk_option_wrapper #loginpress_limit_bulk_blacklist_submit{ + margin-left: 10px; +} + +.bulk_option_wrapper #loginpress_limit_bulk_blacklist_submit, +.bulk_option_wrapper #loginpress_limit_bulk_attempts_submit, +.bulk_option_wrapper #loginpress_limit_bulk_blacklists_submit, +.bulk_option_wrapper #loginpress_limit_bulk_whitelists_submit { + border: none; + background-color: #5C7697; + padding: 14px 20px; + font-size: 14px; + line-height: 21px; + font-weight: 600; + color: #fff; + font-family: "Poppins", sans-serif; + transition: all 0.3s; + border-radius: 5px; + cursor: pointer; + text-decoration: none; + max-width: 100%; + display: inline-block; + text-align: center; + outline: none; + text-transform: capitalize; +} + +.select.selectbox { + max-width: 110px; + margin-left: 10px; + margin-right: 15px; + width: 100%; +} + +.toplevel_page_loginpress-settings select { + background-color: #fff; + cursor: pointer; + vertical-align: middle; + padding: 12px 15px; + line-height: 2; + min-height: 30px; + border: 2px solid #D2DDF2; + height: 50px; + width: 100%; + font-family: "Poppins", sans-serif; + max-width: 450px; + color: #5C7697; + font-size: 14px; + line-height: 24px; + -webkit-appearance: none; + border-radius: 5px; + box-shadow: none; + outline: none !important; + box-shadow: none !important; +} + +.toplevel_page_loginpress-settings .dataTable { + padding-top: 30px; +} + +.toplevel_page_loginpress-settings #loginpress_limit_login_log tbody .loginpress-attempts-whitelist, +.toplevel_page_loginpress-settings #loginpress_limit_login_log tbody .loginpress-attempts-blacklist, +.toplevel_page_loginpress-settings #loginpress_limit_login_log tbody .loginpress-attempts-unlock { + font-size: 12px; + line-height: 1; + padding: 5px 5px !important; + font-weight: 400; + height: auto; + min-height: auto; + border-radius: 4px !important; +} + +.toplevel_page_loginpress-settings #loginpress_limit_login_log tbody .loginpress-attempts-whitelist, +.toplevel_page_loginpress-settings #loginpress_limit_login_log tbody .loginpress-attempts-blacklist { + padding-top: 5px; +} + +.loginpress-social-accordions { + padding: 20px 0; + margin: 0; + margin-top: 0 !important; +} + +.loginpress-social-accordions .loginpress-social-tabs{ + border: none; +} + +body .loginpress-accordions { + display: block; + padding: 10px; + color: #000; + font-size: 22px; + font-weight: 600; + line-height: 33px; + text-decoration: none; + position: relative; + color: #516885 !important; + font-family: "Poppins", sans-serif; + padding: 10px 40px 10px 0px; + display: inline-block; + text-decoration: none !important; + background-color: #fff0; + border: none; + width: auto; +} + +.loginpress-accordions:hover, .loginpress-accordions.loginpress-accordions-acive { + color: #F6366A !important; +} + +.loginpress-social-accordions:not(:first-child) { + border-top: 1px solid #D2DDF2; +} + +.loginpress-social-tabs, +.loginpress-social-tabs p, +.loginpress-social-tabs ul { + font-size: 14px; + line-height: 24px; + font-family: "Poppins", sans-serif; + color: #516885; + border: none; + padding: 0; +} + +input[type=date], +input[type=datetime-local], +input[type=datetime], +input[type=email], +input[type=month], +input[type=number], +input[type=password], +input[type=search], +input[type=tel], +input[type=text], +input[type=time], +input[type=url], +input[type=week], +input[type="file"] { + padding: 13px 15px; + min-height: 30px; + border: 2px solid #D2DDF2; + height: 50px; + width: 100%; + font-family: "Poppins", sans-serif; + max-width: 450px; + color: #5C7697; + font-size: 14px; + line-height: 24px; + border-radius: 5px; + outline: none !important; + box-shadow: none !important; + background-color: #fff; +} + +.toplevel_page_loginpress-settings #wpbody-content .inside [class*="tab-wrapper"] [class*="tab"] { + border: 2px solid #EAEDF4; + border-bottom: 0; + background-color: #EAEDF4; + color: #8F9EC3 !important; + font-size: 16px; + font-weight: 500 !important; + line-height: 24px; + padding: 9px 30px; + border-radius: 5px 5px 0 0; + margin: 0 5px 0 0; + transition: all 0.3s; + text-decoration: none; + outline: none !important; + box-shadow: none !important; + display: inline-block; +} + +.toplevel_page_loginpress-settings #wpbody-content .inside [class*="tab-wrapper"] [class*="active"], +.toplevel_page_loginpress-settings #wpbody-content .inside [class*="tab-wrapper"] [class*="tab"]:hover { + background-color: #ffff; + color: #516885 !important; + text-decoration: none; +} + +.toplevel_page_loginpress-settings ul.ui-autocomplete{ + border-left: 2px solid #D2DDF2 !important; + border-right: 2px solid #D2DDF2 !important; + border-bottom: 2px solid #D2DDF2 !important; + border-radius: 5px !important; + min-height: 30px; +} + +#wpbrigade_infs_general_videobox h3 { + padding: 0px 10px 10px; + border-bottom: 1px solid #eee; +} + +.wpbrigade_videobox .column { + width: 50%; + float: left; + padding-right: 2.5%; + border-right: 1px solid #ebebeb; + padding-bottom: 2em; +} + +.select.selectbox { + max-width: 110px; + margin-left: 10px; + margin-right: 15px; + width: 100%; +} + +.row-per-page { + width: 600px; + margin-bottom: -60px; + position: relative; + z-index: 50; + display: flex; + align-items: center; + white-space: nowrap; +} + +.upload-file input { + opacity: 0; + margin: -2px 0 0 -2px; + position: absolute; + top: 0; + left: 0; + width: calc(100% + 4px) !important; + height: calc(100% + 4px) !important; +} + +.upload-file span{ + cursor: pointer; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + display: block; +} + +.upload-file span::before { + content: "\f317"; + font-family: dashicons; + display: inline-block; + line-height: 1; + font-weight: 400; + font-style: normal; + speak: never; + text-decoration: inherit; + text-transform: none; + text-rendering: auto; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + vertical-align: top; + text-align: center; + transition: color .1s ease-in; + margin-right: 4px; + font-size: 26px; + vertical-align: bottom; +} + +.upload-file { + background: none; + min-height: 30px; + border: 2px solid #D2DDF2; + height: 46px; + width: 100%; + font-family: "Poppins", sans-serif; + max-width: 450px; + color: #5C7697; + font-size: 14px; + line-height: 24px; + border-radius: 5px; + outline: none !important; + box-shadow: none !important; + background-color: #fff; + position: relative; + padding: 11px 15px; + height: 50px; + box-sizing: border-box; + cursor: pointer; + display: inline-block; +} + +.wpbrigade_videobox .column h2 { + font-size: 16px; + margin-bottom: 20px; +} + +.wpbrigade_videobox .column.right { + margin-right: 0; + padding-right: 0; + padding-left: 2.5%; + border: 0; + max-width: 49%; +} + +.wpbrigade_videobox::after { + content: ''; + display: table; + clear: both; +} + +.wpbrigade-video-link { + width: 100%; + max-width: 200px; + float: left; + margin: 0 1.5em 1.5em 0; +} + +.wpbrigade-video-link img { + max-width: 100%; + height: auto; +} + +.wpbrigade-video-popup-overlay { + position: fixed; + height: 100%; + width: 100%; + top: 0; + left: 0; + background: rgba(0, 0, 0, .9); + display: none; +} + +.wpbrigade-video-popup { + width: 600px; + position: absolute; + top: 50%; + left: 50%; + background: #fff; + height: 450px; + -webkit-transform: translate(-50%, -50%); + -moz-transform: translate(-50%, -50%); + -ms-transform: translate(-50%, -50%); + transform: translate(-50%, -50%); + padding: 50px 20px 20px; +} + +.wpbrigade-video-popup iframe { + width: 100%; + height: 380px; +} + +.wpbrigade-close-popup { + position: absolute; + top: 10px; + right: 20px; + cursor: pointer; +} + +.wpbrigade-video-description-wrapper { + overflow: hidden; +} + +.wpbrigade-video-description-wrapper p { + margin: 0; +} + +.wpbrigade-video-description-wrapper p~p { + margin-top: 10px; +} + +.wpbrigade-heading { + font-size: 16px; + margin-bottom: 20px; + font-weight: 400; + margin: 0; + padding: 9px 0 4px; + line-height: 29px; + display: block; +} + +.loginpress-premium { + float: left; + border: 1px solid #ccc; + border-bottom: none; + margin-left: .5em; + padding: 5px 10px; + font-size: 14px; + line-height: 24px; + background: #444; + color: #fff; + text-decoration: none; +} + +.loginpress-premium:hover, +.loginpress-premium:focus { + color: #fff; + background-color: #616060; +} + +html[dir="rtl"] .loginpress-premium { + float: right; + margin-right: .5em; + margin-left: 0; +} + +.loginpress-advertise { + max-width: 26%; + float: right; + width: 355px; +} + +.autologin-sniper img { + height: 20px; + width: 20px; +} + +.loginpress-advertise .inside iframe { + height: 118px; + display: block; + margin: 0 auto; + width: 100%; +} + +.advertise-box .inside iframe { + height: 114px; + display: block; + margin: 0 auto; +} + +.loginpress-support { + background-color: #fff; + padding: 13px; + margin-top: 25px; +} + +.loginpress-support h3 { + margin-bottom: 0; +} + +.advertise-box { + background-color: #fff; + color: #000 !important; + border-color: #734726 !important; + margin-top: 25px; +} + +.advertise-box h3 { + color: #fff !important; + border-color: #23282d !important; + background-color: #23282d; + padding: 5px; + text-align: center; +} + +.inside-advertise ul li .dashicons-admin-post { + font-size: 14px; +} + +.inside-advertise { + padding-left: 15px; + padding-right: 15px; + padding-bottom: 15px; +} + +.loginpress-video { + margin-top: 25px; + background-color: #fff; + padding: 13px; +} + +.loginpress-video h3 { + margin-bottom: 0; + font-size: 15px; +} + +.loginpress-addon-promotion-video { + text-align: center; +} + +.loginpress-addon-promotion-video span.dashicons-dashboard { + margin-top: 0px; + font-size: 30px; + margin-right: 3px; +} + +.loginpress-promotion-big-button { + margin-top: 2.75%; + text-align: center; + padding-bottom: 20px; +} + +.loginpress-promotion-big-button a { + border-radius: 5px !important; + background-color: #f53069 !important; + color: #fff !important; + border: 1px solid #F6366A !important; + padding: 12px 20px !important; + font-size: 16px !important; + line-height: 22px !important; + font-weight: 600 !important; + height: auto !important; + text-shadow: none !important; + text-decoration: none !important; + transition: all 300ms ease 0ms; +} + +.loginpress-promotion-big-button a:before { + content: ""; + display: inline-block; + width: 20px; + height: 20px; + display: inline-block; + margin-right: 10px; + background: url(../img/icons-sprite.png) -8px -80px no-repeat; + background-size: 190px; + vertical-align: middle; + margin-top: -3px; +} + +.loginpress-promotion-big-button a:hover { + transform: translateY(-10px); + opacity: 0.9; +} + +#loginpress_setting form>h2 { + display: none; +} + +.site_key, +.secret_key, +.recaptcha_type, +.captcha_theme, +.captcha_language, +.good_score, +.captcha_enable, +.privacy_policy, +.rename_email_send_to { + display: none; +} + +/*************config-page*******/ + +.loginpress-import-export-page h2 { + padding-top: 15px; +} + +.export_setting .export-sniper { + padding: 5px; + display: none; +} + +.export_setting .export-text { + padding: 5px; + display: none; + color: #009306; +} + +.import_setting .import-sniper { + padding: 5px; + display: none; +} + +.import_setting .import-text { + padding: 5px; + color: #009306; + display: none; +} + +.import_setting .wrong-import { + padding: 5px; + color: #ff0000; + /*display: none;*/ +} + +/*************config-page*******/ + + +/**********help-page**********/ +.loginpress-help-page h2 { + padding-top: 15px; +} + +.loginpress-log-file { + background: #0085ba !important; + border-color: #0073aa #006799 #006799 !important; + -webkit-box-shadow: 0 1px 0 #006799 !important; + box-shadow: 0 1px 0 #006799 !important; + color: #fff !important; + text-decoration: none !important; + text-shadow: 0 -1px 1px #006799, 1px 0 1px #006799, 0 1px 1px #006799, -1px 0 1px #006799; +} + +.log-file-sniper { + padding: 5px; + display: none; +} + +.log-file-text { + padding: 5px; + display: none; + color: #009306; +} + +/**************help-page***************/ + +/**********license-page**********/ +.loginpress-license-page h2 { + padding-top: 15px; +} + +/**********license-page**********/ + + +.recaptcha-promo-img { + display: none; +} + +.recaptcha-promo { + position: relative; +} + +.recaptcha-promo-link { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: rgba(0, 0, 0, .7); + opacity: 0; +} + +.recaptcha-promo-link span { + position: absolute; + top: 50%; + left: 50%; + -webkit-transform: translate(-50%, -50%); + -moz-transform: translate(-50%, -50%); + -ms-transform: translate(-50%, -50%); + transform: translate(-50%, -50%); + content: ''; + font-size: 37px; + color: #fff; + width: 100%; + text-align: center; + text-transform: capitalize; +} + +.recaptcha-promo:hover .recaptcha-promo-link { + opacity: 1; +} + +/*---- !LoginPress-Settings-Checkbox ----*/ + +#wpcontent, +#wpcontent p { + font-size: 14px; + font-weight: 400; + line-height: 24px; + color: #2B3D54; + font-family: "Poppins", sans-serif; +} + +/* new Styling */ + +/* Layout Styling Start */ +body.toplevel_page_loginpress-settings, +.toplevel_page_loginpress-settings #wpcontent, +.loginpress_page_loginpress-help, +.loginpress_page_loginpress-help #wpcontent, +.loginpress_page_loginpress-import-export, +.loginpress_page_loginpress-import-export #wpcontent, +.loginpress_page_loginpress-license, +.loginpress_page_loginpress-license #wpcontent { + background-color: #F2F5F6; +} + +body a.toplevel_page_loginpress-settings { + background-color: transparent; +} + +.toplevel_page_loginpress-settings .dataTables_wrapper .dataTables_length label, +.toplevel_page_loginpress-settings .dataTables_wrapper .dataTables_filter label { + white-space: pre; +} + +.toplevel_page_loginpress-settings .dataTables_wrapper .dataTables_length select, +.toplevel_page_loginpress-settings .dataTables_wrapper .dataTables_filter select { + margin: 0 5px; + ; +} + +.toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting, +.loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting { + display: flex; + flex-wrap: wrap; + padding: 0px 0px 0 0; + max-width: 1400px; + width: 100%; + margin: 0 auto; + box-sizing: border-box; +} + +.toplevel_page_loginpress-settings .bulk_option_wrapper select { + max-width: 190px; + width: calc(100% - 130px); + margin-right: 10px; +} + +.toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting h2:not(.nav-tab-wrapper), +.loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting h2:not(.nav-tab-wrapper) { + font-family: "Poppins", sans-serif; + color: #516885; + font-size: 24px; + font-weight: 600; + margin: 0 !important; + padding: 40px 0 0; + line-height: 1.3; + width: 100%; + display: none; +} + +h3 { + font-size: 22px; + line-height: 32px; + color: #2B3D54; + font-family: "Poppins", sans-serif; + font-weight: 600; + margin: 0; +} + +/* Layout Styling End */ + +/* tabs styling Start */ + +.loginpress-tabs-main .tabs-toggle{ + display: none; +} + +.toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper, +.loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper { + width: 250px; + padding-top: 40px; + border: none; +} +.loginPress-feature-video{ + height: auto; + aspect-ratio: 16/9; +} +.toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list, +.loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list { + display: block; + width: 100%; + margin-bottom: 0; + cursor: pointer; +} + +.toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list .nav-tab, +.loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list .nav-tab { + display: block; + float: none; + margin: 0; + background-color: transparent; + border: none; + white-space: normal; + padding: 20px 15px 20px 57px; + font-size: 16px; + line-height: 20px; + font-family: "Poppins", sans-serif; + color: #516885; + border-radius: 3px 0 0 3px; + position: relative; + -webkit-font-smoothing: antialiased; + outline: none; + text-decoration: none; + display: flex; + flex-direction: column; + justify-content: center; + min-height: 77px; +} + +.toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list .nav-tab span:empty, +.loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list .nav-tab span:empty{ + display: none; +} + +.toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list:hover .nav-tab, +.toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .nav-tab.nav-tab-active, +.loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list:hover .nav-tab, +.loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .nav-tab.nav-tab-active { + background-color: #fff; + color: #F6366A; +} + +.toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .nav-tab:after, +.loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .nav-tab:after { + content: ""; + position: absolute; + left: 15px; + top: 20px; + width: 30px; + height: 30px; + background-image: url(../img/icons-sprite.png); + background-position: -87px -62px; + background-repeat: no-repeat; + background-size: auto; +} + +.toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list:hover .nav-tab:after, +.toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list .nav-tab.nav-tab-active:after, +.loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list:hover .nav-tab:after, +.loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list .nav-tab.nav-tab-active:after{ + background-position: -118px -62px; +} + +.toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list #loginpress_autologin-tab:after, +.loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list #loginpress_autologin-tab:after { + background-position: 0 0; +} + +.toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list:hover #loginpress_autologin-tab:after, +.toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list #loginpress_autologin-tab.nav-tab-active:after, +.loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list:hover #loginpress_autologin-tab:after, +.loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list #loginpress_autologin-tab.nav-tab-active:after{ + background-position: -31px 0; +} + +.toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list #loginpress_hidelogin-tab:after, +.loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list #loginpress_hidelogin-tab:after{ + background-position: -94px -31px; +} + +.toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list:hover #loginpress_hidelogin-tab:after, +.toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list #loginpress_hidelogin-tab.nav-tab-active:after, +.loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list:hover #loginpress_hidelogin-tab:after, +.loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list #loginpress_hidelogin-tab.nav-tab-active:after{ + background-position: -125px -31px; +} + +.toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list #loginpress_limit_login_attempts-tab:after, +.loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list #loginpress_limit_login_attempts-tab:after{ + background-position: -41px -31px; + width: 27px; + height: 30px; +} + +.toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list:hover #loginpress_limit_login_attempts-tab:after, +.toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list #loginpress_limit_login_attempts-tab.nav-tab-active:after, +.loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list:hover #loginpress_limit_login_attempts-tab:after, +.loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list #loginpress_limit_login_attempts-tab.nav-tab-active:after{ + background-position: -67px -31px; + width: 27px; + height: 30px; + left: 16px; +} + +.toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list #loginpress_login_redirects-tab:after, +.loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list #loginpress_login_redirects-tab:after{ + background-position: -25px -62px; +} + +.toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list:hover #loginpress_login_redirects-tab:after, +.toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list #loginpress_login_redirects-tab.nav-tab-active:after, +.loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list:hover #loginpress_login_redirects-tab:after, +.loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list #loginpress_login_redirects-tab.nav-tab-active:after{ + background-position: -56px -62px; +} + +.toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list #loginpress_social_logins-tab:after, +.loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list #loginpress_social_logins-tab:after{ + background-position: -149px -62px; +} + +.toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list:hover #loginpress_social_logins-tab:after, +.toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list #loginpress_social_logins-tab.nav-tab-active:after, +.loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list:hover #loginpress_social_logins-tab:after, +.loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list #loginpress_social_logins-tab.nav-tab-active:after{ + background-position: -180px -62px; +} + +.toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list #loginpress_pro_license-tab:after, +.loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list #loginpress_pro_license-tab:after{ + background-position: -157px -32px; +} + +.toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list:hover #loginpress_pro_license-tab:after, +.toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list #loginpress_pro_license-tab.nav-tab-active:after, +.loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list:hover #loginpress_pro_license-tab:after, +.loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list #loginpress_pro_license-tab.nav-tab-active:after{ + background-position: -188px -32px; +} + +.toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list span, +.loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list span { + display: block; + word-break: break-word; + font-size: 11px; + line-height: 12px; + color: #8F9EC3; + font-family: "Poppins", sans-serif; + font-weight: 500; + margin-top: 5px; + text-decoration: none; +} + +/* tabs styling End */ + +/* Settings styling Start */ + +.toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-settings, +.loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting > .loginpress-settings{ + background-color: transparent; + width: calc(100% - 265px); + margin-top: 40px; + padding-left: 40px; + padding-right: 40px; + background-color: #fff; + padding-top: 20px; +} + +.toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-settings .inside { + font-size: 14px; + line-height: 24px; + color: #2B3D54; + font-family: "Poppins", sans-serif; + font-weight: 400; + margin: 15px 0 0; +} + +.toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-settings .inside a:hover { + text-decoration: underline; +} + +.toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-settings .form-table { + margin-top: 15px; +} + +.toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-settings .form-table tr th { + font-size: 16px; + line-height: 24px; + color: #2B3D54; + font-family: "Poppins", sans-serif; + font-weight: 500; + width: 275px !important; + padding: 20px 10px 15px 0; +} + +.toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-settings .form-table tr td fieldset { + max-width: 450px; + flex-wrap: wrap; +} + +/* Checkbox styling Start */ + +.toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-settings .form-table tr td fieldset label p, +.toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-settings .form-table tr td fieldset label { + font-size: 14px; + line-height: 24px; + color: #2B3D54; + font-family: "Poppins", sans-serif; + font-weight: 400; + overflow: auto; + margin-top: 0; +} + +.loginpress-settings .message.error { + margin-top: 5px; + color: #f35959 !important; + border-left: 5px solid red; + padding-left: 9px; +} + +.checkbox.loginpress-check-hidden { + display: none; +} + +.loginpress-check-hidden+.loginpress-checkbox { + display: inline-block; + outline: 0; + width: 36px; + height: 20px; + position: relative; + cursor: pointer; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + vertical-align: middle; + border-radius: 2em; + padding: 2px; + -webkit-transition: all .4s ease; + transition: all .4s ease; + border: 2px solid #D2DDF2; + background: #fff; + margin-right: 15px; + margin-top: 2px; + box-shadow: inset 0px 0px 4px rgba(0, 0, 0, 0.1); + float: left; +} + +input[type=checkbox].loginpress-check-hidden+.loginpress-checkbox:after { + position: relative; + display: block; + content: ""; + width: 12px; + height: 12px; + box-sizing: border-box; + border: 2px solid #D2DDF2; + border-radius: 2em; + background: #D2DDF2; + -webkit-transition: left 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), padding 0.3s ease, margin 0.3s ease; + transition: left 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), padding 0.3s ease, margin 0.3s ease; + box-shadow: none; + left: 0; +} + +input[type=checkbox].loginpress-check-hidden:checked+.loginpress-checkbox { + border-color: #2B3D54; + background-color: #2B3D54; +} + +input[type=checkbox].loginpress-check-hidden:checked+.loginpress-checkbox:after { + position: relative; + display: block; + content: ""; + width: 12px; + height: 12px; + box-sizing: border-box; + border: 2px solid #ffffff; + border-radius: 2em; + background: #ffffff; + -webkit-transition: left 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), padding 0.3s ease, margin 0.3s ease; + transition: left 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), padding 0.3s ease, margin 0.3s ease; + left: 16px; +} + +body .loginpress_login_redirect_users tr th, body .loginpress_login_redirect_users tr td, +body .loginpress_login_redirect_users tr th:last-child, body .loginpress_login_redirect_users tr td:last-child, +body .loginpress_login_redirect_roles tr th, body .loginpress_login_redirect_roles tr td, +body .loginpress_login_redirect_roles tr th:last-child, body .loginpress_login_redirect_roles tr td:last-child { + text-align: center; +} + +body .login_redirects input[type="text"] { + width: 300px; + padding: 10px; +} + +.loginpress-user-redirects-update, +.loginpress-redirects-role-update { + display: inline-block; + background-color: #ffffff !important; + color: #3a3a3a !important; + border: 1px solid #a5a5a5 !important; + cursor: pointer; + box-shadow: none; + border-radius: 5px !important; + font-size: 14px; + line-height: 21px; + font-family: "Poppins", sans-serif; + font-weight: 600; + transition: all 0.3s; +} + +.loginpress-user-redirects-delete:hover, +.loginpress-redirects-role-delete:hover { + background-color: #0c7dcf !important; + transition: all 0.2; +} + +#wpcontent table tr td.loginpress_login_redirects_url, +#wpcontent table tr td.loginpress_logout_redirects_url { + padding-right: 10px !important; +} + +body .loginpress-user-redirects-delete, +body .loginpress-redirects-role-delete { + line-height: 1.153846; + margin-top: 0 !important; + font-size: 12px; +} + + +/* Field styling End */ + +body input[type=date], +body input[type=datetime-local], +body input[type=datetime], +body input[type=email], +body input[type=month], +body input[type=number], +body input[type=password], +body input[type=search], +body input[type=tel], +body input[type=text], +body input[type=time], +body input[type=url], +body input[type=week], +body input[type="file"] { + padding: 10px 15px; + min-height: 30px; + border: 2px solid #D2DDF2; + height: 50px; + width: 100%; + font-family: "Poppins", sans-serif; + max-width: 450px; + color: #2B3D54; + font-size: 14px; + line-height: 24px; + border-radius: 5px; + outline: none !important; + box-shadow: none !important; + background-color: #fff; +} + +body input[type=number]{ + max-width: 300px; +} + +body #wpcontent input[type="file"] { + padding: 11px 15px; + cursor: pointer; + text-indent: -999px; +} + +input[type=date]:hover, +input[type=datetime-local]:hover, +input[type=datetime]:hover, +input[type=email]:hover, +input[type=month]:hover, +input[type=number]:hover, +input[type=password]:hover, +input[type=search]:hover, +input[type=tel]:hover, +input[type=text]:hover, +input[type=time]:hover, +input[type=url]:hover, +input[type=week]:hover, +input[type="file"]:hover { + border-color: #B0C4EC; +} + +input[type=date]:focus, +input[type=datetime-local]:focus, +input[type=datetime]:focus, +input[type=email]:focus, +input[type=month]:focus, +input[type=number]:focus, +input[type=password]:focus, +input[type=search]:focus, +input[type=tel]:focus, +input[type=text]:focus, +input[type=time]:focus, +input[type=url]:focus, +input[type=week]:focus, +input[type="file"]:focus { + border-color: #5C7697; +} + +input[type=date]::placeholder, +input[type=datetime-local]::placeholder, +input[type=datetime]::placeholder, +input[type=email]::placeholder, +input[type=month]::placeholder, +input[type=number]::placeholder, +input[type=password]::placeholder, +input[type=search]::placeholder, +input[type=tel]::placeholder, +input[type=text]::placeholder, +input[type=time]::placeholder, +input[type=url]::placeholder, +input[type=week]::placeholder, +input[type="file"]::placeholder { + color: rgba(92, 118, 151, 0.5); + line-height: 24px; +} + +.loginpress_autologin_users td:last-child, +.loginpress_login_redirect_users td:last-child, +.loginpress_login_redirect_roles td:last-child { + margin: -3px; + min-width: 160px; +} + +#loginpress_limit_login_log td:last-child { + margin: -3px; + min-width: 200px; +} + +.roles_for_password_reset td>fieldset>p { + display: inline-block !important; +} + +.roles_for_password_reset td fieldset label, +.enable_social_login_links fieldset label { + width: 50%; + padding: 10px 10px !important; + padding-left: 0 !important; + margin: 0 !important; +} + +.toplevel_page_loginpress-settings span.loginpress-settings-span{ + display: block; + font-style: italic; + padding-top: 3px; + font-size: 13px; +} +.toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-settings .form-table tr td .description { + font-family: "Poppins", sans-serif; + color: #2B3D54; + font-size: 14px; + line-height: 24px; + margin: 4px 0 0 1px; + max-width: 480px; + width: 100%; +} + +.toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-settings .form-table .ip_add_remove .description{ + padding-left: 0; +} + +#loginpress_limit_login_attempts .disable_xml_rpc_request{ + border: none; +} + +/* Submit Button styling Start */ + +.toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-settings .submit input[type="submit"], +.loginpress_page_loginpress-license .form-table input[type="submit"] { + max-width: 400px; + min-width: 180px; + border: none; + /* width: 100%; */ + background-color: #3C50E0; + padding: 13px 20px; + font-size: 16px; + line-height: 24px; + font-weight: 600; + color: #fff; + font-family: "Poppins", sans-serif; + transition: all 0.3s; + border-radius: 5px; + cursor: pointer; +} + +.loginpress_page_loginpress-license .form-table input[name="loginpress_pro_license_deactivate"] { + max-width: 190px; + padding: 13px 12px; +} + +.toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-settings .submit input[type="submit"]:hover { + background-color: #2634a1; +} + +/* Submit Button styling End */ + +/* Radio styling Start */ + +input[type=radio] { + border: 2px solid #D2DDF2; + border-radius: 50%; + background: #fff; + clear: none; + cursor: pointer; + display: inline-block; + height: 20px; + margin: 0 32px 0 0 !important; + outline: 0; + padding: 0 !important; + text-align: center; + vertical-align: middle; + width: 20px; + -webkit-appearance: none; + box-shadow: inset 0px 0px 4px rgba(0, 0, 0, 0.1); + transition: .05s border-color ease-in-out; + position: relative; +} +[dir="rtl"] input[type=radio] { + margin: 0 8px 0 21px !important; +} +input[type=radio]:focus{ + border: 2px solid #D2DDF2; + box-shadow: none; +} + +input[type=radio]::before { + content: ""; + border-radius: 50%; + width: 10px !important; + height: 10px !important; + margin: 0 !important; + background-color: #D2DDF2; + line-height: 1.14285714; + display: block; + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); +} + +input[type=radio]:checked::before { + background-color: #516885; +} + +/* Radio styling End */ + +/* Select styling Start */ + +.toplevel_page_loginpress-settings select { + background-color: #fff; + cursor: pointer; + vertical-align: middle; + padding: 12px 15px; + line-height: 2; + min-height: 30px; + border: 2px solid #D2DDF2; + height: 50px; + width: 100%; + font-family: "Poppins", sans-serif; + max-width: 450px; + color: #5C7697; + font-size: 14px; + line-height: 24px; + -webkit-appearance: none; + border-radius: 5px; + box-shadow: none; + outline: none !important; + box-shadow: none !important; +} + +.toplevel_page_loginpress-settings select:focus { + border-color: #5C7697; +} + +/* Select styling End */ + +.toplevel_page_loginpress-settings .dataTables_wrapper .dataTables_length label, +.toplevel_page_loginpress-settings .dataTables_wrapper .dataTables_filter label { + display: flex; + align-items: center; + font-size: 14px; + line-height: 24px; + color: #516885; + font-family: "Poppins", sans-serif; + font-weight: 400; + margin-top: 15px +} + +.toplevel_page_loginpress-settings .dataTables_wrapper .dataTables_length label { + text-transform: capitalize; +} + +.toplevel_page_loginpress-settings .dataTables_wrapper .dataTables_length label select, +.toplevel_page_loginpress-settings .dataTables_wrapper .dataTables_filter label input { + height: 40px; + +} + +.toplevel_page_loginpress-settings .dataTables_wrapper .dataTables_length label select { + height: 40px; + padding-top: 6px; + padding-bottom: 8px; + min-width: 100px; + order: 0; +} + +#wpbody-content .loginpress-admin-setting a, +#wpbody-content .loginpress-help-page a { + color: #3C50E0; + font-weight: 600; + text-decoration: underline; + text-underline-position: under; +} + +#wpbody-content .loginpress-admin-setting a:hover, +#wpbody-content .loginpress-help-page a:hover { + text-decoration: none !important; +} + +html .toplevel_page_loginpress-settings .dataTables_paginate { + display: flex; + align-items: center; + padding-top: 17px; +} + +html .toplevel_page_loginpress-settings .dataTables_paginate span { + display: flex; +} + +html .toplevel_page_loginpress-settings .dataTables_paginate .paginate_button { + background: #D2DDF2; + border: 0 !important; + border-radius: 5px; + margin: 0 3px; + font-size: 14px !important; + line-height: 24px; + color: #5C7697; + font-family: "Poppins", sans-serif; + font-weight: 400; + padding: 0 4px; + display: flex !important; + justify-content: center; + align-items: center; + width: 30px; + height: 30px; + display: inline-block; + cursor: pointer !important; + +} + +html .toplevel_page_loginpress-settings .dataTables_paginate .paginate_button:hover { + background-color: #5C7697 !important; + color: #fff; +} + +html .toplevel_page_loginpress-settings .dataTables_paginate .paginate_button.next, +html .toplevel_page_loginpress-settings .dataTables_paginate .paginate_button.previous { + font-size: 0 !important; +} + +html .toplevel_page_loginpress-settings .dataTables_paginate .paginate_button.next { + background-image: url(../img/pagination-right-arrow.svg) !important; + background-color: #fff !important; + background-position: center center !important; + background-repeat: no-repeat !important; +} + +html .toplevel_page_loginpress-settings .dataTables_paginate .paginate_button.previous { + background-image: url(../img/pagination-left-arrow.svg) !important; + background-color: #fff !important; + background-position: center center !important; + background-repeat: no-repeat !important; +} + +html .toplevel_page_loginpress-settings .dataTables_paginate .paginate_button.current, +html .toplevel_page_loginpress-settings .dataTables_paginate .paginate_button.current:hover { + background: #516885 !important; + color: #fff !important; +} + +html .toplevel_page_loginpress-settings .dataTables_paginate a.paginate_button:hover { + background: #d3ddf1; +} + +.loginpress-admin-setting .inside hr{ + margin: 30px 0; +} + +/* Top Header Bar */ + +#wpcontent .loginpress-header-wrapper { + width: calc(100% + 20px); + margin: 0 0px 0 -20px; + background-color: #fff; + background-image: url(../img/loginpress-logo-divid-logo.svg); + background-position: left -90px top -86px; + background-size: auto; + background-repeat: no-repeat; +} + +#wpcontent .loginpress-header-wrapper .loginpress-header-container { + max-width: 100%; + padding: 43px 20px 43px 180px; + display: flex; + flex-wrap: wrap; + align-items: center; +} + +#wpcontent .loginpress-header-wrapper .loginpress-header-container .loginpress-header-logo { + width: 40%; +} + +#wpcontent .loginpress-header-wrapper .loginpress-header-container .loginpress-header-logo a { + display: inline-block; +} + +#wpcontent .loginpress-header-wrapper .loginpress-header-container .loginpress-header-logo a img { + vertical-align: middle; +} + +#wpcontent .loginpress-header-wrapper .loginpress-header-container .loginpress-header-logo a:focus { + outline: none !important; +} + +#wpcontent .loginpress-header-wrapper .loginpress-header-container .loginpress-header-cta { + width: 60%; + text-align: right; + font-size: 0; + gap: 15px; + display: flex; + flex-wrap: wrap; + justify-content: flex-end; +} + +#wpcontent .loginpress-header-wrapper .loginpress-header-container .loginpress-header-cta a { + max-width: 180px; + border: none; + background-color: #2B3D54; + padding: 10px 20px; + font-size: 16px; + line-height: 22px; + font-weight: 600; + color: #fff; + font-family: "Poppins", sans-serif; + transition: all 0.3s; + border-radius: 5px; + cursor: pointer; + text-decoration: none; + max-width: 100%; + display: inline-block; + text-align: center; + outline: none; + text-transform: normal; + border: 1px solid #2B3D54; +} + +#wpcontent .loginpress-header-wrapper .loginpress-header-container .loginpress-header-cta a:hover { + background-color: #fff; + color: #516885; +} + +#wpcontent .loginpress-header-wrapper .loginpress-header-container .loginpress-header-cta .loginpress-pro-cta { + background-color: #F6366A; + color: #fff; + border: 1px solid #F6366A; +} + +#wpcontent .loginpress-header-wrapper .loginpress-header-container .loginpress-header-cta .loginpress-pro-cta .dashicons { + color: #FFD700; + margin-right: 5px; + display: none; +} + +#wpcontent .loginpress-header-wrapper .loginpress-header-container .loginpress-header-cta .loginpress-pro-cta:hover { + color: #F6366A; + background-color: #fff; +} + +#wpcontent .loginpress-header-wrapper .loginpress-header-container .loginpress-header-cta a:after { + content: ""; + display: block; + width: 136px; + max-width: 100%; +} + +#wpcontent .loginpress-header-wrapper .loginpress-header-container .loginpress-header-cta a:before{ + content: ""; + display: inline-block; + width: 20px; + height: 20px; + display: inline-block; + margin-right: 10px; + background: url(../img/icons-sprite.png) -8px -81px no-repeat; + background-size: 190px; + vertical-align: middle; + margin-top: -1px; +} + +#wpcontent .loginpress-header-wrapper .loginpress-header-container .loginpress-header-cta a.loginpress-documentation:before{ + background-position: -86px 0px; + background: url(../img/icons-sprite.png) -101px -1px no-repeat; +} + +#wpcontent .loginpress-header-wrapper .loginpress-header-container .loginpress-header-cta a.loginpress-documentation:hover:before{ + background-position: -78px -1px; +} + +/* Video Popup Styling */ + +.inside { + position: relative; +} + +.toplevel_page_loginpress-settings #wpcontent .inside .video a { + position: absolute; + top: -25px; + right: 0; + padding: 13px 30px 13px 55px; + background-color: #EAEDF4; + text-decoration: none; + color: #2B3D54; + font-size: 16px; + line-height: 24px; + font-weight: 500; + font-family: "Poppins", sans-serif; + border-radius: 5px; + transition: all 0.3s; + display: inline-block; +} + +.toplevel_page_loginpress-settings #wpcontent .inside .video a:hover { + background-color: #c2c7d3; + text-decoration: none !important; +} + +.toplevel_page_loginpress-settings #wpcontent .inside .video a:before { + content: ""; + position: absolute; + top: 50%; + left: 20px; + width: 24px; + height: 24px; + background: url(../img/icons-sprite.png) -52px -93px no-repeat; + background-size: auto; + transform: translateY(-50%); +} + +.toplevel_page_loginpress-settings #wpcontent .inside .desc p { + font-size: 14px; + font-weight: 400; + line-height: 24px; + color: #2B3D54; + font-family: "Poppins", sans-serif; +} + +.toplevel_page_loginpress-settings #wpcontent .inside .desc .loginpress-addon-promotion-desc.prom-content, +.toplevel_page_loginpress-settings #wpcontent .inside .desc .loginpress-addon-promotion-video, +.toplevel_page_loginpress-settings .loginpress-promotion-big-button { + padding-right: 0 !important; +} + +#wpbody-content .loginpress-admin-setting a.loginpress-premium { + font-size: 16px; + margin: 0; + background-color: #F6366A; + border-radius: 3px 0 0 3px; + border: none; + transition: all 0.3s; + display: inline-block; + padding: 18px 13px 18px 58px; + line-height: 1.625; + color: #fff; + text-decoration: none; + position: relative; +} + +.loginpress-premium:hover, +.loginpress-premium:focus { + background-color: #2B3D54; + text-decoration: none; +} + +.loginpress-premium .dashicons-star-filled { + float: none; + height: 35px; + margin-right: 0; + width: 35px; + position: absolute; + top: 50%; + left: 15px; + transform: translatey(-50%); + display: block; +} + +.loginpress-premium .dashicons-star-filled:before { + color: #FFD700; + font-size: 35px; +} + +.styledSelect { + cursor: pointer; + vertical-align: middle; + padding: 13px 40px 13px 15px; + line-height: 2; + min-height: 30px; + border: 2px solid #D2DDF2; + height: 50px; + width: 100%; + font-family: "Poppins", sans-serif; + max-width: 450px; + color: #5C7697; + font-size: 14px; + line-height: 24px; + -webkit-appearance: none; + border-radius: 5px; + box-shadow: none; + outline: none !important; + box-shadow: none !important; + width: 100%; + background: #fff url(../img/dropdown-arrow-icon.svg) right 15px center no-repeat; +} + +.styledSelect:hover { + border-color: #B0C4EC; +} + +.styledSelect.active { + border-color: #5C7697 !important; + box-shadow: none; +} + +.s-hidden{ + display: none; +} + +.select { + position: relative; +} + +body .options { + display: none; + position: absolute; + top: calc(100% + 2px); + right: 15px; + left: 0; + z-index: 5; + margin: 0 !important; + padding: 2px 0 0 0; + list-style: none; + background: #fff; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + -ms-border-radius: 5px; + -o-border-radius: 5px; + border-radius: 5px; + padding-top: 0px; + padding-bottom: 0px; + max-height: 300px; + overflow-y: auto; + border: solid 2px #5C7697; + box-shadow: none; + font-family: "Poppins", Sans-serif; + width: 100%; + max-width: 450px; +} + +body .options li { + margin: 0; + padding: 10px 15px; + font-size: 14px; + line-height: normal; + color: #5C7697; + text-transform: none; + cursor: pointer; + font-family: "Poppins", Sans-serif; + border-top: 2px solid rgba(92, 119, 151, 0.3); + transition: all 0.3s; +} + +body .options li:first-child { + border-top: 0; +} + +body .options li:hover, +body .options li.active { + background-color: #f1f5fe; + text-decoration: none; + position: relative; +} + +.options li::before { + display: none !important; +} + +.options li[rel=""] { + display: none; +} + +.styledSelect .text-ellipses { + color: rgba(92, 119, 151, 0.5); + font-size: 14px; +} + +.styledSelect .text-ellipses.valueAdded { + color: #5C7697; +} + +/* license styling */ +.loginpress-license-settings table tr th { + font-size: 16px; + line-height: 24px; + color: #516885; + font-family: "Poppins", sans-serif; + font-weight: 500; + width: 275px !important; + padding: 20px 10px 15px 0; +} + +.loginpress-license-settings table tr td .description { + font-size: 14px; + font-family: "Poppins", sans-serif; + color: #5C7697; + font-size: 14px; + line-height: 24px; + margin: 4px 0 0 1px; + max-width: 450px; + display: block; +} + +.loginpress-license-settings table tr td .button-secondary { + border: none; + background-color: #516885; + padding: 13px 25px; + font-size: 16px; + line-height: 24px; + font-weight: 600; + color: #fff; + font-family: "Poppins", sans-serif; + transition: all 0.3s; + border-radius: 5px; + cursor: pointer; +} + +.loginpress-license-settings table tr td .button-secondary:hover { + background-color: #2B3D54; + color: #fff; +} + +.loginpress-license-settings table tr .loginpress-license-desc { + font-size: 14px; + font-family: "Poppins", sans-serif; + color: #5C7697; + font-size: 14px; + line-height: 24px; + margin: 4px 0 0 1px; + max-width: 520px; + display: block; +} + +/* Help Styling */ + +.loginpress_page_loginpress-help #wpcontent .loginpress-help-page { + padding: 0px 20px 0 0; + max-width: 1370px; + width: 100%; + margin: 0 auto; + box-sizing: border-box; +} + +.loginpress_page_loginpress-help #wpcontent .loginpress-help-page>h2, +.loginpress_page_loginpress-help #wpcontent .loginpress-help-page>h3 { + font-size: 22px; + margin-top: 10px !important; + margin-bottom: 10px !important; + font-weight: 600; + line-height: 32px; + color: #516885; + font-family: "Poppins", sans-serif; +} + +.loginpress_page_loginpress-help #wpcontent .loginpress-help-page pre { + margin: 20px 0; +} + +.loginpress_page_loginpress-help #wpcontent .loginpress-help-page pre textarea { + background-color: #fff; + border: 2px solid #D2DDF2; + border-radius: 5px; + padding: 20px; + color: #2B3D54; + width: 100%; + max-width: 650px; +} + +.loginpress_page_loginpress-help #wpcontent .loginpress-help-page pre textarea:focus { + outline: none !important; +} + +/* width */ +.loginpress_page_loginpress-help #wpcontent .loginpress-help-page pre textarea::-webkit-scrollbar { + width: 15px; + background-color: #fff; +} + +/* Track */ +.loginpress_page_loginpress-help #wpcontent .loginpress-help-page pre textarea::-webkit-scrollbar-track { + box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.15); + border-radius: 0px; +} + +/* Handle */ +.loginpress_page_loginpress-help #wpcontent .loginpress-help-page pre textarea::-webkit-scrollbar-thumb { + background: #516885; + border-radius: 0px; + cursor: pointer; +} + +/* Handle on hover */ +.loginpress_page_loginpress-help #wpcontent .loginpress-help-page pre textarea::-webkit-scrollbar-thumb:hover { + background: #2d3d52; + cursor: pointer +} + +.loginpress_page_loginpress-help #wpcontent .loginpress-help-page .loginpress-log-file { + border: 1px solid #2B3D54 !important; + background-color: #2c3d53 !important; + padding: 13px 25px; + font-size: 16px; + line-height: 24px; + font-weight: 600; + color: #fff !important; + font-family: "Poppins", sans-serif; + transition: all 0.3s; + border-radius: 5px; + cursor: pointer; + text-shadow: none; + box-shadow: none !important; +} + +.loginpress_page_loginpress-help #wpcontent .loginpress-help-page .loginpress-log-file:hover { + background-color: #fff !important; + color: #2c3d53 !important; + border: 1px solid #2c3d53 !important; +} + +/* Import/Export Styling */ + +.loginpress_page_loginpress-import-export #wpcontent .loginpress-import-export-page { + padding: 0px 20px 0 0; + max-width: 1370px; + width: 100%; + margin: 0 auto; + box-sizing: border-box; +} + +.loginpress_page_loginpress-import-export #wpcontent .loginpress-import-export-page>h2, +.loginpress_page_loginpress-import-export #wpcontent .loginpress-import-export-page>h3 { + font-size: 22px; + margin-top: 10px !important; + margin-bottom: 10px !important; + font-weight: 600; + line-height: 32px; + color: #516885; + font-family: "Poppins", sans-serif; +} + +.loginpress-import-export-page table tr th { + font-size: 16px; + line-height: 24px; + color: #516885; + font-family: "Poppins", sans-serif; + font-weight: 500; + width: 275px !important; + padding: 20px 10px 15px 0; +} + +.loginpress_page_loginpress-import-export #wpcontent .loginpress-import-export-page .import_setting .loginpress-import:disabled { + border: 1px solid #d2ddf2; + background-color: #D2DDF2 !important; + padding: 12px 24px; + font-size: 16px; + line-height: 24px; + font-weight: 600; + color: #8F9EC3 !important; + font-family: "Poppins", sans-serif; + transition: all 0.3s; + border-radius: 5px; + cursor: not-allowed; +} + +.loginpress_page_loginpress-import-export #wpcontent .loginpress-import-export-page .export_setting .loginpress-export, +.loginpress_page_loginpress-import-export #wpcontent .loginpress-import-export-page .import_setting .loginpress-import { + border: none; + background-color: #2c3d53; + padding: 12px 24px; + font-size: 16px; + line-height: 24px; + font-weight: 600; + color: #fff; + font-family: "Poppins", sans-serif; + transition: all 0.3s; + border-radius: 5px; + cursor: pointer; + border: 1px solid #2B3D54; +} + +.loginpress_page_loginpress-import-export #wpcontent .loginpress-import-export-page .export_setting .loginpress-export:hover, +.loginpress_page_loginpress-import-export #wpcontent .loginpress-import-export-page .import_setting .loginpress-import:hover { + background-color: #fff; + border: 1px solid #2B3D54; + color: #2B3D54; +} + +#wpcontent .loginpress-settings-heading, +#wpcontent .loginpress-license-heading { + font-size: 0; + margin: 0; + padding: 0; + display: none; +} + +.toplevel_page_loginpress-settings #loginpress_limit_login_log tbody tr:last-child th { + border-bottom: 1px solid #D2DDF2 !important; +} + +.loginpress-video-popup { + position: fixed; + top: 0; + right: 0; + height: 100%; + background: rgb(0 0 0 / 80%); + z-index: 100; + display: none; + left: 160px; +} + +.folded .loginpress-video-popup { + left: 36px; +} + +.loginpress-cross { + position: fixed; + top: 44px; + right: 10px; + width: 50px; + height: 50px; + cursor: pointer; +} + +.loginpress-video-overlay { + position: fixed; + top: 0; + left: 0; +} + + +.loginpress-video-play .loginpress-video-popup { + display: block; +} + +.loginpress-video-play body { + overflow: hidden; +} + +.loginpress-video-frame iframe { + width: 100%; + height: 100%; +} + +.loginpress-video-frame iframe { + width: calc(177.78vh); + height: calc(100vh); + box-sizing: border-box; + padding: 2.5rem 4.4444444444rem; + margin: 0 auto; + display: block; +} + +.loginpress-cross { + cursor: pointer; + position: fixed; + right: 32px; + top: 44px; + width: 32px; + height: 32px; + opacity: 1; + z-index: 2; + transition: all 0.3s; +} + +.loginpress-cross:hover { + opacity: 0.7; +} + +.loginpress-cross:before, +.loginpress-cross:after { + position: absolute; + left: 15px; + content: ' '; + height: 33px; + width: 2px; + background-color: #fff; +} + +.loginpress-cross:before { + transform: rotate(45deg); +} + +.loginpress-cross:after { + transform: rotate(-45deg); +} + +.loginpress-video-overlay { + position: fixed; + top: 0; + left: 0; +} + +.metabox-holder form th label{ + cursor: default; +} + +.loginpress-video-play .loginpress-video-popup { + display: block; +} + +.loginpress-video-play body { + overflow: hidden; +} + +.loginpress-video-frame iframe { + width: 100%; + height: 100%; +} + +.loginpress-video-frame iframe { + width: calc(177.78vh); + height: calc(100vh); + box-sizing: border-box; + padding: 2.5rem 4.4444444444rem; + margin: 0 auto; + display: block; +} + +.loginpress-video-overlay { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; +} + +.loginpress-video-frame iframe { + position: relative; + z-index: 1; + background: #000; + background-clip: content-box; +} + +.loginpress-video-frame { + display: inline-block; + vertical-align: middle; + width: calc(100% - 16px); + margin-left: 8px; +} + +.loginpress-video-popup:after { + content: ''; + display: inline-block; + width: 2px; + height: 100%; + vertical-align: middle; +} + +.loginpress_page_loginpress-addons #wpcontent .loginpress-addons-wrap>h2, +.loginpress_page_loginpress-addons #wpcontent .loginpress-addons-wrap>h3, +.loginpress_page_loginpress-license #wpcontent .wrap>h2, +.loginpress_page_loginpress-license #wpcontent .wrap>h3 { + font-size: 22px; + margin-top: 10px !important; + margin-bottom: 0px !important; + font-weight: 600; + line-height: 32px; + color: #516885; + font-family: "Poppins", sans-serif; +} + +body.loginpress_page_loginpress-addons .main_notice_msg { + background: #F6366A; + margin: 20px 0 20px; + padding: 15px; + color: #fff; + display: inline-block; + font-size: 16px; + line-height: 24px; + font-family: "Poppins", sans-serif; + border-radius: 5px; +} + +.addon_cards_wraper { + display: flex; + flex-wrap: wrap; + margin: 0 -15px; + width: calc(100% + 15px); + box-sizing: border-box; +} + +#loginpress_limit_login_attempts .ip_add_remove .regular-text{ + max-width: 300px; + width: 100%; + margin-right: 10px; + margin-bottom: 10px; +} + +.loginpress-extension { + float: none; + box-sizing: border-box; + width: calc(33% - 30px); + margin: 0px 15px 30px; + border: 2px solid #c8d6f1; + display: inline-block; + height: auto; + vertical-align: top; + background: #fff; + min-height: 300px; + position: relative; + padding-bottom: 70px; + border-radius: 8px; + overflow: hidden; +} + +body.loginpress_page_loginpress-addons .loginpress-extension .loginpress_addons_links { + position: relative; + background-color: #DEE5F2; + text-decoration: none !important; +} + +.loginpress-extension h3 { + margin: -2px -2px 0 0; + position: relative; + overflow: hidden; + box-sizing: border-box; + padding: 10px 60px 10px 20px; + border-bottom: 2px solid #c8d6f1; + background-size: 115px 100px; + height: 100px; + color: #5C7697; + font-size: 16px; + font-family: "Poppins", sans-serif; + line-height: 1.3; + display: flex; + align-items: center; +} + +.loginpress-extension h3 span{ + width: calc(100% - 100px); + display: block; +} + +#wpbody-content .loginpress-extension .button-primary { + border: 0; + text-shadow: none; + background: #516885; + padding: 12px 18px; + height: auto; + font-size: 15px; + cursor: pointer; + position: absolute; + bottom: 20px; + left: 50%; + transform: translateX(-50%); + box-shadow: none; + border-radius: 5px; + transition: background-color .3s; + font-size: 16px; + line-height: 24px; + color: #fff; + font-family: "Poppins", sans-serif; + font-weight: 500; + text-decoration: none; +} + +#wpbody-content .loginpress-extension .button-primary:active, +#wpbody-content .loginpress-extension .button-primary:hover, +#wpbody-content .loginpress-extension .button-primary:focus { + background: #2B3D54; + box-shadow: none; + outline: none; +} + +body #loginpress_limit_login_attempts [id*="loginpress_limit_log"] tbody td, +body #loginpress_limit_login_attempts [id*="loginpress_limit_log"] tbody th{ + border-right: 1px solid #D2DDF2; +} + +body #loginpress_limit_login_attempts [id*="loginpress_limit_log"] tbody td:first-child, +body #loginpress_limit_login_attempts [id*="loginpress_limit_log"] tbody th:first-child{ + border-left: 1px solid #D2DDF2 !important; +} + +body table.dataTable.display tbody tr.even>.sorting_1, +body table.dataTable.order-column.stripe tbody tr.even>.sorting_1, +body table.dataTable.display tbody tr.odd>.sorting_1, +body table.dataTable.order-column.stripe tbody tr.odd>.sorting_1{ + background-color: transparent; +} + +body table.dataTable.stripe tbody tr.odd, +body table.dataTable.display tbody tr.odd{ + background-color: #F6F9FF; +} + +body table.dataTable.stripe tbody tr.even, +body table.dataTable.display tbody tr.even{ + background: #fff; +} + +#loginpress_limit_login_attempts [id*="loginpress_limit_log"] thead, +#loginpress_limit_login_attempts [id*="loginpress_limit_log"] tfoot, +#loginpress_login_redirect_users tbody tr:first-child, +#loginpress_login_redirect_roles tbody tr:first-child, +#loginpress_autologin_users tbody tr:first-child{ + background-color: #DEE5F2; +} + +#loginpress_limit_login_attempts [id*="loginpress_limit_log"] thead .sorting{ + background: url(../img/thead-sort-icon.svg) right 5px center no-repeat; +} + +body #loginpress_limit_login_attempts [id*="loginpress_limit_log"] thead th{ + border-bottom: 1px solid #D2DDF2; +} + +body #loginpress_limit_login_attempts [id*="loginpress_limit_log"] tfoot th{ + border-top: 1px solid #D2DDF2; +} + +body #loginpress_limit_login_attempts [id*="loginpress_limit_log"] tbody td .loginpress-whitelist-clear, +body #loginpress_limit_login_attempts [id*="loginpress_limit_log"] tbody td .loginpress-blacklist-clear{ + background-color: #2c3d53; + border: 1px solid #2c3d53; + transition: all 0.3s; + font-weight: 500; +} + +body #loginpress_limit_login_attempts [id*="loginpress_limit_log"] tbody td .loginpress-whitelist-clear:hover, +body #loginpress_limit_login_attempts [id*="loginpress_limit_log"] tbody td .loginpress-blacklist-clear:hover{ + background-color: #fff; + color: #2c3d53; +} + +.loginpress_page_loginpress-license #wpcontent form input+label{ + font-family: "Poppins", sans-serif; + color: #2B3D54; + font-size: 14px; + line-height: 24px; + margin: 4px 0 0 1px; + max-width: 450px; + display: block; +} + +.loginpress-settings-desc{ + font-size: 12px; + line-height: 1.4; + font-style: italic; + display: block; + margin-top: 2px; +} +tr.list-active { + z-index: 99; + position: relative; +} + +/* Right to left content styling */ + +[dir="rtl"] .toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-settings .inside .loginpress-social-login-tab-wrapper, +[dir="rtl"] .toplevel_page_loginpress-settings .inside [class*="tab-wrapper"]{ + display: flex; + width: 100%; + flex-wrap: wrap; +} + +[dir="rtl"] .form-table td fieldset label{ + display: flex; + padding-left: 10px !important; + padding-right: 0 !important; +} + +[dir="rtl"] .form-table td fieldset label .loginpress-check-hidden+.loginpress-checkbox{ + margin-left: 15px; + margin-right: 0; + min-width: 36px; +} + +[dir="rtl"] input[type=checkbox].loginpress-check-hidden:checked+.loginpress-checkbox:after{ + left: 0px; +} + +[dir="rtl"] input[type=checkbox].loginpress-check-hidden+.loginpress-checkbox:after{ + left: -15px; +} + +[dir="rtl"] input[type=checkbox].loginpress-check-hidden+.loginpress-checkbox:after{ + left: -15px; +} + +[dir="rtl"] .toplevel_page_loginpress-settings #wpcontent .inside .video a{ + right: auto; + left: 0; +} + +[dir="rtl"] body .add_black_list, .loginpress-attempts-blacklist{ + margin-right: 5px; +} + +[dir="rtl"] .toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-settings .inside .loginpress-social-login-tab-wrapper, +[dir="rtl"] .toplevel_page_loginpress-settings .inside [class*="tab-wrapper"]{ + display: flex; + width: 100%; + flex-wrap: wrap; +} + +[dir="rtl"] .form-table td fieldset label{ + display: flex; + padding-left: 10px !important; + padding-right: 0 !important; +} + +[dir="rtl"] .form-table td fieldset label .loginpress-check-hidden+.loginpress-checkbox{ + margin-left: 15px; + margin-right: 0; + min-width: 36px; +} + +[dir="rtl"] input[type=checkbox].loginpress-check-hidden:checked+.loginpress-checkbox:after{ + left: 0px; +} + +[dir="rtl"] input[type=checkbox].loginpress-check-hidden+.loginpress-checkbox:after{ + left: -15px; +} + +[dir="rtl"] input[type=checkbox].loginpress-check-hidden+.loginpress-checkbox:after{ + left: -15px; +} + +[dir="rtl"] .toplevel_page_loginpress-settings #wpcontent .inside .video a{ + right: auto; + left: 0; +} + +[dir="rtl"] .rpt-review-notice, +[dir="rtl"] .loginpress-review-notice{ + padding: 15px 30px 15px 0; + margin: 20px 0 0 20px; +} + +[dir="rtl"] body .add_black_list, .loginpress-attempts-blacklist{ + margin-right: 5px; +} + +[dir="rtl"] .loginpress_page_loginpress-addons #wpbody-content .addon_cards_wraper .loginpress-radio-btn:after{ + left: -18px; +} + +[dir="rtl"] .loginpress_page_loginpress-addons #wpbody-content .addon_cards_wraper .loginpress-uninstall-pro-addon + .loginpress-radio-btn:after{ + left: 0; +} + +[dir="rtl"] .loginpress_page_loginpress-addons #wpbody-content .addon_cards_wraper .loginpress_addons_links .loginpress_addons_thumbnails{ + margin-right: 0; + margin-left: 20px; +} + +@media (min-width: 1380px) { + body[class*="page_loginpress"] #wpbody-content .wrap{ + max-width: 1370px; + width: 100%; + margin: auto; + } +} + +@media (max-aspect-ratio: 16/9) { + .loginpress-video-frame iframe { + width: 100%; + height: calc(56.25vw); + padding: 40px; + max-width: 1200px; + } + + .loginpress-cross { + top: 44px; + right: 10px; + width: 24px; + height: 24px; + } + + .loginpress-cross:after, + .loginpress-cross:before { + left: 11px; + height: 24px; + } +} + +@media (min-width: 960px) and (min-width: 767px) { + .loginpress-video-frame iframe { + max-width: 960px; + height: 512px; + max-height: 100vh; + } +} + +@media screen and (min-width: 768px) { + .toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper, + .loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper{ + display: flex !important; + flex-direction: column; + } +} + + + +@media screen and (max-width: 1320px) { + #wpcontent .loginpress-header-wrapper .loginpress-header-container .loginpress-header-cta a:after { + width: 130px; + } + + #wpcontent .loginpress-header-wrapper .loginpress-header-container .loginpress-header-logo a img { + max-width: 220px; + width: 100%; + } + + .toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-settings, + .loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting > .loginpress-settings{ + background-color: #fff; + width: calc(100% - 225px); + padding-left: 20px; + padding-right: 20px; + } + + .toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper, + .loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper { + width: 210px; + } + + .toplevel_page_loginpress-settings #wpcontent .inside .video a { + padding: 15px 15px 15px 45px; + top: -45px; + font-size: 14px; + line-height: 22px; + position: relative; + top: 0; + right: 0; + margin: 0px; + } + + .toplevel_page_loginpress-settings #wpcontent .inside .video a:before { + left: 10px; + } + + .toplevel_page_loginpress-settings #wpcontent .inside .desc>* { + padding-right: 0px; + } + + .toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-settings .form-table tr th, + .loginpress-license-settings table tr th, + .loginpress-import-export-page table tr th { + font-size: 14px; + line-height: 21px; + width: 170px !important; + } + + #wpcontent table tr td { + padding-right: 0 !important; + } + + body input[type=date], + body input[type=datetime-local], + body input[type=datetime], + body input[type=email], + body input[type=month], + body input[type=number], + body input[type=password], + body input[type=search], + body input[type=tel], + body input[type=text], + body input[type=time], + body input[type=url], + body input[type=week], + body input[type="file"] { + height: 40px; + padding: 7px ​10px; + } + + .toplevel_page_loginpress-settings #wpcontent .inside .desc p { + font-size: 14px; + line-height: 20px; + margin-top: 0; + } + + .toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list .nav-tab, + .loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list .nav-tab { + font-size: 13px; + line-height: 20px; + } + + .toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list span, + .loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list span { + font-size: 10px; + } + + .toplevel_page_loginpress-settings #wpbody-content .loginpress-addon-promotion-video .inside { + display: block; + } + + .toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-settings .form-table tr td .description { + font-size: 13px; + line-height: 20px; + } + + .loginpress_page_loginpress-help #wpcontent .loginpress-help-page pre textarea { + font-size: 14px; + } + + body #wpcontent input[type="file"] { + padding: 6px 15px; + } + + /* body[class*="loginpress_page_loginpress"] #wpbody-content { + padding-top: 110px !important; + } */ + + #wpbody-content .loginpress-admin-setting a.loginpress-premium { + font-size: 13px; + } + + #wpcontent .loginpress-header-wrapper .loginpress-header-container .loginpress-header-cta a { + padding: 10px 15px; + font-size: 14px; + } + + .upload-file { + max-width: 350px; + } + + [id*="loginpress"] form .video{ + margin-top: 15px; + } + +} + +@media screen and (max-width: 772px) { + .loginpress-video-popup, + .auto-fold .loginpress-video-popup{ + left: 0px; + } + + .wp-responsive-open .loginpress-video-popup, + .auto-fold .wp-responsive-open .loginpress-video-popup{ + left: 190px; + } + + .loginpress-cross { + top: 55px; + } +} + +@media screen and (min-width: 768px) { + .toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper{ + display: flex !important; + } +} + +@media screen and (min-width: 1025px) { + .toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper{ + display: block !important; + } + + [dir="rtl"] .toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list .nav-tab, + [dir="rtl"] .loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list .nav-tab{ + padding-right: 57px; + padding-left: 15px; + } + + [dir="rtl"] .toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .nav-tab:after, + [dir="rtl"] .loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .nav-tab:after{ + left: auto; + right: 15px; + } +} + +@media screen and (max-width: 1024px) { + .toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting, + .loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting{ + flex-direction: column; + } + + .toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper, + .toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-settings, + .loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-settings, + .loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper{ + width: 100%; + } + + .toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-settings, + .loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-settings{ + margin-top: 0; + } + + .toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper, + .loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper{ + flex-direction: row; + padding-top: 0; + } + + .toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list, + .loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list { + display: flex; + } + + .toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list .nav-tab, + .loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list .nav-tab{ + background-color: rgb(255 255 255 / 50%); + padding: 55px 15px 15px 15px; + min-height: auto; + width: 100%; + text-align: center; + } + + .toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .nav-tab:after, + .loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list .nav-tab:after{ + left: 50%; + top: 15px; + transform: translateX(-50%); + } + + .toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list span, + .loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list span { + display: none; + } + + .toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-settings .form-table tr td fieldset { + max-width: 100%; + } + + #wpbody-content .loginpress-admin-setting a.loginpress-premium { + display: none; + } + + .loginpress-premium .dashicons-star-filled { + top: 10px; + left: 50%; + transform: translate(-50%, 0); + } + + #wpcontent .loginpress-header-wrapper .loginpress-header-container .loginpress-header-logo a img { + max-width: 86px; + } + + #wpcontent .loginpress-header-wrapper .loginpress-header-container .loginpress-header-cta .loginpress-pro-cta span{ + display: none; + } + + .loginpress-header-wrapper .loginpress-header-container { + padding: 10px 15px 10px 70px !important; + } + #wpcontent .loginpress-header-wrapper .loginpress-header-container .loginpress-header-cta { + flex-direction: row-reverse; + justify-content: flex-start; + } + + #wpcontent .loginpress-header-wrapper .loginpress-header-container .loginpress-header-cta a.loginpress-pro-cta:before { + display: none; + } + + #wpcontent .loginpress-header-wrapper .loginpress-header-container .loginpress-header-cta a { + max-width: 100%; + padding: 4px 15px; + font-size: 14px; + line-height: 20px; + } + + #wpcontent .loginpress-header-wrapper .loginpress-header-container .loginpress-header-cta a:after { + width: auto; + } + + #wpcontent .loginpress-header-wrapper .loginpress-header-container .loginpress-header-cta a.loginpress-documentation{ + padding: 0; + font-size: 0; + background-color: transparent; + border: none; + display: flex; + align-items: center; + } + + #wpcontent .loginpress-header-wrapper .loginpress-header-container .loginpress-header-cta a.loginpress-documentation:before { + background-position: -78px -1px; + margin-right: 0; + } + + #wpcontent .loginpress-header-wrapper{ + background-position: left -30px top -30px; + background-size: 88px; + } + + .toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list:hover #loginpress_limit_login_attempts-tab:after, + .toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list #loginpress_limit_login_attempts-tab.nav-tab-active:after, + .loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list:hover #loginpress_limit_login_attempts-tab:after, + .loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list #loginpress_limit_login_attempts-tab.nav-tab-active:after{ + left: 50%; + } +} + +@media (max-width: 960px) { + .auto-fold .loginpress-video-popup { + left: 36px; + } + + .loginpress-video-popup { + left: 160px; + } +} + +@media screen and (max-width: 950px) { + .loginpress-advertise { + max-width: 100%; + float: left; + } + + h1 .nav-tab, + h2 .nav-tab, + h3 .nav-tab { + margin: 0 !important; + } + + body #wpcontent input[type="file"] { + display: block; + } + + .loginpress-extension { + width: calc(50% - 30px); + + } +} + +@media screen and (max-width: 772px) { + .loginpress-video-popup, + .auto-fold .loginpress-video-popup{ + left: 0px; + } + + .wp-responsive-open .loginpress-video-popup, + .auto-fold .wp-responsive-open .loginpress-video-popup{ + left: 190px; + } + + .loginpress-cross { + top: 55px; + } +} + +@media screen and (max-width: 767px) { + .wpbrigade-video-popup { + max-width: 455px; + width: 100%; + height: auto; + padding: 37px 20px 9px; + } + + .wpbrigade-video-popup iframe { + height: 200px; + } + + .toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting, + .loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting{ + flex-direction: column; + padding: 0; + } + + .toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper, + .loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper{ + width: 100%; + } + + .toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-settings, + .loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-settings{ + background-color: transparent; + width: 100%; + } + + #wpbody-content .loginpress-admin-setting a.loginpress-premium{ + width: 100%; + min-width: 230px; + } + + .toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper, + .loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper{ + padding-top: 0; + flex-direction: column; + border-radius: 0 0 5px 5px; + overflow: hidden; + box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.1); + display: none; + position: absolute; + top: calc(100% - 1px); + z-index: 10; + border-top: 1px solid #daddde; + } + + .toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-main, + .loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-main{ + position: relative; + } + + .toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list, + .loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list{ + display: block; + width: 100%; + margin-bottom: 0; + cursor: pointer; + min-width: fit-content; + } + + .toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list .nav-tab, + .loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list .nav-tab { + background-color: rgb(255 255 255 / 100%); + padding: 15px 15px 15px 46px; + min-height: auto; + width: 100%; + text-align: left; + font-size: 14px; + line-height: 21px; + } + + .loginpress-tabs-main .tabs-toggle { + display: block; + font-size: 14px; + font-weight: 500; + padding: 10px 15px; + background-color: #fff; + border-radius: 5px; + border: none; + position: relative; + cursor: pointer; + } + + .loginpress-tabs-main .tabs-toggle.active{ + border-radius: 5px 5px 0 0; + } + + .loginpress-tabs-main .tabs-toggle:after{ + content: ""; + right: 15px; + top: 50%; + transform: translateY(-50%); + width: 14px; + height: 8px; + background: url(../img/menu-dropdown-icon.svg) center center no-repeat; + background-size: contain; + display: block; + position: absolute; + } + + .loginpress-tabs-main .tabs-toggle.active:after{ + transform: translateY(-50%) rotate(180deg); + } + + .toplevel_page_loginpress-settings #wpbody-content .loginpress-settings-heading{ + display: none; + } + + .toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .nav-tab:after, + .loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list .nav-tab:after{ + left: 15px; + top: 50%; + transform: translate(0%, -50%); + width: 21px; + height: 21px; + background-size: 150px; + } + .toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-settings, + .loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-settings{ + background-color: transparent; + padding-left: 0; + padding-right: 0; + } + + .toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list .nav-tab, + .loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list .nav-tab{ + height: 100%; + } + + .toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-settings .form-table tr th, + .loginpress-license-settings table tr th, .loginpress-import-export-page table tr th{ + padding: 10px 0 0; + width: 100% !important; + } + + ::-webkit-scrollbar { + -webkit-appearance: none; + } + + ::-webkit-scrollbar:vertical { + width: 12px; + } + + ::-webkit-scrollbar:horizontal { + height: 12px; + } + + ::-webkit-scrollbar-thumb { + background-color: rgba(0, 0, 0, .5); + border-radius: 10px; + border: 2px solid #ffffff; + } + + ::-webkit-scrollbar-track { + border-radius: 10px; + background-color: #ffffff; + } + + input[type=radio] { + margin: 0 15px 0 0px !important; + } + + #wpcontent { + padding-left: 15px !important; + } + + .toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-settings .form-table tr td fieldset label p, + .toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-settings .form-table tr td fieldset label { + font-size: 13px; + } + + .loginpress_page_loginpress-import-export #wpcontent .loginpress-import-export-page .import_setting .loginpress-import:disabled, + .loginpress_page_loginpress-import-export #wpcontent .loginpress-import-export-page .import_setting .loginpress-import { + margin-top: 15px; + display: block; + } + + .toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .nav-tab:after, + .loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .nav-tab:after{ + background-position: -59px -42px; + } + + .toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list:hover .nav-tab:after, + .toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list .nav-tab.nav-tab-active:after, + .loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list:hover .nav-tab:after, + .loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list .nav-tab.nav-tab-active:after{ + background-position: -81px -42px; + } + + .toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list:hover #loginpress_autologin-tab:after, + .toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list #loginpress_autologin-tab.nav-tab-active:after, + .loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list:hover #loginpress_autologin-tab:after, + .loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list #loginpress_autologin-tab.nav-tab-active:after { + background-position: -21px 0; + } + + .toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list #loginpress_hidelogin-tab:after, .loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list #loginpress_hidelogin-tab:after { + background-position: -64px -21px; + } + + .toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list:hover #loginpress_hidelogin-tab:after, + .toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list #loginpress_hidelogin-tab.nav-tab-active:after, + .loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list:hover #loginpress_hidelogin-tab:after, + .loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list #loginpress_hidelogin-tab.nav-tab-active:after { + background-position: -86px -21px; + } + + .toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list #loginpress_limit_login_attempts-tab:after, + .loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list #loginpress_limit_login_attempts-tab:after { + background-position: -28px -21px; + width: 18px; + height: 21px; + } + + .toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list:hover #loginpress_limit_login_attempts-tab:after, + .toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list #loginpress_limit_login_attempts-tab.nav-tab-active:after, + .loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list:hover #loginpress_limit_login_attempts-tab:after, + .loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list #loginpress_limit_login_attempts-tab.nav-tab-active:after { + left: 15px; + background-position: -46px -21px; + width: 18px; + height: 21px; + } + + .toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list #loginpress_login_redirects-tab:after, + .loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list #loginpress_login_redirects-tab:after { + background-position: -17px -42px; + } + + .toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list:hover #loginpress_login_redirects-tab:after, + .toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list #loginpress_login_redirects-tab.nav-tab-active:after, + .loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list:hover #loginpress_login_redirects-tab:after, + .loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list #loginpress_login_redirects-tab.nav-tab-active:after { + background-position: -38px -42px; + } + + .toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list #loginpress_social_logins-tab:after, + .loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list #loginpress_social_logins-tab:after { + background-position: -102px -43px; + } + + .toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list:hover #loginpress_social_logins-tab:after, + .toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list #loginpress_social_logins-tab.nav-tab-active:after, + .loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list:hover #loginpress_social_logins-tab:after, + .loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list #loginpress_social_logins-tab.nav-tab-active:after { + background-position: -123px -43px; + } + + .toplevel_page_loginpress-settings #wpcontent .rename_login_slug td .loginpress-hidelogin-slug-wrapper input{ + padding-left: 5px !important; + } + + .toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list #loginpress_pro_license-tab:after, + .loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list #loginpress_pro_license-tab:after { + background-position: -107px -23px; + } + + .toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list:hover #loginpress_pro_license-tab:after, + .toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list #loginpress_pro_license-tab.nav-tab-active:after, + .loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list:hover #loginpress_pro_license-tab:after, + .loginpress_page_loginpress-license #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list #loginpress_pro_license-tab.nav-tab-active:after { + background-position: -128px -23px; + } + + body .loginpress-accordions{ + background-color: transparent; + } + + .loginpress-social-accordions .loginpress-social-tabs{ + padding: 1px 15px; + } + [dir="rtl"] input[type=radio] { + margin: 0 0 0 15px !important; + } + + [dir="rtl"] .toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .settings-tabs-list .nav-tab{ + text-align: right; + padding: 15px 46px 15px 15px; + } + + [dir="rtl"] .toplevel_page_loginpress-settings #wpbody-content .loginpress-admin-setting .loginpress-tabs-wrapper .nav-tab:after { + right: 15px; + left: auto; + top: 50%; + } + + [dir="rtl"] .loginpress-tabs-main .tabs-toggle { + padding: 10px 50px 10px 15px; + } + +} + +@media screen and (max-width: 600px) { + + #wpcontent .loginpress-header-wrapper{ + background-position: left -30px top -30px; + background-size: 88px; + top: 46px; + } + + #wpbody-content { + padding-bottom: 30px !important; + } +} diff --git a/wp-content/plugins/loginpress/css/themes/default-1.php b/wp-content/plugins/loginpress/css/themes/default-1.php new file mode 100644 index 0000000..dcf9df1 --- /dev/null +++ b/wp-content/plugins/loginpress/css/themes/default-1.php @@ -0,0 +1,394 @@ +=' ) ) : ?> + + + + + + + =' ) ) : ?> + + + + + + + + + loginpress_key = get_option( 'loginpress_customization' ); + $this->loginpress_preset = get_option( 'customize_presets_settings', true ); + $this->_hooks(); + } + + + /** + * Hook into actions and filters + * + * @since 1.0.0 + * @version 1.4.0 + */ + private function _hooks() { + + add_filter( 'login_title', array( $this, 'login_page_title' ), 99 ); + add_filter( 'login_headerurl', array( $this, 'login_page_logo_url' ) ); + if ( version_compare( $GLOBALS['wp_version'], '5.2', '<' ) ) { + add_filter( 'login_headertitle',array( $this, 'login_page_logo_title' ) ); + } else { + add_filter( 'login_headertext', array( $this, 'login_page_logo_title' ) ); + } + add_filter( 'login_errors', array( $this, 'login_error_messages' ) ); + add_filter( 'login_message', array( $this, 'change_welcome_message' ) ); + add_action( 'customize_register', array( $this, 'customize_login_panel' ) ); + add_action( 'login_footer', array( $this, 'login_page_custom_footer' ) ); + add_filter( 'site_icon_meta_tags', array( $this, 'login_page_custom_favicon' ), 1, 1 ); + add_action( 'login_head', array( $this, 'login_page_custom_head' ) ); + add_action( 'init', array( $this, 'redirect_to_custom_page' ) ); + add_action( 'admin_menu', array( $this, 'menu_url' ), 10 ); + add_filter( 'wp_login_errors', array( $this, 'remove_error_messages_in_wp_customizer' ), 10, 2 ); + add_action( 'login_enqueue_scripts', array( $this, 'loginpress_login_page_scripts' ) ); + + if ( version_compare( $GLOBALS['wp_version'], '5.9', '>=' ) ) { + add_filter( 'login_display_language_dropdown', array( $this, 'loginpress_language_switch' ) ); + } + + /** + * This function enqueues scripts and styles in the Customizer. + */ + add_action( 'customize_controls_enqueue_scripts', array( $this, 'loginpress_customizer_js' ) ); + + /** + * This function is triggered on the initialization of the Previewer in the Customizer. + * We add actions that pertain to the Previewer window here. + * The actions added here are triggered only in the Previewer and not in the Customizer. + * @since 1.0.23 + */ + add_action( 'customize_preview_init', array( $this, 'loginpress_customizer_previewer_js' ) ); + add_filter( 'woocommerce_process_login_errors', array( $this, 'loginpress_woo_login_errors' ), 10, 3 ); + + } + + /** + * Login Page Custom Favicon ( Overwrites the default meta tags if favicon is set from LoginPress ). + * + * @param array $meta_tags default meta tags for login page. + * @return array $meta_tags modified meta tags for login page. + * + * @since 3.0.0 + */ + function login_page_custom_favicon( $meta_tags ) { + $login_favicon = isset($this->loginpress_key['login_favicon']) ? $this->loginpress_key['login_favicon'] : 'off'; + + if ( has_site_icon() && ! empty( $login_favicon ) ) { + + /** + * If Login favicon is set then only show the favicon of login page else site icon will be shown. + */ + if ( 'off' != $login_favicon && function_exists('login_header') ) { + unset( $meta_tags ); + $meta_tags[] = ''; + } + } + return $meta_tags; + } + + /** + * Login Page YouTube Video Background scripts. + * + * @since 3.0.0 + */ + function loginpress_login_page_scripts() { + + $loginpress_customization = get_option( 'loginpress_customization'); + $loginpress_yt_id = isset( $loginpress_customization['yt_video_id'] ) && ! empty( $loginpress_customization['yt_video_id'] ) ? $loginpress_customization['yt_video_id'] : false; + + if ( $loginpress_yt_id ) { + wp_enqueue_script( 'loginpress-yt-iframe', 'https://www.youtube.com/iframe_api' ); + } + } + + /** + * Enqueue jQuery and use wp_localize_script. + * + * @since 1.0.9 + * @version 3.0.0 + */ + function loginpress_customizer_js() { + + wp_enqueue_script( 'jquery' ); + wp_enqueue_script( 'loginpress-customize-control', plugins_url( 'js/customize-controls.js' , LOGINPRESS_ROOT_FILE ), array( 'jquery' ), LOGINPRESS_VERSION, true ); + + /* + * Our Customizer script + * + * Dependencies: Customizer Controls script (core) + */ + wp_enqueue_script( 'loginpress-control-script', plugins_url( 'js/customizer.js' , LOGINPRESS_ROOT_FILE ), array( 'customize-controls' ), LOGINPRESS_VERSION, true ); + + // Get Background URL for use in Customizer JS. + $user = wp_get_current_user(); + $name = empty( $user->user_firstname ) ? ucfirst( $user->display_name ) : ucfirst( $user->user_firstname ); + $loginpress_bg = get_option( 'loginpress_customization'); + $loginpress_st = get_option( 'loginpress_setting'); + $cap_type = isset( $loginpress_st['recaptcha_type'] ) ? $loginpress_st['recaptcha_type'] : 'v2-robot'; // 1.2.1 + $loginpress_bg_url = $loginpress_bg['setting_background'] ? $loginpress_bg['setting_background'] : false; + + /** + * Included in version 1.2.0. + */ + if( isset( $_GET['autofocus'] ) && $_GET['autofocus'] === 'loginpress_panel' ) { + $loginpress_auto_focus = true; + } else { + $loginpress_auto_focus = false; + } + + // Array for localize. + $loginpress_localize = array( + 'admin_url' => admin_url(), + 'ajaxurl' => admin_url( 'admin-ajax.php' ), + 'plugin_url' => plugins_url(), + 'login_theme' => $this->loginpress_preset, + 'loginpress_bg_url' => $loginpress_bg_url, + 'preset_nonce' => wp_create_nonce( 'loginpress-preset-nonce' ), + 'attachment_nonce' => wp_create_nonce( 'loginpress-attachment-nonce' ), + 'preset_loader' => includes_url( 'js/tinymce/skins/lightgray/img/loader.gif' ), + 'autoFocusPanel' => $loginpress_auto_focus, + 'recaptchaType' => $cap_type, + 'filter_bg' => apply_filters( 'loginpress_default_bg', '' ), + 'translated_strings' => array( + 'wrong_yt_id' => _x( 'Wrong YouTube Video ID', 'Wrong YouTube Video ID (Customizer)', 'loginpress' ), + ), + ); + + wp_localize_script( 'loginpress-customize-control', 'loginpress_script', $loginpress_localize ); + + } + + /** + * This function is called only on the Previewer and enqueues scripts and styles. + * Our Customizer script + * + * Dependencies: Customizer Preview script (core) + * @since 1.0.23 + */ + function loginpress_customizer_previewer_js() { + + wp_enqueue_style( 'loginpress-customizer-previewer-style', plugins_url( 'css/style-previewer.css' , LOGINPRESS_ROOT_FILE ), array(), LOGINPRESS_VERSION ); + wp_enqueue_script( 'loginpress-customizer-previewer-script', plugins_url( 'js/customizer-previewer.js' , LOGINPRESS_ROOT_FILE ), array( 'customize-preview' ), LOGINPRESS_VERSION, true ); + + } + + /** + * Creates a method for setting and controlling LoginPress_Range_Control. + * + * @param object $wp_customize The WordPress Customize object. + * @param string $control The control name. + * @param string $default The default value. + * @param string $label The label for the control. + * @param array $input_attr Additional input attributes. + * @param array $unit The unit for the control value. + * @param int $index The index of the control. + * @param int $priority To set the Priority of the section. + * + * @return object The modified WordPress Customize object. + * + * @since 1.1.3 + */ + function loginpress_range_setting( $wp_customize, $control, $default, $label, $input_attr, $unit, $section, $index, $priority = '' ) { + + $wp_customize->add_setting( "loginpress_customization[{$control[$index]}]", array( + 'default' => $default[$index], + 'type' => 'option', + 'capability' => 'manage_options', + 'transport' => 'postMessage', + 'sanitize_callback' => 'absint', + ) ); + + $wp_customize->add_control( new LoginPress_Range_Control( $wp_customize, "loginpress_customization[{$control[$index]}]", array( + 'type' => 'loginpress-range', + 'label' => $label[$index], + 'section' => $section, + 'priority' => $priority, + 'settings' => "loginpress_customization[{$control[$index]}]", + 'default' => $default[$index], + 'input_attrs' => $input_attr[$index], + 'unit' => $unit[$index], + ) ) ); + } + + + /** Creates a method for setting and controlling LoginPress_Group_Control. + * + * @param object $wp_customize The WordPress Customize object. + * @param string $control The control name. + * @param string $label The label for the control. + * @param string $section The section name. + * @param string $info_text The information text. + * @param int $index The index of the control. + * @param int $priority To set the Priority of the section. + * + * @return object The modified WordPress Customize object. + * + * @since 1.1.3 + */ + function loginpress_group_setting( $wp_customize, $control, $label, $info_test, $section, $index, $priority = '' ) { + + $wp_customize->add_setting( "loginpress_customization[{$control[$index]}]", array( + 'type' => 'option', + 'capability' => 'manage_options', + 'transport' => 'postMessage' + ) ); + + $wp_customize->add_control( new LoginPress_Group_Control( $wp_customize, "loginpress_customization[{$control[$index]}]", array( + 'settings' => "loginpress_customization[{$control[$index]}]", + 'label' => $label[$index], + 'section' => $section, + 'type' => 'group', + 'info_text' => $info_test[$index], + 'priority' => $priority, + ) ) ); + } + + /** Creates a method for setting and controlling WP_Customize_Color_Control. + * @param object $wp_customize The WordPress Customize object. + * @param string $control The control name. + * @param string $label The label for the control. + * @param string $section The section name. + * @param int $index The index of the control. + * @param int $priority To set the Priority of the section. + * + * @return object The modified WordPress Customize object. + * @since 1.1.3 + */ + function loginpress_color_setting( $wp_customize, $control, $label, $section, $index, $priority = '' ) { + + $wp_customize->add_setting( "loginpress_customization[{$control[$index]}]", array( + // 'default' => $form_color_default[$form_color], + 'type' => 'option', + 'capability' => 'manage_options', + 'transport' => 'postMessage', + 'sanitize_callback' => 'sanitize_hex_color' // validates 3 or 6 digit HTML hex color code. + ) ); + + $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, "loginpress_customization[{$control[$index]}]", array( + 'label' => $label[$index], + 'section' => $section, + 'settings' => "loginpress_customization[{$control[$index]}]", + 'priority' => $priority, + ) ) ); + } + + /** + * Creates a thematic break. + * + * @param object $wp_customize The WordPress Customize object. + * @param string $control The control name. + * @param string $section The section name. + * @param int $index The index of the control. + * @param int $priority To set the Priority of the section. + * + * @since 1.1.3 + * @version 3.0.0 + */ + function loginpress_hr_setting( $wp_customize, $control, $section, $index, $priority = '' ) { + if ( isset( $control[ $index ] ) ) { + $wp_customize->add_setting( "loginpress_customization[{$control[$index]}]", array( + 'sanitize_callback' => 'sanitize_text_field', + ) ); + + $wp_customize->add_control( new LoginPress_Misc_Control( $wp_customize, "loginpress_customization[{$control[$index]}]", array( + 'section' => $section, + 'type' => 'hr', + 'priority' => $priority, + ) ) ); + } + } + + /** + * Register plugin settings Panel in WP Customizer. + * + * @param $wp_customize The WordPress Customize object. + * + * @since 1.0.0 + */ + public function customize_login_panel( $wp_customize ) { + + include LOGINPRESS_ROOT_PATH . 'classes/control-presets.php'; + + include LOGINPRESS_ROOT_PATH . 'classes/controls/background-gallery.php'; + + include LOGINPRESS_ROOT_PATH . 'classes/controls/range.php'; + + include LOGINPRESS_ROOT_PATH . 'classes/controls/group.php'; + + include LOGINPRESS_ROOT_PATH . 'classes/controls/radio-button.php'; + + include LOGINPRESS_ROOT_PATH . 'classes/controls/miscellaneous.php'; + + include LOGINPRESS_ROOT_PATH . 'include/customizer-strings.php'; + + include LOGINPRESS_ROOT_PATH . 'include/customizer-validation.php'; + + if ( ! has_action( 'loginpress_pro_add_template' ) ) : + include LOGINPRESS_ROOT_PATH . 'classes/class-loginpress-promo.php'; + endif; + + // ============================= + // = Panel for the LoginPress = + // ============================= + $wp_customize->add_panel( 'loginpress_panel', array( + 'title' => __( 'LoginPress', 'loginpress' ), + 'description' => __( 'Customize Your WordPress Login Page with LoginPress :)', 'loginpress' ), + 'priority' => 30, + ) ); + + /** + * Section for Presets. + * + * @since 1.0.9 + * @version 3.0.3 + */ + $wp_customize->add_section( 'customize_presets', array( + 'title' => __( 'Themes', 'loginpress' ), + 'description' => __( 'Choose Theme', 'loginpress' ), + 'priority' => 1, + 'panel' => 'loginpress_panel', + ) ); + + $loginpress_default_theme = $this->loginpress_preset === true && ( empty( $this->loginpress_key ) && empty( $this->loginpress_setting ) ) ? 'minimalist' : 'default1'; + + $wp_customize->add_setting( 'customize_presets_settings', array( + 'default' => $loginpress_default_theme, + 'type' => 'option', + // 'transport' => 'postMessage', + 'capability' => 'manage_options', + ) ); + + $loginpress_free_templates = array(); + $loginpress_theme_name = array( "", "", + __( 'Company', 'loginpress' ), + __( 'Persona', 'loginpress' ), + __( 'Corporate', 'loginpress' ), + __( 'Corporate', 'loginpress' ), + __( 'Startup', 'loginpress' ), + __( 'Wedding', 'loginpress' ), + __( 'Wedding #2', 'loginpress' ), + __( 'Company', 'loginpress' ), + __( 'Bikers', 'loginpress' ), + __( 'Fitness', 'loginpress' ), + __( 'Shopping', 'loginpress' ), + __( 'Writers', 'loginpress' ), + __( 'Persona', 'loginpress' ), + __( 'Geek', 'loginpress' ), + __( 'Innovation', 'loginpress' ), + __( 'Photographers', 'loginpress' ), + __( 'Animated Wapo', 'loginpress' ), + __( 'Animated Wapo 2','loginpress' ) + ); + + // 1st template that is default + $loginpress_free_templates["default1" ] = array( + 'img' => esc_url( apply_filters( 'loginpress_default_bg', plugins_url( 'img/minimalist.jpg', LOGINPRESS_PLUGIN_BASENAME ) ) ), + 'thumbnail' => esc_url( apply_filters( 'loginpress_default_bg', plugins_url( 'img/thumbnail/default-1.png', LOGINPRESS_ROOT_FILE ) ) ), + 'id' => 'default1', + 'name' => 'Default' + ); + + // 1st template that is default + $loginpress_free_templates["minimalist"] = array( + 'img' => esc_url( apply_filters( 'loginpress_default_bg', plugins_url( 'img/bg-default.jpg', LOGINPRESS_PLUGIN_BASENAME ) ) ), + 'thumbnail' => esc_url( apply_filters( 'loginpress_default_bg', plugins_url( 'img/thumbnail/free-minimalist.png', LOGINPRESS_ROOT_FILE ) ) ), + 'id' => 'minimalist', + 'name' => 'Minimalist' + ); + + // Loop through the templates. + $_count = 2; + while ( $_count <= 18 ) : + + $loginpress_free_templates["default{$_count}" ] = array( + // 'img' => plugins_url( 'img/bg.jpg', LOGINPRESS_ROOT_FILE ), + 'thumbnail' => plugins_url( "img/thumbnail/default-{$_count}.png", LOGINPRESS_ROOT_FILE ), + 'id' => "default{$_count}", + 'name' => $loginpress_theme_name[$_count], + 'pro' => 'yes' + ); + $_count++; + endwhile; + + // 18th template for custom design. + $loginpress_free_templates["default19" ] = array( + 'img' => plugins_url( 'loginpress/img/bg17.jpg', LOGINPRESS_ROOT_PATH ), + 'thumbnail' => plugins_url( 'loginpress/img/thumbnail/custom-design.png', LOGINPRESS_ROOT_PATH ), + 'id' => 'default19', + 'name' => __( 'Custom Design', 'loginpress' ), + 'link' => 'yes' + ); + $loginpress_templates = apply_filters( 'loginpress_pro_add_template', $loginpress_free_templates ); + + $wp_customize->add_control( new LoginPress_Presets( $wp_customize, 'customize_presets_settings', + array( + 'section' => 'customize_presets', + // 'label' => __( 'Themes', 'loginpress' ), + 'choices' => $loginpress_templates + ) ) ); + + //End of Presets. + + + // ============================= + // = Section for Login Logo = + // ============================= + $this->loginpress_group_setting( $wp_customize, $group_control, $group_label, $group_info, 'customize_logo_section', 8, 4 ); + $wp_customize->add_section( 'customize_logo_section', array( + 'title' => __( 'Logo', 'loginpress' ), + 'description' => __( 'Customize Your Logo Section', 'loginpress' ), + 'priority' => 5, + 'panel' => 'loginpress_panel', + ) ); + + /** + * [ Enable / Disable Logo Image with LoginPress_Radio_Control ] + * @since 1.1.3 + */ + + $wp_customize->add_setting( 'loginpress_customization[setting_logo_display]', array( + 'default' => false, + 'type' => 'option', + 'capability' => 'manage_options', + 'transport' => 'postMessage', + 'sanitize_callback' => 'loginpress_sanitize_checkbox' + ) ); + + $wp_customize->add_control( new LoginPress_Radio_Control( $wp_customize, 'loginpress_customization[setting_logo_display]', array( + 'settings' => 'loginpress_customization[setting_logo_display]', + 'label' => __( 'Disable Logo:', 'loginpress'), + 'section' => 'customize_logo_section', + 'priority' => 4, + 'type' => 'ios', // light, ios, flat + ) ) ); + + $wp_customize->add_setting( 'loginpress_customization[setting_logo]', array( + 'type' => 'option', + 'capability' => 'manage_options', + 'transport' => 'postMessage', + 'sanitize_callback' => 'loginpress_sanitize_image' + ) ); + + $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'loginpress_customization[setting_logo]', array( + 'label' => __( 'Logo Image:', 'loginpress' ), + 'section' => 'customize_logo_section', + 'priority' => 5, + 'settings' => 'loginpress_customization[setting_logo]' + ) ) ); + + $wp_customize->add_setting( 'loginpress_customization[login_favicon]', array( + 'type' => 'option', + 'capability' => 'manage_options', + 'transport' => 'postMessage', + 'sanitize_callback' => 'loginpress_sanitize_image' + ) ); + + $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'loginpress_customization[login_favicon]', array( + 'label' => __( 'Login Favicon:', 'loginpress' ), + 'section' => 'customize_logo_section', + 'description' => __( 'Add a custom favicon specific for your login page', 'loginpress' ), + 'priority' => 30, + 'settings' => 'loginpress_customization[login_favicon]' + ) ) ); + + /** + * [ Change CSS Properties Input fields with LoginPress_Range_Control ] + * @since 1.0.1 + * @version 3.0.0 + */ + + $this->loginpress_range_setting( $wp_customize, $logo_range_control, $logo_range_default, $logo_range_label, $logo_range_attrs, $logo_range_unit, 'customize_logo_section', 0, 10 ); + $this->loginpress_range_setting( $wp_customize, $logo_range_control, $logo_range_default, $logo_range_label, $logo_range_attrs, $logo_range_unit, 'customize_logo_section', 1, 15 ); + $this->loginpress_range_setting( $wp_customize, $logo_range_control, $logo_range_default, $logo_range_label, $logo_range_attrs, $logo_range_unit, 'customize_logo_section', 2, 20 ); + + + + /** + * Login Page meta and form logo options. + * + * @version 3.0.0 + */ + if ( version_compare( $GLOBALS['wp_version'], '5.2', '<' ) ) { + $loginpress_logo_title = __( 'Logo Hover Title:', 'loginpress' ); + } else { + $loginpress_logo_title = __( 'Logo Title:', 'loginpress' ); + } + $logo_control = array( 'customize_logo_hover', 'customize_logo_hover_title', 'customize_login_page_title' ); + $logo_default = array( '', '', '' ); + $logo_label = array( __( 'Logo URL:', 'loginpress' ), $loginpress_logo_title, __( 'Login Page Title:', 'loginpress' ) ); + $logo_sanitization = array( 'esc_url_raw', 'wp_strip_all_tags', 'wp_strip_all_tags' ); + $logo_desc = array( '', '', __( 'Login page title that is shown on WordPress login page.', 'loginpress' ) ); + + $logo = 0; + while ( $logo < 3 ) : + + $wp_customize->add_setting( "loginpress_customization[{$logo_control[$logo]}]", array( + 'default' => $logo_default[$logo], + 'type' => 'option', + 'capability' => 'manage_options', + 'transport' => 'postMessage', + 'sanitize_callback' => $logo_sanitization[$logo] + ) ); + + $wp_customize->add_control( "loginpress_customization[{$logo_control[$logo]}]", array( + 'label' => $logo_label[$logo], + 'section' => 'customize_logo_section', + 'priority' => 25, + 'settings' => "loginpress_customization[{$logo_control[$logo]}]", + 'description' => $logo_desc[$logo] + ) ); + if ( 1 === $logo ) { + $this->loginpress_hr_setting( $wp_customize, $close_control, 'customize_logo_section', 9, 25 ); + $this->loginpress_group_setting( $wp_customize, $group_control, $group_label, $group_info, 'customize_logo_section', 9, 25 ); + } + $logo++; + endwhile; + + // ============================= + // = Section for Background = + // ============================= + $wp_customize->add_section( 'section_background', array( + 'title' => __( 'Background', 'loginpress' ), + 'description' => '', + 'priority' => 10, + 'panel' => 'loginpress_panel', + ) ); + + $wp_customize->add_setting( 'loginpress_customization[setting_background_color]', array( + // 'default' => '#ddd5c3', + 'type' => 'option', + 'capability' => 'manage_options', + 'transport' => 'postMessage', + 'sanitize_callback' => 'sanitize_hex_color' // validates 3 or 6 digit HTML hex color code. + ) ); + + $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'loginpress_customization[setting_background_color]', array( + 'label' => __( 'Background Color:', 'loginpress' ), + 'section' => 'section_background', + 'priority' => 5, + 'settings' => 'loginpress_customization[setting_background_color]' + ) ) ); + + $wp_customize->add_setting( 'loginpress_customization[loginpress_display_bg]', array( + 'default' => true, + 'type' => 'option', + 'capability' => 'manage_options', + 'transport' => 'postMessage', + 'sanitize_callback' => 'loginpress_sanitize_checkbox' + ) ); + + $this->loginpress_group_setting( $wp_customize, $group_control, $group_label, $group_info, 'section_background', 6, 6 ); + + /** + * [Enable / Disable Background Image with LoginPress_Radio_Control] + * @since 1.0.1 + * @version 1.0.23 + */ + $wp_customize->add_control( new LoginPress_Radio_Control( $wp_customize, 'loginpress_customization[loginpress_display_bg]', array( + 'settings' => 'loginpress_customization[loginpress_display_bg]', + 'label' => __( 'Enable Background Image?', 'loginpress'), + 'section' => 'section_background', + 'priority' => 10, + 'type' => 'ios',// light, ios, flat + ) ) ); + + $wp_customize->add_setting( 'loginpress_customization[setting_background]', array( + // 'default' => plugins_url( 'img/bg.jpg', LOGINPRESS_ROOT_FILE ) , + 'type' => 'option', + 'capability' => 'manage_options', + 'transport' => 'postMessage', + 'sanitize_callback' => 'loginpress_sanitize_image' + ) ); + + $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'loginpress_customization[setting_background]', array( + 'label' => __( 'Background Image:', 'loginpress' ), + 'section' => 'section_background', + 'priority' => 15, + 'settings' => 'loginpress_customization[setting_background]', + 'button_labels' => array( + 'select' => __( 'Select Image', 'loginpress' ), + ) + ) ) ); + + /** + * [ Add Background Gallery ] + * @since 1.1.0 + */ + $wp_customize->add_setting( 'loginpress_customization[gallery_background]', array( + 'default' => plugins_url( "img/gallery/img-1.jpg", LOGINPRESS_ROOT_FILE ), + 'type' => 'option', + 'capability' => 'manage_options', + 'transport' => 'postMessage' + ) ); + + $loginpress_free_background = array(); + $loginpress_background_name = array( "", + __( 'Company', 'loginpress' ), + __( 'Persona', 'loginpress' ), + __( 'Corporate', 'loginpress' ), + __( 'Corporate', 'loginpress' ), + __( 'Startup', 'loginpress' ), + __( 'Wedding', 'loginpress' ), + __( 'Wedding #2', 'loginpress' ), + __( 'Company', 'loginpress' ), + __( 'Bikers', 'loginpress' ) + ); + + // Loop through the backgrounds. + $bg_count = 1; + while ( $bg_count <= 9 ) : + + $thumbnail = plugins_url( "img/gallery/img-{$bg_count}.jpg", LOGINPRESS_ROOT_FILE ); + $loginpress_free_background[$thumbnail] = array( + 'thumbnail' => plugins_url( "img/thumbnail/gallery-img-{$bg_count}.jpg", LOGINPRESS_ROOT_FILE ), + 'id' => $thumbnail, + 'name' => $loginpress_background_name[$bg_count] + ); + $bg_count++; + endwhile; + + $loginpress_background = apply_filters( 'loginpress_pro_add_background', $loginpress_free_background ); + + $wp_customize->add_control( new LoginPress_Background_Gallery_Control( $wp_customize, 'loginpress_customization[gallery_background]', array( + 'section' => 'section_background', + 'label' => __( 'Background Gallery:', 'loginpress' ), + 'choices' => $loginpress_background + ) ) ); + + // @version 1.1.21 + $wp_customize->add_setting( 'loginpress_customization[background_repeat_radio]', array( + 'default' => 'no-repeat', + 'type' => 'option', + 'capability' => 'manage_options', + 'transport' => 'postMessage', + // 'sanitize_callback' => 'loginpress_sanitize_checkbox' + ) ); + + $wp_customize->add_control( 'loginpress_customization[background_repeat_radio]', array( + 'label' => __( 'Background Repeat:', 'loginpress' ), + 'section' => 'section_background', + 'priority' => 20, + 'settings' => 'loginpress_customization[background_repeat_radio]', + 'type' => 'select', + 'choices' => array( + 'repeat' => 'repeat', + 'repeat-x' => 'repeat-x', + 'repeat-y' => 'repeat-y', + 'no-repeat' => 'no-repeat', + 'initial' => 'initial', + 'inherit' => 'inherit', + ), + ) ); + + // @version 1.1.21 + $wp_customize->add_setting( 'loginpress_customization[background_position]', array( + 'default' => 'center', + 'type' => 'option', + 'capability' => 'manage_options', + 'transport' => 'postMessage', + 'sanitize_callback' => 'loginpress_sanitize_select' + ) ); + $wp_customize->add_control( 'loginpress_customization[background_position]', array( + 'settings' => 'loginpress_customization[background_position]', + 'label' => __( 'Select Position:', 'loginpress' ), + 'section' => 'section_background', + 'priority' => 25, + 'type' => 'select', + 'choices' => array( + 'left-top' => 'left top', + 'left-center' => 'left center', + 'left-bottom' => 'left bottom', + 'right-top' => 'right top', + 'right-center' => 'right center', + 'right-bottom' => 'right bottom', + 'center-top' => 'center top', + 'center' => 'center', + 'center-bottom' => 'center bottom', + ), + ) ); + + $wp_customize->add_setting( 'loginpress_customization[background_image_size]', array( + 'default' => 'cover', + 'type' => 'option', + 'capability' => 'manage_options', + 'transport' => 'postMessage', + 'sanitize_callback' => 'loginpress_sanitize_select' + )); + + $wp_customize->add_control( 'loginpress_customization[background_image_size]', array( + 'label' => __( 'Background Image Size: ', 'loginpress' ), + 'section' => 'section_background', + 'priority' => 30, + 'settings' => 'loginpress_customization[background_image_size]', + 'type' => 'select', + 'choices' => array( + 'auto' => 'auto', + 'cover' => 'cover', + 'contain' => 'contain', + 'initial' => 'initial', + 'inherit' => 'inherit', + ), + ) ); + + $this->loginpress_hr_setting( $wp_customize, $close_control, 'section_form', 7, 35 ); + $this->loginpress_group_setting( $wp_customize, $group_control, $group_label, $group_info, 'section_background', 7, 35 ); + /** + * [Enable / Disable Background Video with LoginPress_Radio_Control] + * @since 1.1.22 + */ + $wp_customize->add_setting( 'loginpress_customization[loginpress_display_bg_video]', array( + 'default' => false, + 'type' => 'option', + 'capability' => 'manage_options', + 'transport' => 'postMessage', + 'sanitize_callback' => 'loginpress_sanitize_checkbox' + ) ); + + $wp_customize->add_control( new LoginPress_Radio_Control( $wp_customize, 'loginpress_customization[loginpress_display_bg_video]', array( + 'settings' => 'loginpress_customization[loginpress_display_bg_video]', + 'label' => __( 'Enable Background Video?', 'loginpress'), + 'section' => 'section_background', + 'priority' => 40, + 'type' => 'ios', // light, ios, flat + ) ) ); + + /** + * Background Video Medium. + * + * @since 3.0.0 + */ + $wp_customize->add_setting( 'loginpress_customization[bg_video_medium]', array( + 'default' => 'media', + 'type' => 'option', + 'capability' => 'manage_options', + 'transport' => 'postMessage', + // 'sanitize_callback' => 'loginpress_sanitize_checkbox' + ) ); + + $wp_customize->add_control( 'loginpress_customization[bg_video_medium]', array( + 'label' => __( 'Medium', 'loginpress' ), + 'section' => 'section_background', + 'priority' => 41, + 'settings' => 'loginpress_customization[bg_video_medium]', + 'type' => 'radio', + 'choices' => array( + 'media' => __( 'Media', 'loginpress' ), + 'youtube' => __( 'YouTube', 'loginpress' ), + ), + ) ); + + /** + * [Launch Background Video feature with WP_Customize_Media_Control] + * @since 1.1.22 + */ + $wp_customize->add_setting( 'loginpress_customization[background_video]', array( + 'type' => 'option', + 'capability' => 'manage_options', + 'transport' => 'postMessage', + // 'sanitize_callback' => 'section_background' + ) ); + + $wp_customize->add_control( new WP_Customize_Media_Control( $wp_customize, 'loginpress_customization[background_video]', array( + 'label' => __( 'Background Video:', 'loginpress' ), + 'section' => 'section_background', + 'mime_type' => 'video', // Required. Can be image, audio, video, application, text + 'priority' => 45, + 'button_labels' => array( + 'select' => __( 'Select Video', 'loginpress' ), + 'change' => __( 'Change Video', 'loginpress' ), + 'default' => __( 'Default', 'loginpress' ), + 'remove' => __( 'Remove', 'loginpress' ), + 'frame_title' => __( 'Select File', 'loginpress' ), + 'frame_button' => __( 'Choose File', 'loginpress' ), + ) + ) ) ); + + /** + * Field settings for the error message + * + * @since 3.0.0 + */ + $wp_customize->add_setting( 'loginpress_customization[background_video_error]', array( + 'sanitize_callback' => 'sanitize_text_field', + ) ); + /** + * Field for Add a control for the error message + * + * @since 3.0.0 + */ + $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'loginpress_customization[background_video_error]', array( + 'label' => __( 'Error Message:', 'loginpress' ), + 'description' => 'Wrong Selection, Please select MP4, webm or ogg file only', + 'section' => 'section_background', + 'priority' => 46, // Place it after the video control + 'type' => 'hidden', // Using hidden type to display only the description + ) ) ); + /** + * Field for YouTube video ID. + * + * @since 3.0.0 + */ + $wp_customize->add_setting( "loginpress_customization[yt_video_id]", array( + 'type' => 'option', + 'capability' => 'manage_options', + 'transport' => 'postMessage', + 'sanitize_callback' => 'sanitize_text_field' + )); + + $wp_customize->add_control( "loginpress_customization[yt_video_id]", array( + 'label' => __( 'ID of the YouTube video', 'loginpress' ), + 'description' => sprintf( __('YouTube video ID is correct though the Live Preview is not supported. The video on the %slogin page%s can be checked, once it is published.', 'loginpress'), '', '' ), + 'section' => 'section_background', + 'priority' => 46, + 'settings' => "loginpress_customization[yt_video_id]", + 'input_attrs' => array( + 'placeholder' => 'GMAwsHomJlE', + ) + ) ); + + // @version 1.1.21 + $wp_customize->add_setting( 'loginpress_customization[background_video_object]', array( + 'default' => 'cover', + 'type' => 'option', + 'capability' => 'manage_options', + 'transport' => 'postMessage', + 'sanitize_callback' => 'loginpress_sanitize_select' + ) ); + $wp_customize->add_control( 'loginpress_customization[background_video_object]', array( + 'settings' => 'loginpress_customization[background_video_object]', + 'label' => __( 'Video Size:', 'loginpress' ), + 'section' => 'section_background', + 'priority' => 50, + 'type' => 'select', + 'choices' => array( + 'fill' => 'fill', + 'contain' => 'contain', + 'cover' => 'cover', + 'scale-down' => 'scale-down', + 'none' => 'none', + ), + ) ); + + $wp_customize->add_setting( "loginpress_customization[video_obj_position]", array( + 'type' => 'option', + 'capability' => 'manage_options', + 'transport' => 'postMessage', + 'sanitize_callback' => 'wp_strip_all_tags' + ) ); + + $wp_customize->add_control( "loginpress_customization[video_obj_position]", array( + 'label' => __( 'Object Position:', 'loginpress' ), + 'section' => 'section_background', + 'priority' => 55, + 'settings' => "loginpress_customization[video_obj_position]", + 'input_attrs' => array( + 'placeholder' => __( '50% 50%' ), + ) + ) ); + + /** + * [Enable / Disable Background Video with LoginPress_Radio_Control] + * + * @since 1.1.22 + */ + $wp_customize->add_setting( 'loginpress_customization[background_video_muted]', array( + 'default' => true, + 'type' => 'option', + 'capability' => 'manage_options', + 'transport' => 'postMessage', + 'sanitize_callback' => 'loginpress_sanitize_checkbox' + ) ); + + $wp_customize->add_control( new LoginPress_Radio_Control( $wp_customize, 'loginpress_customization[background_video_muted]', array( + 'settings' => 'loginpress_customization[background_video_muted]', + 'label' => __( 'Muted Video?', 'loginpress'), + 'section' => 'section_background', + 'priority' => 60, + 'type' => 'ios', // light, ios, flat + ) ) ); + + // ============================= + // = Section for Form Beauty = + // ============================= + $wp_customize->add_section( 'section_form', array( + 'title' => __( 'Customize Login Form', 'loginpress' ), + 'description' => '', + 'priority' => 15, + 'panel' => 'loginpress_panel', + ) ); + + $this->loginpress_group_setting( $wp_customize, $group_control, $group_label, $group_info, 'section_form', 2, 4 ); + + /** + * [ Enable / Disable Form Background Image with LoginPress_Radio_Control ] + * + * @since 1.1.3 + */ + + $wp_customize->add_setting( 'loginpress_customization[setting_form_display_bg]', array( + 'default' => false, + 'type' => 'option', + 'capability' => 'manage_options', + 'transport' => 'postMessage', + 'sanitize_callback' => 'loginpress_sanitize_checkbox' + ) ); + + $wp_customize->add_control( new LoginPress_Radio_Control( $wp_customize, 'loginpress_customization[setting_form_display_bg]', array( + 'settings' => 'loginpress_customization[setting_form_display_bg]', + 'label' => __( 'Enable Form Transparency:', 'loginpress'), + 'section' => 'section_form', + 'priority' => 5, + 'type' => 'ios', + ) ) ); + + $wp_customize->add_setting( 'loginpress_customization[setting_form_background]', array( + 'type' => 'option', + 'capability' => 'manage_options', + 'transport' => 'postMessage', + 'sanitize_callback' => 'loginpress_sanitize_image' + ) ); + + $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'loginpress_customization[setting_form_background]', array( + 'label' => __( 'Form Background Image:', 'loginpress' ), + 'section' => 'section_form', + 'priority' => 6, + 'settings' => 'loginpress_customization[setting_form_background]' + ) ) ); + + $this->loginpress_color_setting( $wp_customize, $form_color_control, $form_color_label, 'section_form', 0, 7 ); + + $this->loginpress_range_setting( $wp_customize, $form_range_control, $form_range_default, $form_range_label, $form_range_attrs, $form_range_unit, 'section_form', 0, 15 ); + $this->loginpress_range_setting( $wp_customize, $form_range_control, $form_range_default, $form_range_label, $form_range_attrs, $form_range_unit, 'section_form', 1, 20 ); + $this->loginpress_range_setting( $wp_customize, $form_range_control, $form_range_default, $form_range_label, $form_range_attrs, $form_range_unit, 'section_form', 2, 25 ); + $this->loginpress_range_setting( $wp_customize, $form_range_control, $form_range_default, $form_range_label, $form_range_attrs, $form_range_unit, 'section_form', 3, 30 ); + $this->loginpress_range_setting( $wp_customize, $form_range_control, $form_range_default, $form_range_label, $form_range_attrs, $form_range_unit, 'section_form', 4, 35 ); + + $form_padding = 0; + while ( $form_padding < 2 ) : + + $wp_customize->add_setting( "loginpress_customization[{$form_control[$form_padding]}]", array( + 'default' => $form_default[$form_padding], + 'type' => 'option', + 'capability' => 'manage_options', + 'transport' => 'postMessage', + 'sanitize_callback' => $form_sanitization[$form_padding] + ) ); + + $wp_customize->add_control( "loginpress_customization[{$form_control[$form_padding]}]", array( + 'label' => $form_label[$form_padding], + 'section' => 'section_form', + 'priority' => 40, + 'settings' => "loginpress_customization[{$form_control[$form_padding]}]" + ) ); + + $form_padding++; + endwhile; + + $this->loginpress_hr_setting( $wp_customize, $close_control, 'section_form', 3, 41 ); + + $this->loginpress_group_setting( $wp_customize, $group_control, $group_label, $group_info, 'section_form', 0, 45 ); + + $this->loginpress_color_setting( $wp_customize, $form_color_control, $form_color_label, 'section_form', 1, 50 ); + $this->loginpress_color_setting( $wp_customize, $form_color_control, $form_color_label, 'section_form', 2, 55 ); + + $this->loginpress_range_setting( $wp_customize, $form_range_control, $form_range_default, $form_range_label, $form_range_attrs, $form_range_unit, 'section_form', 5, 60 ); + // textfield_radius. + // $this->loginpress_range_setting( $wp_customize, $form_range_control, $form_range_default, $form_range_label, $form_range_attrs, $form_range_unit, 'section_form', 6, 65 ); + // textfield_shadow. + // $this->loginpress_range_setting( $wp_customize, $form_range_control, $form_range_default, $form_range_label, $form_range_attrs, $form_range_unit, 'section_form', 7, 70 ); + // textfield_shadow_opacity. + // $this->loginpress_range_setting( $wp_customize, $form_range_control, $form_range_default, $form_range_label, $form_range_attrs, $form_range_unit, 'section_form', 8, 75 ); + + /** + * [ Enable / Disable Form Background Image with LoginPress_Radio_Control ] + * @since 1.1.3 + */ + + // $wp_customize->add_setting( 'loginpress_customization[textfield_inset_shadow]', array( + // 'default' => false, + // 'type' => 'option', + // 'capability' => 'manage_options', + // 'transport' => 'postMessage' + // ) ); + // + // $wp_customize->add_control( new LoginPress_Radio_Control( $wp_customize, 'loginpress_customization[textfield_inset_shadow]', array( + // 'settings' => 'loginpress_customization[textfield_inset_shadow]', + // 'label' => __( 'Input Text Field Shadow Inset:', 'loginpress'), + // 'section' => 'section_form', + // 'priority' => 80, + // 'type' => 'ios',// light, ios, flat + // ) ) ); + + $input_padding = 2; + while ( $input_padding < 3 ) : + + $wp_customize->add_setting( "loginpress_customization[{$form_control[$input_padding]}]", array( + 'default' => $form_default[$input_padding], + 'type' => 'option', + 'capability' => 'manage_options', + 'transport' => 'postMessage', + 'sanitize_callback' => $form_sanitization[$input_padding] + ) ); + + $wp_customize->add_control( "loginpress_customization[{$form_control[$input_padding]}]", array( + 'label' => $form_label[$input_padding], + 'section' => 'section_form', + 'priority' => 85, + 'settings' => "loginpress_customization[{$form_control[$input_padding]}]" + ) ); + + $input_padding++; + endwhile; + + $this->loginpress_hr_setting( $wp_customize, $close_control, 'section_form', 4, 86 ); + $this->loginpress_group_setting( $wp_customize, $group_control, $group_label, $group_info, 'section_form', 1, 90 ); + + // $form_input_label = 3; + // while ( $form_input_label < 5 ) : + // + // $wp_customize->add_setting( "loginpress_customization[{$form_control[$form_input_label]}]", array( + // 'default' => $form_default[$form_input_label], + // 'type' => 'option', + // 'capability' => 'manage_options', + // 'transport' => 'postMessage' + // ) ); + // + // $wp_customize->add_control( "loginpress_customization[{$form_control[$form_input_label]}]", array( + // 'label' => $form_label[$form_input_label], + // 'section' => 'section_form', + // 'priority' => 91, + // 'settings' => "loginpress_customization[{$form_control[$form_input_label]}]" + // ) ); + // + // $form_input_label++; + // endwhile; + + $this->loginpress_color_setting( $wp_customize, $form_color_control, $form_color_label, 'section_form', 3, 95 ); + $this->loginpress_color_setting( $wp_customize, $form_color_control, $form_color_label, 'section_form', 4, 100 ); + + // customize_form_label. + $this->loginpress_range_setting( $wp_customize, $form_range_control, $form_range_default, $form_range_label, $form_range_attrs, $form_range_unit, 'section_form', 9, 105 ); + // remember_me_font_size. + $this->loginpress_range_setting( $wp_customize, $form_range_control, $form_range_default, $form_range_label, $form_range_attrs, $form_range_unit, 'section_form', 10, 110 ); + $this->loginpress_hr_setting( $wp_customize, $close_control, 'section_form', 5, 111 ); + + // ============================= + // = Section for Forget Form = + // ============================= + $wp_customize->add_section( 'section_forget_form', array( + 'title' => __( 'Customize Forget Form', 'loginpress' ), + 'description' => '', + 'priority' => 20, + 'panel' => 'loginpress_panel', + ) ); + + $wp_customize->add_setting( 'loginpress_customization[forget_form_background]', array( + 'type' => 'option', + 'capability' => 'manage_options', + 'transport' => 'postMessage', + 'sanitize_callback' => 'loginpress_sanitize_image' + ) ); + + $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'loginpress_customization[forget_form_background]', array( + 'label' => __( 'Forget Form Background Image:', 'loginpress' ), + 'section' => 'section_forget_form', + 'priority' => 5, + 'settings' => 'loginpress_customization[forget_form_background]' + ) ) ); + + $wp_customize->add_setting( 'loginpress_customization[forget_form_background_color]', array( + // 'default' => '#FFF', + 'type' => 'option', + 'capability' => 'manage_options', + 'transport' => 'postMessage', + 'sanitize_callback' => 'sanitize_hex_color' // validates 3 or 6 digit HTML hex color code. + ) ); + + $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'loginpress_customization[forget_form_background_color]', array( + 'label' => __( 'Forget Form Background Color:', 'loginpress' ), + 'section' => 'section_forget_form', + 'priority' => 10, + 'settings' => 'loginpress_customization[forget_form_background_color]' + ) ) ); + + // ============================= + // = Section for Button Style = + // ============================= + $wp_customize->add_section( 'section_button', array( + 'title' => __( 'Button Beauty', 'loginpress' ), + 'description' => '', + 'priority' => 25, + 'panel' => 'loginpress_panel', + ) ); + + $this->loginpress_color_setting( $wp_customize, $button_control, $button_label, 'section_button', 0, 5 ); + $this->loginpress_color_setting( $wp_customize, $button_control, $button_label, 'section_button', 1, 10 ); + $this->loginpress_color_setting( $wp_customize, $button_control, $button_label, 'section_button', 2, 15 ); + $this->loginpress_color_setting( $wp_customize, $button_control, $button_label, 'section_button', 3, 20 ); + $this->loginpress_color_setting( $wp_customize, $button_control, $button_label, 'section_button', 4, 25 ); + $this->loginpress_color_setting( $wp_customize, $button_control, $button_label, 'section_button', 5, 30 ); + $this->loginpress_color_setting( $wp_customize, $button_control, $button_label, 'section_button', 6, 35 ); + + /** + * [ Change Button CSS Properties with LoginPress_Range_Control ] + * @since 1.0.1 + * @version 3.0.0 + */ + + $this->loginpress_range_setting( $wp_customize, $button_range_control, $button_range_default, $button_range_label, $button_range_attrs, $button_range_unit, 'section_button', 0, 35 ); + $this->loginpress_range_setting( $wp_customize, $button_range_control, $button_range_default, $button_range_label, $button_range_attrs, $button_range_unit, 'section_button', 1, 40 ); + $this->loginpress_range_setting( $wp_customize, $button_range_control, $button_range_default, $button_range_label, $button_range_attrs, $button_range_unit, 'section_button', 2, 45 ); + $this->loginpress_range_setting( $wp_customize, $button_range_control, $button_range_default, $button_range_label, $button_range_attrs, $button_range_unit, 'section_button', 3, 50 ); + $this->loginpress_range_setting( $wp_customize, $button_range_control, $button_range_default, $button_range_label, $button_range_attrs, $button_range_unit, 'section_button', 4, 55 ); + $this->loginpress_range_setting( $wp_customize, $button_range_control, $button_range_default, $button_range_label, $button_range_attrs, $button_range_unit, 'section_button', 5, 60 ); + $this->loginpress_range_setting( $wp_customize, $button_range_control, $button_range_default, $button_range_label, $button_range_attrs, $button_range_unit, 'section_button', 6, 65 ); + + // ============================= + // = Section for Error message = + // ============================= + $wp_customize->add_section( 'section_error', array( + 'title' => __( 'Error Messages', 'loginpress' ), + 'description' => '', + 'priority' => 30, + 'panel' => 'loginpress_panel', + ) ); + + $error = 0; + while ( $error < 11 ) : + + $wp_customize->add_setting( "loginpress_customization[{$error_control[$error]}]", array( + 'default' => $error_default[$error], + 'type' => 'option', + 'capability' => 'manage_options', + 'transport' => 'postMessage', + 'sanitize_callback' => 'wp_kses_post' + ) ); + + $wp_customize->add_control( "loginpress_customization[{$error_control[$error]}]", array( + 'label' => $error_label[$error], + 'section' => 'section_error', + 'priority' => 5, + 'settings' => "loginpress_customization[{$error_control[$error]}]", + ) ); + + $error++; + endwhile; + + // ============================= + // = Section for Welcome message + // ============================= + $wp_customize->add_section( 'section_welcome', array( + 'title' => __( 'Welcome Messages', 'loginpress' ), + 'description' => '', + 'priority' => 35, + 'panel' => 'loginpress_panel', + ) ); + + $welcome = 0; + while ( $welcome < 5 ) : + + $wp_customize->add_setting( "loginpress_customization[{$welcome_control[$welcome]}]", array( + 'type' => 'option', + 'capability' => 'manage_options', + 'transport' => 'postMessage', + 'sanitize_callback' => $welcome_sanitization[$welcome] + )); + + $wp_customize->add_control( "loginpress_customization[{$welcome_control[$welcome]}]", array( + 'label' => $welcome_label[ $welcome ], + 'section' => 'section_welcome', + 'priority' => 5, + 'settings' => "loginpress_customization[{$welcome_control[$welcome]}]", + 'input_attrs' => array( + 'placeholder' => $welcome_default[ $welcome ], + ) + ) ); + + $welcome++; + endwhile; + + $wp_customize->add_setting( 'loginpress_customization[message_background_color]', array( + // 'default' => '#fff', + 'type' => 'option', + 'capability' => 'manage_options', + 'transport' => 'postMessage', + 'sanitize_callback' => 'sanitize_hex_color' // validates 3 or 6 digit HTML hex color code. + ) ); + + $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'loginpress_customization[message_background_color]', array( + 'label' => __( 'Message Field Background Color:', 'loginpress' ), + 'section' => 'section_welcome', + 'priority' => 30, + 'settings' => 'loginpress_customization[message_background_color]' + ) ) ); + + // ============================= + // = Section for Header message + // ============================= + // $wp_customize->add_section( + // 'section_head', + // array( + // 'title' => __( 'Header Message', 'loginpress' ), + // 'description' => '', + // 'priority' => 35, + // 'panel' => 'loginpress_panel', + // )); + // + // $wp_customize->add_setting( 'loginpress_customization[login_header_message]', array( + // 'default' => 'Latest NEWS', + // 'type' => 'option', + // 'capability' => 'edit_theme_options', + // )); + // + // $wp_customize->add_control( 'login_header_message', array( + // 'label' => __( 'Header Message:', 'loginpress' ), + // 'section' => 'section_head', + // 'priority' => 5, + // 'settings' => 'loginpress_customization[login_header_message]', + // )); + // + // $wp_customize->add_setting( 'loginpress_customization[login_header_message_link]', array( + // 'default' => '#', + // 'type' => 'option', + // 'capability' => 'edit_theme_options', + // )); + // + // $wp_customize->add_control( 'login_header_message_link', array( + // 'label' => __( 'Header Message Link:', 'loginpress' ), + // 'section' => 'section_head', + // 'priority' => 5, + // 'settings' => 'loginpress_customization[login_header_message_link]', + // )); + // + // $wp_customize->add_setting( 'loginpress_customization[login_head_color]', array( + // 'default' => '#17a8e3', + // 'type' => 'option', + // 'capability' => 'edit_theme_options', + // )); + // + // $wp_customize->add_control( + // new WP_Customize_Color_Control( + // $wp_customize, + // 'login_head_color', + // array( + // 'label' => __( 'Header Text Color:', 'loginpress' ), + // 'section' => 'section_head', + // 'priority' => 10, + // 'settings' => 'loginpress_customization[login_head_color]' + // ))); + // + // $wp_customize->add_setting( 'loginpress_customization[login_head_color_hover]', array( + // // 'default' => '#17a8e3', + // 'type' => 'option', + // 'capability' => 'edit_theme_options', + // )); + // + // $wp_customize->add_control( + // new WP_Customize_Color_Control( + // $wp_customize, + // 'login_head_color_hover', + // array( + // 'label' => __( 'Header Text Hover Color:', 'loginpress' ), + // 'section' => 'section_head', + // 'priority' => 15, + // 'settings' => 'loginpress_customization[login_head_color_hover]' + // ))); + // + // $wp_customize->add_setting( 'loginpress_customization[login_head_font_size]', array( + // 'default' => '13px;', + // 'type' => 'option', + // 'capability' => 'edit_theme_options', + // )); + // + // $wp_customize->add_control( 'login_head_font_size', array( + // 'label' => __( 'Text Font Size:', 'loginpress' ), + // 'section' => 'section_head', + // 'priority' => 20, + // 'settings' => 'loginpress_customization[login_head_font_size]', + // )); + // + // $wp_customize->add_setting( 'loginpress_customization[login_head_bg_color]', array( + // // 'default' => '#17a8e3', + // 'type' => 'option', + // 'capability' => 'edit_theme_options', + // )); + // + // $wp_customize->add_control( + // new WP_Customize_Color_Control( + // $wp_customize, + // 'login_head_bg_color', + // array( + // 'label' => __( 'Header Background Color:', 'loginpress' ), + // 'section' => 'section_head', + // 'priority' => 25, + // 'settings' => 'loginpress_customization[login_head_bg_color]' + // ))); + + // ============================= + // = Section for Form Footer = + // ============================= + $wp_customize->add_section( 'section_footer', array( + 'title' => __( 'Form Footer', 'loginpress' ), + 'description' => '', + 'priority' => 40, + 'panel' => 'loginpress_panel', + ) ); + + $this->loginpress_group_setting( $wp_customize, $group_control, $group_label, $group_info, 'section_footer', 3, 4 ); + + $wp_customize->add_setting( 'loginpress_customization[footer_display_text]', array( + 'default' => true, + 'type' => 'option', + 'capability' => 'manage_options', + 'transport' => 'postMessage', + 'sanitize_callback' => 'loginpress_sanitize_checkbox' + )); + + /** + * [Enable / Disable Footer Text with LoginPress_Radio_Control] + * @since 1.0.1 + * @version 1.0.23 + */ + $wp_customize->add_control( new LoginPress_Radio_Control( $wp_customize, 'loginpress_customization[footer_display_text]', array( + 'settings' => 'loginpress_customization[footer_display_text]', + 'label' => __( 'Enable Footer Text:', 'loginpress' ), + 'section' => 'section_footer', + 'priority' => 5, + 'type' => 'ios',// light, ios, flat + ) ) ); + + $wp_customize->add_setting( 'loginpress_customization[login_footer_text]', array( + 'default' => __( 'Lost your password?', 'loginpress' ), + 'type' => 'option', + 'capability' => 'manage_options', + 'transport' => 'postMessage', + 'sanitize_callback' => 'wp_kses_post' + ) ); + + $wp_customize->add_control( 'loginpress_customization[login_footer_text]', array( + 'label' => __( 'Lost Password Text:', 'loginpress' ), + 'section' => 'section_footer', + 'priority' => 10, + 'settings' => 'loginpress_customization[login_footer_text]', + ) ); + + $wp_customize->add_setting( 'loginpress_customization[login_footer_text_decoration]', array( + 'default' => 'none', + 'type' => 'option', + 'capability' => 'manage_options', + 'transport' => 'postMessage', + 'sanitize_callback' => 'loginpress_sanitize_select' + ) ); + + $wp_customize->add_control( 'loginpress_customization[login_footer_text_decoration]', array( + 'settings' => 'loginpress_customization[login_footer_text_decoration]', + 'label' => __( 'Select Text Decoration:', 'loginpress' ), + 'section' => 'section_footer', + 'priority' => 15, + 'type' => 'select', + 'choices' => array( + 'none' => 'none', + 'overline' => 'overline', + 'line-through' => 'line-through', + 'underline' => 'underline', + ), + ) ); + + $wp_customize->add_setting( 'loginpress_customization[login_footer_color]', array( + // 'default' => '#17a8e3', + 'type' => 'option', + 'capability' => 'manage_options', + 'transport' => 'postMessage', + 'sanitize_callback' => 'sanitize_hex_color' // validates 3 or 6 digit HTML hex color code. + ) ); + + $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'loginpress_customization[login_footer_color]', array( + 'label' => __( 'Footer Text Color:', 'loginpress' ), + 'section' => 'section_footer', + 'priority' => 20, + 'settings' => 'loginpress_customization[login_footer_color]' + ) ) ); + + $wp_customize->add_setting( 'loginpress_customization[login_footer_color_hover]', array( + // 'default' => '#17a8e3', + 'type' => 'option', + 'capability' => 'manage_options', + 'transport' => 'postMessage', + 'sanitize_callback' => 'sanitize_hex_color' // validates 3 or 6 digit HTML hex color code. + ) ); + + $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'loginpress_customization[login_footer_color_hover]', array( + 'label' => __( 'Footer Text Hover Color:', 'loginpress' ), + 'section' => 'section_footer', + 'priority' => 25, + 'settings' => 'loginpress_customization[login_footer_color_hover]' + ) ) ); + + $wp_customize->add_setting( "loginpress_customization[login_footer_font_size]", array( + 'default' => '13', + 'type' => 'option', + 'capability' => 'manage_options', + 'transport' => 'postMessage', + 'sanitize_callback' => 'absint', + ) ); + + /** + * [ Change login_footer_font_size Input fields with LoginPress_Range_Control ] + * @since 1.0.1 + * @version 1.0.23 + */ + $wp_customize->add_control( new LoginPress_Range_Control( $wp_customize, "loginpress_customization[login_footer_font_size]", array( + 'type' => 'loginpress-range', + 'label' => __( 'Text Font Size:', 'loginpress' ), + 'section' => 'section_footer', + 'settings' => "loginpress_customization[login_footer_font_size]", + 'default' => '13', + 'priority' => 30, + 'input_attrs' => array( + 'min' => 0, + 'max' => 100, + 'step' => 1, + 'suffix' => 'px' + ) + ) ) ); + + $wp_customize->add_setting( 'loginpress_customization[login_footer_bg_color]', array( + // 'default' => '#17a8e3', + 'type' => 'option', + 'capability' => 'manage_options', + 'transport' => 'postMessage', + 'sanitize_callback' => 'sanitize_hex_color' // validates 3 or 6 digit HTML hex color code. + ) ); + + $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'loginpress_customization[login_footer_bg_color]', array( + 'label' => __( 'Footer Background Color:', 'loginpress' ), + 'section' => 'section_footer', + 'priority' => 35, + 'settings' => 'loginpress_customization[login_footer_bg_color]' + ) ) ); + + $this->loginpress_hr_setting( $wp_customize, $close_control, 'section_footer', 0, 36 ); + + $this->loginpress_group_setting( $wp_customize, $group_control, $group_label, $group_info, 'section_footer', 4, 40 ); + + $wp_customize->add_setting( 'loginpress_customization[back_display_text]', array( + 'default' => true, + 'type' => 'option', + 'capability' => 'manage_options', + 'transport' => 'postMessage', + 'sanitize_callback' => 'loginpress_sanitize_checkbox' + ) ); + + /** + * [Enable / Disable Footer Text with LoginPress_Radio_Control] + * @since 1.0.1 + * @version 1.0.23 + */ + $wp_customize->add_control( new LoginPress_Radio_Control( $wp_customize, 'loginpress_customization[back_display_text]', array( + 'settings' => 'loginpress_customization[back_display_text]', + 'label' => __( 'Enable "Back to" Text:', 'loginpress' ), + 'section' => 'section_footer', + 'priority' => 45, + 'type' => 'ios', // light, ios, flat + ) ) ); + + $wp_customize->add_setting( 'loginpress_customization[login_back_text_decoration]', array( + 'default' => 'none', + 'type' => 'option', + 'capability' => 'manage_options', + 'transport' => 'postMessage', + 'sanitize_callback' => 'loginpress_sanitize_select' + + ) ); + + $wp_customize->add_control( 'loginpress_customization[login_back_text_decoration]', array( + 'settings' => 'loginpress_customization[login_back_text_decoration]', + 'label' => __( '"Back to" Text Decoration:', 'loginpress' ), + 'section' => 'section_footer', + 'priority' => 50, + 'type' => 'select', + 'choices' => array( + 'none' => 'none', + 'overline' => 'overline', + 'line-through' => 'line-through', + 'underline' => 'underline', + ), + ) ); + + $wp_customize->add_setting( 'loginpress_customization[login_back_color]', array( + // 'default' => '#17a8e3', + 'type' => 'option', + 'capability' => 'manage_options', + 'transport' => 'postMessage', + 'sanitize_callback' => 'sanitize_hex_color' // validates 3 or 6 digit HTML hex color code. + ) ); + + $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'loginpress_customization[login_back_color]', array( + 'label' => __( '"Back to" Text Color:', 'loginpress' ), + 'section' => 'section_footer', + 'priority' => 55, + 'settings' => 'loginpress_customization[login_back_color]' + ) ) ); + + $wp_customize->add_setting( 'loginpress_customization[login_back_color_hover]', array( + // 'default' => '#17a8e3', + 'type' => 'option', + 'capability' => 'manage_options', + 'transport' => 'postMessage', + 'sanitize_callback' => 'sanitize_hex_color' // validates 3 or 6 digit HTML hex color code. + ) ); + + $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'loginpress_customization[login_back_color_hover]', array( + 'label' => __( '"Back to" Text Hover Color:', 'loginpress' ), + 'section' => 'section_footer', + 'priority' => 60, + 'settings' => 'loginpress_customization[login_back_color_hover]' + ) ) ); + + $wp_customize->add_setting( "loginpress_customization[login_back_font_size]", array( + 'default' => '13', + 'type' => 'option', + 'capability' => 'manage_options', + 'transport' => 'postMessage', + 'sanitize_callback' => 'absint', + ) ); + $wp_customize->add_setting( 'loginpress_customization[loginpress_show_love]', array( + 'default' => true, + 'type' => 'option', + 'capability' => 'manage_options', + 'transport' => 'postMessage', + 'sanitize_callback' => 'loginpress_sanitize_checkbox' + ) ); + + /** + * [ Change login_back_font_size Input fields with LoginPress_Range_Control ] + * @since 1.0.1 + * @version 1.0.23 + */ + $wp_customize->add_control( new LoginPress_Range_Control( $wp_customize, "loginpress_customization[login_back_font_size]", array( + 'type' => 'loginpress-range', + 'label' => __( '"Back to" Text Font Size:', 'loginpress' ), + 'section' => 'section_footer', + 'settings' => "loginpress_customization[login_back_font_size]", + 'default' => '13', + 'priority' => 65, + 'input_attrs' => array( + 'min' => 0, + 'max' => 100, + 'step' => 1, + 'suffix' => 'px' + ) + ) ) ); + + $wp_customize->add_setting( 'loginpress_customization[login_back_bg_color]', array( + // 'default' => '#17a8e3', + 'type' => 'option', + 'capability' => 'manage_options', + 'transport' => 'postMessage', + 'sanitize_callback' => 'sanitize_hex_color' // validates 3 or 6 digit HTML hex color code. + ) ); + + $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'loginpress_customization[login_back_bg_color]', array( + 'label' => __( '"Back to" Background Color:', 'loginpress' ), + 'section' => 'section_footer', + 'priority' => 70, + 'settings' => 'loginpress_customization[login_back_bg_color]' + ) ) ); + + $this->loginpress_hr_setting( $wp_customize, $close_control, 'section_footer', 1, 71 ); + + $this->loginpress_group_setting( $wp_customize, $group_control, $group_label, $group_info, 'section_footer', 5, 72 ); + + /** + * [Enable / Disable Footer Text with LoginPress_Radio_Control] + * @since 1.1.3 + */ + $wp_customize->add_setting( 'loginpress_customization[login_copy_right_display]', array( + 'default' => false, + 'type' => 'option', + 'capability' => 'manage_options', + 'transport' => 'postMessage', + 'sanitize_callback' => 'loginpress_sanitize_checkbox' + ) ); + $wp_customize->add_control( new LoginPress_Radio_Control( $wp_customize, 'loginpress_customization[login_copy_right_display]', array( + 'settings' => 'loginpress_customization[login_copy_right_display]', + 'section' => 'section_footer', + 'priority' => 73, + 'type' => 'ios',// light, ios, flat + 'label' => __( 'Enable Copyright Note:', 'loginpress' ), + ) ) ); + + $wp_customize->add_setting( 'loginpress_customization[copyright_background_color]', array( + 'default' => '#efefef', + 'type' => 'option', + 'capability' => 'manage_options', + 'transport' => 'postMessage', + 'sanitize_callback' => 'sanitize_hex_color' // validates 3 or 6 digit HTML hex color code. + ) ); + + $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'loginpress_customization[copyright_background_color]', array( + 'label' => __( '"Copyright" Background Color:', 'loginpress' ), + 'section' => 'section_footer', + 'priority' => 74, + 'settings' => 'loginpress_customization[copyright_background_color]' + ) ) ); + + //Form Footer Text Color + $wp_customize->add_setting( 'loginpress_customization[copyright_text_color]', array( + 'default' => '#000000', + 'type' => 'option', + 'capability' => 'manage_options', + 'transport' => 'postMessage', + 'sanitize_callback' => 'sanitize_hex_color' // validates 3 or 6 digit HTML hex color code. + ) ); + + $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'loginpress_customization[copyright_text_color]', array( + 'label' => __( '"Copyright" Text Color:', 'loginpress' ), + 'section' => 'section_footer', + 'priority' => 75, + 'settings' => 'loginpress_customization[copyright_text_color]' + ) ) ); + + $wp_customize->add_setting( 'loginpress_customization[login_footer_copy_right]', array( + 'default' => sprintf( __('© %1$s %2$s, All Rights Reserved.', 'loginpress'), date("Y"), get_bloginfo('name') ), + 'type' => 'option', + 'capability' => 'manage_options', + 'transport' => 'postMessage', + 'sanitize_callback' => 'wp_kses_post' + ) ); + + //Show Some Love text Color + // $wp_customize->add_setting( 'loginpress_customization[show_some_love_text_color]', array( + // // 'default' => '#17a8e3', + // 'type' => 'option', + // 'capability' => 'manage_options', + // 'transport' => 'postMessage', + // 'sanitize_callback' => 'sanitize_hex_color' // validates 3 or 6 digit HTML hex color code. + // ) ); + + // $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'loginpress_customization[show_some_love_text_color]', array( + // 'label' => __( '"Show Some Love" Text Color:', 'loginpress' ), + // 'section' => 'section_footer', + // 'priority' => 76, + // 'settings' => 'loginpress_customization[show_some_love_text_color]' + // ) ) ); + + /** + * [Add Copyright string in the footer along with year] + * + * @version 1.5.4 + */ + $wp_customize->add_setting( 'loginpress_customization[login_footer_copy_right]', array( + 'default' => sprintf( __('© %1$s %2$s, All Rights Reserved.', 'loginpress'), '$YEAR$' , get_bloginfo('name') ), + 'type' => 'option', + 'capability' => 'manage_options', + 'transport' => 'postMessage', + 'sanitize_callback' => 'wp_kses_post' + ) ); + $wp_customize->add_control( 'loginpress_customization[login_footer_copy_right]', array( + 'label' => __( 'Copyright Note:', 'loginpress' ), + 'description' => sprintf( __( '%1$s will be replaced with the current year.', 'loginpress' ), '$YEAR$' ), + 'type' => 'textarea', + 'section' => 'section_footer', + 'priority' => 77, + 'settings' => 'loginpress_customization[login_footer_copy_right]' + ) ); + + /** + * [Enable / Disable Footer Text with LoginPress_Radio_Control] + * @since 1.0.1 + * @version 1.0.23 + */ + $wp_customize->add_control( new LoginPress_Radio_Control( $wp_customize, 'loginpress_customization[loginpress_show_love]', array( + 'settings' => 'loginpress_customization[loginpress_show_love]', + 'section' => 'section_footer', + 'priority' => 80, + 'type' => 'ios', // light, ios, flat + 'label' => __( 'Show some Love. Please help others learn about this free plugin by placing small link in footer. Thank you very much!', 'loginpress' ), + ) ) ); + + /** + * [Love position on footer.] + * @since 1.1.3 + */ + $wp_customize->add_setting( 'loginpress_customization[show_love_position]', array( + 'default' => 'right', + 'type' => 'option', + 'capability' => 'manage_options', + 'transport' => 'postMessage', + // 'sanitize_callback' => 'loginpress_sanitize_checkbox' + ) ); + + $wp_customize->add_control( 'loginpress_customization[show_love_position]', array( + 'label' => __( 'Love Position:', 'loginpress' ), + 'section' => 'section_footer', + 'priority' => 85, + 'settings' => 'loginpress_customization[show_love_position]', + 'type' => 'radio', + 'choices' => array( + 'left' => __( 'Left', 'loginpress' ), + 'right' => __( 'Right', 'loginpress' ), + ), + ) ); + $this->loginpress_hr_setting( $wp_customize, $close_control, 'section_footer', 2, 90 ); + // $this->loginpress_group_setting( $wp_customize, $group_control, $group_label, $group_info, 'section_footer', 2, 90 ); + + // ============================= + // = Section for Custom CSS/JS = + // ============================= + $wp_customize->add_section( 'loginpress_custom_css_js', array( + 'title' => __( 'Custom CSS/JS', 'loginpress' ), + 'description' => '', + 'priority' => 50, + 'panel' => 'loginpress_panel', + ) ); + + $wp_customize->add_setting( 'loginpress_customization[loginpress_custom_css]', array( + 'type' => 'option', + 'capability' => 'manage_options', + 'transport' => 'postMessage' + ) ); + + $wp_customize->add_control( 'loginpress_customization[loginpress_custom_css]', array( + 'label' => __( 'Customize CSS:', 'loginpress' ), + 'type' => 'textarea', + 'section' => 'loginpress_custom_css_js', + 'priority' => 5, + 'settings' => 'loginpress_customization[loginpress_custom_css]', + 'description' => sprintf( __( 'Custom CSS doesn\'t make effect live. For preview please save the setting and visit %1$s login%2$s page or after save refresh the customizer.', "loginpress" ), '', '') + ) ); + + $wp_customize->add_setting( 'loginpress_customization[loginpress_custom_js]', array( + 'type' => 'option', + 'capability' => 'manage_options', + 'transport' => 'postMessage' + ) ); + + $wp_customize->add_control( 'loginpress_customization[loginpress_custom_js]', array( + 'label' => __( 'Customize JS:', 'loginpress' ), + 'type' => 'textarea', + 'section' => 'loginpress_custom_css_js', + 'priority' => 10, + 'settings' => 'loginpress_customization[loginpress_custom_js]', + 'description' => sprintf( __( 'Custom JS doesn\'t make effect live. For preview please save the setting and visit %1$s login%2$s page or after save refresh the customizer.', "loginpress" ), '', '') + ) ); + } + + /** + * Manage the Login Footer Links. + * + * @since 1.0.0 + * @version 3.0.0 + */ + public function login_page_custom_footer() { + + /** + * Add brand position class. + * @since 1.1.3 + * @version 3.0.0 + */ + $position = ''; // Empty variable for storing position class. + if ( $this->loginpress_key ) { + if ( isset( $this->loginpress_key['show_love_position'] ) && $this->loginpress_key['show_love_position'] == 'left' ) { + $position = ' love-position'; + } + } + + /** + * Add functionality of disabling the templates of LoginPress. + * + * @since 1.6.4 + */ + $disable_default_style = (bool) apply_filters( 'loginpress_disable_default_style', false ); + + if ( $this->loginpress_preset === 'default1' && $disable_default_style ) { + include( LOGINPRESS_DIR_PATH . 'include/login-footer.php' ); + } + + if ( empty( $this->loginpress_key ) || ( isset( $this->loginpress_key['loginpress_show_love'] ) && $this->loginpress_key['loginpress_show_love'] != '' ) ) { + echo '
' . __( 'Powered by:', 'loginpress' ) . ' LoginPress
'; + } + + echo ''; + + /** + * Include LoginPress script in footer. + * @since 1.2.2 + */ + include( LOGINPRESS_DIR_PATH . 'js/script-login.php' ); + } + + /** + * Manage the Login Head + * + * @since 1.0.0 + * @version 1.6.4 + */ + public function login_page_custom_head() { + + $loginpress_setting = get_option( 'loginpress_setting' ); + $lostpassword_url = isset( $loginpress_setting['lostpassword_url'] ) ? $loginpress_setting['lostpassword_url'] : 'off'; + + add_filter( 'gettext', array( $this, 'change_lostpassword_message' ), 20, 3 ); + add_filter( 'gettext', array( $this, 'change_username_label' ), 20, 3 ); + // add_filter( 'gettext', array( $this, 'change_password_label' ), 20, 3 ); + // Include CSS File in header. + if ( isset( $this->loginpress_key['loginpress_custom_js'] ) && ! empty( $this->loginpress_key['loginpress_custom_js'] ) ) { // 1.2.2 + wp_enqueue_script( 'jquery' ); + } + + /** + * Add functionality of disabling the templates of LoginPress. + * + * @since 1.6.4 + */ + $disable_default_style = (bool) apply_filters( 'loginpress_disable_default_style', false ); + + if ( ! $disable_default_style || 'default1' !== $this->loginpress_preset ) { + include( LOGINPRESS_DIR_PATH . 'css/style-presets.php' ); + include( LOGINPRESS_DIR_PATH . 'css/style-login.php' ); + } + + do_action( 'loginpress_header_menu' ); + // do_action( 'loginpress_header_wrapper' ); + + if ( 'on' == $lostpassword_url ) { + remove_filter( 'lostpassword_url', 'wc_lostpassword_url', 10 ); + } + + /** + * Filter for changing the lost password URL of lifter LMS plugin to default Lost Password URL of WordPress + * By using this filter, you can prevent the redirection of lost password to Lifter LMS's lost password page over lost password link. + * + * @param bool + * + * @since 1.5.3 + */ + if ( apply_filters( 'loginpress_llms_lostpassword_url', false ) ) { + remove_filter( 'lostpassword_url', 'llms_lostpassword_url', 10 ); + } + + if ( ! has_site_icon() && ! is_customize_preview() ) { + $login_favicon = isset( $this->loginpress_key['login_favicon'] ) ? $this->loginpress_key['login_favicon'] : 'off'; + + if ( 'off' != $login_favicon && function_exists('login_header') ) { + echo ''; + } + } + } + + /** + * Filters the Languages select input activation on the login screen. + * + * @param bool $arg Whether to display the Languages select input on the login screen. + * + * @since 1.5.11 + * @return bool + */ + function loginpress_language_switch( $arg ) { + + $loginpress_setting = get_option( 'loginpress_setting' ); + $language_switcher = isset( $loginpress_setting['enable_language_switcher'] ) ? $loginpress_setting['enable_language_switcher'] : 'off'; + + if ( 'off' === $language_switcher ) { + return true; + } else { + return false; + } + } + + /** + * Set Redirect Path of Logo + * + * @since 1.0.0 + * @version 1.5.3 + */ + public function login_page_logo_url() { + + if ( $this->loginpress_key && array_key_exists( 'customize_logo_hover', $this->loginpress_key ) && ! empty( $this->loginpress_key['customize_logo_hover'] ) ) { + return __( $this->loginpress_key["customize_logo_hover"], 'loginpress' ); + } else { + return home_url(); + } + } + + /** + * Remove the filter login_errors from woocommerce login form. + * + * @since 1.0.16 + * + * @return errors + */ + function loginpress_woo_login_errors( $validation_error, $arg1, $arg2 ) { + + remove_filter( 'login_errors', array( $this, 'login_error_messages' ) ); + return $validation_error; + } + + + /** + * Set hover Title of Logo + * + * @since 1.0.0 + * @version 1.5.3 + * + * @return mixed + */ + public function login_page_logo_title() { + + if ( $this->loginpress_key && array_key_exists( 'customize_logo_hover_title', $this->loginpress_key ) && ! empty( $this->loginpress_key['customize_logo_hover_title'] ) ) { + return __( $this->loginpress_key["customize_logo_hover_title"], 'loginpress' ); + } else { + return home_url(); + } + } + + /** + * Set Errors Messages to Show off + * + * @param $error + * @since 1.0.0 + * @version 1.2.5 + * + * @return string + */ + public function login_error_messages($error) { + + global $errors; + + if ( isset( $errors ) && apply_filters( 'loginpress_display_custom_errors', true ) ) { + + $error_codes = $errors->get_error_codes(); + + if ( $this->loginpress_key ) { + + $invalid_username = array_key_exists( 'incorrect_username', $this->loginpress_key ) && ! empty( $this->loginpress_key['incorrect_username'] ) ? $this->loginpress_key['incorrect_username'] : sprintf( __( '%1$sError:%2$s Invalid Username.', 'loginpress' ), '', '' ); + + $invalid_password = array_key_exists( 'incorrect_password', $this->loginpress_key ) && ! empty( $this->loginpress_key['incorrect_password'] ) ? $this->loginpress_key['incorrect_password'] : sprintf( __( '%1$sError:%2$s Invalid Password.', 'loginpress' ), '', '' ); + + $empty_username = array_key_exists( 'empty_username', $this->loginpress_key ) && ! empty( $this->loginpress_key['empty_username'] ) ? $this->loginpress_key['empty_username'] : sprintf( __( '%1$sError:%2$s The username field is empty.', 'loginpress' ), '', '' ); + + $empty_password = array_key_exists( 'empty_password', $this->loginpress_key ) && ! empty( $this->loginpress_key['empty_password'] ) ? $this->loginpress_key['empty_password'] : sprintf( __( '%1$sError:%2$s The password field is empty.', 'loginpress' ), '', '' ); + + $invalid_email = array_key_exists( 'invalid_email', $this->loginpress_key ) && ! empty( $this->loginpress_key['invalid_email'] ) ? $this->loginpress_key['invalid_email'] : sprintf( __( '%1$sError:%2$s The email address isn\'t correct..', 'loginpress' ), '', '' ); + + $empty_email = array_key_exists( 'empty_email', $this->loginpress_key ) && ! empty( $this->loginpress_key['empty_email'] ) ? $this->loginpress_key['empty_email'] : sprintf( __( '%1$sError:%2$s Please type your email address.', 'loginpress' ), '', '' ); + + $username_exists = array_key_exists( 'username_exists', $this->loginpress_key ) && ! empty( $this->loginpress_key['username_exists'] ) ? $this->loginpress_key['username_exists'] : sprintf( __( '%1$sError:%2$s This username is already registered. Please choose another one.', 'loginpress' ), '', '' ); + + $email_exists = array_key_exists( 'email_exists', $this->loginpress_key ) && ! empty( $this->loginpress_key['email_exists'] ) ? $this->loginpress_key['email_exists'] : sprintf( __( '%1$sError:%2$s This email is already registered, please choose another one.', 'loginpress' ), '', '' ); + + $password_mismatch = array_key_exists( 'password_mismatch', $this->loginpress_key ) && ! empty( $this->loginpress_key['password_mismatch'] ) ? $this->loginpress_key['password_mismatch'] : sprintf( __( '%1$sError:%2$s Passwords Don\'t match.', 'loginpress' ), '', '' ); + + $invalidcombo = array_key_exists( 'invalidcombo_message', $this->loginpress_key ) && ! empty( $this->loginpress_key['invalidcombo_message'] ) ? $this->loginpress_key['invalidcombo_message'] : sprintf( __( '%1$sError:%2$s Invalid username or email.', 'loginpress' ), '', '' ); + + if ( in_array( 'invalid_username', $error_codes ) ) return $invalid_username; + + if ( in_array( 'incorrect_password', $error_codes ) ) return $invalid_password; + + if ( in_array( 'empty_username', $error_codes ) ) return $empty_username; + + if ( in_array( 'empty_password', $error_codes ) ) return $empty_password; + + // registration Form entries. + if ( in_array( 'invalid_email', $error_codes ) ) return $invalid_email; + + if ( in_array( 'empty_email', $error_codes ) ) return "
" . $empty_email; + + if ( in_array( 'username_exists', $error_codes ) ) return $username_exists; + + if ( in_array( 'email_exists', $error_codes ) ) return $email_exists; + + // forget password entry. + if ( in_array( 'invalidcombo', $error_codes ) ) return $invalidcombo; + + // Password mismatch custom error message. + if ( in_array( 'password_mismatch', $error_codes ) ) return $password_mismatch; + + } + } + + return $error; + } + + /** + * Change Lost Password Text from Form + * + * @param $text + * @since 1.0.0 + * @version 3.0.0 + * + * @return mixed + */ + public function change_lostpassword_message( $translated_text, $text, $domain ) { + + if ( is_array( $this->loginpress_key ) && array_key_exists( 'login_footer_text', $this->loginpress_key ) && $text == 'Lost your password?' && 'default' == $domain && trim( $this->loginpress_key['login_footer_text'] ) ) { + + return trim( __( $this->loginpress_key['login_footer_text'], 'loginpress' ) ); + } + + return $translated_text; + } + + /** + * Change Label of the Username from login Form. + * + * @param string $translated_text Translated text. + * @param string $text The text to translate. + * @param string $domain The text domain. + * + * @since 1.1.3 + * @version 3.0.0 + * @return string + */ + public function change_username_label( $translated_text, $text, $domain ){ + + $loginpress_setting = get_option( 'loginpress_setting' ); + + if ( $loginpress_setting ) { + + $default = 'Username or Email Address'; + // $options = $this->loginpress_key; + // $label = array_key_exists( 'form_username_label', $options ) ? $options['form_username_label'] : ''; + $login_order = isset( $loginpress_setting['login_order'] ) ? $loginpress_setting['login_order'] : ''; + + // If the option does not exist, return the text unchanged. + if ( ! $loginpress_setting && $default === $text ) { + return $translated_text; + } + + // If options exist, then translate away. + if ( $loginpress_setting && $default === $text ) { + // Check if the option exists. + if ( '' != $login_order && 'default' != $login_order ) { + if ( 'username' == $login_order ) { + $label = __( 'Username', 'loginpress' ); + } elseif ( 'email' == $login_order ) { + $label = __( 'Email Address', 'loginpress' ); + } else { + $label = __( 'Username or Email Address', 'loginpress' ); + } + $translated_text = esc_html( $label ); + } + $translated_text = esc_html( apply_filters( 'loginpress_username_label', $translated_text ) ); + } + } + return $translated_text; + } + /** + * Change Password Label from Form. + * @param [type] $translated_text [description] + * @param [type] $text [description] + * @param [type] $domain [description] + * @since 1.1.3 + * + * @return string + * + */ + public function change_password_label( $translated_text, $text, $domain ) { + + if ( $this->loginpress_key ) { + $default = 'Password'; + $options = $this->loginpress_key; + $label = array_key_exists( 'form_password_label', $options ) ? $options['form_password_label'] : ''; + + // If the option does not exist, return the text unchanged. + if ( ! $options && $default === $text ) { + return $translated_text; + } + + // If options exist, then translate away. + if ( $options && $default === $text ) { + + // Check if the option exists. + if ( array_key_exists( 'form_password_label', $options ) ) { + $translated_text = esc_html( $label ); + } else { + return $translated_text; + } + } + } + return $translated_text; + } + + /** + * Manage Welcome Messages + * + * @param $message + * @since 1.0.0 + * @version 1.5.3 + * + * @return string + */ + public function change_welcome_message( $message ) { + + if ( $this->loginpress_key ) { + + //Check, User Logged out. + if ( isset( $_GET['loggedout'] ) && TRUE == $_GET['loggedout'] ) { + + if ( array_key_exists( 'logout_message', $this->loginpress_key ) && ! empty( $this->loginpress_key['logout_message'] ) ) { + + $loginpress_message = __( $this->loginpress_key['logout_message'], 'loginpress' ); + } + } + + //Logged In messages. + else if ( isset( $_GET['action'] ) && 'lostpassword' == $_GET['action'] ) { + + if ( array_key_exists( 'lostpwd_welcome_message', $this->loginpress_key ) && ! empty( $this->loginpress_key['lostpwd_welcome_message'] ) ) { + + $loginpress_message = __( $this->loginpress_key['lostpwd_welcome_message'], 'loginpress' ); + } + } + + else if( isset( $_GET['action'] ) && 'register' == $_GET['action'] ) { + + if ( array_key_exists( 'register_welcome_message', $this->loginpress_key ) && ! empty( $this->loginpress_key['register_welcome_message'] ) ) { + + $loginpress_message = __( $this->loginpress_key['register_welcome_message'], 'loginpress' ); + } + } + + // @since 1.0.18 + // else if ( strpos( $message, __( "Enter your new password below." ) ) == true ) { + // + // if ( array_key_exists( 'reset_hint_message', $this->loginpress_key ) && ! empty( $this->loginpress_key['reset_hint_message'] ) ) { + // + // $loginpress_message = $this->loginpress_key['reset_hint_message']; + // } + // } + + // @since 1.0.18 + else if ( strpos( $message, __( "Your password has been reset." ) ) == true ) { + + // if ( array_key_exists( 'after_reset_message', $this->loginpress_key ) && ! empty( $this->loginpress_key['after_reset_message'] ) ) { + + $loginpress_message = __( 'Your password has been reset.' ) . ' ' . __( 'Log in' ) . '

'; + // } + } + + else { + if ( array_key_exists( 'welcome_message', $this->loginpress_key ) && ! empty( $this->loginpress_key['welcome_message'] ) ) { + + $loginpress_message = __( $this->loginpress_key['welcome_message'], 'loginpress' ); + } + } + + return ! empty( $loginpress_message ) ? "

" . $loginpress_message. "

" : $message; + } + } + + /** + * Set WordPress login page title. + * + * @since 1.4.6 + * @version 1.5.3 + + * @return string + */ + public function login_page_title( $title ) { + + if ( $this->loginpress_key && array_key_exists( 'customize_login_page_title', $this->loginpress_key ) && ! empty( $this->loginpress_key['customize_login_page_title'] ) ) { + return __( $this->loginpress_key["customize_login_page_title"], 'loginpress' ); + } else { + return $title; + } + } + + /** + * Hook to Redirect Page for Customize + * + * @since 1.1.3 + * @version 3.0.6 + */ + public function redirect_to_custom_page() { + if ( ! empty($_GET['page'] ) ) { + + if( ( $_GET['page'] == "abw" ) || ( $_GET['page'] == "loginpress" ) ) { + + if ( is_multisite() ) { // if subdirectories are used in multisite. + + $loginpress_obj = new LoginPress(); + $loginpress_page = $loginpress_obj->get_loginpress_page(); + + $page = get_permalink( $loginpress_page ); + + // Generate the redirect url. + $url = add_query_arg( + array( + 'autofocus[panel]' => 'loginpress_panel', + 'url' => rawurlencode( $page ), + ), + admin_url( 'customize.php' ) + ); + + wp_safe_redirect( $url ); + + } else { + $login_url = wp_login_url(); + $parsed_url = parse_url( $login_url ); + $login_url = isset( $parsed_url['path'] ) ? sanitize_text_field( $parsed_url['path'] ) : 'wp-login.php'; + wp_redirect( get_admin_url() . "customize.php?url=" . esc_url( site_url( $login_url, 'login_post') ) . '&autofocus=loginpress_panel' ); + } + } + } + } + + /** + * Redirect to the Admin Panel After Closing LoginPress Customizer + * + * @since 1.0.0 + * @version 3.0.6 + * @return null + */ + public function menu_url() { + + global $submenu; + + $parent = 'index.php'; + $page = 'abw'; + + // Create specific url for login view. + $login_url = wp_login_url(); + $parsed_url = parse_url( $login_url ); + $login_url = isset( $parsed_url['path'] ) ? sanitize_text_field( $parsed_url['path'] ) : 'wp-login.php'; + $url = add_query_arg( + array( + 'url' => esc_url( site_url( $login_url, 'login_post' ) ), + 'return' => admin_url( 'themes.php' ), + ), + admin_url( 'customize.php' ) + ); + + // If is Not Design Menu, return + if ( ! isset( $submenu[ $parent ] ) ) { + return NULL; + } + + foreach ( $submenu[ $parent ] as $key => $value ) { + // Set new URL for menu item + if ( $page === $value[ 2 ] ) { + $submenu[ $parent ][ $key ][ 2 ] = $url; + break; + } + } + } + + /** + * This function is removed the error messages in the customizer. + * @param array $errors [description] + * @param string $redirect_to [description] + * @since 1.2.0 + * @version 3.0.6 + */ + function remove_error_messages_in_wp_customizer( $errors, $redirect_to ) { + + if ( is_customize_preview() && version_compare( $GLOBALS['wp_version'], '5.2', '>=' ) ) { + return new WP_Error( '', '' ); + } + // If Logout message is set and not empty then remove the default logout message from WordPress. + if ( isset( $this->loginpress_key ) && is_array( $this->loginpress_key ) && array_key_exists( 'logout_message', $this->loginpress_key ) && ! empty( $this->loginpress_key['logout_message'] ) ) { + if ( isset( $_GET['loggedout'] ) && true == $_GET['loggedout'] && isset( $errors->errors['loggedout'] ) ) { + unset( $errors->errors['loggedout'] ); + } + } + return $errors; + } +} diff --git a/wp-content/plugins/loginpress/img/addons/auto-login.png b/wp-content/plugins/loginpress/img/addons/auto-login.png new file mode 100644 index 0000000..a11410b Binary files /dev/null and b/wp-content/plugins/loginpress/img/addons/auto-login.png differ diff --git a/wp-content/plugins/loginpress/img/addons/custom-fields.png b/wp-content/plugins/loginpress/img/addons/custom-fields.png new file mode 100644 index 0000000..d1d3812 Binary files /dev/null and b/wp-content/plugins/loginpress/img/addons/custom-fields.png differ diff --git a/wp-content/plugins/loginpress/img/addons/hide-login.png b/wp-content/plugins/loginpress/img/addons/hide-login.png new file mode 100644 index 0000000..0316c5d Binary files /dev/null and b/wp-content/plugins/loginpress/img/addons/hide-login.png differ diff --git a/wp-content/plugins/loginpress/img/addons/limit-login-attempts.png b/wp-content/plugins/loginpress/img/addons/limit-login-attempts.png new file mode 100644 index 0000000..e887318 Binary files /dev/null and b/wp-content/plugins/loginpress/img/addons/limit-login-attempts.png differ diff --git a/wp-content/plugins/loginpress/img/addons/login-logout-menu.png b/wp-content/plugins/loginpress/img/addons/login-logout-menu.png new file mode 100644 index 0000000..e4436fe Binary files /dev/null and b/wp-content/plugins/loginpress/img/addons/login-logout-menu.png differ diff --git a/wp-content/plugins/loginpress/img/addons/login-redirects.png b/wp-content/plugins/loginpress/img/addons/login-redirects.png new file mode 100644 index 0000000..43479b9 Binary files /dev/null and b/wp-content/plugins/loginpress/img/addons/login-redirects.png differ diff --git a/wp-content/plugins/loginpress/img/addons/login-widget.png b/wp-content/plugins/loginpress/img/addons/login-widget.png new file mode 100644 index 0000000..1b870f2 Binary files /dev/null and b/wp-content/plugins/loginpress/img/addons/login-widget.png differ diff --git a/wp-content/plugins/loginpress/img/addons/protect-content.png b/wp-content/plugins/loginpress/img/addons/protect-content.png new file mode 100644 index 0000000..00c6c96 Binary files /dev/null and b/wp-content/plugins/loginpress/img/addons/protect-content.png differ diff --git a/wp-content/plugins/loginpress/img/addons/social-login.png b/wp-content/plugins/loginpress/img/addons/social-login.png new file mode 100644 index 0000000..6b3ea9c Binary files /dev/null and b/wp-content/plugins/loginpress/img/addons/social-login.png differ diff --git a/wp-content/plugins/loginpress/img/back_arrow.png b/wp-content/plugins/loginpress/img/back_arrow.png new file mode 100644 index 0000000..7db03a1 Binary files /dev/null and b/wp-content/plugins/loginpress/img/back_arrow.png differ diff --git a/wp-content/plugins/loginpress/img/bg-default.jpg b/wp-content/plugins/loginpress/img/bg-default.jpg new file mode 100644 index 0000000..ee155c5 Binary files /dev/null and b/wp-content/plugins/loginpress/img/bg-default.jpg differ diff --git a/wp-content/plugins/loginpress/img/bg2.jpg b/wp-content/plugins/loginpress/img/bg2.jpg new file mode 100644 index 0000000..88c6afc Binary files /dev/null and b/wp-content/plugins/loginpress/img/bg2.jpg differ diff --git a/wp-content/plugins/loginpress/img/black-friday.png b/wp-content/plugins/loginpress/img/black-friday.png new file mode 100644 index 0000000..3f779b2 Binary files /dev/null and b/wp-content/plugins/loginpress/img/black-friday.png differ diff --git a/wp-content/plugins/loginpress/img/dropdown-arrow-icon.svg b/wp-content/plugins/loginpress/img/dropdown-arrow-icon.svg new file mode 100644 index 0000000..d440e6e --- /dev/null +++ b/wp-content/plugins/loginpress/img/dropdown-arrow-icon.svg @@ -0,0 +1,10 @@ + + + + + + diff --git a/wp-content/plugins/loginpress/img/gallery/img-2.jpg b/wp-content/plugins/loginpress/img/gallery/img-2.jpg new file mode 100644 index 0000000..2c9b727 Binary files /dev/null and b/wp-content/plugins/loginpress/img/gallery/img-2.jpg differ diff --git a/wp-content/plugins/loginpress/img/gallery/img-3.jpg b/wp-content/plugins/loginpress/img/gallery/img-3.jpg new file mode 100644 index 0000000..5987eee Binary files /dev/null and b/wp-content/plugins/loginpress/img/gallery/img-3.jpg differ diff --git a/wp-content/plugins/loginpress/img/gallery/img-4.jpg b/wp-content/plugins/loginpress/img/gallery/img-4.jpg new file mode 100644 index 0000000..44d2781 Binary files /dev/null and b/wp-content/plugins/loginpress/img/gallery/img-4.jpg differ diff --git a/wp-content/plugins/loginpress/img/gallery/img-5.jpg b/wp-content/plugins/loginpress/img/gallery/img-5.jpg new file mode 100644 index 0000000..fb2a466 Binary files /dev/null and b/wp-content/plugins/loginpress/img/gallery/img-5.jpg differ diff --git a/wp-content/plugins/loginpress/img/gallery/img-6.jpg b/wp-content/plugins/loginpress/img/gallery/img-6.jpg new file mode 100644 index 0000000..f1f1277 Binary files /dev/null and b/wp-content/plugins/loginpress/img/gallery/img-6.jpg differ diff --git a/wp-content/plugins/loginpress/img/gallery/img-7.jpg b/wp-content/plugins/loginpress/img/gallery/img-7.jpg new file mode 100644 index 0000000..3f6325e Binary files /dev/null and b/wp-content/plugins/loginpress/img/gallery/img-7.jpg differ diff --git a/wp-content/plugins/loginpress/img/gallery/img-8.jpg b/wp-content/plugins/loginpress/img/gallery/img-8.jpg new file mode 100644 index 0000000..3cdaa1b Binary files /dev/null and b/wp-content/plugins/loginpress/img/gallery/img-8.jpg differ diff --git a/wp-content/plugins/loginpress/img/gallery/img-9.jpg b/wp-content/plugins/loginpress/img/gallery/img-9.jpg new file mode 100644 index 0000000..6f7059b Binary files /dev/null and b/wp-content/plugins/loginpress/img/gallery/img-9.jpg differ diff --git a/wp-content/plugins/loginpress/img/icon.svg b/wp-content/plugins/loginpress/img/icon.svg new file mode 100644 index 0000000..84ea00a --- /dev/null +++ b/wp-content/plugins/loginpress/img/icon.svg @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + diff --git a/wp-content/plugins/loginpress/img/icons-sprite.png b/wp-content/plugins/loginpress/img/icons-sprite.png new file mode 100644 index 0000000..817aefe Binary files /dev/null and b/wp-content/plugins/loginpress/img/icons-sprite.png differ diff --git a/wp-content/plugins/loginpress/img/login-field-icons.svg b/wp-content/plugins/loginpress/img/login-field-icons.svg new file mode 100644 index 0000000..fb89f3a --- /dev/null +++ b/wp-content/plugins/loginpress/img/login-field-icons.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + diff --git a/wp-content/plugins/loginpress/img/loginpress-logo-divid-logo.svg b/wp-content/plugins/loginpress/img/loginpress-logo-divid-logo.svg new file mode 100644 index 0000000..56ca261 --- /dev/null +++ b/wp-content/plugins/loginpress/img/loginpress-logo-divid-logo.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/wp-content/plugins/loginpress/img/loginpress-logo.svg b/wp-content/plugins/loginpress/img/loginpress-logo.svg new file mode 100644 index 0000000..4ed5404 --- /dev/null +++ b/wp-content/plugins/loginpress/img/loginpress-logo.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/wp-content/plugins/loginpress/img/loginpress-sniper.gif b/wp-content/plugins/loginpress/img/loginpress-sniper.gif new file mode 100644 index 0000000..3532008 Binary files /dev/null and b/wp-content/plugins/loginpress/img/loginpress-sniper.gif differ diff --git a/wp-content/plugins/loginpress/img/loginpress.png b/wp-content/plugins/loginpress/img/loginpress.png new file mode 100644 index 0000000..cc339e2 Binary files /dev/null and b/wp-content/plugins/loginpress/img/loginpress.png differ diff --git a/wp-content/plugins/loginpress/img/menu-dropdown-icon.svg b/wp-content/plugins/loginpress/img/menu-dropdown-icon.svg new file mode 100644 index 0000000..7b7f4f3 --- /dev/null +++ b/wp-content/plugins/loginpress/img/menu-dropdown-icon.svg @@ -0,0 +1,4 @@ + + + + diff --git a/wp-content/plugins/loginpress/img/minimalist.jpg b/wp-content/plugins/loginpress/img/minimalist.jpg new file mode 100644 index 0000000..4aa7c4f Binary files /dev/null and b/wp-content/plugins/loginpress/img/minimalist.jpg differ diff --git a/wp-content/plugins/loginpress/img/notification_logo.svg b/wp-content/plugins/loginpress/img/notification_logo.svg new file mode 100644 index 0000000..d6382ac --- /dev/null +++ b/wp-content/plugins/loginpress/img/notification_logo.svg @@ -0,0 +1,53 @@ + + + diff --git a/wp-content/plugins/loginpress/img/pagination-left-arrow.svg b/wp-content/plugins/loginpress/img/pagination-left-arrow.svg new file mode 100644 index 0000000..94bd275 --- /dev/null +++ b/wp-content/plugins/loginpress/img/pagination-left-arrow.svg @@ -0,0 +1,4 @@ + + + + diff --git a/wp-content/plugins/loginpress/img/pagination-right-arrow.svg b/wp-content/plugins/loginpress/img/pagination-right-arrow.svg new file mode 100644 index 0000000..30ec881 --- /dev/null +++ b/wp-content/plugins/loginpress/img/pagination-right-arrow.svg @@ -0,0 +1,4 @@ + + + + diff --git a/wp-content/plugins/loginpress/img/promo/font_promo.png b/wp-content/plugins/loginpress/img/promo/font_promo.png new file mode 100644 index 0000000..83a433b Binary files /dev/null and b/wp-content/plugins/loginpress/img/promo/font_promo.png differ diff --git a/wp-content/plugins/loginpress/img/promo/hint_promo.png b/wp-content/plugins/loginpress/img/promo/hint_promo.png new file mode 100644 index 0000000..a19c8bd Binary files /dev/null and b/wp-content/plugins/loginpress/img/promo/hint_promo.png differ diff --git a/wp-content/plugins/loginpress/img/promo/recaptcha_option_promo.png b/wp-content/plugins/loginpress/img/promo/recaptcha_option_promo.png new file mode 100644 index 0000000..e5f5929 Binary files /dev/null and b/wp-content/plugins/loginpress/img/promo/recaptcha_option_promo.png differ diff --git a/wp-content/plugins/loginpress/img/promo/recaptcha_promo.png b/wp-content/plugins/loginpress/img/promo/recaptcha_promo.png new file mode 100644 index 0000000..b7d5dc7 Binary files /dev/null and b/wp-content/plugins/loginpress/img/promo/recaptcha_promo.png differ diff --git a/wp-content/plugins/loginpress/img/thead-sort-icon.svg b/wp-content/plugins/loginpress/img/thead-sort-icon.svg new file mode 100644 index 0000000..65437ee --- /dev/null +++ b/wp-content/plugins/loginpress/img/thead-sort-icon.svg @@ -0,0 +1,4 @@ + + + + diff --git a/wp-content/plugins/loginpress/img/thumbnail/custom-design.png b/wp-content/plugins/loginpress/img/thumbnail/custom-design.png new file mode 100644 index 0000000..07ae9aa Binary files /dev/null and b/wp-content/plugins/loginpress/img/thumbnail/custom-design.png differ diff --git a/wp-content/plugins/loginpress/img/thumbnail/default-1.png b/wp-content/plugins/loginpress/img/thumbnail/default-1.png new file mode 100644 index 0000000..a15bdae Binary files /dev/null and b/wp-content/plugins/loginpress/img/thumbnail/default-1.png differ diff --git a/wp-content/plugins/loginpress/img/thumbnail/default-10.png b/wp-content/plugins/loginpress/img/thumbnail/default-10.png new file mode 100644 index 0000000..d75620d Binary files /dev/null and b/wp-content/plugins/loginpress/img/thumbnail/default-10.png differ diff --git a/wp-content/plugins/loginpress/img/thumbnail/default-11.png b/wp-content/plugins/loginpress/img/thumbnail/default-11.png new file mode 100644 index 0000000..16834fe Binary files /dev/null and b/wp-content/plugins/loginpress/img/thumbnail/default-11.png differ diff --git a/wp-content/plugins/loginpress/img/thumbnail/default-12.png b/wp-content/plugins/loginpress/img/thumbnail/default-12.png new file mode 100644 index 0000000..1f30dec Binary files /dev/null and b/wp-content/plugins/loginpress/img/thumbnail/default-12.png differ diff --git a/wp-content/plugins/loginpress/img/thumbnail/default-13.png b/wp-content/plugins/loginpress/img/thumbnail/default-13.png new file mode 100644 index 0000000..8157d02 Binary files /dev/null and b/wp-content/plugins/loginpress/img/thumbnail/default-13.png differ diff --git a/wp-content/plugins/loginpress/img/thumbnail/default-14.png b/wp-content/plugins/loginpress/img/thumbnail/default-14.png new file mode 100644 index 0000000..dab43e0 Binary files /dev/null and b/wp-content/plugins/loginpress/img/thumbnail/default-14.png differ diff --git a/wp-content/plugins/loginpress/img/thumbnail/default-15.png b/wp-content/plugins/loginpress/img/thumbnail/default-15.png new file mode 100644 index 0000000..b022bcb Binary files /dev/null and b/wp-content/plugins/loginpress/img/thumbnail/default-15.png differ diff --git a/wp-content/plugins/loginpress/img/thumbnail/default-16.png b/wp-content/plugins/loginpress/img/thumbnail/default-16.png new file mode 100644 index 0000000..2026f5d Binary files /dev/null and b/wp-content/plugins/loginpress/img/thumbnail/default-16.png differ diff --git a/wp-content/plugins/loginpress/img/thumbnail/default-17.png b/wp-content/plugins/loginpress/img/thumbnail/default-17.png new file mode 100644 index 0000000..c43728e Binary files /dev/null and b/wp-content/plugins/loginpress/img/thumbnail/default-17.png differ diff --git a/wp-content/plugins/loginpress/img/thumbnail/default-18.png b/wp-content/plugins/loginpress/img/thumbnail/default-18.png new file mode 100644 index 0000000..de11ab7 Binary files /dev/null and b/wp-content/plugins/loginpress/img/thumbnail/default-18.png differ diff --git a/wp-content/plugins/loginpress/img/thumbnail/default-19.png b/wp-content/plugins/loginpress/img/thumbnail/default-19.png new file mode 100644 index 0000000..16834fe Binary files /dev/null and b/wp-content/plugins/loginpress/img/thumbnail/default-19.png differ diff --git a/wp-content/plugins/loginpress/img/thumbnail/default-2.png b/wp-content/plugins/loginpress/img/thumbnail/default-2.png new file mode 100644 index 0000000..abf1c77 Binary files /dev/null and b/wp-content/plugins/loginpress/img/thumbnail/default-2.png differ diff --git a/wp-content/plugins/loginpress/img/thumbnail/default-3.png b/wp-content/plugins/loginpress/img/thumbnail/default-3.png new file mode 100644 index 0000000..2af2852 Binary files /dev/null and b/wp-content/plugins/loginpress/img/thumbnail/default-3.png differ diff --git a/wp-content/plugins/loginpress/img/thumbnail/default-4.jpg b/wp-content/plugins/loginpress/img/thumbnail/default-4.jpg new file mode 100644 index 0000000..0ec9fb6 Binary files /dev/null and b/wp-content/plugins/loginpress/img/thumbnail/default-4.jpg differ diff --git a/wp-content/plugins/loginpress/img/thumbnail/default-4.png b/wp-content/plugins/loginpress/img/thumbnail/default-4.png new file mode 100644 index 0000000..305d18b Binary files /dev/null and b/wp-content/plugins/loginpress/img/thumbnail/default-4.png differ diff --git a/wp-content/plugins/loginpress/img/thumbnail/default-5.png b/wp-content/plugins/loginpress/img/thumbnail/default-5.png new file mode 100644 index 0000000..ccaa707 Binary files /dev/null and b/wp-content/plugins/loginpress/img/thumbnail/default-5.png differ diff --git a/wp-content/plugins/loginpress/img/thumbnail/default-6.png b/wp-content/plugins/loginpress/img/thumbnail/default-6.png new file mode 100644 index 0000000..7d13ffe Binary files /dev/null and b/wp-content/plugins/loginpress/img/thumbnail/default-6.png differ diff --git a/wp-content/plugins/loginpress/img/thumbnail/default-7.png b/wp-content/plugins/loginpress/img/thumbnail/default-7.png new file mode 100644 index 0000000..14e850d Binary files /dev/null and b/wp-content/plugins/loginpress/img/thumbnail/default-7.png differ diff --git a/wp-content/plugins/loginpress/img/thumbnail/default-8.png b/wp-content/plugins/loginpress/img/thumbnail/default-8.png new file mode 100644 index 0000000..7670ab5 Binary files /dev/null and b/wp-content/plugins/loginpress/img/thumbnail/default-8.png differ diff --git a/wp-content/plugins/loginpress/img/thumbnail/default-9.png b/wp-content/plugins/loginpress/img/thumbnail/default-9.png new file mode 100644 index 0000000..b31a131 Binary files /dev/null and b/wp-content/plugins/loginpress/img/thumbnail/default-9.png differ diff --git a/wp-content/plugins/loginpress/img/thumbnail/default.png b/wp-content/plugins/loginpress/img/thumbnail/default.png new file mode 100644 index 0000000..14e850d Binary files /dev/null and b/wp-content/plugins/loginpress/img/thumbnail/default.png differ diff --git a/wp-content/plugins/loginpress/img/thumbnail/free-minimalist.png b/wp-content/plugins/loginpress/img/thumbnail/free-minimalist.png new file mode 100644 index 0000000..765d375 Binary files /dev/null and b/wp-content/plugins/loginpress/img/thumbnail/free-minimalist.png differ diff --git a/wp-content/plugins/loginpress/img/thumbnail/gallery-img-1.jpg b/wp-content/plugins/loginpress/img/thumbnail/gallery-img-1.jpg new file mode 100644 index 0000000..fc83647 Binary files /dev/null and b/wp-content/plugins/loginpress/img/thumbnail/gallery-img-1.jpg differ diff --git a/wp-content/plugins/loginpress/img/thumbnail/gallery-img-1.png b/wp-content/plugins/loginpress/img/thumbnail/gallery-img-1.png new file mode 100644 index 0000000..19722f0 Binary files /dev/null and b/wp-content/plugins/loginpress/img/thumbnail/gallery-img-1.png differ diff --git a/wp-content/plugins/loginpress/img/thumbnail/gallery-img-2.jpg b/wp-content/plugins/loginpress/img/thumbnail/gallery-img-2.jpg new file mode 100644 index 0000000..febf03c Binary files /dev/null and b/wp-content/plugins/loginpress/img/thumbnail/gallery-img-2.jpg differ diff --git a/wp-content/plugins/loginpress/img/thumbnail/gallery-img-3.jpg b/wp-content/plugins/loginpress/img/thumbnail/gallery-img-3.jpg new file mode 100644 index 0000000..bc8c11d Binary files /dev/null and b/wp-content/plugins/loginpress/img/thumbnail/gallery-img-3.jpg differ diff --git a/wp-content/plugins/loginpress/img/thumbnail/gallery-img-4.jpg b/wp-content/plugins/loginpress/img/thumbnail/gallery-img-4.jpg new file mode 100644 index 0000000..a930b2d Binary files /dev/null and b/wp-content/plugins/loginpress/img/thumbnail/gallery-img-4.jpg differ diff --git a/wp-content/plugins/loginpress/img/thumbnail/gallery-img-5.jpg b/wp-content/plugins/loginpress/img/thumbnail/gallery-img-5.jpg new file mode 100644 index 0000000..026b6de Binary files /dev/null and b/wp-content/plugins/loginpress/img/thumbnail/gallery-img-5.jpg differ diff --git a/wp-content/plugins/loginpress/img/thumbnail/gallery-img-6.jpg b/wp-content/plugins/loginpress/img/thumbnail/gallery-img-6.jpg new file mode 100644 index 0000000..c8c1b95 Binary files /dev/null and b/wp-content/plugins/loginpress/img/thumbnail/gallery-img-6.jpg differ diff --git a/wp-content/plugins/loginpress/img/thumbnail/gallery-img-7.jpg b/wp-content/plugins/loginpress/img/thumbnail/gallery-img-7.jpg new file mode 100644 index 0000000..439b8b7 Binary files /dev/null and b/wp-content/plugins/loginpress/img/thumbnail/gallery-img-7.jpg differ diff --git a/wp-content/plugins/loginpress/img/thumbnail/gallery-img-8.jpg b/wp-content/plugins/loginpress/img/thumbnail/gallery-img-8.jpg new file mode 100644 index 0000000..ec3a934 Binary files /dev/null and b/wp-content/plugins/loginpress/img/thumbnail/gallery-img-8.jpg differ diff --git a/wp-content/plugins/loginpress/img/thumbnail/gallery-img-9.jpg b/wp-content/plugins/loginpress/img/thumbnail/gallery-img-9.jpg new file mode 100644 index 0000000..efdd46f Binary files /dev/null and b/wp-content/plugins/loginpress/img/thumbnail/gallery-img-9.jpg differ diff --git a/wp-content/plugins/loginpress/img/thumbnail/gray-loginpress.png b/wp-content/plugins/loginpress/img/thumbnail/gray-loginpress.png new file mode 100644 index 0000000..d1d3812 Binary files /dev/null and b/wp-content/plugins/loginpress/img/thumbnail/gray-loginpress.png differ diff --git a/wp-content/plugins/loginpress/img/thumbnail/v18.jpg b/wp-content/plugins/loginpress/img/thumbnail/v18.jpg new file mode 100644 index 0000000..d7d3a70 Binary files /dev/null and b/wp-content/plugins/loginpress/img/thumbnail/v18.jpg differ diff --git a/wp-content/plugins/loginpress/img/thumbnail/v9.jpg b/wp-content/plugins/loginpress/img/thumbnail/v9.jpg new file mode 100644 index 0000000..b83dfeb Binary files /dev/null and b/wp-content/plugins/loginpress/img/thumbnail/v9.jpg differ diff --git a/wp-content/plugins/loginpress/include/class-loginpress-theme-template.php b/wp-content/plugins/loginpress/include/class-loginpress-theme-template.php new file mode 100644 index 0000000..6cfc35b --- /dev/null +++ b/wp-content/plugins/loginpress/include/class-loginpress-theme-template.php @@ -0,0 +1,147 @@ +templates = array(); + + // Add a filter to the attributes metabox to inject template into the cache. + if ( version_compare( floatval( get_bloginfo( 'version' ) ), '4.7', '<' ) ) { + // 4.6 and older + add_filter( 'page_attributes_dropdown_pages_args', array( $this, 'register_project_templates' ) ); + } else { + // Add a filter to the wp 4.7 version attributes metabox + add_filter( 'theme_page_templates', array( $this, 'add_new_template' ) ); + } + + // Add a filter to the save post to inject out template into the page cache. + add_filter( 'wp_insert_post_data', array( $this, 'register_project_templates' ) ); + + // Add a filter to the template include to determine if the page has our template assigned and return it's path. + add_filter( 'template_include', array( $this, 'view_project_template') ); + + // Add templates. + $this->templates = array( + 'template-loginpress.php' => 'LoginPress', + ); + + } + + /** + * Adds our template to the page dropdown for v4.7+ + * + */ + public function add_new_template( $posts_templates ) { + + $posts_templates = array_merge( $posts_templates, $this->templates ); + return $posts_templates; + } + + /** + * Adds our template to the pages cache in order to trick WordPress + * into thinking the template file exists where it doesn't really exist. + */ + public function register_project_templates( $atts ) { + + // Create the key used for the themes cache. + $cache_key = 'page_templates-' . md5( get_theme_root() . '/' . get_stylesheet() ); + + // Retrieve the cache list. + // If it doesn't exist, or it's empty prepare an array. + $templates = wp_get_theme()->get_page_templates(); + if ( empty( $templates ) ) { + $templates = array(); + } + + // New cache, therefore remove the old one + wp_cache_delete( $cache_key , 'themes'); + + // Now add our template to the list of templates by merging our templates + // with the existing templates array from the cache. + $templates = array_merge( $templates, $this->templates ); + + // Add the modified cache to allow WordPress to pick it up for listing + // available templates + wp_cache_add( $cache_key, $templates, 'themes', 1800 ); + + return $atts; + + } + + /** + * Checks if the template is assigned to the page. + */ + public function view_project_template( $template ) { + + // Get global post + global $post; + + // Return template if post is empty + if ( ! $post ) { + return $template; + } + + // Return default template if we don't have a custom one defined + if ( ! isset( $this->templates[ get_post_meta( $post->ID, '_wp_page_template', true ) ] ) ) { + return $template; + } + + $file = plugin_dir_path( __FILE__ ). get_post_meta( $post->ID, '_wp_page_template', true ); + + // Just to be safe, we check if the file exist first + if ( file_exists( $file ) ) { + return $file; + } else { + echo $file; + } + + // Return template + return $template; + + } + } +endif; +add_action( 'plugins_loaded', array( 'LoginPress_Theme_Template', 'get_instance' ) ); diff --git a/wp-content/plugins/loginpress/include/class-remote-notification-client.php b/wp-content/plugins/loginpress/include/class-remote-notification-client.php new file mode 100644 index 0000000..f8ef1bf --- /dev/null +++ b/wp-content/plugins/loginpress/include/class-remote-notification-client.php @@ -0,0 +1,865 @@ + + * @license GPL-2.0+ + * @link http://themeavenue.net + * @link http://wordpress.org/plugins/remote-dashboard-notifications/ + * @link https://github.com/ThemeAvenue/Remote-Dashboard-Notifications + * @copyright 2016 ThemeAvenue + */ + +// If this file is called directly, abort. +if ( ! defined( 'WPINC' ) ) { + die; +} + +if ( ! class_exists( 'Remote_Dashboard_Notifications_Client' ) ) { + + final class Remote_Dashboard_Notifications_Client { + + /** + * @var Remote_Dashboard_Notifications_Client Holds the unique instance + * @since 1.3.0 + */ + private static $instance; + + /** + * Minimum version of WordPress required ot run the plugin + * + * @since 1.3.0 + * @var string + */ + public $wordpress_version_required = '3.8'; + + /** + * Required version of PHP. + * + * Follow WordPress latest requirements and require + * PHP version 5.2 at least. + * + * @since 1.3.0 + * @var string + */ + public $php_version_required = '5.2'; + + /** + * Holds all the registered notifications + * + * @since 1.3.0 + * @var array + */ + public $notifications = array(); + + /** + * Instantiate and return the unique object + * + * @since 1.2.0 + * @return object Remote_Dashboard_Notifications_Client Unique instance + */ + public static function instance() { + + if ( ! isset( self::$instance ) && ! ( self::$instance instanceof Awesome_Support ) ) { + self::$instance = new Remote_Dashboard_Notifications_Client; + self::$instance->init(); + } + + return self::$instance; + + } + + /** + * Instantiate the plugin + * + * @since 1.3.0 + * @return void + */ + private function init() { + + // Make sure the WordPress version is recent enough + if ( ! self::$instance->is_version_compatible() ) { + return; + } + + // Make sure we have a version of PHP that's not too old + if ( ! self::$instance->is_php_version_enough() ) { + return; + } + + // Call the dismiss method before testing for Ajax + if ( isset( $_GET['rn'] ) && isset( $_GET['notification'] ) ) { + add_action( 'plugins_loaded', array( self::$instance, 'dismiss' ) ); + } + + if ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) { + add_action( 'admin_print_styles', array( self::$instance, 'style' ), 100 ); + add_action( 'admin_notices', array( self::$instance, 'show_notices' ) ); + add_action( 'admin_footer', array( self::$instance, 'script' ) ); + } + + add_action( 'wp_ajax_rdn_fetch_notifications', array( $this, 'remote_get_notice_ajax' ) ); + add_filter( 'heartbeat_received', array( self::$instance, 'heartbeat' ), 10, 2 ); + + } + + /** + * Throw error on object clone + * + * The whole idea of the singleton design pattern is that there is a single + * object therefore, we don't want the object to be cloned. + * + * @since 3.2.5 + * @return void + */ + public function __clone() { + // Cloning instances of the class is forbidden + _doing_it_wrong( __FUNCTION__, __( 'Cheatin’ huh?', 'awesome-support' ), '3.2.5' ); + } + + /** + * Disable unserializing of the class + * + * @since 3.2.5 + * @return void + */ + public function __wakeup() { + // Unserializing instances of the class is forbidden + _doing_it_wrong( __FUNCTION__, __( 'Cheatin’ huh?', 'awesome-support' ), '3.2.5' ); + } + + /** + * Check if the core version is compatible with this addon. + * + * @since 1.3.0 + * @return boolean + */ + private function is_version_compatible() { + + if ( empty( self::$instance->wordpress_version_required ) ) { + return true; + } + + if ( version_compare( get_bloginfo( 'version' ), self::$instance->wordpress_version_required, '<' ) ) { + return false; + } + + return true; + + } + + /** + * Check if the version of PHP is compatible with this addon. + * + * @since 1.3.0 + * @return boolean + */ + private function is_php_version_enough() { + + /** + * No version set, we assume everything is fine. + */ + if ( empty( self::$instance->php_version_required ) ) { + return true; + } + + if ( version_compare( phpversion(), self::$instance->php_version_required, '<' ) ) { + return false; + } + + return true; + + } + + /** + * Register a new remote notification + * + * @since 1.3.0 + * + * @param int $channel_id Channel ID on the remote server + * @param string $channel_key Channel key for authentication with the server + * @param string $server Notification server URL + * @param int $cache Cache lifetime (in hours) + * + * @return bool|string + */ + public function add_notification( $channel_id, $channel_key, $server, $cache = 6 ) { + + $notification = array( + 'channel_id' => (int) $channel_id, + 'channel_key' => $channel_key, + 'server_url' => esc_url( $server ), + 'cache_lifetime' => apply_filters( 'rn_notice_caching_time', $cache ), + ); + + // Generate the notice unique ID + $notification['notice_id'] = $notification['channel_id'] . substr( $channel_key, 0, 5 ); + + // Double check that the required info is here + if ( '' === ( $notification['channel_id'] || $notification['channel_key'] || $notification['server_url'] ) ) { + return false; + } + + // Check that there is no notification with the same ID + if ( array_key_exists( $notification['notice_id'], $this->notifications ) ) { + return false; + } + + $this->notifications[ $notification['notice_id'] ] = $notification; + + return $notification['notice_id']; + + } + + /** + * Remove a registered notification + * + * @since 1.3.0 + * + * @param string $notice_id ID of the notice to remove + * + * @return void + */ + public function remove_notification( $notice_id ) { + if ( array_key_exists( $notice_id, $this->notifications ) ) { + unset( $this->notifications[ $notice_id ] ); + } + } + + /** + * Get all registered notifications + * + * @since 1.3.0 + * @return array + */ + public function get_notifications() { + return $this->notifications; + } + + /** + * Get a specific notification + * + * @since 1.3.0 + * + * @param string $notice_id ID of the notice to retrieve + * + * @return bool|array + */ + public function get_notification( $notice_id ) { + + if ( ! array_key_exists( $notice_id, $this->notifications ) ) { + return false; + } + + return $this->notifications[ $notice_id ]; + } + + /** + * Adds inline style for non standard notices + * + * This function will only be called if the notice style is not standard. + * + * @since 0.1.0 + */ + public function style() { ?> + + notifications as $id => $notification ) { + + $rn = $this->get_remote_notification( $notification ); + + if ( empty( $rn ) || is_wp_error( $rn ) ) { + continue; + } + + if ( $this->is_notification_error( $rn ) ) { + continue; + } + + if ( $this->is_notice_dismissed( $rn->slug ) ) { + continue; + } + + if ( $this->is_post_type_restricted( $rn ) ) { + continue; + } + + if ( ! $this->is_notification_started( $rn ) ) { + continue; + } + + if ( $this->has_notification_ended( $rn ) ) { + continue; + } + + // Output the admin notice + $this->create_admin_notice( $rn->message, $this->get_notice_class( isset( $rn->style ) ? $rn->style : 'updated' ), $this->get_notice_dismissal_url( $rn->slug ) ); + + } + + } + + /** + * Check if the notification has been dismissed + * + * @since 1.2.0 + * + * @param string $slug Slug of the notice to check + * + * @return bool + */ + protected function is_notice_dismissed( $slug ) { + + global $current_user; + + $dismissed = array_filter( (array) get_user_meta( $current_user->ID, '_rn_dismissed', true ) ); + + if ( is_array( $dismissed ) && in_array( $slug, $dismissed ) ) { + return true; + } + + return false; + + } + + /** + * Check if the notification can be displayed for the current post type + * + * @since 1.2.0 + * + * @param stdClass $notification The notification object + * + * @return bool + */ + protected function is_post_type_restricted( $notification ) { + + /* If the type array isn't empty we have a limitation */ + if ( isset( $notification->type ) && is_array( $notification->type ) && ! empty( $notification->type ) ) { + + /* Get current post type */ + $pt = get_post_type(); + + /** + * If the current post type can't be retrieved + * or if it's not in the allowed post types, + * then we don't display the admin notice. + */ + if ( false === $pt || ! in_array( $pt, $notification->type ) ) { + return true; + } + + } + + return false; + + } + + /** + * Check if the notification has started yet + * + * @since 1.2.0 + * + * @param stdClass $notification The notification object + * + * @return bool + */ + protected function is_notification_started( $notification ) { + + if ( ! isset( $notification->date_start ) ) { + return true; + } + + if ( empty( $notification->date_start ) || strtotime( $notification->date_start ) < time() ) { + return true; + } + + return false; + + } + + /** + * Check if the notification has expired + * + * @since 1.2.0 + * + * @param stdClass $notification The notification object + * + * @return bool + */ + protected function has_notification_ended( $notification ) { + + if ( ! isset( $notification->date_end ) ) { + return false; + } + + if ( empty( $notification->date_end ) || strtotime( $notification->date_end ) > time() ) { + return false; + } + + return true; + + } + + /** + * Get the remote notification object + * + * @since 1.3.0 + * + * @param array $notification The notification data array + * + * @return object|false + */ + protected function get_remote_notification( $notification ) { + + $content = get_transient( 'rn_last_notification_' . $notification['notice_id'] ); + + if ( false === $content ) { + add_option( 'rdn_fetch_' . $notification['notice_id'], 'fetch' ); + } + + return $content; + + } + + /** + * Get the admin notice class attribute + * + * @since 1.3.0 + * + * @param string $style Notification style + * + * @return string + */ + protected function get_notice_class( $style ) { + + switch ( $style ) { + case 'updated': + $class = $style; + break; + + case 'error': + $class = 'updated error'; + break; + + default: + $class = "updated rn-alert rn-alert-$style"; + } + + return $class; + + } + + /** + * Prepare the dismissal URL for the notice + * + * @since 1.3.0 + * + * @param string $slug Notice slug + * + * @return string + */ + protected function get_notice_dismissal_url( $slug ) { + + $args = $_GET; + $args['rn'] = wp_create_nonce( 'rn-dismiss' ); + $args['notification'] = trim( $slug ); + + return esc_url( add_query_arg( $args, '' ) ); + + } + + /** + * Create the actual admin notice + * + * @since 1.3.0 + * + * @param string $contents Notice contents + * @param string $class Wrapper class + * @param string $dismiss Dismissal link + * + * @return void + */ + protected function create_admin_notice( $contents, $class, $dismiss ) { ?> +
+ × +

+
+ ID, '_rn_dismissed', true ) ); + + /* Add the current notice to the list if needed */ + if ( is_array( $dismissed ) && ! in_array( $_GET['notification'], $dismissed ) ) { + array_push( $dismissed, $_GET['notification'] ); + } + + /* Update option */ + update_user_meta( $current_user->ID, '_rn_dismissed', $dismissed ); + + } + + /** + * Adds the script that hooks into the Heartbeat API + * + * @since 1.3.0 + * @return void + */ + public function script() { + + $maybe_fetch = array(); + + foreach ( $this->get_notifications() as $id => $n ) { + $maybe_fetch[] = (string) $id; + } + + // var_dump( 'RND_FETCH_NOTIFICATIONS' ); + // var_dump( get_transient( 'loginpress_rdn_fetch_notifications' ) ); + + if ( false === get_transient( 'loginpress_rdn_fetch_notifications' ) ) { ?> + + + get_notification( $notice_id ); + $rn = $this->remote_get_notification( $notification ); + + if ( is_wp_error( $rn ) ) { + echo $rn->get_error_message(); + } else { + echo json_encode( $rn ); + } + + } + + die(); + + } + + /** + * Get the remote server URL + * + * @since 1.2.0 + * + * @param string $url THe server URL to sanitize + * + * @return string + */ + protected function get_remote_url( $url ) { + + $url = explode( '?', $url ); + + return esc_url( $url[0] ); + + } + + /** + * Maybe get a notification from the remote server + * + * @since 1.2.0 + * + * @param array $notification The notification data array + * + * @return string|WP_Error + */ + protected function remote_get_notification( $notification ) { + + /* Query the server */ + $response = wp_remote_get( $this->build_query_url( $notification['server_url'], $this->get_payload( $notification ) ), array( 'timeout' => apply_filters( 'rn_http_request_timeout', 5 ) ) ); + + /* If we have a WP_Error object we abort */ + if ( is_wp_error( $response ) ) { + return $response; + } + + if ( 200 !== (int) wp_remote_retrieve_response_code( $response ) ) { + return new WP_Error( 'invalid_response', sprintf( __( 'The server response was invalid (code %s)', 'remote-notifications' ), wp_remote_retrieve_response_code( $response ) ) ); + } + + $body = wp_remote_retrieve_body( $response ); + + if ( empty( $body ) ) { + return new WP_Error( 'empty_response', __( 'The server response is empty', 'remote-notifications' ) ); + } + + $body = json_decode( $body ); + + if ( is_null( $body ) ) { + return new WP_Error( 'json_decode_error', __( 'Cannot decode the response content', 'remote-notifications' ) ); + } + + set_transient( 'rn_last_notification_' . $notification['notice_id'], $body, $notification['cache_lifetime'] * 60 * 60 ); + delete_option( 'rdn_fetch_' . $notification['notice_id'] ); + + if ( $this->is_notification_error( $body ) ) { + return new WP_Error( 'notification_error', $this->get_notification_error_message( $body ) ); + } + + return $body; + + } + + /** + * Check if the notification returned by the server is an error + * + * @since 1.2.0 + * + * @param object $notification Notification returned + * + * @return bool + */ + protected function is_notification_error( $notification ) { + + if ( false === $this->get_notification_error_message( $notification ) ) { + return false; + } + + return true; + + } + + /** + * Get the error message returned by the remote server + * + * @since 1.2.0 + * + * @param object $notification Notification returned + * + * @return bool|string + */ + protected function get_notification_error_message( $notification ) { + + if ( ! is_object( $notification ) ) { + return false; + } + + if ( ! isset( $notification->error ) ) { + return false; + } + + return sanitize_text_field( $notification->error ); + + } + + /** + * Get the payload required for querying the remote server + * + * @since 1.2.0 + * + * @param array $notification The notification data array + * + * @return string + */ + protected function get_payload( $notification ) { + return base64_encode( json_encode( array( + 'channel' => isset( $notification['channel_id'] ) && ! empty( $notification['channel_id'] ) ? $notification['channel_id'] : '', + 'key' => isset( $notification['channel_key'] ) && ! empty( $notification['channel_key'] ) ? $notification['channel_key'] : '' + ) ) ); + } + + /** + * Get the full URL used for the remote get + * + * @since 1.2.0 + * + * @param string $url The remote server URL + * @param string $payload The encoded payload + * + * @return string + */ + protected function build_query_url( $url, $payload ) { + return add_query_arg( array( + 'post_type' => 'notification', + 'payload' => $payload + ), $this->get_remote_url( $url ) ); + } + + } + +} + +/** + * The main function responsible for returning the unique RDN client + * + * Use this function like you would a global variable, except without needing + * to declare the global. + * + * @since 1.3.0 + * @return object Remote_Dashboard_Notifications_Client + */ +function RDNC() { + return Remote_Dashboard_Notifications_Client::instance(); +} + +// Get Awesome Support Running +RDNC(); + +/** + * Register a new remote notification + * + * Helper function for registering new notifications through the Remote_Dashboard_Notifications_Client class + * + * @since 1.3.0 + * + * @param int $channel_id Channel ID on the remote server + * @param string $channel_key Channel key for authentication with the server + * @param string $server Notification server URL + * @param int $cache Cache lifetime (in hours) + * + * @return bool|string + */ +function rdnc_add_notification( $channel_id, $channel_key, $server, $cache = 6 ) { + return RDNC()->add_notification( $channel_id, $channel_key, $server, $cache ); +} + +if ( ! class_exists( 'TAV_Remote_Notification_Client' ) ) { + + /** + * Class TAV_Remote_Notification_Client + * + * This class, even though deprecated, is kept here for backwards compatibility. It is now just a wrapper for the new notification registration method. + * + * @deprecated @1.3.0 + */ + class TAV_Remote_Notification_Client { + + public function __construct( $channel_id = false, $channel_key = false, $server = false ) { + rdnc_add_notification( $channel_id, $channel_key, $server ); + } + } + +} diff --git a/wp-content/plugins/loginpress/include/compatibility.php b/wp-content/plugins/loginpress/include/compatibility.php new file mode 100644 index 0000000..385a6a1 --- /dev/null +++ b/wp-content/plugins/loginpress/include/compatibility.php @@ -0,0 +1,472 @@ +loginpress_key = get_option( 'loginpress_customization' ); + $this->dependencies(); + } + + public function dependencies() { + + add_action( 'wp_print_scripts', array( $this, 'dequeue_conflicted_script' ), 100 ); + add_action( 'login_headerurl', array( $this, 'remove_conflicted_action' ) ); + add_action( 'init', array( $this, 'enqueue_loginpress_compatibility_script') ); + + /************************************* + WebArx Compatibility Fix // v1.2.3 + *************************************/ + add_filter( 'wp_redirect', array( $this, 'wp_redirect_remove_filter' ), 9 ); + add_filter( 'site_url', array( $this, 'site_url_remove_filter' ) , 9 ); + add_filter( 'network_site_url', array( $this, 'network_site_url_remove_filter' ), 9 ); + add_action( 'plugins_loaded', array( $this, 'plugins_loaded_remove_action' ), 10 ); + add_action( 'wp_loaded', array( $this, 'wp_loaded_remove_action' ), 9 ); + add_action( 'init', array( $this, 'init_remove_action' ), 9 ); + + /** + * Login page Compatibility Fix. + * + * @since v1.3.2 + */ + add_action( 'login_enqueue_scripts', array( $this, 'dequeue_login_page_conflicting_scripts' ), 99 ); + + /** + * Oxygen Builder Compatibility Fix. + * + * @since v1.4.0 + */ + add_filter( 'template_include', array( $this, 'template_include_ob' ), 100 ); + + /** + * All In One WP Security & Firewall Compatibility Fix. + * + * @since 1.4.0 + */ + add_action( 'init', array( $this, 'aiowps_login_init_remove_action' ) ); + } + + /** + * Dequeue login page styles. + * + * @since 1.3.2 + * @version 1.4.3 + */ + function dequeue_login_page_conflicting_scripts() { + + /** + * Dequeue thrive theme login page styles. + * + * @since 1.3.2 + */ + wp_dequeue_style( 'thrive-custom-login' ); + wp_dequeue_script( 'thrive-custom-login' ); + + /** + * Dequeue listing-pro theme login page styles. + * + * @since 1.4.3 + */ + wp_dequeue_style( 'listable-custom-login' ); + + /** + * PCI Compliance + * + * @since 1.7.2 + */ + $loginpress_setting = get_option( 'loginpress_setting' ); + $pci_compliance = isset( $loginpress_setting['enable_pci_compliance'] ) ? $loginpress_setting['enable_pci_compliance'] : 'off'; + + if ( $pci_compliance !== 'off' ) { + + echo ''; + echo ''; + echo ''; + } + } + + /** + * Override the oxygen template with loginpress on login customizer screen. + * + * @since 1.4.0 + */ + public function template_include_ob( $template ) { + + // Safely exit if methods not defined yet + if ( ! function_exists( 'is_customize_preview' ) || ! function_exists( 'wp_get_referer' ) ) { + return $template; + } + + if ( is_customize_preview() && $template == ABSPATH . 'wp-content/plugins/oxygen/component-framework//oxygen-main-template.php' && ( false !== strpos( wp_get_referer(), 'autofocus[panel]=loginpress_panel' ) ) ) { + return ABSPATH . 'wp-content/plugins/loginpress/include/template-loginpress.php'; + } + + return $template; + } + + /** + * WebArx Compatibility Fix. + * + * @since 1.2.3 + * @param string $location The currrent location. + * @return string $location Modified currrent location. + */ + public function wp_redirect_remove_filter( $location ) { + + if ( class_exists( 'Webarx' ) ) { + + if ( ! function_exists( 'is_user_logged_in' ) ) { + return $location; + } + + $webarx_login = get_option( 'webarx_mv_wp_login' ); + $user_logged_in = is_user_logged_in(); + + if ( ( isset( $user_logged_in ) && true === $user_logged_in ) && ( isset( $webarx_login ) && '1' === $webarx_login ) ) { + remove_filter( 'wp_redirect', array( webarx()->hide_login, 'wp_redirect' ) ); + } + } + return $location; + } + + /** + * WebArx Compatibility Fix for site URL removal. + * + * @since 1.2.3 + * @param string $url The URL. + * @return string $url Modfied URL. + */ + public function site_url_remove_filter( $url ) { + if ( class_exists( 'Webarx' ) ) { + + if ( ! function_exists( 'is_user_logged_in' ) ) { + return $url; + } + + $webarx_login = get_option( 'webarx_mv_wp_login' ); + $user_logged_in = is_user_logged_in(); + + if ( ( isset( $user_logged_in ) && true === $user_logged_in ) && ( isset( $webarx_login ) && '1' === $webarx_login ) ) { + remove_filter('site_url', array( webarx()->hide_login, 'site_url' ) ) ; + } + } + return $url; + } + + /** + * WebArx Compatibility Fix for multi-site URL removal. + * + * @since 1.2.3 + * @param string $url The URL. + * @return string $url Modfied URL. + */ + public function network_site_url_remove_filter( $url ) { + if ( class_exists( 'Webarx' ) ) { + + if ( ! function_exists( 'is_user_logged_in' ) ) { + return $url; + } + + $webarx_login = get_option( 'webarx_mv_wp_login' ); + $user_logged_in = is_user_logged_in(); + + if ( ( isset( $user_logged_in ) && true === $user_logged_in ) && ( isset( $webarx_login ) && '1' === $webarx_login ) ) { + remove_filter('network_site_url', array( webarx()->hide_login, 'network_site_url' ) ) ; + } + } + return $url; + } + + /** + * WebArx Compatibility Fix for multi-site URL removal. + * + * @since 1.2.3 + */ + public function plugins_loaded_remove_action() { + if ( class_exists( 'Webarx' ) ) { + + if ( ! function_exists( 'is_user_logged_in' ) ) { + return; + } + + $webarx_login = get_option( 'webarx_mv_wp_login' ); + $user_logged_in = is_user_logged_in(); + + if ( ( isset( $user_logged_in ) && true === $user_logged_in ) && ( isset( $webarx_login ) && '1' === $webarx_login ) ) { + remove_action( 'plugins_loaded', array( webarx()->hide_login, 'plugins_loaded' ), 9999 ) ; + } + } + } + /** + * Remove wp_loaded action hook. + * + * @since 1.2.3 + */ + public function wp_loaded_remove_action() { + if ( class_exists( 'Webarx' ) ) { + + if ( ! function_exists( 'is_user_logged_in' ) ) { + return $url; + } + + $webarx_login = get_option( 'webarx_mv_wp_login' ); + $user_logged_in = is_user_logged_in(); + + if ( ( isset( $user_logged_in ) && true === $user_logged_in ) && ( isset( $webarx_login ) && '1' === $webarx_login ) ) { + remove_action( 'wp_loaded', array( webarx()->hide_login, 'wp_loaded' ) ); + } + } + } + /** + * Remove init action hook. + * + * @since 1.2.3 + */ + public function init_remove_action() { + if ( class_exists( 'Webarx' ) ) { + + if ( ! function_exists( 'is_user_logged_in' ) ) { + return $url; + } + + $webarx_login = get_option( 'webarx_mv_wp_login' ); + $user_logged_in = is_user_logged_in(); + + if ( ( isset( $user_logged_in ) && true === $user_logged_in ) && ( isset( $webarx_login ) && '1' === $webarx_login ) ) { + remove_action( 'init', array( webarx()->hide_login, 'denyRequestsToWpLogin' ) ) ; + } + } + } + + + /** + * Remove login security check in customizer screen only. + * No need for this check as the user is already logged in and using customizer. + * + * @since 1.4.0 + */ + public function aiowps_login_init_remove_action() { + if ( ! is_customize_preview() ) + return; + + if ( ! class_exists( 'AIO_WP_Security' ) ) + return; + + global $aio_wp_security; + + if( ! is_a( $aio_wp_security, 'AIO_WP_Security' ) ) + return; + + if( remove_action( 'wp_loaded', array( $aio_wp_security, 'aiowps_wp_loaded_handler' ) ) ) { + add_filter( 'option_aio_wp_security_configs', array( $this, 'aiowps_filter_options' ) ); + } + } + + /** + * Filter options aio_wp_security_configs. + * + * @since 1.4.0 + */ + public function aiowps_filter_options( $option ) { + + unset( $option['aiowps_enable_rename_login_page'] ); + return $option; + } + + /** + * Enqueue LoginPress CSS on Password_Protected plugin. + * + * @return void + */ + public function enqueue_loginpress_compatibility_script() { + + /** + * Enqueue LoginPress CSS on Password_Protected plugin. + * + * Hooked to the password_protected_login_head action, + * Head URL & Title on logo as well. + * + * so that it is after the script was enqueued. + * @since 1.0.3 + * @version 1.3.2 + */ + if ( class_exists( 'Password_Protected' ) ) { + add_action( 'password_protected_login_head', array( $this, 'enqueue_loginpress_script' ) ); + add_filter( 'password_protected_login_headerurl', array( $this, 'password_protected_login_headerurl_cb' ) ); + add_filter( 'password_protected_login_headertitle', array( $this, 'password_protected_login_headertitle_cb' ) ); + } + } + + /** + * Enqueue the Divi Login script. + * + * @since 1.0.3 + */ + public function dequeue_conflicted_script() { + + /** + * Dequeue the Divi Login script. + * + * Hooked to the wp_print_scripts action, with a late priority (100), + * so that it is after the script was enqueued. + * @since 1.0.3 + */ + if ( class_exists( 'ET_Divi_100_Custom_Login_Page_Config' ) ) { + wp_dequeue_style( 'custom-login-pages' ); + wp_dequeue_script( 'custom-login-pages-icon-font' ); + wp_dequeue_script( 'custom-login-pages-scripts' ); + } + } + + /** + * Remove the Divi login_footer hook 'print_styles'. + * + * @since 1.0.3 + */ + public function remove_conflicted_action() { + + /** + * Remove the Divi login_footer hook 'print_styles' + * So that conflict is removed. + * + * @since 1.0.3 + */ + if ( class_exists( 'ET_Divi_100_Custom_Login_Page_Config' ) ) { + + remove_action( 'login_footer', array( ET_Divi_100_Custom_Login_Page::instance(), 'print_styles' ) ); + } + } + + /** + * Include LoginPress CSS for Support with other plugins. + * + * @since 1.0.3 + */ + public function enqueue_loginpress_script() { + + include( LOGINPRESS_DIR_PATH . 'css/style-presets.php' ); + include( LOGINPRESS_DIR_PATH . 'css/style-login.php' ); + } + + /** + * Password protected plugin compatibility with logo url. + * + * @since 1.3.1 + * @version 1.3.2 + */ + public function password_protected_login_headerurl_cb() { + + $logo_url = $this->loginpress_key && isset( $this->loginpress_key['customize_logo_hover'] ) && ! empty( $this->loginpress_key['customize_logo_hover'] ) ? $this->loginpress_key['customize_logo_hover'] : home_url( '/' ); + + return $logo_url; + } + + /** + * Password protected plugin compatibility with logo title. + * + * @since 1.3.2 + */ + public function password_protected_login_headertitle_cb() { + + $logo_title = $this->loginpress_key && isset( $this->loginpress_key['customize_logo_hover_title'] ) && ! empty( $this->loginpress_key['customize_logo_hover_title'] ) ? $this->loginpress_key['customize_logo_hover_title'] : get_bloginfo( 'name' ); + + return $logo_title; + } + } +endif; + +new LoginPress_Compatibility; diff --git a/wp-content/plugins/loginpress/include/create-loginpress-page.php b/wp-content/plugins/loginpress/include/create-loginpress-page.php new file mode 100644 index 0000000..2ced0eb --- /dev/null +++ b/wp-content/plugins/loginpress/include/create-loginpress-page.php @@ -0,0 +1,212 @@ +_init(); + $this->_hooks(); + } + + function _hooks(){ + add_action( 'wpmu_new_blog', array( $this, 'loginpress_new_site_created' ), 10, 6 ); + } + + public function _init(){ + global $wpdb; + + if ( ! current_user_can( 'activate_plugins' ) ) { + return; + } + + if ( is_multisite() ) { + + foreach ( $wpdb->get_col( "SELECT blog_id FROM $wpdb->blogs LIMIT 100" ) as $blog_id ) { + switch_to_blog( $blog_id ); + $this->loginpress_run_install(); + restore_current_blog(); + } + + } else { + $this->loginpress_run_install(); + } + } + + /** + * Run the LoginPress install process + * + * @return void + */ + public function loginpress_run_install() { + + /* translators: 1: Name of this plugin */ + $post_content = sprintf( __( '

This page is used by %1$s to preview the login page in the Customizer.

', 'loginpress' ), 'LoginPress' ); + + $pages = apply_filters( + 'loginpress_create_pages', array( + 'loginpress' => array( + 'name' => _x( 'loginpress', 'Page slug', 'loginpress' ), + 'title' => _x( 'LoginPress', 'Page title', 'loginpress' ), + 'content' => $post_content, + ), + ) + ); + + foreach ( $pages as $key => $page ) { + $this->loginpress_create_page( esc_sql( $page['name'] ), 'loginpress_page', $page['title'], $page['content'] ); + } + } + + /** + * Create a page and store the ID in an option. + * + * @param mixed $slug Slug for the new page. + * @param string $option Option name to store the page's ID. + * @param string $page_title (default: '') Title for the new page. + * @param string $page_content (default: '') Content for the new page. + * @return int page ID + */ + public function loginpress_create_page( $slug, $option = '', $page_title = '', $page_content = '' ) { + global $wpdb; + + // Set up options. + $options = array(); + + // Pull options from WP. + $loginpress_setting = get_option( 'loginpress_setting', array() ); + if ( ! is_array( $loginpress_setting ) && empty( $loginpress_setting ) ) { + $loginpress_setting = array(); + } + $option_value = array_key_exists( 'loginpress_page', $loginpress_setting ) ? $loginpress_setting['loginpress_page'] : false; + + if ( $option_value > 0 && ( $page_object = get_post( $option_value ) ) ) { + if ( 'page' === $page_object->post_type && ! in_array( $page_object->post_status, array( 'pending', 'trash', 'future', 'auto-draft' ), true ) ) { + // Valid page is already in place. + return $page_object->ID; + } + } + + // Search for an existing page with the specified page slug. + $loginpress_page_found = $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_type='page' AND post_status NOT IN ( 'pending', 'trash', 'future', 'auto-draft' ) AND post_name = %s LIMIT 1;", $slug ) ); + + $loginpress_page_found = apply_filters( 'loginpress_create_page_id', $loginpress_page_found, $slug, $page_content ); + + if ( $loginpress_page_found ) { + + if ( $option ) { + + $options['loginpress_page'] = $loginpress_page_found; + $loginpress_page_found = isset( $page_id ) ? $loginpress_page_found : $option_value; + $merged_options = array_merge( $loginpress_setting, $options ); + $loginpress_setting = $merged_options; + + update_option( 'loginpress_setting', $loginpress_setting ); + } + return $loginpress_page_found; + } + + // Search for an existing page with the specified page slug. + $loginpress_trashed_found = $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_type='page' AND post_status = 'trash' AND post_name = %s LIMIT 1;", $slug ) ); + + if ( $loginpress_trashed_found ) { + $page_id = $loginpress_trashed_found; + $page_data = array( + 'ID' => $page_id, + 'post_status' => 'publish', + ); + + wp_update_post( $page_data ); + + } else { + + $page_data = array( + 'post_status' => 'publish', + 'post_type' => 'page', + 'post_author' => 1, + 'post_name' => $slug, + 'post_title' => $page_title, + 'post_content' => $page_content, + 'comment_status' => 'closed', + ); + + $page_id = wp_insert_post( $page_data ); + } + + if ( $option ) { + + $options['loginpress_page'] = $page_id; + $page_id = isset( $page_id ) ? $page_id : $option_value; + $merged_options = array_merge( $loginpress_setting, $options ); + $loginpress_setting = $merged_options; + + update_option( 'loginpress_setting', $loginpress_setting ); + } + + // Assign the LoginPress template. + $this->loginpress_attach_template_to_page( $page_id, 'template-loginpress.php' ); + + return $page_id; + } + + /** + * Attaches the specified template to the page identified by the specified name. + * + * @param int|int $page The id of the page to attach the template. + * @param int|int $template The template's filename (assumes .php' is specified). + * + * @returns -1 if the page does not exist; otherwise, the ID of the page. + */ + public function loginpress_attach_template_to_page( $page, $template ) { + + // Only attach the template if the page exists. + if ( -1 !== $page ) { + update_post_meta( $page, '_wp_page_template', $template ); + } + + return $page; + } + + /** + * When a new Blog is created in multisite, check if LoginPress is network activated, and run the installer + * + * @param int|int $blog_id The Blog ID created. + * @param int|int $user_id The User ID set as the admin. + * @param string $domain The URL. + * @param string $path Site Path. + * @param int|int $site_id The Site ID. + * @param array|array $meta Blog Meta. + * @return void + */ + public function loginpress_new_site_created( $blog_id, $user_id, $domain, $path, $site_id, $meta ) { + + if ( is_plugin_active_for_network( plugin_basename( LOGINPRESS_ROOT_FILE ) ) ) { + + switch_to_blog( $blog_id ); + $this->_init(); + restore_current_blog(); + + } + } + } + +endif; +?> diff --git a/wp-content/plugins/loginpress/include/customizer-strings.php b/wp-content/plugins/loginpress/include/customizer-strings.php new file mode 100644 index 0000000..daeebba --- /dev/null +++ b/wp-content/plugins/loginpress/include/customizer-strings.php @@ -0,0 +1,189 @@ + 0, 'max' => 500, 'step' => 1, 'suffix' => 'px' ), + array( 'min' => 0, 'max' => 500, 'step' => 1, 'suffix' => 'px' ), + array( 'min' => 0, 'max' => 100, 'step' => 1, 'suffix' => 'px' ) +); +$logo_range_unit = array( 'px', 'px', 'px' ); + +/** + * Customizer strings for the grouping control. + * @since 1.1.3 + */ +$group_control = array( 'login_input_group', 'login_label_group', 'login_form_group', 'footer_form_group', 'footer_back_group', 'footer_group', 'bg_image_group', 'bg_video_group', 'logo_group', 'login_page_meta_group' ); +$group_label = array( + __( 'Input Fields:', 'loginpress'), + __( 'Input Field Labels:', 'loginpress'), + __( 'Login Form:', 'loginpress'), + __( 'Lost Your Password Text', 'loginpress' ), + __( 'Back To Site Text', 'loginpress' ), + __( 'LoginPress Footer Text', 'loginpress' ), + __( 'Background Image', 'loginpress' ), + __( 'Background Video', 'loginpress' ), + __( 'Form Logo', 'loginpress' ), + __( 'Login Page Meta', 'loginpress' ) +); +$group_info = array( + __( 'This section helps you to easily Customize the login form input field elements.', 'loginpress' ), + __( 'This section helps you to easily Customize the login form input field labels.', 'loginpress' ), + __( 'This section helps you to easily Customize the login form elements whether they are form labels, fields or backgrounds.', 'loginpress' ), + __( ' Customize the "Lost your password" and "Register" text section under the form.', 'loginpress' ), + __( 'Customize the "Back to" text section under the form.', 'loginpress' ), + __( 'Customize the copyright note and branding sections at the footer of login page.', 'loginpress' ), + __( 'Customize the background Image.', 'loginpress' ), + __( 'Customize the background Video.', 'loginpress' ), + __( 'Customize the form logo.', 'loginpress' ), + __( 'Customize the login page meta tags.', 'loginpress' ) +); +/** ------------------Grouping Control-------------------- */ + +/** + * [ Customizer strings for the section login form. ] + * @since 1.1.3 + */ +$form_range_control = array( 'customize_form_width', 'customize_form_height', 'customize_form_radius', 'customize_form_shadow', 'customize_form_opacity', 'textfield_width', 'textfield_radius', 'textfield_shadow', 'textfield_shadow_opacity', 'customize_form_label', 'remember_me_font_size' ); +$form_range_default = array( '350', '200', '0', '0', '0', '100', '0', '0', '80', '14', '13' ); +$form_range_label = array( + __( 'Form Width:', 'loginpress' ), + __( 'Form Minimum Height:', 'loginpress' ), + __( 'Form Radius:', 'loginpress' ), + __( 'Form Shadow:', 'loginpress' ), + __( 'Form Shadow Opacity:', 'loginpress' ), + __( 'Input Text Field Width:', 'loginpress' ), + __( 'Input Text Field Radius:', 'loginpress' ), + __( 'Input Text Field Shadow:', 'loginpress' ), + __( 'Input Text Field Shadow Opacity:', 'loginpress' ), + __( 'Input Field Label Font Size:', 'loginpress' ), + __( 'Remember Me Font Size:', 'loginpress' ) ); +$form_range_attrs = array( + array( 'min' => 320, 'max' => 800, 'step' => 1, 'suffix' => 'px' ), // form width + array( 'min' => 0, 'max' => 500, 'step' => 1, 'suffix' => 'px' ), // form height + array( 'min' => 0, 'max' => 100, 'step' => 1, 'suffix' => 'px' ), // form radius + array( 'min' => 0, 'max' => 30, 'step' => 1, 'suffix' => 'px' ), // form shadow + array( 'min' => 0, 'max' => 100, 'step' => 1, 'suffix' => '%' ), // form Opacity + array( 'min' => 0, 'max' => 100, 'step' => 1, 'suffix' => '%' ), // textfield width + array( 'min' => 0, 'max' => 30, 'step' => 1, 'suffix' => 'px' ), // textfield radius + array( 'min' => 0, 'max' => 30, 'step' => 1, 'suffix' => 'px' ), // textfield shadow + array( 'min' => 0, 'max' => 100, 'step' => 1, 'suffix' => '%' ), // textfield Opacity + array( 'min' => 9, 'max' => 30, 'step' => 1, 'suffix' => 'px' ), // textfield label + array( 'min' => 9, 'max' => 30, 'step' => 1, 'suffix' => 'px' ) // readme label +); +$form_range_unit = array( 'px', 'px', 'px', 'px', '%', '%', 'px', 'px', '%', 'px', 'px' ); +//-------------------- +$form_color_control = array( 'form_background_color', 'textfield_background_color', 'textfield_color', 'textfield_label_color', 'remember_me_label_size' ); +$form_color_default = array( '#FFF', '#FFF', '#333', '#777', '#72777c' ); +$form_color_label = array( + __( 'Form Background Color:', 'loginpress' ), + __( 'Input Field Background Color:', 'loginpress' ), + __( 'Input Field Text Color:', 'loginpress' ), + __( 'Input Field Label Color:', 'loginpress' ), + __( 'Remember me Label Color:', 'loginpress' ), +); +//-------------------- +$form_control = array( 'customize_form_padding', 'customize_form_border', 'textfield_margin', 'form_username_label', 'form_password_label' ); +$form_default = array( '', '', '2px 6px 18px 0px', __( 'Username or Email Address', 'loginpress' ), __( 'Password', 'loginpress' ) ); +$form_label = array( + __( 'Form Padding:', 'loginpress' ), + __( 'Border (Example: 2px dotted black):', 'loginpress' ), + __( 'Input Text Field Margin:', 'loginpress' ), + __( 'Username Label:', 'loginpress' ), + __( 'Password Label:', 'loginpress' ), +); +$form_sanitization = array( 'wp_strip_all_tags', 'wp_strip_all_tags', 'wp_strip_all_tags', 'wp_strip_all_tags', 'wp_strip_all_tags' ); +/** -----------------Section Login Form------------------ */ + +/** + * [ Customizer strings for the section button beauty. ] + * @since 1.1.3 + * @version 1.4.3 + */ + $button_control = array( 'custom_button_color', 'button_border_color', 'button_hover_color', 'button_hover_border', 'custom_button_shadow', 'button_text_color', 'button_hover_text_color' ); + $button_default = array( '#F6366A', '#F6366A', '#1E8CBE', '#0074A2', '#78C8E6', '#FFF', '#FFF' ); + $button_label = array( + __( 'Button Color:', 'loginpress' ), + __( 'Button Border Color:', 'loginpress' ), + __( 'Button Color (Hover):', 'loginpress' ), + __( 'Button Border (Hover):', 'loginpress' ), + __( 'Button Box Shadow:', 'loginpress' ), + __( 'Button Text Color:', 'loginpress' ), + __( 'Button Text Color (Hover):', 'loginpress' ) + ); + +$button_range_control = array( 'login_button_size', 'login_button_top', 'login_button_bottom', 'login_button_radius', 'login_button_shadow', 'login_button_shadow_opacity', 'login_button_text_size' ); +$button_range_default = array( '100', '13', '13', '5', '0', '80', '15' ); +$button_range_label = array( __( 'Button Size:', 'loginpress' ), __( 'Button Top Padding:', 'loginpress' ), __( 'Button Bottom Padding:', 'loginpress' ), __( 'Radius:', 'loginpress' ), __( 'Shadow:', 'loginpress' ), __( 'Shadow Opacity:', 'loginpress' ), __( 'Text Size:', 'loginpress' ) ); +$button_range_attrs = array( + array( 'min' => 20, 'max' => 100, 'step' => 1, 'suffix' => '%' ), + array( 'min' => 0, 'max' => 30, 'step' => 1, 'suffix' => 'px' ), + array( 'min' => 0, 'max' => 30, 'step' => 1, 'suffix' => 'px' ), + array( 'min' => 0, 'max' => 50, 'step' => 1, 'suffix' => 'px' ), + array( 'min' => 0, 'max' => 30, 'step' => 1, 'suffix' => 'px' ), + array( 'min' => 0, 'max' => 100, 'step' => 1, 'suffix' => 'px' ), + array( 'min' => 7, 'max' => 35, 'step' => 1, 'suffix' => 'px' ), +); +$button_range_unit = array( '%', 'px', 'px', 'px', 'px', '%', 'px' ); +/** -----------------Section Button Beauty------------------ */ + +/** + * [ Customizer strings for the group close. ] + * @since 1.1.3 + */ +$close_control = array( 'login_input_br', 'login_label_br', 'login_form_br', 'footer_form_br', 'footer_back_br', 'footer_br' ); +/** -----------------Section Login Footer------------------ */ + +/** + * [ Customizer strings for the error messages. ] + * @since 1.1.22 + */ +$error_control = array( 'incorrect_username', 'incorrect_password', 'empty_username', 'empty_password', 'invalid_email', 'empty_email', 'username_exists', 'email_exists', 'invalidcombo_message','force_email_login', 'password_mismatch' ); +$error_default = array( + sprintf( __( '%1$sError:%2$s Invalid Username.', 'loginpress' ), '', '' ), sprintf( __( '%1$sError:%2$s Invalid Password.', 'loginpress' ), '', '' ), + sprintf( __( '%1$sError:%2$s The username field is empty.', 'loginpress' ), '', '' ), + sprintf( __( '%1$sError:%2$s The password field is empty.', 'loginpress' ), '', '' ), + sprintf( __( '%1$sError:%2$s The email address isn\'t correct..', 'loginpress' ), '', '' ), + sprintf( __( '%1$sError:%2$s Please type your email address.', 'loginpress' ), '', '' ), + sprintf( __( '%1$sError:%2$s This username is already registered. Please choose another one.', 'loginpress' ), '', '' ), + sprintf( __( '%1$sError:%2$s This email is already registered, please choose another one.', 'loginpress' ), '', '' ), + sprintf( __( '%1$sError:%2$s Invalid username or email.', 'loginpress' ), '', '' ), + sprintf( __( '%1$sError:%2$s Invalid Email Address', 'loginpress' ), '', '' ), + sprintf( __( '%1$sError:%2$s Passwords Don\'t match.', 'loginpress' ), '', '' ), +); + + $error_label = array( + __( 'Incorrect Username Message:', 'loginpress' ), + __( 'Incorrect Password Message:', 'loginpress' ), + __( 'Empty Username Message:', 'loginpress' ), + __( 'Empty Password Message:', 'loginpress' ), + __( 'Invalid Email Message:', 'loginpress' ), + __( 'Empty Email Message:', 'loginpress' ), + __( 'Username Already Exist Message:','loginpress' ), + __( 'Email Already Exist Message:', 'loginpress' ), + __( 'Forget Password Message:', 'loginpress' ), + __( 'Login with Email Message:', 'loginpress' ), + __( 'Passwords Don\'t match:', 'loginpress' ), + +); +/** -----------------Error Section------------------ */ + +/** + * [ Customizer strings for the welcome messages. ] + * @since 1.1.22 + */ +$welcome_control = array( 'lostpwd_welcome_message', 'welcome_message', 'register_welcome_message', 'logout_message', 'message_background_border' ); +$welcome_default = array( 'Forgot password?', 'Welcome', 'Register For This Site', 'Logout', '' ); +$welcome_label = array( + __( 'Welcome Message on Lost Password:', 'loginpress' ), + __( 'Welcome Message on Login Page:', 'loginpress' ), + __( 'Welcome Message on Registration:', 'loginpress' ), + __( 'Logout Message:', 'loginpress' ), + __( 'Message Field Border: ( Example: 1px solid #00a0d2; )', 'loginpress' ), +); +$welcome_sanitization = array( 'wp_kses_post', 'wp_kses_post', 'wp_kses_post', 'wp_kses_post', 'wp_strip_all_tags' ); diff --git a/wp-content/plugins/loginpress/include/customizer-validation.php b/wp-content/plugins/loginpress/include/customizer-validation.php new file mode 100644 index 0000000..2c40588 --- /dev/null +++ b/wp-content/plugins/loginpress/include/customizer-validation.php @@ -0,0 +1,168 @@ +get_control() https://developer.wordpress.org/reference/classes/wp_customize_manager/get_control/ + * + * @param string $input Slug to sanitize. + * @param WP_Customize_Setting $setting Setting instance. + * @return string Sanitized slug if it is a valid choice; otherwise, the setting default. + */ +function loginpress_sanitize_select( $input, $setting ) { + + // Ensure input is a slug. + $input = sanitize_key( $input ); + + // Get list of choices from the control associated with the setting. + $choices = $setting->manager->get_control( $setting->id )->choices; + + // If the input is a valid key, return it; otherwise, return the default. + return ( array_key_exists( $input, $choices ) ? $input : $setting->default ); +} + +/** + * Image sanitization callback example. + * + * Checks the image's file extension and mime type against a whitelist. If they're allowed, + * send back the filename, otherwise, return the setting default. + * + * - Sanitization: image file extension + * - Control: text, WP_Customize_Image_Control + * + * @see wp_check_filetype() https://developer.wordpress.org/reference/functions/wp_check_filetype/ + * + * @param string $image Image filename. + * @param WP_Customize_Setting $setting Setting instance. + * @return string The image filename if the extension is allowed; otherwise, the setting default. + * + * @since 1.1.17 + * + * @version 3.0.0 + */ +function loginpress_sanitize_image( $image, $setting ) { + + /** + * Array of valid image file types. + * + * The array includes image mime types that are included in wp_get_mime_types() + */ + $mimes = array( + 'jpg|jpeg|jpe' => 'image/jpeg', + 'gif' => 'image/gif', + 'png' => 'image/png', + 'bmp' => 'image/bmp', + 'tif|tiff' => 'image/tiff', + 'ico' => 'image/x-icon', + ); + + // Allowed svg mime type in version 1.2.2 + $allowed_mime = get_allowed_mime_types(); + + /** + * Filter the list of mime types that are allowed for uploads. + * + * @since 1.6.1 + */ + $extra_mimes = array( + 'svg' => 'image/svg+xml', // Allowed svg mime type in version 1.2.2 + 'webp' => 'image/webp', // Allowed webp mime type in version 1.6.1 + ); + + foreach ( $extra_mimes as $key => $value ) { + $mime_check = isset( $allowed_mime[ $key ] ) ? true : false; + if ( $mime_check ) { + $allow_mime = array( $key => $value ); + $mimes = array_merge( $mimes, $allow_mime ); + } + } + + $file_type = false; + + /** + * Return an array with file extension and mime_type. + * + * @since 3.0.0 + * @version 3.0.3 + */ + if ( ! empty( $image ) ) { + + // Return an array with file extension and mime_type. + $file = wp_check_filetype( $image, $mimes ); + + // If $image has a valid mime_type, return it; otherwise, return the default. + return ( $file['ext'] ? $image : loginpress_image_content_type( $image, $mimes, $setting ) ); + } + + return $setting->default; +} + +/** + * If CDN is being used get sanitization option. + * + * @param string $image The image URL. + * @param array $mimes The mime type allowed. + * @param object $setting The settings object. + * + * @version 3.0.2 + * @return mixed The images based on content type. + */ +function loginpress_image_content_type( $image, $mimes, $setting ) { + $headers = get_headers( $image, 1 ); + $content_type = false; + $file_type = false; + $content_types_can = ['Content-Type', 'content-type']; + foreach ( $content_types_can as $type ) { + if ( isset( $headers[$type] ) && !empty( $headers[$type] ) ) { + $content_type = $headers[$type]; + break; + } + } + + if ( $content_type ) { + + $file_type = $content_type ? in_array( $content_type, $mimes ) : false; + + if ( is_array( $content_type ) ) { + foreach ( $content_type as $type ) { + $file_type = $type ? in_array( $type, $mimes ) : false; + if ( $file_type ) { + break; + } + } + } + } + + // If $image has a valid mime_type, return it; otherwise, return the default. + return ( $file_type ? $image : $setting->default ); +} diff --git a/wp-content/plugins/loginpress/include/deactivate_modal.php b/wp-content/plugins/loginpress/include/deactivate_modal.php new file mode 100644 index 0000000..fb26e2f --- /dev/null +++ b/wp-content/plugins/loginpress/include/deactivate_modal.php @@ -0,0 +1,483 @@ + + +
+
+
+
+

+
+
+

+ +
    +
  • + +
    +
  • +
  • + +
    +
  • +
  • + +
    +
    +
  • +
  • + +
    +
  • +
  • + +
    +
  • +
  • + +
    +
  • +
  • + +
    +
  • +
  • + +
    +
    +
  • +
+
+ +
+
+
+ diff --git a/wp-content/plugins/loginpress/include/login-footer.php b/wp-content/plugins/loginpress/include/login-footer.php new file mode 100644 index 0000000..5e5a635 --- /dev/null +++ b/wp-content/plugins/loginpress/include/login-footer.php @@ -0,0 +1,27 @@ + + + diff --git a/wp-content/plugins/loginpress/include/loginpress-import-export.php b/wp-content/plugins/loginpress/include/loginpress-import-export.php new file mode 100644 index 0000000..8e1e108 --- /dev/null +++ b/wp-content/plugins/loginpress/include/loginpress-import-export.php @@ -0,0 +1,49 @@ + +
+

+
+ + + + + + + + + + + +
+ + +
Upload File
+ + + + + + + +

+
+ + + + + + + + +

+
+
diff --git a/wp-content/plugins/loginpress/include/loginpress-optin-form.php b/wp-content/plugins/loginpress/include/loginpress-optin-form.php new file mode 100644 index 0000000..cd4b67f --- /dev/null +++ b/wp-content/plugins/loginpress/include/loginpress-optin-form.php @@ -0,0 +1,490 @@ + + +user_firstname ) ? $user->display_name : $user->user_firstname; +$email = $user->user_email; +$site_link = ''. get_site_url() . ''; +$website = get_site_url(); +$nonce = wp_create_nonce( 'loginpress_submit_optin_nonce' ); +$default_login_press_redirect = 'loginpress-settings'; + +/** + * XSS Attack fix in the opt-in form. + * + * @since 1.5.12 + * @version 3.0.0 + */ +if ( isset( $_GET['redirect-page'] ) ) { + $default_login_press_redirect = esc_attr( sanitize_text_field( wp_unslash( $_GET['redirect-page'] ) ) ); + +} +echo LoginPress_Settings::loginpress_admin_page_header(); +echo '
'; +echo ""; +echo ""; +echo '
'; +echo '

' . esc_html__( 'Welcome to LoginPress', 'loginpress' ) . '

'; +echo '
'; +echo '
'; + +if ( get_option( '_loginpress_optin' ) == 'no' || ! get_option( '_loginpress_optin' ) ) { + echo "
"; + echo sprintf ( __( '%1$s Hey %2$s, %4$s If you opt-in some data about your installation of LoginPress will be sent to WPBrigade.com (This doesn\'t include stats)%4$s and You will receive new feature updates, security notifications etc %5$sNo Spam, I promise.%6$s %4$s%4$s Help us %7$sImprove LoginPress%8$s %4$s %4$s ', 'loginpress' ), '

', '' . $name . '', '' . $website . '', '
', '', '', '', '' ) . '

'; + echo "
"; + echo ""; + echo '
'; + echo '' . __( 'What permissions are being granted?', 'loginpress' ) . ''; + echo ''; + echo '
'; + echo '
'; + } + +echo '
'; +echo '
'; +echo '
'; +echo '
'; +?> + + diff --git a/wp-content/plugins/loginpress/include/loginpress-optout-form.php b/wp-content/plugins/loginpress/include/loginpress-optout-form.php new file mode 100644 index 0000000..0525053 --- /dev/null +++ b/wp-content/plugins/loginpress/include/loginpress-optout-form.php @@ -0,0 +1,161 @@ + + +
+
+
+

+
+
+
+ +

+ +

', '') ?>

+

', '' ); ?>

+
+
+ +
+
+ diff --git a/wp-content/plugins/loginpress/include/loginpress-static-addons.php b/wp-content/plugins/loginpress/include/loginpress-static-addons.php new file mode 100644 index 0000000..ee5eb11 --- /dev/null +++ b/wp-content/plugins/loginpress/include/loginpress-static-addons.php @@ -0,0 +1,260 @@ + + + + + + + + + + + + + + $action, 'plugin' => sanitize_text_field( $slug ) ), admin_url( 'update.php' ) ), $action . '_' .sanitize_text_field( $slug ) ); + ?> + + + + + + + + + + + +
+
+ +

+
+

+ _ajax_response('Login Logout Menu', 'login-logout-menu' ); ?> +
+ + +
+ +

+
+

+ _ajax_response('Login Redirects', 'loginpress-login-redirects' ); ?> +
+ + +
+ +

+
+

+

+ _ajax_response('Social Login', 'loginpress-social-login' ); ?> +

+ + +
+ +

+
+

+

+ _ajax_response('Login Widget', 'loginpress-login-widget' ); ?> +

+ + +
+ +

+
+

+ _ajax_response('Limit Login Attempts', 'loginpress-limit-login-attempts' ); ?> +
+ + +
+ +

+
+

+ _ajax_response('Auto Login', 'loginpress-auto-login' ); ?> +
+ + +
+ +

+
+

+ _ajax_response('Limit Login Attempts', 'loginpress-hide-login' ); ?> +
+ +
+ + +
+
+ + +

+
+ +

+ _ajax_response('Login Logout Menu', 'login-logout-menu' ); ?> + +
+ +
+ + +

+
+ +

+

+ +

+
+ +
+ + +

+
+ +

+

+ +

+
+ +
+ + +

+
+ +

+

+ +

+ +
+ +
+ + +

+
+ +

+

+ +

+
+ +
+ + +

+
+ +

+

+ +

+
+ +
+ + +

+
+ +

+

+ +

+
+
+ ', '' ) ); ?> +

+ +

+ add( 'policy_error', "ERROR: Please accept the privacy policy." ); + return $errors; + endif; + return $errors; +} + +// Lastly, save our extra registration user meta. +// add_action( 'user_register', 'loginpress_privacy_policy_save' ); + +function loginpress_privacy_policy_save( $user_id ) { + + if ( isset( $_POST['lp_privacy_policy'] ) ) + update_user_meta( $user_id, 'lp_privacy_policy', $_POST['lp_privacy_policy'] ); +} diff --git a/wp-content/plugins/loginpress/include/template-loginpress.php b/wp-content/plugins/loginpress/include/template-loginpress.php new file mode 100644 index 0000000..17c54ca --- /dev/null +++ b/wp-content/plugins/loginpress/include/template-loginpress.php @@ -0,0 +1,678 @@ +get_loginpress_page(); + + $page = get_permalink( $loginpress_page ); + + // Generate the redirect url. + $url = add_query_arg( + array( + 'autofocus[panel]' => 'loginpress_panel', + 'return' => admin_url( 'index.php' ), + 'url' => rawurlencode( $page ), + ), + admin_url( 'customize.php' ) + ); + + wp_safe_redirect( $url ); +} + + /** Make sure that the WordPress bootstrap has run before continuing. */ + require( ABSPATH . '/wp-load.php' ); + + // Redirect to https login if forced to use SSL + if ( force_ssl_admin() && ! is_ssl() ) { + if ( 0 === strpos($_SERVER['REQUEST_URI'], 'http') ) { + wp_redirect( set_url_scheme( $_SERVER['REQUEST_URI'], 'https' ) ); + exit(); + } else { + wp_redirect( 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] ); + exit(); + } + } + +/** +* Output the login page header. +* +* @param string $title Optional. WordPress login Page title to display in the `` element. +* Default 'Log In'. +* @param string $message Optional. Message to display in header. Default empty. +* @param WP_Error $wp_error Optional. The error to pass. Default empty. +*/ +function login_header( $title = 'Log In', $message = '', $wp_error = '' ) { + global $error, $interim_login, $action; + + // Don't index any of these forms + add_action( 'login_head', 'wp_no_robots' ); + + add_action( 'login_head', 'wp_login_viewport_meta' ); + + if ( empty($wp_error) ) + $wp_error = new WP_Error(); + + $login_title = get_bloginfo( 'name', 'display' ); + + /* translators: Login screen title. 1: Login screen name, 2: Network or site name */ + $login_title = sprintf( __( '%1$s ‹ %2$s — WordPress' ), $title, $login_title ); + + /** + * Filters the title tag content for login page. + * + * @since 4.9.0 + * + * @param string $login_title The page title, with extra context added. + * @param string $title The original page title. + */ + $login_title = apply_filters( 'login_title', $login_title, $title ); + + ?><!DOCTYPE html> + <!--[if IE 8]> + <html xmlns="http://www.w3.org/1999/xhtml" class="ie8" <?php language_attributes(); ?>> + <![endif]--> + <!--[if !(IE 8) ]><!--> + <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>> + <!--<![endif]--> + <head> + <title><?php echo $login_title; ?> + + + + + + + site_name; + } else { + $login_header_url = __( 'https://wordpress.org/' ); + $login_header_title = __( 'Powered by WordPress' ); + } + + /** + * Filters link URL of the header logo above login form. + * + * @since 2.1.0 + * + * @param string $login_header_url Login header logo URL. + */ + $login_header_url = apply_filters( 'login_headerurl', $login_header_url ); + + /** + * Filters the title attribute of the header logo above login form. + * + * @since 2.1.0 + * + * @param string $login_header_title Login header logo title attribute. + */ + $login_header_title = apply_filters( 'login_headertitle', $login_header_title ); + + /* + * To match the URL/title set above, Multisite sites have the blog name, + * while single sites get the header title. + */ + if ( is_multisite() ) { + $login_header_text = get_bloginfo( 'name', 'display' ); + } else { + $login_header_text = $login_header_title; + } + + ?> +
+

+ add('error', $error); + unset($error); + } + + if ( $wp_error->get_error_code() ) { + $errors = ''; + $messages = ''; + foreach ( $wp_error->get_error_codes() as $code ) { + $severity = $wp_error->get_error_data( $code ); + foreach ( $wp_error->get_error_messages( $code ) as $error_message ) { + if ( 'message' == $severity ) + $messages .= ' ' . $error_message . "
\n"; + else + $errors .= ' ' . $error_message . "
\n"; + } + } + if ( ! empty( $errors ) ) { + /** + * Filters the error messages displayed above the login form. + * + * @since 2.1.0 + * + * @param string $errors Login error message. + */ + echo '
' . apply_filters( 'login_errors', $errors ) . "
\n"; + } + if ( ! empty( $messages ) ) { + /** + * Filters instructional messages displayed above the login form. + * + * @since 2.5.0 + * + * @param string $messages Login messages. + */ + echo '

' . apply_filters( 'login_messages', $messages ) . "

\n"; + } + } +} // End of login_header() + +/** + * Outputs the footer for the login page. + * + * @since 3.0.5 + * + * @global bool|string $interim_login Whether interim login modal is being displayed. String 'success' + * upon successful login. + * + * @param string $input_id Which input to auto-focus. + */ +function login_footer( $input_id = '' ) { + global $interim_login; + + // Don't allow interim logins to navigate away from the page. + if ( ! $interim_login ) { + ?> +

+ %s', + esc_url( home_url( '/' ) ), + sprintf( + /* translators: %s: Site title. */ + _x( '← Go to %s', 'site' ), + get_bloginfo( 'title', 'display' ) + ) + ); + /** + * Filters the "Go to site" link displayed in the login page footer. + * + * @since 5.7.0 + * + * @param string $link HTML link to the home URL of the current site. + */ + echo apply_filters( 'login_site_html_link', $html_link ); + ?> +

+ + + ', '
' ); + } + + ?> + . ?> + + +
+
+ + + + 'language-switcher-locales', + 'name' => 'wp_lang', + 'selected' => determine_locale(), + 'show_available_translations' => false, + 'explicit_option_en_us' => true, + 'languages' => $languages, + ); + + /** + * Filters default arguments for the Languages select input on the login screen. + * + * The arguments get passed to the wp_dropdown_languages() function. + * + * @since 5.9.0 + * + * @param array $args Arguments for the Languages select input on the login screen. + */ + wp_dropdown_languages( apply_filters( 'login_language_dropdown_args', $args ) ); + ?> + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + ' . __('Please enter your username or email address. You will receive a link to create a new password via email.') . '

', $errors); + + $user_login = ''; + + if ( isset( $_POST['user_login'] ) && is_string( $_POST['user_login'] ) ) { + $user_login = wp_unslash( $_POST['user_login'] ); + } + + ?> + +
+

+ +

+ + +

+
+ + + + ' . __('Register For This Site') . '

', $errors); + ?> +
+

+ +

+

+ +

+ +

+
+ +

+ +

+
+ + + + + +
+

+ +

+

+ +

+ +

+ +

+

+ +

+
+ + + + Unlock Premium Feature' ).insertAfter($(".enable_recaptcha_promo").closest('tr')); + + var promotion = $('#wpb-loginpress_setting\\[enable_recaptcha_promo\\]'); + if (promotion.is(":checked")) { + $('tr.recaptcha-promo-img').show(); + } + + var privacy_editor = $('#wpb-loginpress_setting\\[enable_privacy_policy\\]'); + if (privacy_editor.is(":checked")) { + $('tr.privacy_policy').show(); + } + + loginPressForceChangePasswordSettings(); + + }); // Window on load. + + $('.loginpress-log-file').on('click', function(event) { + + event.preventDefault(); + + $.ajax({ + + url: ajaxurl, + type: 'POST', + data: { + action: 'loginpress_help', + security: loginpress_script.help_nonce, + }, + beforeSend: function() { + $(".log-file-sniper").show(); + }, + success: function(response) { + + $(".log-file-sniper").hide(); + $(".log-file-text").show(); + + if (!window.navigator.msSaveOrOpenBlob) { // If msSaveOrOpenBlob() is supported, then so is msSaveBlob(). + $("", { + "download": "loginpress-log.txt", + "href": "data:text/plain;charset=utf-8," + + encodeURIComponent(response), + }).appendTo("body") + .click(function() { + $(this).remove() + })[0].click() + } else { + var blobObject = new Blob([response]); + window.navigator.msSaveBlob(blobObject, + 'loginpress-log.txt'); + } + setTimeout(function() { + $(".log-file-text").fadeOut() + }, 3000); + } + }); + + }); + + $('.loginpress-export').on('click', function(event) { + + event.preventDefault(); + + var dateObj = new Date(); + var month = dateObj.getUTCMonth() + 1; //months from 1-12 + var day = dateObj.getUTCDate(); + var year = dateObj.getUTCFullYear(); + var newdate = year + "-" + month + "-" + day; + var export_nonce = $('.loginpress_export_nonce').val(); + + $.ajax({ + + url: ajaxurl, + type: 'POST', + data: { + action: 'loginpress_export', + security: export_nonce, + }, + beforeSend: function() { + $(".export_setting .export-sniper").show(); + }, + success: function(response) { + + $(".export_setting .export-sniper").hide(); + $(".export_setting .export-text").show(); + + if ( ! window.navigator.msSaveOrOpenBlob ) { // If msSaveOrOpenBlob() is supported, then so is msSaveBlob(). + $("", { + "download": "loginpress-export-" + newdate + + ".json", + "href": "data:application/json;charset=utf-8," + + encodeURIComponent(response), + }).appendTo("body") + .click(function() { + $(this).remove() + })[0].click() + } else { + var blobObject = new Blob([response]); + window.navigator.msSaveBlob( blobObject, "loginpress-export-" + newdate + ".json" ); + } + setTimeout( function() { + $(".export_setting .export-text").fadeOut() + }, 3000 ); + } + }); + }); + + $('.loginpress-import').on('click', function(event) { + + event.preventDefault(); + + var file = $('#loginPressImport'); + var import_nonce = $('.loginpress_import_nonce').val(); + var fileObj = new FormData(); + var content = file[0].files[0]; + + fileObj.append('file', content); + fileObj.append('name', content['name']); + fileObj.append('action', 'loginpress_import'); + fileObj.append('security', import_nonce); + + $.ajax({ + + processData: false, + contentType: false, + url: ajaxurl, + type: 'POST', + data: fileObj, // file and action append into variable fileObj. + beforeSend: function() { + $(".import_setting .import-sniper").show(); + $(".import_setting .wrong-import").html(""); + $('.loginpress-import').attr("disabled", "disabled"); + }, + success: function(response) { + // console.log(response); + $(".import_setting .import-sniper").hide(); + // $(".import_setting .import-text").fadeIn(); + if ('error' == response) { + $(".import_setting .wrong-import").html( + "JSON File is not Valid."); + } else { + $(".import_setting .import-text").show(); + setTimeout(function() { + $(".import_setting .import-text").fadeOut(); + // $(".import_setting .wrong-import").html(""); + file.val(''); + }, 3000); + } + + } + }); //!ajax. + }); + }); + $(document).ready(function () { + //run the select code for all selects + generate_select('select:not(.gfield_select)'); + $(".tabs-toggle").on("click", function(){ + $(this).toggleClass("active").next(".loginpress-tabs-wrapper").slideToggle(); + }) + $(".settings-tabs-list").on("click", function(){ + if(window.matchMedia('(max-width: 767px)').matches === true){ + $(this).closest(".loginpress-tabs-wrapper").slideUp(); + $(".tabs-toggle").removeClass("active"); + } + }) + }) + + function generate_select(selector) { + $(selector).each(function() { + + // Cache the number of options + var $this = $(this), + activeValue = $this.val(), + classselect = $this.attr("class"), + numberOfOptions = $(this).children("option").length; + + // Hides the select element + $this.addClass("s-hidden"); + + // Wrap the select element in a div + $this.wrap('
'); + + // Insert a styled div to sit over the top of the hidden select element + $this.after('
'); + + // Cache the styled div + var $styledSelect = $this.next("div.styledSelect"); + + var getHTML = $this.children('option[value="' + $this.val() + '"]').text(); + + // if ($this.children('option[value="' + $this.val() + '"]').length > 1) { + // var getHTML = $this + // .children("option") + // .eq(0) + // .text(); + // } + // Show the first select option in the styled div + $styledSelect.html('' + getHTML + ''); + + // Insert an unordered list after the styled div and also cache the list + var $list = $("