Plugin Directory

Changeset 883915


Ignore:
Timestamp:
03/29/2014 02:08:20 AM (12 years ago)
Author:
mathzqy
Message:

fix two obsolite functions

Location:
latex/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • latex/trunk/latex.php

    r875765 r883915  
    44Plugin URI: http://wordpress.org/extend/plugins/latex/
    55Description: Using MathJax and LaTex image service, this plugin provides a general solution to add and display your mathematical fourmula, no matter the visitors are visiting your blog or read from Google Reader.
    6 Version: 3.4.7
     6Version: 3.4.8
    77Author: zhiqiang
    88Author URI: http://zhiqiang.org
     
    3737function latex_admin_page() {
    3838        if (function_exists('add_submenu_page')) {
    39                 add_submenu_page('options-general.php',  'LaTex administrator',  'LaTex', 1, 'latex/latex-admin.php');
     39                add_submenu_page('options-general.php',  'LaTex administrator',  'LaTeX', 'manage_options', 'latex/latex-admin.php');
    4040        }
    4141}
     
    4545function decode_entities_latex($text) {
    4646    $text= html_entity_decode($text,ENT_QUOTES,"ISO-8859-1"); #NOTE: UTF-8 does not work!
    47     $text= preg_replace('/&#(\d+);/me',"chr(\\1)",$text); #decimal notation
    48     $text= preg_replace('/&#x([a-f0-9]+);/mei',"chr(0x\\1)",$text);  #hex notation
     47    $text = preg_replace_callback(
     48        '/&#(\d+);/m',
     49        function($m) {
     50            return chr(intval($m[1]));
     51        },
     52        $text); # decimal notation
     53    $text = preg_replace_callback(
     54        '/&#x([a-f0-9]+);/mi',
     55        function($m) {
     56            return chr(intval("0x$m[1]"));
     57        },
     58        $text); #hex notation
    4959    return $text;
    5060}
  • latex/trunk/readme.txt

    r876150 r883915  
    1212
    1313verion logs:
     14
     15ver 3.4.8 replace two obsolute functions. one is the regular express 'e' option which will not be supported by PHP. the second is 'user layer' is not support by WordPress. The patch is provided by XIA Rui. Thanks.
    1416
    1517ver 3.4.7 make the space around inline formula to be optional. It's closed by default. But I recommend turn on it on Chinese blog.
Note: See TracChangeset for help on using the changeset viewer.