public function get_extraction_rules() { return [ 'article_xpath' => [ '//div[contains(@class,"s-prose")]' ], // Featured image (from article body) 'featured_image_xpath' => '(//div[contains(@class,"s-prose")]//img)[1]', // Remove duplicates and unwanted elements 'remove_xpaths' => [ '//h1[contains(@class,"t-page-title")]', '//p[contains(@class,"t-page-subtitle")]', ], /** * Remove ALL tags from the article HTML * (featured image is handled separately by the plugin) */ 'postprocess_callback' => function($html) { libxml_use_internal_errors(true); $dom = new DOMDocument(); $dom->loadHTML(mb_convert_encoding($html, 'HTML-ENTITIES', 'UTF-8')); libxml_clear_errors(); $xp = new DOMXPath($dom); // Remove all IMAGES from the article body foreach ($xp->query('//img') as $img) { $img->parentNode->removeChild($img); } $body = $dom->getElementsByTagName('body')->item(0); return $dom->saveHTML($body); }, ]; } Rail Safety Month – LW Rail Train Magazine

Rail Safety Month

Rail Safety Month

We have planned another monthly event for December. It is called Rail advertorial month. It will be showcasing some of Britain’s best railway adverts.

One of the most famous railway adverts, the BR intercity advert where the police pull over the HST is one of the most successful railway ads of all time.

Lewis

Hello my name is lewis and I am the editor of LWrail train magazine. I manage the LWrail social media, YouTube channel and write most of the stories on this website.

Leave a Reply