function links_remove () { // Подключаем DOM parser include_once('simple_html_dom.php'); // Лучше объявить массив один раз, вне циклов $links_mass = array( 'site.com' ); $args = array ('numberposts' => -1); // -1 означает все записи $allposts = get_posts( $args ); foreach( $allposts as $post ) { $id = $post->ID; $content = $post->post_content; $html = str_get_html($content); // получаем структуру DOM контента // Находим все ссылки в контенте foreach($html->find('a') as $element) { // сравниваем со ссылками в массиве foreach($links_mass as $link) { if (strpos($element->href, $link) !== false) { // есть такая ссылка, убираем в элементе все, кроме текста ссылки $element->outertext = $element->innertext; } } } $post->post_content = (string) $html->save(); // модифицируем контент wp_update_post( $post ); // обновляем пост } } add_action ('init', 'links_remove'); In renting autocrains - Заметки опытного строителя

In renting autocrains

10.04.2017 | комментариев 0 | раздел: Стены

A considerable share of qualitatively carried out work with the help of such construction equipment as a car crane depends on an experienced and qualified driver, which is able to cope with difficult tasks for the shortest possible time. Often, companies engaged in renting autocrains offer such equipment with the driver that saves the customer from many problems to search for them and invitation to work. Employees of the company with all the thoroughness and maximum responsibility are taken for the performance of tasks of varying degrees of complexity, which allows the customer to count on timely and high -quality fulfillment of their assignment.

Оставить комментарий

Текст сообщения:

Имя:

E-mail:

Капча загружается...