PluginProbe
LoginPress | wp-login Custom Login Page Customizer / 3.1.2
LoginPress | wp-login Custom Login Page Customizer v3.1.2
6.2.5 6.2.4 6.2.3 6.2.2 6.2.1 trunk 1.0.0 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.15 1.0.16 1.0.17 1.0.18 1.0.19 1.0.2 1.0.20 1.0.21 1.0.22 1.0.23 1.0.3 1.0.4 All 118 releases
loginpress / loginpress.php

loginpress.php in LoginPress | wp-login Custom Login Page Customizer 3.1.2, at loginpress.php

633 lines 20.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Plugin Name: LoginPress
4 * Plugin URI: https://loginpress.pro?utm_source=loginpress-lite&utm_medium=plugin-header&utm_campaign=pro-upgrade&utm_content=plugin-uri
5 * Description: LoginPress is the best <code>wp-login</code> Login Page Customizer plugin by <a href="https://wpbrigade.com/?utm_source=loginpress-lite&utm_medium=plugins&utm_campaign=wpbrigade-home&utm_content=WPBrigade-text-link">WPBrigade</a> which allows you to completely change the layout of login, register and forgot password forms.
6 * Version: 3.1.2
7 * Author: LoginPress
8 * Author URI: https://loginpress.pro?utm_source=loginpress-lite&utm_medium=plugin-header&utm_campaign=pro-upgrade&utm_content=author-uri
9 * Text Domain: loginpress
10 * Domain Path: /languages
11 *
12 * @package loginpress
13 * @category Core
14 * @author WPBrigade
15 */
16
17
18 if ( ! function_exists( 'loginpress_wpb53407382' ) ) {
19 // Create a helper function for easy SDK access.
20 function loginpress_wpb53407382() {
21 global $loginpress_wpb53407382;
22
23 if ( ! isset( $loginpress_wpb53407382 ) ) {
24 // Include Telemetry SDK.
25 require_once dirname(__FILE__) . '/lib/wpb-sdk/start.php';
26
27 $loginpress_wpb53407382 = wpb_dynamic_init([
28 'id' => '6',
29 'slug' => 'loginpress',
30 'type' => 'plugin',
31 'public_key' => '1|4aOA8EuyIN4pi2miMvC23LLpnHbBZFNki9R9pVmwd673d3c8',
32 'secret_key' => 'sk_b36c525848fee035',
33 'is_premium' => false,
34 'has_addons' => false,
35 'has_paid_plans' => false,
36 'menu' => [
37 'slug' => 'loginpress',
38 'account' => false,
39 'support' => false,
40 ],
41 'settings' => [ 'loginpress_customization' => '' , 'loginpress_setting' => '' , 'loginpress_addon_active_time' => '' , 'loginpress_addon_dismiss_1' => '' , 'loginpress_review_dismiss' => '' , 'loginpress_active_time' => '' , '_loginpress_optin' => '' , 'loginpress_friday_sale_active_time' => '' , 'loginpress_friday_sale_dismiss' => '' , 'loginpress_friday_21_sale_dismiss' => '' ],
42 ]);
43 }
44
45 return $loginpress_wpb53407382;
46 }
47
48 // Init Telemetry.
49 loginpress_wpb53407382();
50 // Signal that SDK was initiated.
51 do_action( 'loginpress_wpb53407382_loaded' );
52 }
53
54 if ( ! class_exists( 'LoginPress' ) ) :
55
56 final class LoginPress {
57
58 /**
59 * @var string
60 */
61 public $version = '3.1.2';
62
63 /**
64 * @var The single instance of the class
65 * @since 1.0.0
66 */
67 protected static $_instance = null;
68
69 /**
70 * @var WP_Session session
71 */
72 public $session = null;
73
74 /**
75 * @var WP_Query $query
76 */
77 public $query = null;
78
79 /**
80 * @var WP_Countries $countries
81 */
82 public $countries = null;
83
84 /**
85 * Class Constructor.
86 */
87 public function __construct() {
88
89 $this->define_constants();
90 $this->includes();
91 $this->_hooks();
92 }
93
94 /**
95 * Define LoginPress Constants
96 */
97 private function define_constants() {
98
99 $this->define( 'LOGINPRESS_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
100 $this->define( 'LOGINPRESS_DIR_PATH', plugin_dir_path( __FILE__ ) );
101 $this->define( 'LOGINPRESS_DIR_URL', plugin_dir_url( __FILE__ ) );
102 $this->define( 'LOGINPRESS_ROOT_PATH', dirname( __FILE__ ) . '/' );
103 $this->define( 'LOGINPRESS_ROOT_FILE', __FILE__ );
104 $this->define( 'LOGINPRESS_VERSION', $this->version );
105 $this->define( 'LOGINPRESS_FEEDBACK_SERVER', 'https://wpbrigade.com/' );
106 }
107
108 /**
109 * Include required core files used in admin and on the frontend.
110 *
111 * @since 1.0.0
112 * @version 3.0.0
113 */
114 public function includes() {
115
116 include_once( LOGINPRESS_DIR_PATH . 'include/compatibility.php' );
117 include_once( LOGINPRESS_DIR_PATH . 'custom.php' );
118 include_once( LOGINPRESS_DIR_PATH . 'classes/class-loginpress-setup.php' );
119 include_once( LOGINPRESS_DIR_PATH . 'classes/class-loginpress-ajax.php' );
120 // include_once( LOGINPRESS_DIR_PATH . 'classes/class-loginpress-filter-plugin.php' );
121 include_once( LOGINPRESS_DIR_PATH . 'classes/class-loginpress-developer-hooks.php' );
122 include_once( LOGINPRESS_DIR_PATH . 'classes/class-loginpress-notifications.php' );
123 if ( is_multisite() ) {
124 require_once( LOGINPRESS_DIR_PATH . 'include/class-loginpress-theme-template.php' );
125 }
126
127 $loginpress_setting = get_option( 'loginpress_setting' );
128
129 $loginpress_privacy_policy = isset( $loginpress_setting['enable_privacy_policy'] ) ? $loginpress_setting['enable_privacy_policy'] : 'off';
130 if ( 'off' != $loginpress_privacy_policy ) {
131 include_once( LOGINPRESS_DIR_PATH . 'include/privacy-policy.php' );
132 }
133
134 $login_with_email = isset( $loginpress_setting['login_order'] ) ? $loginpress_setting['login_order'] : 'default';
135 if ( 'default' != $login_with_email ) {
136 include_once( LOGINPRESS_DIR_PATH . 'classes/class-loginpress-login-order.php' );
137 new LoginPress_Login_Order();
138 }
139
140 $enable_reg_pass_field = isset( $loginpress_setting['enable_reg_pass_field'] ) ? $loginpress_setting['enable_reg_pass_field'] : 'off';
141 if ( 'off' != $enable_reg_pass_field ) {
142 include_once( LOGINPRESS_DIR_PATH . 'classes/class-loginpress-custom-password.php' );
143 new LoginPress_Custom_Password();
144 }
145 $loginpress_password_reset_time_limit = isset( $loginpress_setting['loginpress_password_reset_time_limit'] ) ? $loginpress_setting['loginpress_password_reset_time_limit'] : 'off';
146 if ( 'off' != $loginpress_password_reset_time_limit ) {
147 include_once( LOGINPRESS_DIR_PATH . 'classes/class-loginpress-force-reset-pass.php' );
148 new LoginPress_Force_Password_Reset();
149 }
150
151 }
152
153 /**
154 * Hook into actions and filters
155 * @since 1.0.0
156 * @version 3.0.0
157 */
158 private function _hooks() {
159
160 add_action( 'admin_menu', array( $this, 'register_options_page' ) );
161 add_action( 'plugins_loaded', array( $this, 'textdomain' ) );
162 add_filter( 'plugin_row_meta', array( $this, '_row_meta'), 10, 2 );
163 add_action( 'admin_enqueue_scripts', array( $this, '_admin_scripts' ) );
164 add_action( 'admin_footer', array( $this, 'add_deactivate_modal' ) );
165 add_action( 'plugin_action_links', array( $this, 'loginpress_action_links' ), 10, 2 );
166 add_action( 'admin_init', array( $this, 'redirect_optin' ) );
167 add_filter( 'auth_cookie_expiration', array( $this, '_change_auth_cookie_expiration' ), 10, 3 );
168 add_action( 'wp_wpb_sdk_after_uninstall', array( $this, 'plugin_uninstallation' ) );
169 //add_filter( 'plugins_api', array( $this, 'get_addon_info_' ) , 100, 3 );
170 if ( is_multisite() ) {
171 add_action( 'admin_init', array( $this, 'redirect_loginpress_edit_page' ) );
172 add_action( 'admin_init', array( $this, 'check_loginpress_page' ) );
173 // Makes sure the plugin is defined before trying to use it
174 if ( ! function_exists( 'is_plugin_active_for_network' ) || ! function_exists( 'is_plugin_active' ) ) {
175 require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
176 if ( is_plugin_active_for_network( 'wordpress-seo/wp-seo.php' ) ) {
177 /**
178 * This filters the ID of the page/post which you want to remove from the sitemap XML.
179 * @since 1.5.14
180 *
181 * @documentation https://developer.yoast.com/features/xml-sitemaps/api/
182 */
183 add_filter( 'wpseo_exclude_from_sitemap_by_post_ids', array( $this, 'loginpress_exclude_from_sitemap' ) );
184 }
185 }
186 }
187 }
188
189 /**
190 * Callback function to exclude LoginPress page from sitemap.
191 *
192 * @return bool Exclude page/s or post/s.
193 * @since 1.5.14
194 * @version 1.6.3
195 */
196 public function loginpress_exclude_from_sitemap() {
197
198 $page = get_page_by_path( 'loginpress' );
199 if ( is_object( $page ) ) {
200 return array( $page->ID );
201 }
202 }
203
204 /**
205 * Redirect to Optin page.
206 *
207 * @since 1.0.15
208 */
209 function redirect_optin() {
210
211 /**
212 * Fix the Broken Access Control (BAC) security fix.
213 *
214 * @since 1.6.3
215 */
216 if ( current_user_can( 'manage_options' ) ) {
217 if ( isset( $_POST['loginpress-submit-optout'] ) ) {
218 if ( ! wp_verify_nonce( sanitize_text_field( $_POST['loginpress_submit_optin_nonce'] ), 'loginpress_submit_optin_nonce' ) ) {
219 return;
220 }
221 update_option( '_loginpress_optin', 'no' );
222 } elseif ( isset( $_POST['loginpress-submit-optin'] ) ) {
223 if ( ! wp_verify_nonce( sanitize_text_field( $_POST['loginpress_submit_optin_nonce'] ), 'loginpress_submit_optin_nonce' ) ) {
224 return;
225 }
226 update_option( '_loginpress_optin', 'yes' );
227 } elseif ( ! get_option( '_loginpress_optin' ) && isset( $_GET['page'] ) && ( $_GET['page'] === 'loginpress-settings' || $_GET['page'] === 'loginpress' || $_GET['page'] === 'abw' ) ) {
228
229 /**
230 * XSS Attack vector found and fixed.
231 *
232 * @since 1.5.11
233 */
234 $page_redirect = $_GET['page'] === 'loginpress' ? 'loginpress' : 'loginpress-settings';
235 wp_redirect( admin_url('admin.php?page=loginpress-optin&redirect-page=' . $page_redirect) );
236 exit;
237
238 } elseif ( get_option( '_loginpress_optin' ) && ( get_option( '_loginpress_optin' ) == 'yes' ) && isset( $_GET['page'] ) && $_GET['page'] === 'loginpress-optin' ) {
239 wp_redirect( admin_url( 'admin.php?page=loginpress-settings' ) );
240 exit;
241 }
242 }
243 }
244
245 /**
246 * Main Instance
247 *
248 * @since 1.0.0
249 * @static
250 * @see loginPress_loader()
251 * @return Main instance
252 */
253 public static function instance() {
254 if ( is_null( self::$_instance ) ) {
255 self::$_instance = new self();
256 }
257 return self::$_instance;
258 }
259
260 /**
261 * Load Languages
262 * @since 1.0.0
263 */
264 public function textdomain() {
265
266 $plugin_dir = dirname( plugin_basename( __FILE__ ) ) ;
267 load_plugin_textdomain( 'loginpress', false, $plugin_dir . '/languages/' );
268 }
269
270 /**
271 * Define constant if not already set
272 * @param string $name
273 * @param string|bool $value
274 */
275 private function define( $name, $value ) {
276 if ( ! defined( $name ) ) {
277 define( $name, $value );
278 }
279 }
280
281 /**
282 * Init WPBrigade when WordPress Initializes.
283 */
284 public function init() {
285 // Before init action
286 }
287
288 /**
289 * Create LoginPress Page Template.
290 *
291 * @since 1.1.3
292 */
293 public function check_loginpress_page() {
294
295 // Retrieve the LoginPress admin page option, that was created during the activation process.
296 $option = $this->get_loginpress_page();
297
298 include LOGINPRESS_DIR_PATH . 'include/create-loginpress-page.php';
299 // Retrieve the status of the page, if the option is available.
300 if ( $option ) {
301 $page = get_post( $option );
302 $status = $page->post_status;
303 } else {
304 $status = null;
305 }
306
307 // Check the status of the page. Let's fix it, if the page is missing or in the trash.
308 if ( empty( $status ) || 'trash' === $status ) {
309 new LoginPress_Page_Create();
310 }
311 }
312
313 /**
314 * function for redirect the LoginPress page on editing.
315 *
316 * @since 1.1.3
317 */
318 public function redirect_loginpress_edit_page() {
319 global $pagenow;
320
321 $page = $this->get_loginpress_page();
322
323 if ( ! $page ) {
324 return;
325 }
326
327 $page_url = get_permalink( $page );
328 $page_id = get_post( $page );
329 $page_id = $page->ID;
330
331 // Generate the redirect url.
332 $url = add_query_arg(
333 array(
334 'autofocus[section]' => 'loginpress_panel',
335 'url' => rawurlencode( $page_url ),
336 ),
337 admin_url( 'customize.php' )
338 );
339
340 /* Check current admin page. */
341 if ( $pagenow == 'post.php' && isset( $_GET['post'] ) && $_GET['post'] == $page_id ) {
342 wp_safe_redirect( $url );
343 }
344 }
345
346 /**
347 * Add new page in Appearance to customize Login Page.
348 * @version 3.0.0
349 */
350 public function register_options_page() {
351
352 add_submenu_page( 'LoginPress', __( 'Activate', 'loginpress' ), __( 'Activate', 'loginpress' ), 'manage_options', 'loginpress-optin', array( $this, 'render_optin' ) );
353
354 add_theme_page( __( 'LoginPress', 'loginpress' ), __( 'LoginPress', 'loginpress' ), 'manage_options', "abw", '__return_null' );
355 }
356
357
358 /**
359 * Show Opt-in Page.
360 *
361 * @since 1.0.15
362 */
363 function render_optin() {
364 include LOGINPRESS_DIR_PATH . 'include/loginpress-optin-form.php';
365 }
366
367 /**
368 * Session Expiration
369 *
370 * @since 1.0.18
371 * @version 1.3.2
372 */
373 function _change_auth_cookie_expiration( $expiration, $user_id, $remember ) {
374
375 $loginpress_setting = get_option( 'loginpress_setting' );
376 $_expiration = isset( $loginpress_setting['session_expiration'] ) ? intval( $loginpress_setting['session_expiration'] ) : '';
377
378 /**
379 * return the WordPress default $expiration time if LoginPress Session Expiration time set 0 or empty.
380 * @since 1.0.18
381 */
382 if ( empty( $_expiration ) || '0' == $_expiration ) {
383 return $expiration;
384 }
385
386 /**
387 * $filter_role Use filter `loginpress_exclude_role_session` for return the role.
388 * By default it's false and $expiration time will apply on all user.
389 *
390 * @return string/array role name.
391 * @since 1.3.2
392 */
393 $filter_role = apply_filters( 'loginpress_exclude_role_session', false );
394
395 if ( $filter_role ) {
396 $user_roles = get_userdata( $user_id )->roles;
397
398 // if $filter_role is array, return the default $expiration for each defined role.
399 if ( is_array( $filter_role ) ) {
400 foreach ( $filter_role as $role ) {
401 if ( in_array( $role, $user_roles ) ) {
402 return $expiration;
403 }
404 }
405 } else if ( in_array( $filter_role, $user_roles ) ) {
406 return $expiration;
407 }
408 }
409
410 // Convert Duration (minutes) of the expiration period in seconds.
411 $expiration = $_expiration * 60;
412
413 return $expiration;
414 }
415
416 /**
417 * Load JS or CSS files at admin side and enqueue them
418 * @param string tell you the Page ID
419 * @return void
420 * @version 3.0.0
421 */
422 function _admin_scripts( $hook ) {
423
424 if( $hook == 'toplevel_page_loginpress-settings' || $hook == 'loginpress_page_loginpress-addons' || $hook == 'loginpress_page_loginpress-help' || $hook == 'loginpress_page_loginpress-import-export' || $hook == 'loginpress_page_loginpress-license' || $hook == 'admin_page_loginpress-optin' ) {
425
426 wp_enqueue_style( 'loginpress_style', plugins_url( 'css/style.css', __FILE__ ), array(), LOGINPRESS_VERSION );
427 wp_enqueue_script( 'loginpress_js', plugins_url( 'js/admin-custom.js', __FILE__ ), array(), LOGINPRESS_VERSION );
428
429 // Array for localize.
430 $loginpress_localize = array(
431 'plugin_url' => plugins_url(),
432 'localize_translations' => array(
433 _x( 'Name', 'Login Redirect Roles', 'loginpress' ),
434 ),
435 'help_nonce' => wp_create_nonce( 'loginpress-log-nonce' ),
436
437 );
438
439 wp_localize_script( 'loginpress_js', 'loginpress_script', $loginpress_localize );
440 }
441
442 }
443
444 /**
445 * Add rating icon on plugins page.
446 *
447 * @since 1.0.9
448 * @version 1.1.22
449 */
450
451 public function _row_meta( $meta_fields, $file ) {
452
453 if ( $file != 'loginpress/loginpress.php' ) {
454 return $meta_fields;
455 }
456
457 echo "<style>.loginpress-rate-stars { display: inline-block; color: #ffb900; position: relative; top: 3px; }.loginpress-rate-stars svg{ fill:#ffb900; } .loginpress-rate-stars svg:hover{ fill:#ffb900 } .loginpress-rate-stars svg:hover ~ svg{ fill:none; } </style>";
458
459 $plugin_rate = "https://wordpress.org/support/plugin/loginpress/reviews/?rate=5#rate-response";
460 $plugin_filter = "https://wordpress.org/support/plugin/loginpress/reviews/?filter=5";
461 $svg_xmlns = "https://www.w3.org/2000/svg";
462 $svg_icon = '';
463
464 for ( $i = 0; $i < 5; $i++ ) {
465 $svg_icon .= "<svg xmlns='" . esc_url( $svg_xmlns ) . "' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-star'><polygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/></svg>";
466 }
467
468 // Set icon for thumbs up.
469 $meta_fields[] = '<a href="' . esc_url( $plugin_filter ) . '" target="_blank"><span class="dashicons dashicons-thumbs-up"></span>' . __( 'Vote!', 'loginpress' ) . '</a>';
470
471 // Set icon for 5-star reviews. v1.1.22
472 $meta_fields[] = "<a href='" . esc_url( $plugin_rate ) . "' target='_blank' title='" . esc_html__( 'Rate', 'loginpress' ) . "'><i class='loginpress-rate-stars'>" . $svg_icon . "</i></a>";
473
474 return $meta_fields;
475 }
476
477 /**
478 * Add deactivate modal layout.
479 */
480 function add_deactivate_modal() {
481 global $pagenow;
482
483 if ( 'plugins.php' !== $pagenow ) {
484 return;
485 }
486
487 include LOGINPRESS_DIR_PATH . 'include/loginpress-optout-form.php';
488 }
489
490 /**
491 * Plugin activation
492 *
493 * @since 1.0.15
494 * @version 1.0.22
495 */
496 static function plugin_activation() {
497
498 $loginpress_key = get_option( 'loginpress_customization' );
499 $loginpress_setting = get_option( 'loginpress_setting' );
500
501 // Create a key 'loginpress_customization' with empty array.
502 if ( ! $loginpress_key ) {
503 update_option( 'loginpress_customization', array() );
504 }
505
506 // Create a key 'loginpress_setting' with empty array.
507 if ( ! $loginpress_setting ) {
508 update_option( 'loginpress_setting', array() );
509 }
510 }
511
512 function plugin_uninstallation() {
513 include_once (LOGINPRESS_DIR_PATH . 'include/uninstall.php');
514 }
515
516
517 /**
518 * Pull the LoginPress page from options.
519 *
520 * @access public
521 * @since 1.1.3
522 * @version 1.1.7
523 */
524 public function get_loginpress_page() {
525
526 $loginpress_setting = get_option( 'loginpress_setting', array() );
527 if ( ! is_array( $loginpress_setting ) && empty( $loginpress_setting ) ) {
528 $loginpress_setting = array();
529 }
530 $page = array_key_exists( 'loginpress_page', $loginpress_setting ) ? get_post( $loginpress_setting['loginpress_page'] ) : false;
531
532 return $page;
533 }
534
535
536 /**
537 * Add a link to the settings page to the plugins list
538 *
539 * @since 1.0.11
540 * @version 3.0.8
541 */
542 public function loginpress_action_links( $links, $file ) {
543
544 static $this_plugin;
545
546 if ( empty( $this_plugin ) ) {
547 $this_plugin = 'loginpress/loginpress.php';
548 }
549
550 if ( $file == $this_plugin ) {
551
552 $settings_link = sprintf( esc_html__( '%1$s Settings %2$s | %3$s Customize %4$s', 'loginpress' ), '<a href="' . admin_url( 'admin.php?page=loginpress-settings' ) . '">', '</a>', '<a href="' . admin_url( 'admin.php?page=loginpress' ) . '">', '</a>' );
553
554 if( 'yes' == get_option( '_loginpress_optin' ) ){
555 $settings_link .= sprintf( esc_html__( ' | %1$s Opt Out %2$s ', 'loginpress'), '<a class="opt-out" href="' . admin_url( 'admin.php?page=loginpress-settings' ) . '">', '</a>' );
556 } else {
557 $settings_link .= sprintf( esc_html__( ' | %1$s Opt In %2$s ', 'loginpress'), '<a href="' . admin_url( 'admin.php?page=loginpress-optin&redirect-page=' .'loginpress-settings' ) . '">', '</a>' );
558 }
559
560 array_unshift( $links, $settings_link );
561
562 if ( ! has_action( 'loginpress_pro_add_template' ) ) {
563 $pro_link = sprintf( esc_html__( '%1$s %3$s Upgrade Pro %4$s %2$s', 'loginpress' ), '<a href="https://loginpress.pro/lite/?utm_source=loginpress-lite&utm_medium=plugins&utm_campaign=pro-upgrade&utm_content=Upgrade+Pro" target="_blank">', '</a>', '<span class="loginpress-dashboard-pro-link">', '</span>' );
564 array_push( $links, $pro_link );
565 }
566 }
567
568 return $links;
569 }
570
571 // function get_addon_info_( $api, $action, $args ) {
572
573 // if ( $action == 'plugin_information' && empty( $api ) && ( ! empty( $_GET['lgp'] ) ) ) {
574
575 // $raw_response = wp_remote_post( 'https://wpbrigade.com/loginpress-api/search.php', array(
576 // 'body' => array(
577 // 'slug' => $args->slug
578 // ) )
579 // );
580
581 // if ( is_wp_error( $raw_response ) || $raw_response['response']['code'] != 200 ) {
582 // return false;
583 // }
584
585 // $plugin = unserialize( $raw_response['body'] );
586
587 // $api = new stdClass();
588 // $api->name = $plugin['title'];
589 // $api->version = $plugin['version'];
590 // $api->download_link = $plugin['download_url'];
591 // $api->tested = '10.0';
592
593 // }
594
595 // return $api;
596 // }
597 } // End Of Class.
598 endif;
599
600
601 /**
602 * Returns the main instance of WP to prevent the need to use globals.
603 *
604 * @since 1.0.0
605 * @return LoginPress
606 */
607 function loginPress_loader() {
608 return LoginPress::instance();
609 }
610
611 // Call the function
612 loginPress_loader();
613
614 /**
615 * Create the Object of Custom Login Entities and Settings.
616 *
617 * @since 1.0.0
618 */
619 new LoginPress_Entities();
620 new LoginPress_Settings();
621
622 /**
623 * Create the Object of Remote Notification.
624 *
625 * @since 1.0.9
626 */
627 if ( ! class_exists( 'TAV_Remote_Notification_Client' ) ) {
628 require( LOGINPRESS_ROOT_PATH . 'include/class-remote-notification-client.php' );
629 }
630 $notification = new TAV_Remote_Notification_Client( 125, '16765c0902705d62', 'https://wpbrigade.com?post_type=notification' );
631
632 register_activation_hook( __FILE__, array( 'LoginPress', 'plugin_activation' ) );
633