preg_replace error?
-
Hi
I have a site which I am currently testing but at the top I am getting this error:Warning: preg_replace() [function.preg-replace]: Unknown modifier ‘a’ in /home/widneswe/public_html/nctest.co.uk/anfield/wp-content/themes/anfieldindex/header.php on line 92
When I look on header.php line 92 there is no ‘a’ modifier.
Code`<nav id=”main-menu”>
<?php
echo preg_replace(array(
‘/\t/’, // remove tabs
‘/’.str_replace(‘//’,’\/\/’, get_bloginfo(‘url’)).’/i’, // remove full URL
‘/current_page_item\s*/i’,
‘/current_page_ancestor\s*/i’,
‘/current_page_parent\s*/i’,
‘/page_item\s+/i’,
‘/page-item-\d+\s*/i’,
‘/children\s*/i’,
‘/\s*class=[“\’][“\’]/i’, // empty classes
‘/\s*title=”[^”]+”/i’, // all titles
‘/\s+>/i’,
‘/div>/i’ // change div to nav
),
array(
”,
”,
‘active’,
‘open’,
”,
”,
”,
”,
”,
”,
‘>’,
‘nav>’
),
wp_nav_menu(array(‘container’ => ”, ‘theme_location’ => header, ‘menu_class’ => ”, ‘echo’ => false))
);
?>
</nav> `The only part of code which has preg in it is this section from line 61 onwards to closing at line 94. I think it is to do with the menu but not fully sure, does anyone have an idea on this?
Thanks
The topic ‘preg_replace error?’ is closed to new replies.