Created
October 5, 2012 23:50
-
-
Save pippinsplugins/3843128 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//get the review type based on page custom meta field | |
function oswc_get_review_meta($postid) { | |
//try every reasonble conceivable variation that the user my enter to make this as user friendly as possible | |
$postTypeName = get_post_meta($postid, "Review Type", $single = true); | |
if(empty($postTypeName)){ | |
$postTypeName = get_post_meta($postid, "review type", $single = true); | |
if(empty($postTypeName)){ | |
$postTypeName = get_post_meta($postid, "reviewtype", $single = true); | |
if(empty($postTypeName)){ | |
$postTypeName = get_post_meta($postid, "Reviewtype", $single = true); | |
if(empty($postTypeName)){ | |
$postTypeName = get_post_meta($postid, "ReviewType", $single = true); | |
if(empty($postTypeName)){ | |
$postTypeName = get_post_meta($postid, "Review type", $single = true); | |
if(empty($postTypeName)){ | |
$postTypeName = get_post_meta($postid, "review Type", $single = true); | |
if(empty($postTypeName)){ | |
$postTypeName = get_post_meta($postid, "Post Type", $single = true); | |
if(empty($postTypeName)){ | |
$postTypeName = get_post_meta($postid, "post type", $single = true); | |
if(empty($postTypeName)){ | |
$postTypeName = get_post_meta($postid, "review_type", $single = true); | |
if(empty($postTypeName)){ | |
$postTypeName = get_post_meta($postid, "Review_Type", $single = true); | |
if(empty($postTypeName)){ | |
$postTypeName = get_post_meta($postid, "Review_type", $single = true); | |
if(empty($postTypeName)){ | |
$postTypeName = get_post_meta($postid, "review-type", $single = true); | |
if(empty($postTypeName)){ | |
$postTypeName = get_post_meta($postid, "Review-Type", $single = true); | |
if(empty($postTypeName)){ | |
$postTypeName = get_post_meta($postid, "Review-type", $single = true); | |
if(empty($postTypeName)){ | |
$postTypeName = get_post_meta($postid, "post_type", $single = true); | |
if(empty($postTypeName)){ | |
$postTypeName = get_post_meta($postid, "Post_Type", $single = true); | |
if(empty($postTypeName)){ | |
$postTypeName = get_post_meta($postid, "Post_type", $single = true); | |
if(empty($postTypeName)){ | |
$postTypeName = get_post_meta($postid, "post-type", $single = true); | |
if(empty($postTypeName)){ | |
$postTypeName = get_post_meta($postid, "Post-Type", $single = true); | |
if(empty($postTypeName)){ | |
$postTypeName = get_post_meta($postid, "Post-type", $single = true); | |
if(empty($postTypeName)){ | |
$postTypeName = get_post_meta($postid, "Reviews Type", $single = true); | |
if(empty($postTypeName)){ | |
$postTypeName = get_post_meta($postid, "reviews type", $single = true); | |
if(empty($postTypeName)){ | |
$postTypeName = get_post_meta($postid, "Reviews type", $single = true); | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
return $postTypeName; | |
} |
Just like I got the spelling right. -> At least they got the nesting part right.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
At least they to the nesting part right..