Function Reference: geodir_cp_listing
Summary
This function has not been documented yet.
Source File
geodir_cp_listing() is located in geodir_custom_posts/geodir_cp_template_tags.php [Line: 6]
Source Code
function geodir_cp_listing()
{
?>
Click to all posts of () post type. If you don't delete posts of this post type now and create a same name post types in future then all the posts will be assigned to () post type again.
|
|
|
|
|
|
|
$value)
{
if(!empty($geodir_temp_post_types ) )
{
if(!isset($value['listing_order']) || $value['listing_order']==0)
{
$total_zero_count++;
}
if(!isset($value['listing_order']) || $value['listing_order']==0|| array_key_exists($value['listing_order'], $geodir_temp_post_types ))
$value['listing_order'] = max(array_keys($geodir_temp_post_types))+1 ;
}
else
{
if(!isset($value['listing_order']) || $value['listing_order']==0 )
{
$value['listing_order'] =1 ;
$total_zero_count++;
}
}
$geodir_temp_post_types[$value['listing_order']] = $value;
$geodir_temp_post_type_keys[$value['listing_order']] = $key ;
}
ksort($geodir_temp_post_types) ;
foreach($geodir_temp_post_types as $key => $value)
{
$geodir_post_types_in_new_order[$geodir_temp_post_type_keys[$key]] = $value ;
}
if($total_zero_count==count($geodir_post_types_in_new_order))
{
update_option( 'geodir_post_types', $geodir_post_types_in_new_order );
}
foreach($geodir_post_types as $key => $value)
{
$cpt_image = get_option('geodir_cpt_img_' . $key);
?>
|
|
|
|
|
|
|