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

215 lines 5.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 - Customizing the WordPress Login
4 * Plugin URI: http://www.WPBrigade.com/wordpress/plugins/loginpress/
5 * Description: LoginPress is the best Login Page Customizer in WordPress which allows you to completely change the layout of login, register and forgot password forms.
6 * Version: 1.0.9
7 * Author: WPBrigade
8 * Author URI: http://www.WPBrigade.com/
9 * Requires at least: 4.0
10 * Tested up to: 4.7.3
11 * Text Domain: loginpress
12 * Domain Path: /languages
13 *
14 * @package loginpress
15 * @category Core
16 * @author WPBrigade
17 */
18
19
20 if ( ! class_exists( 'LoginPress' ) ) :
21
22 final class LoginPress {
23
24 /**
25 * @var string
26 */
27 public $version = '1.0.8';
28
29 /**
30 * @var The single instance of the class
31 * @since http://prntscr.com/e0wxbu1.0.0
32 */
33 protected static $_instance = null;
34
35 /**
36 * @var WP_Session session
37 */
38 public $session = null;
39
40 /**
41 * @var WP_Query $query
42 */
43 public $query = null;
44
45 /**s
46 * @var WP_Countries $countries
47 */
48 public $countries = null;
49
50 /* * * * * * * * * *
51 * Class constructor
52 * * * * * * * * * */
53 public function __construct() {
54
55 $this->define_constants();
56 $this->includes();
57 $this->_hooks();
58 }
59
60 /**
61 * Define LoginPress Constants
62 */
63 private function define_constants() {
64
65 $this->define( 'LOGINPRESS_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
66 $this->define( 'LOGINPRESS_DIR_PATH', plugin_dir_path( __FILE__ ) );
67 $this->define( 'LOGINPRESS_DIR_URL', plugin_dir_url( __FILE__ ) );
68 $this->define( 'LOGINPRESS_ROOT_PATH', dirname( __FILE__ ) . '/' );
69 $this->define( 'LOGINPRESS_VERSION', $this->version );
70 }
71
72 /**
73 * Include required core files used in admin and on the frontend.
74 */
75
76 public function includes() {
77
78 include_once( LOGINPRESS_DIR_PATH . 'custom.php' );
79 include_once( LOGINPRESS_DIR_PATH . 'classes/loginpress-setup.php' );
80 }
81
82 /**
83 * Hook into actions and filters
84 * @since 1.0.0
85 */
86 private function _hooks() {
87
88 add_action( 'admin_menu', array( $this, 'register_options_page' ) );
89 add_action( 'plugins_loaded', array( $this, 'textdomain' ) );
90 add_filter( 'plugin_row_meta', array( $this, '_row_meta'), 10, 2 );
91 add_action( 'admin_enqueue_scripts', array( $this, '_admin_scripts' ) );
92 }
93
94 /**
95 * Main Instance
96 *
97 * @since 1.0.0
98 * @static
99 * @see loginPress_loader()
100 * @return Main instance
101 */
102 public static function instance() {
103 if ( is_null( self::$_instance ) ) {
104 self::$_instance = new self();
105 }
106 return self::$_instance;
107 }
108
109
110 /**
111 * Load Languages
112 * @since 1.0.0
113 */
114 public function textdomain() {
115
116 $plugin_dir = dirname( plugin_basename( __FILE__ ) ) ;
117 load_plugin_textdomain( 'loginpress', false, $plugin_dir . '/languages/');
118 }
119
120 /**
121 * Define constant if not already set
122 * @param string $name
123 * @param string|bool $value
124 */
125 private function define( $name, $value ) {
126 if ( ! defined( $name ) ) {
127 define( $name, $value );
128 }
129 }
130
131 /**
132 * Include required ajax files.
133 */
134 public function ajax_includes() {
135 // Ajax functions for admin and the front-end
136 }
137 /**
138 * Init WPBrigade when WordPress Initialises.
139 */
140 public function init() {
141 // Before init action
142 }
143 /**
144 * Add new page in Apperance to customize Login Page
145 */
146 public function register_options_page() {
147 add_theme_page( __( 'LoginPress', 'loginpress' ), __( 'LoginPress', 'loginpress' ), 'manage_options', "abw", '__return_null' );
148
149 add_menu_page( __( 'LoginPress', 'loginpress' ), __( 'LoginPress', 'loginpress' ), 'manage_options', "loginpress", '__return_null', '', 50 );
150
151 add_submenu_page( 'loginpress', __( 'Customizer', 'loginpress' ), __( 'Customizer', 'loginpress' ), 'manage_options', "loginpress", '__return_null' );
152
153 // add_submenu_page( 'loginpress', __( 'Settings', 'loginpress' ), __( 'Settings', 'loginpress' ), 'manage_options', "loginpress-settings", array( $this, '_loginpress_settings' ) );
154 }
155
156
157 public function _loginpress_settings() {
158
159 if ( isset( $_GET['get-premium'] ) && 'loginpress' == $_GET['get-premium'] ) {
160 include_once LOGINPRESS_DIR_PATH . '/include/get-premium.php';
161 } else {
162 include_once LOGINPRESS_DIR_PATH . '/include/settings.php';
163 }
164 }
165
166 function _admin_scripts() {
167 wp_enqueue_style( 'loginpress_stlye', plugins_url( 'css/style.css', __FILE__ ), array(), time() );
168 wp_enqueue_script( 'loginpress_js', plugins_url( 'js/admin-custom.js', __FILE__ ), array(), time() );
169 }
170
171
172 public function _row_meta( $links, $file ) {
173
174 if ( strpos( $file, 'loginpress.php' ) !== false ) {
175
176 // Set link for Reviews.
177 $new_links = array('<a href="https://wordpress.org/support/view/plugin-reviews/loginpress" target="_blank"><span class="dashicons dashicons-thumbs-up"></span> ' . __( 'Vote!', 'loginpress' ) . '</a>',
178 );
179
180 $links = array_merge( $links, $new_links );
181 }
182
183 return $links;
184 }
185 }
186 endif;
187
188 /**
189 * Returns the main instance of WP to prevent the need to use globals.
190 *
191 * @since 1.0.0
192 * @return LoginPress
193 */
194 function loginPress_loader() {
195 return LoginPress::instance();
196 }
197
198 // Call the function
199 loginPress_loader();
200
201 /**
202 * Create the Object of Custom Login Entites.
203 *
204 * @since 1.0.0
205 */
206 new LoginPress_Entities();
207 new LoginPress_Settings();
208
209
210 if (!class_exists('TAV_Remote_Notification_Client')) {
211 require( LOGINPRESS_ROOT_PATH . 'include/class-remote-notification-client.php' );
212 }
213 $notification = new TAV_Remote_Notification_Client( 125, '16765c0902705d62', 'http://wpbrigade.com?post_type=notification' );
214 ?>
215