Changeset 1956786
- Timestamp:
- 10/15/2018 10:26:03 AM (7 years ago)
- Location:
- wpstudio-login-modal-box/trunk
- Files:
-
- 4 edited
-
genesis-login-modal-box.php (modified) (10 diffs)
-
inc/glmb-admin.php (modified) (1 diff)
-
inc/glmb-frontend.php (modified) (5 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wpstudio-login-modal-box/trunk/genesis-login-modal-box.php
r1844266 r1956786 4 4 * Plugin URI: https://wpstud.io/plugins 5 5 * Description: Login modal box 6 * Version: 1.2. 36 * Version: 1.2.4 7 7 * Author: Frank Schrijvers 8 8 * Author URI: https://www.wpstud.io … … 25 25 */ 26 26 27 if ( ! defined( 'ABSPATH' ) ) { 28 die( 'Sorry, you are not allowed to access this page directly.' ); 27 // If this file is called directly, abort. 28 if ( ! defined( 'WPINC' ) ) { 29 die; 29 30 } 30 31 31 define( 'GLMBVERSION', '1.2' ); 32 define( 'GLMBRELEASEDATE', 'february, 2015' ); 32 require_once ABSPATH . 'wp-admin/includes/plugin.php'; 33 33 34 add_action( 'init', 'wps_load_plugin_textdomain' );35 34 /** 36 35 * Callback on the `plugins_loaded` hook. … … 44 43 */ 45 44 function wps_load_plugin_textdomain() { 45 46 46 load_plugin_textdomain( 'wpstudio-login-modal-box', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' ); 47 47 48 } 48 49 49 register_activation_hook( __FILE__, 'wps_glmb_activation_check' ); 50 add_action( 'init', 'wps_load_plugin_textdomain' ); 51 50 52 /** 51 53 * This function runs on plugin activation. It checks to make sure the required … … 60 62 61 63 deactivate_plugins( plugin_basename( __FILE__ ) ); // Deactivate plugin. 62 wp_die( sprintf( __( 'Sorry, you can not activate the Genesis Slide-in Widget unless you have installed the Genesis Framewor . Go back to the Plugins Page.', 'genesis-overlay-widget' ), '<em>', '</em>', '<a href="http://www.studiopress.com/themes/genesis" target="_blank">', '</a>', '<a href="javascript:history.back()">' ) );64 wp_die( sprintf( __( 'Sorry, you can not activate the Genesis Slide-in Widget unless you have installed the Genesis Framework. Go back to the Plugins Page.', 'wpstudio-login-modal-box' ), '<em>', '</em>', '<a href="http://www.studiopress.com/themes/genesis" target="_blank">', '</a>', '<a href="javascript:history.back()">' ) ); 63 65 64 66 } … … 67 69 68 70 deactivate_plugins( plugin_basename( __FILE__ ) ); // Deactivate plugin. 69 wp_die( sprintf( __( 'Sorry, you can not activate the Genesis Slide-in Widget unless you have installed the Genesis Framework. Go back to the Plugins Page.', ' genesis-overlay-widget' ), '<em>', '</em>', '<a href="http://www.studiopress.com/themes/genesis" target="_blank">', $latest, '</a>', '<a href="javascript:history.back()">' ) );71 wp_die( sprintf( __( 'Sorry, you can not activate the Genesis Slide-in Widget unless you have installed the Genesis Framework. Go back to the Plugins Page.', 'wpstudio-login-modal-box' ), '<em>', '</em>', '<a href="http://www.studiopress.com/themes/genesis" target="_blank">', $latest, '</a>', '<a href="javascript:history.back()">' ) ); 70 72 71 73 } … … 73 75 } 74 76 75 add_action( 'after_switch_theme', 'wps_glmb_deactivate_check' ); 77 /** 78 * This function runs on plugin deactivation. 79 */ 76 80 function wps_glmb_deactivate_check() { 77 81 … … 84 88 } 85 89 86 add_action( 'wp_enqueue_scripts', 'wps_glmb_load_scripts', 99 ); 90 add_action( 'after_switch_theme', 'wps_glmb_deactivate_check', 10 ); 91 92 87 93 /** 88 94 * Enqueue scripts and styles … … 96 102 } 97 103 98 add_action( 'after_setup_theme', 'wps_glmb_init' ); 104 add_action( 'wp_enqueue_scripts', 'wps_glmb_load_scripts', 99 ); 105 106 107 /** 108 * Load required files. 109 */ 99 110 function wps_glmb_init() { 100 111 101 require dirname( __FILE__ ) . '/inc/glmb-admin.php'; 102 include dirname( __FILE__ ) . '/inc/glmb-frontend.php'; 103 new WPSTUDIO_Glmb_Settings(); 112 if ( function_exists( 'genesis_pre' ) ) { 113 114 require dirname( __FILE__ ) . '/inc/glmb-admin.php'; 115 include dirname( __FILE__ ) . '/inc/glmb-frontend.php'; 116 new WPSTUDIO_Glmb_Settings(); 117 118 } 104 119 105 120 } 106 121 107 add_shortcode( 'wps_login', 'wps_glmb_shortcode' ); 122 add_action( 'after_setup_theme', 'wps_glmb_init' ); 123 124 108 125 /** 109 126 * Add shortcode … … 119 136 } 120 137 121 add_action( 'wp_login_failed', 'wps_login_fail' ); 138 add_shortcode( 'wps_login', 'wps_glmb_shortcode' ); 139 140 122 141 /** 123 142 * If username or password is wrong redirect … … 139 158 } 140 159 } 160 161 add_action( 'wp_login_failed', 'wps_login_fail' ); -
wpstudio-login-modal-box/trunk/inc/glmb-admin.php
r1815571 r1956786 83 83 <li><strong style="width: 180px; margin: 0 40px 20px 0; display: inline-block; font-weight: 600;">' . __( 'Website', 'wpstudio-login-modal-box' ) . ':</strong> <a href="https://www.wpstud.io" target="_blank">www.wpstud.io</a></li> 84 84 <li><strong style="width: 180px; margin: 0 40px 20px 0; display: inline-block; font-weight: 600;">' . __( 'Contact', 'wpstudio-login-modal-box' ) . ':</strong> <a href="mailto:[email protected]">[email protected]</a></li> 85 <li><strong style="width: 180px; margin: 0 40px 20px 0; display: inline-block; font-weight: 600;">' . __( 'Version', 'wpstudio-login-modal-box' ) . ':</strong>' . GLMBVERSION .'</li>86 <li><strong style="width: 180px; margin: 0 40px 20px 0; display: inline-block; font-weight: 600;">' . __( 'Release date', 'wpstudio-login-modal-box' ) . ':</strong>' . GLMBRELEASEDATE .'</li>87 85 </ul>'; 88 86 } -
wpstudio-login-modal-box/trunk/inc/glmb-frontend.php
r1844266 r1956786 21 21 $login_url = genesis_get_option( 'glmb_loginurl', 'glmb-settings' ); 22 22 23 } elseif ( is_home() || is_404() ) { 24 25 $login_url = '/'; 26 23 27 } else { 24 28 25 $login_url = get_the_permalink(); 29 $login_url = get_permalink(); 30 26 31 27 32 } … … 62 67 ); 63 68 wp_login_form( $args ); 69 64 70 echo '</div>'; 65 71 … … 84 90 } else { 85 91 86 $logout_url = get_the_permalink();92 $logout_url = '/'; 87 93 88 94 } … … 112 118 if ( $login_location !== $args['theme_location'] ) 113 119 114 return $menu;120 return $menu; 115 121 116 $logout = '<li class="menu-item logout"><a href="' . wp_logout_url( home_url() ) . '" title="Logout">' . esc_html__( 'Log out', 'wpstudio-login-modal-box' ) . '</a></li>'; 122 $logout = '<li class="menu-item logout"><a href="' . wp_logout_url( home_url() ) . '" title="Logout">' . esc_html__( 'Log out', 'wpstudio-login-modal-box' ) . '</a></li>'; 123 124 if ( is_home() ) { 125 126 $login = '<li class="menu-item login"><a href="/#login" title="Login">' . esc_html__( 'Login', 'wpstudio-login-modal-box' ) . '</a></li>'; 127 128 } else { 117 129 118 130 $login = '<li class="menu-item login"><a href="' . get_the_permalink() . '/#login" title="Login">' . esc_html__( 'Login', 'wpstudio-login-modal-box' ) . '</a></li>'; 131 } 119 132 120 133 if ( has_filter( 'wpstudio_add_logout_filter' ) ) { … … 130 143 } 131 144 132 if ( is_user_logged_in() ) 145 if ( is_user_logged_in() ) { 133 146 134 147 return $menu . $logout; 135 148 136 else {149 } else { 137 150 138 151 return $menu . $login; -
wpstudio-login-modal-box/trunk/readme.txt
r1844266 r1956786 3 3 Tags: overlay, genesis, login, modal, Genesis Framework, genesiswp, login form, custom login, wordpress login 4 4 Requires at least: 3.6 5 Tested up to: 4.9. 46 Stable tag: 1.2. 35 Tested up to: 4.9.8 6 Stable tag: 1.2.4 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 45 45 == Changelog == 46 46 47 =1.2.4 = 48 * Bug fix: fixed check wich causes a error 500 if switched to an none Genesis theme. 49 * Tweak: login from 404 directs to homepage 50 * Tweak: login from homepage does not redirect anymore to another post before lauching pop-up 51 47 52 = 1.2.3 = 48 53 * fix: made lost password string translatable.
Note: See TracChangeset
for help on using the changeset viewer.