示例#1
0
    function custom_login_warning()
    {
        global $custom_login;
        if (custom_login_get_setting('use_custom') != true) {
        }
        ?>
                <p id="custom-login-warning" class="updated fade below-h2" style="padding: 5px 10px;">
                    <strong><?php 
        sprintf(_e('Custom Login plugin is not configured yet. It will use the defualt theme unless you configure the %1$s.', 'custom-login'), '<a href="' . admin_url('options-general.php?page=custom-login') . '">options</a>');
        ?>
</strong>
                </p><?php 
    }
示例#2
0
<?php 
if (custom_login_get_setting('login_form_logo') == '') {
    ?>
#login h1 {
	display: none;
}
<?php 
}
if (custom_login_get_setting('login_form_logo') != '') {
    ?>
.login h1 a {
	background: url( '<?php 
    echo custom_login_get_setting('login_form_logo');
    ?>
' ) no-repeat scroll center top transparent;
}
<?php 
}
?>

label {
	color: <?php 
echo custom_login_get_setting('label_color');
?>
 !important;
}

<?php 
if ($returnCSS) {
    $css = ob_get_clean();
}
示例#3
0
/**
 * Add html after the body class
 * @since 0.4.6
 */
function custom_login_html()
{
    global $custom_login;
    if (custom_login_get_setting('custom_html') != '' || custom_login_get_setting('gravatar') != false) {
        ?>
<script type='text/javascript'>
//<![CDATA[
jQuery(document).ready(
	function($) {
		<?php 
        if (custom_login_get_setting('custom_html') != '') {
            ?>
		$('html body.login').append('<?php 
            echo wp_specialchars_decode(stripslashes(custom_login_get_setting('custom_html')), 1, 0, 1);
            ?>
');
		<?php 
        }
        ?>
		
		<?php 
        if (custom_login_get_setting('gravatar') != false && get_option('users_can_register')) {
            ?>
		var email = $('#user_email').size();		
		if (email > 0) {
		$('#user_email').parent().parent().css('position','relative');
		$('#user_email').parent().append('<span id="working"></span>');
		$('#user_email').parent().append('<img id="gravatar" style="display:none; position:relative; top:10px; width:37px" />');
		$('#user_email').css('width','80.4%').getGravatar({
			avatarSize: 48,
			start: function(){
				$('#working').fadeIn('fast');
			},
			stop: function(){
				$('#working').fadeOut('slow');
			},
			url: '/includes/get-gravatar.php',
			fallback: 'http://0.gravatar.com/avatar/ad516503a11cd5ca435acc9bb6523536'
		});
		
		$('#working').hide();
		$('img#gravatar').delay(2000).fadeTo(400,1);
		}
		<?php 
        }
        ?>
	}
);
//]]>
</script><?php 
    }
}