run();
add_action( 'upgrader_process_complete', 'wpstream_my_upgrate_function',10, 2);
function wpstream_my_upgrate_function( $upgrader_object, $options ) {
$current_plugin_path_name = plugin_basename( __FILE__ );
if ($options['action'] == 'update' && $options['type'] == 'plugin' ) {
if(is_array($options)):
foreach($options['plugins'] as $each_plugin) {
if ($each_plugin==$current_plugin_path_name) {
delete_transient('wpstream_token_api');
update_option('wp_estate_token_expire',0);
update_option('wp_estate_curent_token',' ');
}
}
endif;
}
}
add_action('wp_head', 'wpstream_add_custom_meta_to_header');
function wpstream_add_custom_meta_to_header(){
global $post;
if ( is_singular('product') || is_singular('wpstream_product') || is_singular('wpstream_product_vod') ){
$image_id = get_post_thumbnail_id();
$share_img = wp_get_attachment_image_src( $image_id, 'full');
$the_post = get_post($post->ID); ?>