diff --git a/wp-admin/admin-functions.php b/wp-admin/admin-functions.php index 26fdd037fb..42251e5727 100644 --- a/wp-admin/admin-functions.php +++ b/wp-admin/admin-functions.php @@ -197,4 +197,121 @@ function wp_create_thumbnail($file, $max_side, $effect = '') { } } +// Some postmeta stuff +function has_meta($postid) { + global $wpdb, $tablepostmeta; + + return $wpdb->get_results(" + SELECT meta_key, meta_value, meta_id, post_id + FROM $tablepostmeta + WHERE post_id = $postid + ORDER BY meta_key,meta_id",ARRAY_A); + +} + +function list_meta($meta) { + global $post_ID; + // Exit if no meta + if (!$meta) return; + + + print " +
Key | +Value | +  | +
---|---|---|
{$entry['meta_key']} | +{$entry['meta_value']} | +Delete | +
Select existing key or enter new key
+ + + + +Custom Value
+ + +
diff --git a/wp-admin/post.php b/wp-admin/post.php
index 1d5eecab45..1b9b0f1137 100644
--- a/wp-admin/post.php
+++ b/wp-admin/post.php
@@ -37,6 +37,20 @@ for ($i=0; $i