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

196 lines 4.4 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.7
7 * Author: WPBrigade
8 * Author URI: http://www.WPBrigade.com/
9 * Requires at least: 4.0
10 * Tested up to: 4.7.1
11 * Text Domain: loginpress
12 * Domain Path: /languages
13 *
14 * @package loginpress
15 * @category Core
16 * @author WPBrigade
17 */
18
19
20
21 if ( ! class_exists( 'LoginPress' ) ) :
22
23 final class LoginPress {
24
25 /**
26 * @var string
27 */
28 public $version = '1.0.7';
29
30 /**
31 * @var The single instance of the class
32 * @since 1.0.0
33 */
34 protected static $_instance = null;
35
36 /**
37 * @var WP_Session session
38 */
39 public $session = null;
40
41 /**
42 * @var WP_Query $query
43 */
44 public $query = null;
45
46 /**s
47 * @var WP_Countries $countries
48 */
49 public $countries = null;
50
51 /* * * * * * * * * *
52 * Class constructor
53 * * * * * * * * * */
54 public function __construct() {
55
56 $this->define_constants();
57 $this->includes();
58 $this->_hooks();
59 }
60
61 /**
62 * Define LoginPress Constants
63 */
64 private function define_constants() {
65
66 $this->define( 'LOGINPRESS_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
67 $this->define( 'LOGINPRESS_DIR_PATH', plugin_dir_path( __FILE__ ) );
68 $this->define( 'LOGINPRESS_ROOT_PATH', dirname( __FILE__ ) . '/');
69 $this->define( 'LOGINPRESS_VERSION', $this->version );
70 $this->define( 'EXE', '.php' );
71 }
72
73 /**
74 * Include required core files used in admin and on the frontend.
75 */
76
77 public function includes() {
78
79 include_once( LOGINPRESS_DIR_PATH . 'custom' . EXE );
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 }
92
93 /**
94 * Main Instance
95 *
96 * @since 1.0.0
97 * @static
98 * @see loginPress_loader()
99 * @return Main instance
100 */
101 public static function instance() {
102 if ( is_null( self::$_instance ) ) {
103 self::$_instance = new self();
104 }
105 return self::$_instance;
106 }
107
108
109 /**
110 * Load Languages
111 * @since 1.0.0
112 */
113 public function textdomain() {
114
115 $plugin_dir = dirname( plugin_basename( __FILE__ ) ) ;
116 load_plugin_textdomain( 'loginpress', false, $plugin_dir . '/languages/');
117 }
118
119 /**
120 * Define constant if not already set
121 * @param string $name
122 * @param string|bool $value
123 */
124 private function define( $name, $value ) {
125 if ( ! defined( $name ) ) {
126 define( $name, $value );
127 }
128 }
129
130 /**
131 * Include required ajax files.
132 */
133 public function ajax_includes() {
134 // Ajax functions for admin and the front-end
135 }
136 /**
137 * Init WPBrigade when WordPress Initialises.
138 */
139 public function init() {
140 // Before init action
141 }
142 /**
143 * Add new page in Apperance to customize Login Page
144 */
145 public function register_options_page() {
146 add_theme_page( __( 'LoginPress', 'loginpress' ),
147 __( 'LoginPress', 'loginpress' ),
148 'manage_options',
149 "abw",
150 '__return_null' );
151
152 add_menu_page( __( 'LoginPress', 'loginpress' ),
153 __( 'LoginPress', 'loginpress' ),
154 'manage_options',
155 "abw",
156 '__return_null', '', 50 );
157 }
158
159
160 public function _row_meta( $links, $file ) {
161
162 if ( strpos( $file, 'loginpress.php' ) !== false ) {
163
164 // Set link for Reviews.
165 $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>',
166 );
167
168 $links = array_merge( $links, $new_links );
169 }
170
171 return $links;
172 }
173 }
174 endif;
175
176 /**
177 * Returns the main instance of WP to prevent the need to use globals.
178 *
179 * @since 1.0.0
180 * @return LoginPress
181 */
182 function loginPress_loader() {
183 return LoginPress::instance();
184 }
185
186 // Call the function
187 loginPress_loader();
188
189 /**
190 * Create the Object of Custom Login Entites.
191 *
192 * @since 1.0.0
193 */
194 new LoginPress_Entities();
195 ?>
196