| Server IP : 77.68.64.21 / Your IP : 216.73.217.105 Web Server : Apache System : Linux hp3-wp-1011378.hostingp3.local 3.10.0-1160.144.1.el7.tuxcare.els9.x86_64 #1 SMP Fri Jul 10 17:06:31 UTC 2026 x86_64 User : csh2668128 ( 2112425) PHP Version : 8.1.34 Disable Function : shell_exec,exec,system,popen,set_time_limit MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /proc/self/cwd/wp-content/themes/jannah/framework/plugins/ |
Upload File : |
<?php
/**
* Instant Articles for WP
*
*/
defined( 'ABSPATH' ) || exit; // Exit if accessed directly
if( ! class_exists( 'TIELABS_FBINSTANT_ARTICLES' )){
class TIELABS_FBINSTANT_ARTICLES{
/**
* __construct
*
* Class constructor where we will call our filter and action hooks.
*/
function __construct(){
// Disable if the Instant Articles for WP plugin is not active
if( ! TIELABS_FB_INSTANT_IS_ACTIVE ){
return false;
}
// Filters
add_filter( 'instant_articles_transformer_custom_rules_loaded', array( $this, '_transformer_custom_rules' ));
add_filter( 'instant_articles_subtitle', array( $this, '_articles_subtitle' ), 10, 2);
}
/**
* _transformer_custom_rules
*/
function _transformer_custom_rules( $transformer ){
$rules = array(
'rules' => array(
array(
'class' => 'TextNodeRule'
),
array(
'class' => 'PassThroughRule',
'selector' => "div[class^='tie-padding']",
),
array(
'class' => 'PassThroughRule',
'selector' => "div[class^='checklist']",
),
array(
'class' => 'PassThroughRule',
'selector' => "div[class^='tie-full-width-img']",
),
array(
'class' => 'IgnoreRule',
'selector' => 'div.index-title',
),
array(
'class' => 'IgnoreRule',
'selector' => "div[class^='stream-item-in-post']",
),
)
);
$transformer->loadRules( json_encode( $rules ) );
return $transformer;
}
/**
* _articles_subtitle
*
*/
function _articles_subtitle( $sub_title = '', $the_post ){
if( empty( $the_post ) ){
return $sub_title;
}
return tie_get_postdata( 'tie_post_sub_title', $sub_title, $the_post->get_the_id() );
}
}
// Instantiate the class
new TIELABS_FBINSTANT_ARTICLES();
}