Changeset 3025514
- Timestamp:
- 01/23/2024 06:18:59 AM (2 years ago)
- Location:
- login-by-referer
- Files:
-
- 20 added
- 3 edited
-
tags/1.0.2 (added)
-
tags/1.0.2/LICENSE.txt (added)
-
tags/1.0.2/assets (added)
-
tags/1.0.2/assets/login-by-referer.css (added)
-
tags/1.0.2/assets/login-by-referer.css.map (added)
-
tags/1.0.2/assets/login-by-referer.min.css (added)
-
tags/1.0.2/assets/login-by-referer.min.css.map (added)
-
tags/1.0.2/assets/login-by-referer.scss (added)
-
tags/1.0.2/class (added)
-
tags/1.0.2/class/class-loginbyreferer-admin.php (added)
-
tags/1.0.2/class/class-loginbyreferer-core.php (added)
-
tags/1.0.2/class/trait-singleton.php (added)
-
tags/1.0.2/login-by-referer.php (added)
-
tags/1.0.2/readme.txt (added)
-
trunk/assets (added)
-
trunk/assets/login-by-referer.css (added)
-
trunk/assets/login-by-referer.css.map (added)
-
trunk/assets/login-by-referer.min.css (added)
-
trunk/assets/login-by-referer.min.css.map (added)
-
trunk/assets/login-by-referer.scss (added)
-
trunk/class/class-loginbyreferer-core.php (modified) (6 diffs)
-
trunk/login-by-referer.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
login-by-referer/trunk/class/class-loginbyreferer-core.php
r3024843 r3025514 23 23 * Plugin constant. 24 24 */ 25 const PLUGIN_VERSION = '1.0. 1';25 const PLUGIN_VERSION = '1.0.2'; 26 26 const PLUGIN_PREFIX = 'login-by-referer'; 27 27 const PLUGIN_GITHUB = 'https://github.com/web83info/login-by-referer'; … … 58 58 add_action( 'admin_menu', array( $this, 'load_textdomain' ) ); 59 59 60 // Load CSS and JS. 61 add_action( 'wp_enqueue_scripts', array( $this, 'load_css_js' ) ); 62 60 63 // Auto login. 61 64 add_action( 'init', array( $this, 'auto_login' ) ); 62 65 63 // Subscribergo to dashboard.64 add_action( 'auth_redirect', array( $this, ' subscriber_no_dashboard' ) );66 // Auto login user can't go to dashboard. 67 add_action( 'auth_redirect', array( $this, 'auto_login_user_no_dashboard' ) ); 65 68 66 69 // Add logout button on admin bar. … … 75 78 public function load_textdomain() { 76 79 load_plugin_textdomain( self::PLUGIN_PREFIX ); 80 } 81 82 public function load_css_js() { 83 // CSS. 84 wp_enqueue_style( 85 self::PLUGIN_PREFIX . '-css', 86 plugins_url( 'assets/login-by-referer.min.css', dirname( __FILE__ ) ), 87 array(), 88 self::PLUGIN_VERSION 89 ); 77 90 } 78 91 … … 110 123 111 124 /** 112 * Subscribergo to dashboard.125 * Auto login user can't go to dashboard. 113 126 * 114 127 * @param int $user_id User ID. 115 128 * @return void 116 129 */ 117 public function subscriber_no_dashboard( $user_id ) {130 public function auto_login_user_no_dashboard( $user_id ) { 118 131 if ( $this->is_autologin_user() ) { 119 132 wp_safe_redirect( get_home_url() ); … … 147 160 $nodes = $wp_admin_bar->get_nodes(); 148 161 foreach ( $nodes as $node ) { 149 // 'top-secondary' is located on r oght top.162 // 'top-secondary' is located on right top. 150 163 if ( ! $node->parent || 'top-secondary' === $node->parent ) { 151 164 $wp_admin_bar->remove_menu( $node->id ); … … 155 168 $wp_admin_bar->add_menu( 156 169 array( 157 'id' => ' new-item-in-admin-bar',170 'id' => 'loginbyreferer-logout', 158 171 'title' => __( 'Logout', 'login-by-referer' ), 159 172 'href' => wp_logout_url(), -
login-by-referer/trunk/login-by-referer.php
r3024843 r3025514 12 12 * Plugin URI: 13 13 * Description: This plugin allows a user to login by specific referer. 14 * Version: 1.0. 114 * Version: 1.0.2 15 15 * Requires at least: 6.0 16 * Tested up to: 6.4. 116 * Tested up to: 6.4.2 17 17 * Requires PHP: 7.4 18 18 * Author: web83info <[email protected]> -
login-by-referer/trunk/readme.txt
r3024843 r3025514 4 4 Tags: login, referer 5 5 Requires at least: 6.2 6 Tested up to: 6.4. 16 Tested up to: 6.4.2 7 7 Requires PHP: 7.4 8 Stable tag: 1.0. 18 Stable tag: 1.0.2 9 9 License: GPL v2 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 21 21 == Changelog == 22 22 23 = 1.0.2 - 2024-01-23 = 24 * Add: Plugin original CSS. 25 * Tested up to: 6.4.2. 26 23 27 = 1.0.1 - 2024-01-15 = 24 * Fix: Clarify li sense.28 * Fix: Clarify license. 25 29 26 30 = 1.0.0 - 2023-11-26 =
Note: See TracChangeset
for help on using the changeset viewer.