PluginProbe
LoginPress | wp-login Custom Login Page Customizer / 3.0.9
LoginPress | wp-login Custom Login Page Customizer v3.0.9
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.0.9, at loginpress.php

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