Deprecated function warning
-
The error is:
get_bloginfo was called with an argument that is deprecated since version 2.2! Thetext_direction
option is deprecated for the family ofbloginfo()
functions.Fix is:
— admin-menu.php.orig 2016-08-08 16:47:26.160106167 -0400
+++ admin-menu.php 2016-08-08 16:48:09.823104866 -0400
@@ -183,11 +183,11 @@
echo ‘<input class=”check-field” type=”checkbox” name=”plugin_options[H5BP_html]” value=”true” ‘ .$checked. ‘/>’;
echo ‘<p>Replace standard<html>
with HTML5 Boilerplate IE-Conditional version.</p>’;
echo ‘<p>Selecting this option will replace your existing<html>
with the following code on all of your pages:</p>’;
– echo ‘<!--[if lt IE 7 ]><html dir="'.get_bloginfo('text_direction').'" lang="'.get_bloginfo('language').'" class="no-js ie ie6 lte7 lte8 lte9"><![endif]-->
‘;
– echo ‘<!--[if IE 7 ]><html dir="'.get_bloginfo('text_direction').'" lang="'.get_bloginfo('language').'" class="no-js ie ie7 lte7 lte8 lte9"><![endif]-->
‘;
– echo ‘<!--[if IE 8 ]><html dir="'.get_bloginfo('text_direction').'" lang="'.get_bloginfo('language').'" class="no-js ie ie8 lte8 lte9"><![endif]-->
‘;
– echo ‘<!--[if IE 9 ]><html dir="'.get_bloginfo('text_direction').'" lang="'.get_bloginfo('language').'" class="no-js ie ie9 lte9"><![endif]-->
‘;
– echo ‘<!--[if (gt IE 9)|!(IE)]><!--><html dir="'.get_bloginfo('text_direction').'" lang="'.get_bloginfo('language').'" class="no-js"><!-->![endif]-->
‘;
+ echo ‘<!--[if lt IE 7 ]><html dir="'.is_rtl().'" lang="'.get_bloginfo('language').'" class="no-js ie ie6 lte7 lte8 lte9"><![endif]-->
‘;
+ echo ‘<!--[if IE 7 ]><html dir="'.is_rtl().'" lang="'.get_bloginfo('language').'" class="no-js ie ie7 lte7 lte8 lte9"><![endif]-->
‘;
+ echo ‘<!--[if IE 8 ]><html dir="'.is_rtl().'" lang="'.get_bloginfo('language').'" class="no-js ie ie8 lte8 lte9"><![endif]-->
‘;
+ echo ‘<!--[if IE 9 ]><html dir="'.is_rtl().'" lang="'.get_bloginfo('language').'" class="no-js ie ie9 lte9"><![endif]-->
‘;
+ echo ‘<!--[if (gt IE 9)|!(IE)]><!--><html dir="'.is_rtl().'" lang="'.get_bloginfo('language').'" class="no-js"><!-->![endif]-->
‘;
}
endif; // H5BP_html_setting@@ -484,8 +484,8 @@
// kill xml namespace
$new = str_replace(‘ xmlns=”https://www.w3.org/1999/xhtml”‘, ”, $new);
// insert dir if missing
– if (!strpos($new,’dir=’) && get_bloginfo(‘text_direction’)) {
– $new = str_replace(‘<html’, ‘<html dir=”‘.get_bloginfo(‘text_direction’).'”‘, $new);
+ if (!strpos($new,’dir=’) && is_rtl()) {
+ $new = str_replace(‘<html’, ‘<html dir=”‘.is_rtl().'”‘, $new);
}
// insert lang if missing
if (!strpos($new,’lang=’) && get_bloginfo(‘language’)) {
- The topic ‘Deprecated function warning’ is closed to new replies.