Plugin Directory

Changeset 1127769


Ignore:
Timestamp:
04/04/2015 03:05:08 PM (11 years ago)
Author:
liwanglin12
Message:

1.60

[新增]启用WP原生链接管理器功能
[恢复]Google API替换功能

Location:
wp-plus/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • wp-plus/trunk/option.php

    r1122960 r1127769  
    2626echo plus_version;
    2727?>版本更新日志:<br />
    28 [新增]低版本IE更新提示功能
     28[新增]启用WP原生链接管理器功能<br />
     29[恢复]Google API替换功能
    2930</div>
    3031<form method="POST" action="">
     
    7172echo get_option("wp_plus_ietip");
    7273?> /> 启用“提示IE10以下IE用户更换浏览器”功能<p>
     74<input type="checkbox" name="linkman" id="linkman" <?php
     75echo get_option("wp_plus_linkman");
     76?> /> 启用“WP原生链接管理器”功能<p>
     77<input type="checkbox" name="google" id="google" <?php
     78echo get_option("wp_plus_google");
     79?> /> 启用“替换Google API”功能<p>
    7380<input type="submit" class="button-primary" value="保存设置" /> &nbsp; WP-Plus 版本 <?php
    7481echo plus_version;
     
    184191    }
    185192    update_option('wp_plus_ietip', $display);
    186    
     193    if ($_POST['linkman'] == 'on') {
     194        $display = 'checked';
     195    } else {
     196        $display = '';
     197    }
     198    update_option('wp_plus_linkman', $display);
     199    if ($_POST['google'] == 'on') {
     200        $display = 'checked';
     201    } else {
     202        $display = '';
     203    }
     204    update_option('wp_plus_google', $display);
    187205}
    188206?>
  • wp-plus/trunk/readme.txt

    r1122960 r1127769  
    2929
    3030== Changelog ==
     31= 1.60 =
     32[新增]启用WP原生链接管理器功能
     33[恢复]Google API替换功能
    3134= 1.59 =
    3235[新增]低版本IE更新提示功能
     
    6063
    6164== Upgrade Notice ==
     65[新增]启用WP原生链接管理器功能
     66[恢复]Google API替换功能
    6267= 1.59 =
    6368[新增]低版本IE更新提示功能
  • wp-plus/trunk/wp-plus.php

    r1122960 r1127769  
    66Author: liwanglin12
    77Author URI: http://lwl12.com
    8 Version: 1.59
     8Version: 1.60
    99*/
    1010/*Exit if accessed directly:安全第一,如果是直接载入,就退出.*/
    1111defined('ABSPATH') or exit;
    12 define("plus_version", "1.59");
     12define("plus_version", "1.60");
    1313/* 插件初始化*/
    1414register_activation_hook(__FILE__, 'plus_plugin_activate');
     
    313313<?php
    314314    require "welcomemsg.php";
    315     function plus_welcomemsg_css(){
     315    function plus_welcomemsg_css()
     316    {
    316317        echo '<style type="text/css">#hellobaby { width: 200px; background:#000000; border:1px solid #B3B3B3; color:#FFFFFF; font-size:14px; opacity:0.7; filter:alpha(opacity=70); padding: 10px 10px 10px 10px; position:fixed; right:0; top:150px; z-index:999; } .closebox{float:left;text-align:center;font-size:26px;margin-top:0px;padding: 0 10px 0 0;} .closebox a{border-bottom: none;}</style>';
    317318    }
    318     function plus_welcomemsg(){
     319    function plus_welcomemsg()
     320    {
    319321        $msg = welcome_msg();
    320322        if ($msg !== false) {
    321         echo "<script type=\"text/javascript\"> (function(){ var wait = 30; var interval = setInterval(function(){ var time = --wait; if(time <= 0) { $('#hellobaby').animate({right:'-20000px'}).hide(); clearInterval(interval); }; }, 1000); })(); </script>";
    322         echo '<div id="hellobaby"> <div class="closebox"><a href="javascript:void(0)" onclick="$(\'#hellobaby\').animate({right:\'-20000px\'});" title="关闭">x</a></div>';
    323         echo $msg;
    324         echo '</div>';
    325         }       
     323            echo "<script type=\"text/javascript\"> (function(){ var wait = 30; var interval = setInterval(function(){ var time = --wait; if(time <= 0) { $('#hellobaby').animate({right:'-20000px'}).hide(); clearInterval(interval); }; }, 1000); })(); </script>";
     324            echo '<div id="hellobaby"> <div class="closebox"><a href="javascript:void(0)" onclick="$(\'#hellobaby\').animate({right:\'-20000px\'});" title="关闭">x</a></div>';
     325            echo $msg;
     326            echo '</div>';
     327        }
    326328    }
    327329    add_action('wp_head', 'plus_welcomemsg_css');
     
    335337?>
    336338<?php
    337     function plus_ietip(){
     339    function plus_ietip()
     340    {
    338341        echo '<!--[if lt IE 10]><script src="http://wuyongzhiyong.b0.upaiyun.com/iedie/v1.1/script.min.js"></script><![endif]-->';
    339342    }
     
    341344?>
    342345<?php
     346}
     347?>
     348<?php
     349if (get_option('wp_plus_linkman') == 'checked') {
     350    add_filter('pre_option_link_manager_enabled', '__return_true');
     351}
     352/*谷歌替换*/
     353if (get_option('wp_plus_google') == 'checked') {
     354    add_filter('style_loader_tag', array(
     355        $this,
     356        'ohMyFont'
     357    ), 888, 4);
     358    function ohMyFont($text)
     359    {
     360        returnstr_replace('//fonts.googleapis.com/', '//fonts.geekzu.org/', $text);
     361        returnstr_replace('//ajax.googleapis.com', '//sdn.geekzu.org/ajax', $text);
     362    }
    343363}
    344364?>
Note: See TracChangeset for help on using the changeset viewer.