Plugin Directory

Changeset 1033580


Ignore:
Timestamp:
11/27/2014 04:59:06 AM (11 years ago)
Author:
mignonstyle
Message:

Bug fix.

Location:
ms-custom-login/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • ms-custom-login/trunk/languages/ms-custom-login-ja.po

    r1033320 r1033580  
    44msgstr ""
    55"Project-Id-Version: MS Custom Login\n"
    6 "POT-Creation-Date: 2014-11-27 01:33+0900\n"
    7 "PO-Revision-Date: 2014-11-27 01:33+0900\n"
     6"POT-Creation-Date: 2014-11-27 13:39+0900\n"
     7"PO-Revision-Date: 2014-11-27 13:39+0900\n"
    88"Last-Translator: Mignon Style <mignonxstyle@gmail.com>\n"
    99"Language-Team: Mignon Style <mignonxstyle@gmail.com>\n"
  • ms-custom-login/trunk/languages/ms-custom-login.pot

    r1033320 r1033580  
    44msgstr ""
    55"Project-Id-Version: MS Custom Login\n"
    6 "POT-Creation-Date: 2014-11-27 01:32+0900\n"
    7 "PO-Revision-Date: 2014-11-27 01:32+0900\n"
     6"POT-Creation-Date: 2014-11-27 13:39+0900\n"
     7"PO-Revision-Date: 2014-11-27 13:39+0900\n"
    88"Last-Translator: \n"
    99"Language-Team: Mignon Style <mignonxstyle@gmail.com>\n"
  • ms-custom-login/trunk/ms-custom-login.php

    r1033320 r1033580  
    66 * Text Domain: ms-custom-login
    77 * Domain Path: /languages
    8  * Version: 0.5
     8 * Version: 0.6
    99 * Author: Mignon Style
    1010 * Author URI: http://mignonstyle.com
     
    963963    if ( strcmp( get_template(), 'chocolat' ) == 0 && ! empty( $options['mcl_option_chocolat'] ) ) {
    964964        wp_enqueue_style( 'ms-custom-login-chocolat', MS_CUSTOM_LOGIN_PLUGIN_URL . 'inc/mcl-chocolat/mcl-chocolat.css', array(), null );
    965     }
    966 
    967     wp_enqueue_style( 'ms-custom-login', home_url( '/?mcl_login=1' ) );
    968     wp_print_styles();
    969 }
    970 add_action( 'login_enqueue_scripts', 'ms_custom_login_style' );
    971 
    972 /**
    973  * ------------------------------------------------------------
    974  * 7.3.1 - Add Query Var Stylesheet trigger
    975  * Adds a query var to our stylesheet,
    976  * so it can trigger our psuedo-stylesheet
    977  * ------------------------------------------------------------
    978  */
    979 
    980 function ms_custom_login_add_trigger( $vars ) {
    981     $vars[] = 'mcl_login';
    982     return $vars;
    983 }
    984 add_filter( 'query_vars', 'ms_custom_login_add_trigger' );
    985 
    986 /**
    987  * ------------------------------------------------------------
    988  * 7.3.2 - pseudo-stylesheet load
    989  * If trigger (query var) is tripped, load our pseudo-stylesheet
    990  * I'd prefer to esc $content at the very last moment,
    991  * but we need to allow the > character.
    992  * ------------------------------------------------------------
    993  */
    994 
    995 function ms_custom_login_trigger_check() {
    996     if ( intval( get_query_var( 'mcl_login' ) ) == 1 ) {
    997         ob_start();
    998         header( 'Content-type: text/css; charset=utf-8' );
    999         $raw_content = ms_custom_login_output();
    1000         $content     = wp_kses( $raw_content, array( '\'', '\"' ) );
    1001         $content     = str_replace( '&gt;', '>', $content );
    1002         echo $content; //xss okay
    1003         exit;
    1004         ob_clean();
    1005     }
    1006 }
    1007 add_action( 'template_redirect', 'ms_custom_login_trigger_check' );
    1008 
    1009 /**
    1010  * ------------------------------------------------------------
    1011  * 7.3.3 - Login Page Style Output CSS
    1012  * ------------------------------------------------------------
    1013  */
    1014 
    1015 function ms_custom_login_output() {
    1016     $options = ms_custom_login_get_option();
    1017     $default = ms_custom_login_default_options();
    1018     echo '@charset "UTF-8";' . "\n\n";
     965        wp_print_styles();
     966    }
     967
     968    echo '<style type="text/css">' . "\n";
    1019969
    1020970// Web font
     
    12701220<?php echo "\n"; endif;
    12711221
    1272     // custom css
    1273     if ( ! empty( $options['mcl_custom_css'] ) ) {
    1274         echo wp_kses_stripslashes( $options['mcl_custom_css'] ) . "\n";
    1275     }
    1276 }
     1222// custom css
     1223if ( ! empty( $options['mcl_custom_css'] ) ) {
     1224    echo "\n" . wp_kses_stripslashes( $options['mcl_custom_css'] ) . "\n";
     1225} ?>
     1226</style>
     1227<?php
     1228}
     1229add_action( 'login_enqueue_scripts', 'ms_custom_login_style' );
  • ms-custom-login/trunk/readme.txt

    r1033320 r1033580  
    5555== Changelog ==
    5656
     57= 0.6 =
     58* Bug fix.
     59
    5760= 0.5 =
    5861* Add a tab to the options page.
Note: See TracChangeset for help on using the changeset viewer.