Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/clone/wp-conte.../plugins/accelera.../componen.../loop
File: loop.php
$width = $thumb_width;
[500] Fix | Delete
}
[501] Fix | Delete
$height = $data['image_crop_height'];
[502] Fix | Delete
if ( empty($height) ) {
[503] Fix | Delete
$height = $thumb_height;
[504] Fix | Delete
}
[505] Fix | Delete
if ( isset($redux_builder_amp['ampforwp-retina-images']) && true == $redux_builder_amp['ampforwp-retina-images'] ) {
[506] Fix | Delete
$resolution = 2;
[507] Fix | Delete
if ( isset($redux_builder_amp['ampforwp-retina-images-res']) && $redux_builder_amp['ampforwp-retina-images-res'] ) {
[508] Fix | Delete
$resolution = $redux_builder_amp['ampforwp-retina-images-res'];
[509] Fix | Delete
}
[510] Fix | Delete
$width = $width * $resolution;
[511] Fix | Delete
$height = $height * $resolution;
[512] Fix | Delete
}
[513] Fix | Delete
$thumbnail_modify = apply_filters('ampforwp_modify_thumb_url_array', array('thumb_url'=>$thumb_url,'width'=>$width,'height'=> $height));
[514] Fix | Delete
$thumb_url_array = ampforwp_aq_resize( $thumbnail_modify['thumb_url'], $thumbnail_modify['width'], $thumbnail_modify['height'], true, false, true ); //resize & crop the image
[515] Fix | Delete
$thumb_url = $thumb_url_array[0];
[516] Fix | Delete
$thumb_width = $thumb_url_array[1];
[517] Fix | Delete
$thumb_height = $thumb_url_array[2];
[518] Fix | Delete
}
[519] Fix | Delete
if ( $thumb_url ) {
[520] Fix | Delete
$imageLink = amp_loop_permalink(true);
[521] Fix | Delete
$loopImageData = array("post_id" =>get_the_ID(),
[522] Fix | Delete
"image_url" =>$thumb_url,
[523] Fix | Delete
"width" =>$thumb_width,
[524] Fix | Delete
"height" =>$thumb_height,
[525] Fix | Delete
"layout_responsive" =>$layout_responsive,
[526] Fix | Delete
"image_class" =>$imageClass,
[527] Fix | Delete
"image_link" =>$imageLink
[528] Fix | Delete
);
[529] Fix | Delete
$changesInImageData = apply_filters("ampforwp_loop_image_update",$loopImageData);
[530] Fix | Delete
if(!empty($changesInImageData) && is_array($changesInImageData)){
[531] Fix | Delete
$thumb_url = $changesInImageData["image_url"];
[532] Fix | Delete
$thumb_width = $changesInImageData["width"];
[533] Fix | Delete
$thumb_height = $changesInImageData["height"];
[534] Fix | Delete
$layout_responsive = $changesInImageData["layout_responsive"];
[535] Fix | Delete
$imageClass = $changesInImageData["image_class"];
[536] Fix | Delete
$imageLink = $changesInImageData["image_link"];
[537] Fix | Delete
}
[538] Fix | Delete
if(function_exists('ampforwp_check_image_existance')){
[539] Fix | Delete
$thumb_url = ampforwp_check_image_existance($thumb_url);
[540] Fix | Delete
}
[541] Fix | Delete
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()) ){
[542] Fix | Delete
$thumb_width = $width / $resolution;
[543] Fix | Delete
$thumb_height = $height / $resolution;
[544] Fix | Delete
}
[545] Fix | Delete
if(isset($data['referer']) && $data['referer']=='related_post'){
[546] Fix | Delete
$imageLink = ampforwp_modify_url_utm_params($imageLink);
[547] Fix | Delete
}
[548] Fix | Delete
echo '<'.esc_attr($tag).' class="loop-img '.esc_attr($tag_class).'">';
[549] Fix | Delete
echo '<a href="'.esc_url($imageLink).'" title="'.esc_html(get_the_title()).'">';
[550] Fix | Delete
$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>';
[551] Fix | Delete
if(function_exists('ampforwp_add_fallback_element')){
[552] Fix | Delete
$img_content = ampforwp_add_fallback_element($img_content,'amp-img');
[553] Fix | Delete
}
[554] Fix | Delete
echo $img_content;
[555] Fix | Delete
echo '</a>';
[556] Fix | Delete
echo '</'.esc_attr($tag).'>';
[557] Fix | Delete
}
[558] Fix | Delete
}
[559] Fix | Delete
}
[560] Fix | Delete
[561] Fix | Delete
// Category
[562] Fix | Delete
function amp_loop_category(){
[563] Fix | Delete
$categories = get_the_category();
[564] Fix | Delete
$cat_id = '';
[565] Fix | Delete
if (function_exists('seopress_activation')){
[566] Fix | Delete
$cat_id = get_post_meta(ampforwp_get_the_ID(),'_seopress_robots_primary_cat',true);
[567] Fix | Delete
}
[568] Fix | Delete
if(class_exists( 'WPSEO_Options' )){
[569] Fix | Delete
$cat_id = get_post_meta(ampforwp_get_the_ID(), '_yoast_wpseo_primary_category', true);
[570] Fix | Delete
}
[571] Fix | Delete
if(class_exists('RankMath')){
[572] Fix | Delete
$cat_id = get_post_meta(ampforwp_get_the_ID(), 'rank_math_primary_category', true);
[573] Fix | Delete
}
[574] Fix | Delete
if (function_exists( 'the_seo_framework' )) {
[575] Fix | Delete
$cat_id = the_seo_framework()->get_primary_term_id( ampforwp_get_the_ID(),'category' );
[576] Fix | Delete
}
[577] Fix | Delete
if(class_exists( 'SQ_Classes_ObjController' )){
[578] Fix | Delete
$get_cat_id = SQ_Classes_ObjController::getClass('SQ_Models_Domain_Categories')->getAllCategories(ampforwp_get_the_ID());
[579] Fix | Delete
$cat_id = key($get_cat_id);
[580] Fix | Delete
}
[581] Fix | Delete
$cat_id = apply_filters('ampforwp_custom_primary_cat',$cat_id);
[582] Fix | Delete
if (isset($cat_id)) {
[583] Fix | Delete
$cat_name = get_cat_name($cat_id);
[584] Fix | Delete
}
[585] Fix | Delete
if( count($categories) > 0 && empty($cat_id)){
[586] Fix | Delete
echo ' <ul class="loop-category">';
[587] Fix | Delete
foreach($categories as $category) {
[588] Fix | Delete
if(ampforwp_get_setting('ampforwp-cats-tags-links-single') == true){
[589] Fix | Delete
$cat_link = get_category_link( $category->term_id );
[590] Fix | Delete
if(ampforwp_get_setting('ampforwp-archive-support-cat') == true && ampforwp_get_setting('ampforwp-archive-support') == true){
[591] Fix | Delete
$cat_link = ampforwp_url_controller( $cat_link );
[592] Fix | Delete
}
[593] Fix | Delete
echo '<li class="amp-cat-'. esc_attr($category->term_id) .'"><a href="'.esc_url($cat_link).'">'. esc_html($category->cat_name).'</a></li>';
[594] Fix | Delete
}else{
[595] Fix | Delete
echo '<li class="amp-cat-'. esc_attr($category->term_id) .'">'. esc_html($category->cat_name).'</li>';
[596] Fix | Delete
}
[597] Fix | Delete
}
[598] Fix | Delete
echo '</ul>';
[599] Fix | Delete
}else{
[600] Fix | Delete
echo '<ul class="loop-category">';
[601] Fix | Delete
if(ampforwp_get_setting('ampforwp-cats-tags-links-single') == true){
[602] Fix | Delete
$cat_link = get_category_link( $cat_id );
[603] Fix | Delete
if(ampforwp_get_setting('ampforwp-archive-support-cat') == true && ampforwp_get_setting('ampforwp-archive-support') == true){
[604] Fix | Delete
$cat_link = ampforwp_url_controller( $cat_link );
[605] Fix | Delete
}
[606] Fix | Delete
echo '<li class="amp-cat-'. esc_attr($cat_id) .'"><a href="'.esc_url($cat_link).'">'. esc_html($cat_name).'</a></li>';
[607] Fix | Delete
}else{
[608] Fix | Delete
echo '<li class="amp-cat-'. esc_attr($cat_id) .'">'. esc_html($cat_name).'</li>';
[609] Fix | Delete
}
[610] Fix | Delete
echo '</ul>';
[611] Fix | Delete
}
[612] Fix | Delete
}
[613] Fix | Delete
// author
[614] Fix | Delete
function amp_loop_author($args = array()){
[615] Fix | Delete
global $redux_builder_amp;
[616] Fix | Delete
if(function_exists('ampforwp_framework_get_author_box')){
[617] Fix | Delete
ampforwp_framework_get_author_box($args);
[618] Fix | Delete
}else{
[619] Fix | Delete
echo "";
[620] Fix | Delete
}
[621] Fix | Delete
}
[622] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function