[Plugin: LaTeX for WordPress] Deprecated use of snoopy class
-
use of snoopy class needs to be replaced with WP_Http as per https://wpquestions.com/question/show/id/1925
This is the fixed section of latex.php:
if ( !is_file($cache_formula_path) || filesize($cache_formula_path) < 10) {
if( !class_exists( ‘WP_Http’ ) )
include_once( ABSPATH . WPINC. ‘/class-http.php’ );$request = new WP_Http;
$formula_text_html = str_replace(‘%C2%A0’, ‘%20’,
rawurlencode(html_entity_decode(preg_replace(‘/\\\\label{.*?}/’, ”, $formula_text))));
$result = $request->request(get_option(‘latex_img_server’).$formula_text_html);
if (strlen($result[‘body’]) < 10)
$result = $request->request(‘https://www.quantnet.com/cgi-bin/mathtex.cgi?’.rawurlencode(($formula_text)));
$cache_file = fopen($cache_formula_path, ‘w’);
fputs($cache_file, $result[‘body’]);
- The topic ‘[Plugin: LaTeX for WordPress] Deprecated use of snoopy class’ is closed to new replies.