<?php
/*-----------------------------------------------*/
/*  EXTHEM.ES
/*  PREMIUM WORDRESS THEMES
/*
/*  STOP DON'T TRY EDIT
/*  IF YOU DON'T KNOW PHP 
/*
/*  As Errors In Your Themes
/*  Are Not The Responsibility
/*  Of The DEVELOPERS
/*  @EXTHEM.ES
/*  
/*  Follow Social Media Exthem.es
/*  Youtube : https://www.youtube.com/channel/UCpcZNXk6ySLtwRSBN6fVyLA
/*  Facebook : https://www.facebook.com/groups/exthem.es
/*  Twitter : https://x.com/bangreyblog
/*  Instagram : https://www.instagram.com/exthem.es/
/*  Telegram : https://t.me/exthemes_helps
/*  TikTok : https://www.tiktok.com/@exthemes
/* 	More Premium Themes Visit Now On https://exthem.es/
/*-----------------------------------------------*/
if ( ! defined( 'ABSPATH' ) ) exit; 
// Silence is golden.

if ( !empty($gets_data['GP_ID']) ) { 
	update_post_meta( $post_id, 'wp_GP_ID', $gets_data['GP_ID'] ); 
}

if ( !empty($gets_data['title_GP']) ) { 
	update_post_meta( $post_id, 'wp_title_GP', $gets_data['title_GP'] );
}

if ( !empty($gets_data['images_GP']) ) { 
	update_post_meta( $post_id, 'wp_images_GP', $gets_data['images_GP'] );
}

if ( !empty($gets_data['backgrounds_GP']) ) { 
	update_post_meta( $post_id, 'wp_backgrounds_GP', $gets_data['backgrounds_GP'] );
}

if ( !empty($gets_data['poster_GP']) ) { 
	$sizes		= '=s90-rw';
	update_post_meta( $post_id, 'wp_poster_GP', $gets_data['poster_GP'].$sizes );
} else {
	update_post_meta( $post_id, 'wp_poster_GP', $gets_data['poster_sc'] );
}

if ( !empty($gets_data['youtube_GP']) ) { 
	update_post_meta( $post_id, 'wp_youtube_GP', $gets_data['youtube_GP'] );
}

if ( !empty($gets_data['genres_GP']) ) { 
//	update_post_meta( $post_id, 'wp_genres_GP', $gets_data['genres_GP'] ); 
	wp_set_object_terms( $post_id, $gets_data['genres_GP'], 'category', false );
} else {
//	update_post_meta( $post_id, 'wp_genres_GP', $gets_data['genre_sc'] ); 
	wp_set_object_terms( $post_id, $gets_data['genre_sc'], 'category', false );
}
if ( !empty($gets_data['paid_GP2']) ) { 
	wp_set_object_terms( $post_id, $gets_data['paid_GP2'], 'category', false );
} 

if ( !empty($gets_data['whatnews_GP']) ) { 
	update_post_meta( $post_id, 'wp_whatnews_GP', $gets_data['whatnews_GP'] );
}

if ( !empty($gets_data['installs_GP']) ) { 
	update_post_meta( $post_id, 'wp_installs_GP', $gets_data['installs_GP'] );
}

if ( !empty($gets_data['updates_GP']) ) { 
	update_post_meta( $post_id, 'wp_updates_GP', $gets_data['updates_GP'] );
}

if ( !empty($gets_data['ratings_GP']) ) { 
	update_post_meta( $post_id, 'wp_ratings_GP', $gets_data['ratings_GP'] );
}

if ( !empty($gets_data['rated_GP']) ) { 
	update_post_meta( $post_id, 'wp_rated_GP', $gets_data['rated_GP'] );
}

if ( !empty($gets_data['desck_GP']) ) { 
	update_post_meta( $post_id, 'wp_desck_GP', $gets_data['desck_GP'] );
} else {
	update_post_meta( $post_id, 'wp_desck_GP', $gets_data['summary_sc'] );
}

if ( !empty($gets_data['articlebody_GP']) ) { 
	update_post_meta( $post_id, 'wp_articlebody_GP', $gets_data['articlebody_GP'] );
}

if ( !empty($gets_data['developers_GP']) ) { 
	update_post_meta( $post_id, 'wp_developers_GP', str_replace(array('.', ',' ), ' ', $gets_data['developers_GP']) );
	wp_set_post_terms( $post_id, str_replace(array('.', ',' ), ' ', $gets_data['developers_GP']), 'developer' );
	wp_set_object_terms( $post_id, str_replace(array('.', ',' ), ' ', $gets_data['developers_GP']), 'developer', true ); 
}

//if ( !empty($gets_data['version_GP']) ) { 
//	update_post_meta( $post_id, 'wp_version_GP', $gets_data['version_GP'] );
//} else { 
//	update_post_meta( $post_id, 'wp_version_GP', $gets_data['version_sc'] ); 
//}

//if ( $gets_data['version_GP'] ) { 
//	update_post_meta( $post_id, 'wp_version_GP', $gets_data['version_GP'] );
//}

if ( $gets_data['appversion'] ) { 
	update_post_meta( $post_id, 'wp_version_GP', $gets_data['appversion'] );
}

 

if ( !empty($gets_data['sizes_GP']) ) {
	update_post_meta( $post_id, 'wp_sizes_GP', $gets_data['sizes_GP'] );
}

if ( !empty($gets_data['requires_GP']) ) { 
	update_post_meta( $post_id, 'wp_requires_GP', $gets_data['requires_GP'] );
}

if ( !empty($gets_data['GP_ID']) ) { 
	update_post_meta( $post_id, 'wp_playstore_link', 'https://play.google.com/store/apps/details?id='.$gets_data['GP_ID'] ); 
}