0){ foreach ($scriptComponent as $key => $value) { if ( empty( $data['amp_component_scripts'][$key] ) ) { $data['amp_component_scripts'][$key] = $value; } } } return $data; } //Component Loader function add_amp_theme_support($componentName){ global $wpdb; global $loadComponent,$supportComponent; if($supportComponent){ if(in_array($componentName, $supportComponent)){ $loadComponent[$componentName] = true; ampforwp_loadComponents($componentName); return true; } } return false; } //Include the Component file function ampforwp_loadComponents($componentName){ global $wpdb; if(empty($componentName)) return ''; $componentName = str_replace("AMP-", "", $componentName); $file = AMP_FRAMEWORK_COMOPNENT_DIR_PATH.'/'.$componentName.'/'.$componentName.".php"; if(!file_exists($file)){ return ''; } include_once($file); } // Icons $amp_icons_css = array(); function add_amp_icon($args=array()){ global $amp_icons_css, $redux_builder_amp; $amp_icons_css_array = include AMPFORWP_PLUGIN_DIR .'includes/icons/amp-icons.php'; foreach ($args as $key ) { if(isset($amp_icons_css_array[$key])) $amp_icons_css[$key] = $amp_icons_css_array[$key]; } // Design-1,2,3 if ( 1 == $redux_builder_amp['amp-design-selector'] || 2 == $redux_builder_amp['amp-design-selector'] || 3 == $redux_builder_amp['amp-design-selector'] ) { add_action('amp_post_template_css', 'amp_icon_css',999); } else add_action('amp_css', 'amp_icon_css'); } function amp_icon_css(){ global $amp_icons_css, $redux_builder_amp; foreach ($amp_icons_css as $key => $value) { // TODO: https://github.com/ahmedkaludi/accelerated-mobile-pages/issues/2651 echo $value; } // Add @font-face for Design-1,2,3 if ( 1 == $redux_builder_amp['amp-design-selector'] || 2 == $redux_builder_amp['amp-design-selector'] || 3 == $redux_builder_amp['amp-design-selector'] ) { ?> @font-face {font-family: 'icomoon';font-style: normal;font-weight: normal;font-display: swap;src: local('icomoon'), local('icomoon'), url('icomoon/icomoon.ttf');} [class^="icon-"], [class*=" icon-"] {font-family: 'icomoon';speak: none;font-style: normal;font-weight: normal;font-variant: normal;text-transform: none;line-height: 1;-webkit-font-smoothing: antialiased;-moz-osx-font-smoothing: grayscale;} ID; if( $ID!=null ){ do_action('ampforwp_above_the_title'); ?>
ID; if ( $post_id != null && true == $redux_builder_amp['enable-excerpt-single'] ) { ?> get( 'html_tag_attributes' ) ); $bodyClass = ''; if ( is_single() || is_page() ) { $bodyClass = 'single-post'; $bodyClass .= ( is_page()? ' amp-single-page ' : ' amp-single '); } // Archive if ( is_archive() ) { $bodyClass = 'amp-archive'; } $ampforwp_custom_post_page = ampforwp_custom_post_page(); add_action('amp_post_template_head','ampforwp_sanitize_archive_desc'); function ampforwp_sanitize_archive_desc(){ $description = get_the_archive_description(); if ($description) { $sanitizer = new AMPFORWP_Content( $description, array(), apply_filters( 'ampforwp_content_sanitizers', array( 'AMP_Style_Sanitizer' => array(), 'AMP_Blacklist_Sanitizer' => array(), 'AMP_Img_Sanitizer' => array(), 'AMP_Video_Sanitizer' => array(), 'AMP_Audio_Sanitizer' => array(), 'AMP_Iframe_Sanitizer' => array( 'add_placeholder' => true, ) ) ) ); $amp_component_scripts = $sanitizer->amp_scripts; if ( $sanitizer && $amp_component_scripts) { foreach ($amp_component_scripts as $ampforwp_service => $ampforwp_js_file) { ?> get( 'body_class' ) ); if ($redux_builder_amp['amp-frontpage-select-option'] == 1) { $bodyClass = 'single-post design_3_wrapper'; } if ( $ampforwp_custom_post_page == "page" && ampforwp_name_blog_page() ) { $current_url = home_url( $GLOBALS['wp']->request ); $current_url_in_pieces = explode( '/', $current_url ); if( in_array( ampforwp_name_blog_page() , $current_url_in_pieces ) ) { $bodyClass = 'amp-index' .esc_attr( $thisTemplate->get( 'body_class' ) ); } } } // is_search if ( is_search() ) { $bodyClass = 'amp_home_body archives_body design_3_wrapper'; } if( true == $redux_builder_amp['amp-rtl-select-option'] ){ $bodyClass .= ' rtl '; } ?> get( 'html_tag_attributes' ) ); ?>> '; wp_head(); }else{ if(is_search()){?> > load_parts( array( 'header' ) ); do_action( 'amp_after_header', $thisTemplate ); do_action( 'ampforwp_after_header', $thisTemplate ); do_action('ampforwp_post_before_design_elements') ?> load_parts( array( 'footer' ) ); } function amp_footer_core(){ global $ampforwpTemplate; $post_id = get_queried_object_id(); if ( ampforwp_polylang_front_page() ) { $post_id = pll_get_post(get_option('page_on_front')); } $thisTemplate = $ampforwpTemplate; if(ampforwp_amp_nonamp_convert("", "check")){ wp_footer(); } else { do_action( 'amp_post_template_footer', $thisTemplate ); do_action('ampforwp_global_after_footer'); do_action('amp_end',$thisTemplate); } amp_back_to_top_link(); // Close the body and Html tags ?>| ';
global $redux_builder_amp;
echo '' . strip_tags(ampforwp_translation($redux_builder_amp['amp-translator-footer-text'],'All Rights Reserved'),$allowed_tags) . '' ;
if($redux_builder_amp['amp-footer-link-non-amp-page']=='1') { ampforwp_view_nonamp(); }
}
// Back to Top
function amp_back_to_top_link(){
global $redux_builder_amp;
if(true == ampforwp_get_setting('ampforwp-footer-top')){?>
'.esc_attr($post_date).' ';
}
//Load font Compoment
$fontComponent = array();
function amp_post_load_custom_fonts(){
global $fontComponent;
if(count($fontComponent)){
$fontComponent = array_unique($fontComponent);
foreach ($fontComponent as $key => $value) {
?>
body.rtl {direction: rtl;}
body amp-carousel{ direction: ltr;}
post_author);
$author_link = get_author_posts_url($post_author->ID);
if ( $author_name ) {
echo ' ' .esc_html( $post_author->display_name ).'';
}
if ( $avatar && true == ampforwp_gravatar_checker($post_author->user_email) ) {
$author_avatar_url = get_avatar_url( $post_author->ID, array( 'size' => $avatar_size ) );
?>
|