Function Reference: geodir_display_post_claim_link

Summary

This function has not been documented yet.

Filters

‘geodir_dashboard_author_link’ [Line: 647]

Source Code

function geodir_display_post_claim_link(){
	
	global $post, $preview;
	
	$geodir_post_type = array();
	if(get_option('geodir_post_types_claim_listing'))
		$geodir_post_type =	get_option('geodir_post_types_claim_listing');
	
	$post_id = $post->ID;
	$posttype = (isset($post->post_type)) ? $post->post_type : '';
	
	if(in_array($posttype, $geodir_post_type) && !$preview)
	{
		
		$post_info = get_post($post_id);
		
		$author_id = $post_info->post_author;
		
		$post_type = $post_info->post_type;
        
		$is_owned = geodir_get_post_meta($post_id,'claimed',true);
		
		if(get_option('geodir_claim_show_owner_varified')=='yes')
		{ 
			if ( $is_owned != '0' )
			{
				echo '

'.CLAIM_OWNER_VERIFIED_PLACE.'

'; } } if (get_option('geodir_claim_enable')=='yes' && $is_owned=='0') { if (is_user_logged_in()) { echo '
'; if (!empty($_REQUEST['gd_go']) && $_REQUEST['gd_go'] == 'claim' && !isset($_REQUEST['geodir_claim_request'])) { echo ''; } } else { $current_url = remove_query_arg(array('gd_go'), geodir_curPageURL()); $current_url = add_query_arg(array('gd_go' => 'claim'), $current_url); $login_to_claim_url = geodir_login_url(array('redirect_to' => urlencode_deep($current_url))); $login_to_claim_url = apply_filters('geodir_claim_login_to_claim_url', $login_to_claim_url, $post_id); echo ''; } if (isset($_REQUEST['geodir_claim_request']) && $_REQUEST['geodir_claim_request']=='success') { echo '

'.CLAIM_LISTING_SUCCESS.'

'; } } if ($is_owned=='1' && get_option('geodir_claim_show_author_link')=='yes' && !$preview ) { $author_link = get_author_posts_url( $author_id ); $author_link = geodir_getlink($author_link,array('geodir_dashbord'=>'true','stype'=>$post_type ),false); // hook for author link $author_link = apply_filters( 'geodir_dashboard_author_link', $author_link, $author_id, $post_type ); echo ''; } } }