mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-16 23:00:21 +00:00
More int casts
git-svn-id: https://develop.svn.wordpress.org/trunk@5082 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -447,6 +447,8 @@ function wp_delete_post($postid = 0) {
|
||||
}
|
||||
|
||||
function wp_get_post_categories($post_id = 0) {
|
||||
$post_id = (int) $post_id;
|
||||
|
||||
$cats = &get_the_category($post_id);
|
||||
$cat_ids = array();
|
||||
foreach ( $cats as $cat )
|
||||
@@ -471,6 +473,8 @@ function wp_get_recent_posts($num = 10) {
|
||||
function wp_get_single_post($postid = 0, $mode = OBJECT) {
|
||||
global $wpdb;
|
||||
|
||||
$postid = (int) $postid;
|
||||
|
||||
$post = get_post($postid, $mode);
|
||||
|
||||
// Set categories
|
||||
|
||||
Reference in New Issue
Block a user