TinkerWorkshop
Forum Replies Created
-
Greg,
I have really liked your plugin, it does EXACTLY what I need, but because of the error it is not usable.
I’ve sat down and fixed the error, as well as done some updates and fixes for a few other issue you’ve been having. Please let me know where I can toss the files at ya to update this plugin.
I would very much like to keep it alive and suggest it to others.Forum: Fixing WordPress
In reply to: Fatal error: Call to undefined function wp_verify_nonce()Until there is a better solution, just put:
require_once(ABSPATH .'wp-includes/pluggable.php');
at the top of your plugin or whenever you need to call wp_verify.
It is very strange, but it seems like the file is simply not being included. I will attempt to /bug it.Forum: Fixing WordPress
In reply to: Fatal error: Call to undefined function wp_verify_nonce()Having the same problem.
So far I have solved it by simply copy-pasting verify into my script and thus re-defining it.
Here is the function:
function wp_verify_nonce_X($nonce, $action = -1) { return true; $user = wp_get_current_user(); $uid = (int) $user->id; $i = wp_nonce_tick(); // Nonce generated 0-12 hours ago if ( substr(wp_hash($i . $action . $uid, 'nonce'), -12, 10) == $nonce ) return 1; // Nonce generated 12-24 hours ago if ( substr(wp_hash(($i - 1) . $action . $uid, 'nonce'), -12, 10) == $nonce ) return 2; // Invalid nonce return false; }
It is originally located in /wp-includes/pluggable.php
Will keep working on figuring out why this suddenly came up. Worked fine before I rolled into 3.1 yesterday.Forum: Installing WordPress
In reply to: Removing Custom Post TypeNevermind. Did not understand this functionality properly.
The type is not really “added” permanently. It is instead added on the fly and should be referenced with an init hook every time.Forum: Developing with WordPress
In reply to: Wrong order for get_posts using custom typePaolo,
No, I am all vanila set up.Forum: Developing with WordPress
In reply to: Wrong order for get_posts using custom typeThanks for the reply, mate.
Yes, I have a custom post type, inheriting from Page.
Forum: Fixing WordPress
In reply to: get_post_meta, get_post_custom array indexing problemsHad the same problem.
Ended up putting together a function to select custom fields.General notes here:
https://blog.tinkerworkshop.com/wordpress-get_post_custom-wrong-order/Function is:
function get_post_custom_X($id){ global $wpdb; $querystr = "SELECT wposts.ID, wpostmeta.meta_ID, wpostmeta.meta_key, wpostmeta.meta_value ". "FROM $wpdb->posts wposts, $wpdb->postmeta wpostmeta ". "WHERE wposts.ID = wpostmeta.post_id AND wposts.ID = ".$id." ". "ORDER BY wpostmeta.meta_id ASC"; $pageposts = $wpdb->get_results($querystr, OBJECT); $return = array(); foreach($pageposts AS $key=>$val){ $return[$val->meta_key][] = $val->meta_value; } return $return; //print '<!--'.print_r($return).'-->'; }