با سلام خدمت اساتید گرامی
جدیدا یه قالب رو رو سایت سوار کردم ، خیلی ساده و سبکه اما یه مشکل دارم که وقتی تو دسته ها مطالب زیاد میشن با این پیغام مواجه میشم ؛ اگه ممکنه راهنمایی کنید
آدرس سایت :
وب سایت دکتر حسن خلیل آبادی
پیغام خطا :
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 2031845 bytes) in /home/khalil/public_html/wp-includes/formatting.php on line 87
برای کسانی که نیاز به کد php فایل formatting دارند هم کدها رو گزاشتم از خط 29 تا خط 97:
function wptexturize($text) {
global $wp_cockneyreplace;
static $opening_quote, $closing_quote, $en_dash, $em_dash, $default_no_texturize_tags, $default_no_texturize_shortcodes, $static_characters, $static_replacements, $dynamic_characters, $dynamic_replacements;
// No need to set up these static variables more than once
if ( empty( $opening_quote ) ) {
/* translators: opening curly quote */
$opening_quote = _x('“', 'opening curly quote');
/* translators: closing curly quote */
$closing_quote = _x('”', 'closing curly quote');
/* translators: en dash */
$en_dash = _x('–', 'en dash');
/* translators: em dash */
$em_dash = _x('—', 'em dash');
$default_no_texturize_tags = array('pre', 'code', 'kbd', 'style', 'script', 'tt');
$default_no_texturize_shortcodes = array('code');
// if a plugin has provided an autocorrect array, use it
if ( isset($wp_cockneyreplace) ) {
$cockney = array_keys($wp_cockneyreplace);
$cockneyreplace = array_values($wp_cockneyreplace);
} else {
$cockney = array("'tain't","'twere","'twas","'tis","'twill","'til","'bout","'nuff","'round","'cause");
$cockneyreplace = array("’tain’t","’twere","’twas","’tis","’twill","’til","’bout","’nuff","’round","’cause");
}
$static_characters = array_merge( array('---', ' -- ', '--', ' - ', 'xn–', '...', '<code></code>', '\'\'', ' (tm)'), $cockney );
$static_replacements = array_merge( array($em_dash, ' ' . $em_dash . ' ', $en_dash, ' ' . $en_dash . ' ', 'xn--', '…', $opening_quote, $closing_quote, ' ™'), $cockneyreplace );
$dynamic_characters = array('/\'(\d\d(?:’|\')?s)/', '/\'(\d)/', '/(\s|\A|[([{<]|")\'/', '/(\d)"/', '/(\d)\'/', '/(\S)\'([^\'\s])/', '/(\s|\A|[([{<])"(?!\s)/', '/"(\s|\S|\Z)/', '/\'([\s.]|\Z)/', '/\b(\d+)x(\d+)\b/');
$dynamic_replacements = array('’$1','’$1', '$1‘', '$1″', '$1′', '$1’$2', '$1' . $opening_quote . '$2', $closing_quote . '$1', '’$1', '$1×$2');
}
// Transform into regexp sub-expression used in _wptexturize_pushpop_element
// Must do this everytime in case plugins use these filters in a context sensitive manner
$no_texturize_tags = '(' . implode('|', apply_filters('no_texturize_tags', $default_no_texturize_tags) ) . ')';
$no_texturize_shortcodes = '(' . implode('|', apply_filters('no_texturize_shortcodes', $default_no_texturize_shortcodes) ) . ')';
$no_texturize_tags_stack = array();
$no_texturize_shortcodes_stack = array();
$textarr = preg_split('/(<.*>|\[.*\])/Us', $text, -1, PREG_SPLIT_DELIM_CAPTURE);
foreach ( $textarr as &$curl ) {
if ( empty( $curl ) )
continue;
// Only call _wptexturize_pushpop_element if first char is correct tag opening
$first = $curl[0];
if ( '<' === $first ) {
_wptexturize_pushpop_element($curl, $no_texturize_tags_stack, $no_texturize_tags, '<', '>');
} elseif ( '[' === $first ) {
_wptexturize_pushpop_element($curl, $no_texturize_shortcodes_stack, $no_texturize_shortcodes, '[', ']');
} elseif ( empty($no_texturize_shortcodes_stack) && empty($no_texturize_tags_stack) ) {
// This is not a tag, nor is the texturization disabled static strings
$curl = str_replace($static_characters, $static_replacements, $curl);
// regular expressions
$curl = preg_replace($dynamic_characters, $dynamic_replacements, $curl);
}
$curl = preg_replace('/&([^#])(?![a-zA-Z1-4]{1,8};)/', '&$1', $curl);
}
return implode( '', $textarr );
}