Фильтры wordpress "add_filter"
-
Добрый день, после обновления wordpress 4.0 на 4.1 перестал работать один очень нужный мне плагин. Вот часть его кода:
$counter_comment_author_IP = 0; add_filter('get_comment_author_IP','comment_author_World_IP'); function comment_author_World_IP($comment_author_IP) { global $counter_comment_author_IP; // Преобразуем IP в число $int = sprintf("%u", ip2long($comment_author_IP)); $country_name = ""; $country_id = 0; $city_name = ""; $city_id = 0;
WordPress обновил файл wp-admin\includes\class-wp-comments-list-table.php
Код до обновления:echo '<a href="edit-comments.php?s='; comment_author_IP(); echo '&mode=detail'; if ( 'spam' == $comment_status ) echo '&comment_status=spam'; echo '">'; comment_author_IP(); echo '</a>';
Код после обновления:
$author_ip = get_comment_author_IP(); if ( $author_ip ) { $author_ip_url = add_query_arg( array( 's' => $author_ip, 'mode' => 'detail' ), 'edit-comments.php' ); if ( 'spam' == $comment_status ) { $author_ip_url = add_query_arg( 'comment_status', 'spam', $author_ip_url ); } printf( '<a href="%s">%s</a>', esc_url( $author_ip_url ), $author_ip ); }
Помогите модифицировать код плагина? Всем большое Спасибо!
- Тема «Фильтры wordpress "add_filter"» закрыта для новых ответов.