Changeset 3096344
- Timestamp:
- 06/02/2024 04:17:46 PM (20 months ago)
- Location:
- ideal-wp-login-logo-changer
- Files:
-
- 10 added
- 3 edited
-
tags/1.1.3 (added)
-
tags/1.1.3/admin (added)
-
tags/1.1.3/admin/backend.js (added)
-
tags/1.1.3/ideal-wp-login-logo-changer.php (added)
-
tags/1.1.3/readme.txt (added)
-
tags/1.1.4 (added)
-
tags/1.1.4/admin (added)
-
tags/1.1.4/admin/backend.js (added)
-
tags/1.1.4/ideal-wp-login-logo-changer.php (added)
-
tags/1.1.4/readme.txt (added)
-
trunk/admin/backend.js (modified) (1 diff)
-
trunk/ideal-wp-login-logo-changer.php (modified) (8 diffs)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ideal-wp-login-logo-changer/trunk/admin/backend.js
r2898156 r3096344 34 34 35 35 // Image Popup Function 36 var frame; 36 37 $('[id=iwllc-upload-btn]').click(function(e) { 37 38 e.preventDefault(); 39 38 40 var btn = $(this); 39 var image = wp.media({ 40 title: 'Upload Logo', 41 42 // If the media frame already exists, reopen it. 43 if ( frame ) { 44 frame.open(); 45 return; 46 } 47 // Create a new media frame 48 var frame = wp.media({ 49 title: btn.hasClass('iwllc-logo') ? 'Upload Logo' : 'Upload Background', 41 50 multiple: false 42 }).open() 43 .on('select', function(e){ 44 var uploaded_image = image.state().get('selection').first(); 45 console.log(uploaded_image); 51 }); 52 // When an image is selected in the media frame... 53 frame.on('select', function(e){ 54 var uploaded_image = frame.state().get('selection').first(); 55 // console.log(uploaded_image); 46 56 var image_url = uploaded_image.toJSON().url; 47 57 btn.closest('td').find('input[type=text]').val(image_url); 58 // Instant replace image src to display selected logo 59 if( btn.hasClass('iwllc-logo') ){ 60 $('.iwllc_current_logo').attr( 'src', image_url ); 61 } 62 // Instant replace background img src to display selected background img 63 if( btn.hasClass('iwllc-bg') ){ 64 $('.iwllc_current_bg').attr( 'src', image_url ); 65 } 48 66 }); 67 // Finally, open the modal on click 68 frame.open(); 49 69 }); 50 70 -
ideal-wp-login-logo-changer/trunk/ideal-wp-login-logo-changer.php
r3074587 r3096344 3 3 Plugin Name: Custom Login Logo 4 4 description: Change the default WordPress logo by uploading your site logo for the login page. 5 Version: 1.1. 35 Version: 1.1.4 6 6 Author: Hakik Zaman 7 7 Author URI: https://github.com/hakikz … … 23 23 24 24 /*Defining Constant*/ 25 define("IWLLC_VERSION", '1.1. 3');25 define("IWLLC_VERSION", '1.1.4'); 26 26 27 27 /*Add body class for options page*/ … … 107 107 <th>Current Logo</th> 108 108 <td> 109 <img src="<?php echo esc_attr( get_option('iwllc_wp_logo_url') ); ?>" alt="Current Logo" width="220">109 <img class="iwllc_current_logo" src="<?php echo esc_url( get_option('iwllc_wp_logo_url') ); ?>" alt="<?php echo esc_html__( 'Current Logo', 'ideal-wp-login-logo-changer' ) ?>" width="220"> 110 110 </td> 111 111 </tr> … … 116 116 <td> 117 117 <input type="text" id="iwllc_wp_logo_url" name="iwllc_wp_logo_url" value="<?php echo esc_attr( get_option('iwllc_wp_logo_url') ); ?>" /> 118 <input type="button" name="iwllc-upload-btn" id="iwllc-upload-btn" class="button-secondary " value="Upload Logo">118 <input type="button" name="iwllc-upload-btn" id="iwllc-upload-btn" class="button-secondary iwllc-logo" value="<?php echo esc_html__( 'Upload Logo', 'ideal-wp-login-logo-changer' ) ?>"> 119 119 <p class="description"><i><?php echo esc_html__( 'This Image will be displayed in Login Page', 'ideal-wp-login-logo-changer' ) ?></i></p> 120 120 </td> … … 148 148 <th>Current Background Image</th> 149 149 <td> 150 <img src="<?php echo esc_attr( get_option('iwllc_wp_bg_img_url') ); ?>" alt="Current Background Image" width="220">150 <img class="iwllc_current_bg" src="<?php echo esc_url( get_option('iwllc_wp_bg_img_url') ); ?>" alt="Current Background Image" width="220"> 151 151 </td> 152 152 </tr> … … 158 158 <td> 159 159 <input type="text" id="iwllc_wp_bg_img_url" name="iwllc_wp_bg_img_url" value="<?php echo esc_attr( get_option('iwllc_wp_bg_img_url') ); ?>" /> 160 <input type="button" name="iwllc-upload-btn" id="iwllc-upload-btn" class="button-secondary " value="Upload Logo">161 <p class="description"><i><?php echo esc_html__( 'This Image will be displayed as background image of Login Page' ) ?></i></p>160 <input type="button" name="iwllc-upload-btn" id="iwllc-upload-btn" class="button-secondary iwllc-bg" value="<?php echo esc_html__( 'Upload Background', 'ideal-wp-login-logo-changer' ) ?>"> 161 <p class="description"><i><?php echo esc_html__( 'This Image will be displayed as background image of Login Page', 'ideal-wp-login-logo-changer' ) ?></i></p> 162 162 </td> 163 163 </tr> … … 168 168 <td> 169 169 <input type="url" id="iwllc_wp_logo_link" name="iwllc_wp_logo_link" value="<?php echo esc_attr( get_option('iwllc_wp_logo_link') ); ?>" /> 170 <p class="description"><i><?php echo esc_html__( 'Set your desired link, to redirect after clicking on your logo' ) ?></i></p>170 <p class="description"><i><?php echo esc_html__( 'Set your desired link, to redirect after clicking on your logo', 'ideal-wp-login-logo-changer' ) ?></i></p> 171 171 </td> 172 172 </tr> … … 177 177 <td> 178 178 <input type="text" name="iwllc_wp_logo_width" value="<?php echo esc_attr( get_option('iwllc_wp_logo_width') ); ?>" /> 179 <p class="description"><i><?php echo esc_html__( 'Default width is 100%' ) ?></i></p>179 <p class="description"><i><?php echo esc_html__( 'Default width is 100%', 'ideal-wp-login-logo-changer' ) ?></i></p> 180 180 </td> 181 181 </tr> -
ideal-wp-login-logo-changer/trunk/readme.txt
r3074587 r3096344 5 5 Tested up to: 6.5 6 6 Requires PHP: 5.2.4 7 Stable tag: 1.1. 37 Stable tag: 1.1.4 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 23 23 👉 By default, the login logo will not redirect to wordpress.org rather than redirect to your site. 24 24 👉 You can redirect anywhere after clicking on your site logo (if you set a link). 25 👉 You can check current logo right after sav eyour settings on plugin setting page.25 👉 You can check current logo right after saving your settings on plugin setting page. 26 26 27 27 == How does the Custom Login Logo For WordPress work: == … … 62 62 == Changelog == 63 63 64 = 1.1.4 [02-06-2024] = 65 * Enhancement: Settings UI. Now, it will display the selected image (with current logo/background image) right after selecting an image. 66 * Update: Script Update. 67 64 68 = 1.1.3 [21-04-2024] = 65 69 * Security: Whole codebase using PCP (Plugin Check Plugin).
Note: See TracChangeset
for help on using the changeset viewer.