Plugin Directory

Changeset 1030399


Ignore:
Timestamp:
11/21/2014 10:12:39 PM (11 years ago)
Author:
wpbizplugins
Message:

Support custom link for login logo

Location:
admin-branding/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • admin-branding/trunk/admin-branding.php

    r1018436 r1030399  
    44Plugin URI: http://www.wpbizplugins.com?utm_source=uac&utm_medium=plugin&utm_campaign=pluginuri
    55Description: Brand the WordPress admin section and login screen.
    6 Version: 1.1.0
     6Version: 1.1.1
    77Author: Gabriel Nordeborn
    88Author URI: http://www.wpbizplugins.com?utm_source=uac&utm_medium=plugin&utm_campaign=authoruri
     
    467467
    468468add_action( 'login_footer', 'wpbizplugins_uac_js_for_login_page' );
     469
     470/**
     471 * Change login title and link
     472 *
     473 * @since 1.1.1
     474 *
     475 */
     476
     477function wpbizplugins_uac_login_link( $login_header_url ) {
     478
     479    global $wpbizplugins_uac_options;
     480
     481    if( ( isset( $wpbizplugins_uac_options[ 'login_link' ] ) ) && ( $wpbizplugins_uac_options[ 'login_link' ] != '' ) ) $login_header_url = $wpbizplugins_uac_options[ 'login_link' ];
     482
     483    return $login_header_url;
     484
     485}
     486
     487add_filter( 'login_headerurl', 'wpbizplugins_uac_login_link' );
     488
     489function wpbizplugins_uac_login_title( $login_header_title ) {
     490
     491    global $wpbizplugins_uac_options;
     492
     493    if( ( isset( $wpbizplugins_uac_options[ 'login_title' ] ) ) && ( $wpbizplugins_uac_options[ 'login_title' ] != '' ) ) $login_header_title = $wpbizplugins_uac_options[ 'login_title' ];
     494
     495    return $login_header_title;
     496
     497}
     498
     499add_filter( 'login_headertitle', 'wpbizplugins_uac_login_title' );
     500
     501function wpbizplugins_uac_login_link_blank() {
     502
     503    global $wpbizplugins_uac_options;
     504
     505    if( ( isset( $wpbizplugins_uac_options[ 'login_link' ] ) ) && ( $wpbizplugins_uac_options[ 'login_link' ] != '' ) ) {
     506        echo '<script type="text/javascript">jQuery( document ).ready( function() {
     507            jQuery( "#login a" ).attr( "target", "_blank" );
     508        });
     509        </script>';
     510    }
     511
     512}
     513
     514add_action( 'login_footer', 'wpbizplugins_uac_login_link_blank' );
  • admin-branding/trunk/inc/redux-config.php

    r1018436 r1030399  
    378378                        'compiler' => true,
    379379                        'readonly' => false
     380                    ),
     381
     382                    array(
     383                        'id'       => 'login_link',
     384                        'type'     => 'text',
     385                        'title'    => __('Link for logo', 'wpbizplugins-uac'),
     386                        'subtitle' => __('Fill in this if you want your custom logo to link to something', 'wpbizplugins-uac'),
     387                        'desc'     => __('For example: Link to you company website.', 'wpbizplugins-uac'),
     388                        'default'  => '',
     389                        'validate' => 'url',
     390                        'required' => array('custom_logo','!=',''),
     391                    ),
     392
     393                    array(
     394                        'id'       => 'login_title',
     395                        'type'     => 'text',
     396                        'title'    => __('Title for logo link', 'wpbizplugins-uac'),
     397                        'subtitle' => __('The title of the logo link', 'wpbizplugins-uac'),
     398                        //'desc'     => __('For example: Link to you company website.', 'wpbizplugins-uac'),
     399                        'default'  => '',
     400                        'required' => array('custom_logo','!=',''),
    380401                    ),
    381402
  • admin-branding/trunk/readme.txt

    r1018436 r1030399  
    44Tags: admin, branding, admin branding, custom admin dashboard, customize login screen, custom admin, login screen, admin menu, logo in admin dashboard, brand dashboard, custom branding, custom login url, own login url, login url, wpbizplugins
    55Requires at least: 3.5
    6 Tested up to: 4.0
    7 Stable tag: 1.1.0
     6Tested up to: 4.0.1
     7Stable tag: 1.1.1
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    6969* Bugfixes and more
    7070
     71= 1.1.0 =
     72* Support for custom linking of the login logo
     73
    7174== Upgrade Notice ==
    7275
Note: See TracChangeset for help on using the changeset viewer.