: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
$height = $data['image_crop_height'];
if ( isset($redux_builder_amp['ampforwp-retina-images']) && true == $redux_builder_amp['ampforwp-retina-images'] ) {
if ( isset($redux_builder_amp['ampforwp-retina-images-res']) && $redux_builder_amp['ampforwp-retina-images-res'] ) {
$resolution = $redux_builder_amp['ampforwp-retina-images-res'];
$width = $width * $resolution;
$height = $height * $resolution;
$thumbnail_modify = apply_filters('ampforwp_modify_thumb_url_array', array('thumb_url'=>$thumb_url,'width'=>$width,'height'=> $height));
$thumb_url_array = ampforwp_aq_resize( $thumbnail_modify['thumb_url'], $thumbnail_modify['width'], $thumbnail_modify['height'], true, false, true ); //resize & crop the image
$thumb_url = $thumb_url_array[0];
$thumb_width = $thumb_url_array[1];
$thumb_height = $thumb_url_array[2];
$imageLink = amp_loop_permalink(true);
$loopImageData = array("post_id" =>get_the_ID(),
"image_url" =>$thumb_url,
"height" =>$thumb_height,
"layout_responsive" =>$layout_responsive,
"image_class" =>$imageClass,
"image_link" =>$imageLink
$changesInImageData = apply_filters("ampforwp_loop_image_update",$loopImageData);
if(!empty($changesInImageData) && is_array($changesInImageData)){
$thumb_url = $changesInImageData["image_url"];
$thumb_width = $changesInImageData["width"];
$thumb_height = $changesInImageData["height"];
$layout_responsive = $changesInImageData["layout_responsive"];
$imageClass = $changesInImageData["image_class"];
$imageLink = $changesInImageData["image_link"];
if(function_exists('ampforwp_check_image_existance')){
$thumb_url = ampforwp_check_image_existance($thumb_url);
if(ampforwp_get_setting('ampforwp-retina-images') && (ampforwp_get_setting('amp-design-selector') ==1 || ampforwp_get_setting('amp-design-selector') ==2 ) && (is_home() || is_archive() || is_search()) ){
$thumb_width = $width / $resolution;
$thumb_height = $height / $resolution;
if(isset($data['referer']) && $data['referer']=='related_post'){
$imageLink = ampforwp_modify_url_utm_params($imageLink);
echo '<'.esc_attr($tag).' class="loop-img '.esc_attr($tag_class).'">';
echo '<a href="'.esc_url($imageLink).'" title="'.esc_html(get_the_title()).'">';
$img_content = '<amp-img src="'. esc_url($thumb_url) .'" width="'.esc_attr($thumb_width).'" height="'.esc_attr($thumb_height).'" '. esc_attr($layout_responsive) .' class="'.esc_attr($imageClass).'" alt="'. esc_html(get_the_title()) .'"></amp-img>';
if(function_exists('ampforwp_add_fallback_element')){
$img_content = ampforwp_add_fallback_element($img_content,'amp-img');
echo '</'.esc_attr($tag).'>';
function amp_loop_category(){
$categories = get_the_category();
if (function_exists('seopress_activation')){
$cat_id = get_post_meta(ampforwp_get_the_ID(),'_seopress_robots_primary_cat',true);
if(class_exists( 'WPSEO_Options' )){
$cat_id = get_post_meta(ampforwp_get_the_ID(), '_yoast_wpseo_primary_category', true);
if(class_exists('RankMath')){
$cat_id = get_post_meta(ampforwp_get_the_ID(), 'rank_math_primary_category', true);
if (function_exists( 'the_seo_framework' )) {
$cat_id = the_seo_framework()->get_primary_term_id( ampforwp_get_the_ID(),'category' );
if(class_exists( 'SQ_Classes_ObjController' )){
$get_cat_id = SQ_Classes_ObjController::getClass('SQ_Models_Domain_Categories')->getAllCategories(ampforwp_get_the_ID());
$cat_id = key($get_cat_id);
$cat_id = apply_filters('ampforwp_custom_primary_cat',$cat_id);
$cat_name = get_cat_name($cat_id);
if( count($categories) > 0 && empty($cat_id)){
echo ' <ul class="loop-category">';
foreach($categories as $category) {
if(ampforwp_get_setting('ampforwp-cats-tags-links-single') == true){
$cat_link = get_category_link( $category->term_id );
if(ampforwp_get_setting('ampforwp-archive-support-cat') == true && ampforwp_get_setting('ampforwp-archive-support') == true){
$cat_link = ampforwp_url_controller( $cat_link );
echo '<li class="amp-cat-'. esc_attr($category->term_id) .'"><a href="'.esc_url($cat_link).'">'. esc_html($category->cat_name).'</a></li>';
echo '<li class="amp-cat-'. esc_attr($category->term_id) .'">'. esc_html($category->cat_name).'</li>';
echo '<ul class="loop-category">';
if(ampforwp_get_setting('ampforwp-cats-tags-links-single') == true){
$cat_link = get_category_link( $cat_id );
if(ampforwp_get_setting('ampforwp-archive-support-cat') == true && ampforwp_get_setting('ampforwp-archive-support') == true){
$cat_link = ampforwp_url_controller( $cat_link );
echo '<li class="amp-cat-'. esc_attr($cat_id) .'"><a href="'.esc_url($cat_link).'">'. esc_html($cat_name).'</a></li>';
echo '<li class="amp-cat-'. esc_attr($cat_id) .'">'. esc_html($cat_name).'</li>';
function amp_loop_author($args = array()){
global $redux_builder_amp;
if(function_exists('ampforwp_framework_get_author_box')){
ampforwp_framework_get_author_box($args);