92 reputation
19
bio website
location
age
visits member for 2 years, 10 months
seen 2 days ago

Media Developer since 1990, working with web, print, audio, video, and music.


Apr
10
comment How to handle forms from sidebar widgets - Processing $_POST variables using get_field_name()
The title says 'Processing $_POST variables using get_field_name()' and the example code asks specifically 'What function retreives the variable?', but I can see how someone might assume this is set up incorrectly as you did. So, any clues as to the answer?
Apr
9
comment How to handle forms from sidebar widgets - Processing $_POST variables using get_field_name()
Unless I missed something, those methods are for the admin side only. I'm only asking about the user/public side, that is why the form is in the widget method.
Feb
4
comment Post data returning null
Also, I was just saying the header because it gives easy access to executing PHP code straight without any interference.
Feb
4
comment Post data returning null
I have a question, what happens if you rename the field user_info_form to something completely random like apple_wheels? I was just thinking it could be a conflict if you or something else is storing a $_SESSION variable with the same name as user_info_form.
Feb
2
comment Post data returning null
Check again, was sidetracked...
Feb
2
comment Post data returning null
Actually, I just checked, even with no specified value in the submit input field, I'm still seeing 'Submit' come through. I've edited above, have a look.
Jan
6
comment How to stack name list in non-alphabetical order?
There is no possible way the query could be injected in to, it is a closed query with no outside variables (besides the $wpdb object), so using a prepare statement would be unnecessary and wasteful. It doesn't matter anyway in this case as I was providing an example of what to look for, not code to be used. Good point on the $wpdb->posts, it also doesn't require curly braces to parse correctly either.
Jan
5
comment I am looking for a specialist WordPress host
cPanel hosts that have Fantastico have an easy way to install Wordpress. From inside the control panel, you click Fantastico, select Wordpress, hit install, and enter the admin and site details. It automatically installs the database and sets up the configuration for you. It might help if you go with a cPanel host.
Dec
24
comment Gathering all Custom Post Type posts in to array/object the proper way
I didn't like how wasteful using get_posts was, so I did just that, used a WP query. I thought there might be a function out there to wrap this, but I used the following: $names = $wpdb->get_results("SELECT ID,post_title FROM {$wpdb->prefix}posts WHERE post_status='publish' and post_type='country-zones' ORDER BY post_title;",ARRAY_N);
Dec
24
comment Gathering all Custom Post Type posts in to array/object the proper way
My brain is jello. It's simply: $array = get_posts(array('post_type' => 'custom_post_type_here'));
Dec
24
comment Gathering all Custom Post Type posts in to array/object the proper way
Thanks, but not what I'm asking about. I'm looking for a function that will return individual posts as a row in an array, not the post types.
Nov
7
comment Add Meta Box not showing on New Post - Custom meta box not showing
Yup, that's it. I think I figured this out before, but it always throws me for a loop. Spot on, thanks.
Nov
7
comment Add Meta Box not showing on New Post - Custom meta box not showing
Sorry, that doesn't work at all from what I'm seeing. After trying this, the meta box disappeared entirely.
Oct
7
comment Create New Admin Menu Section - Like how custom post type works, in a way
I just found the functions a bit ago and was trying to get them to work, but they weren't showing because the role I selected isn't formatted correctly. I wish the Codex would spell out what it expect sometimes! Thanks!
Jul
23
comment Plugin Development: Wordpress processes twice on post update. How to skip process on the first?
Thanks, that is exactly it. This works perfectly, and appears to use everything within the WP framework.
Jul
13
comment Plugin Development: Wordpress processes twice on post update. How to skip process on the first?
Hi, thanks, but that also isn't working. I tried that method before, but I did some checking and during both passes, it never sets the post_type to 'revision' when it is in the process function. Both times is registers the same post type, which seems odd. Did you try running this plugin to see if it works? It might be not working do to a bug in WP.
Jul
13
comment Plugin Development: Wordpress processes twice on post update. How to skip process on the first?
Sorry, that doesn't work. Feel free to install the plugin to test it. I see the only place that DOING_AUTOSAVE is defined is in wp-admin/admin-ajax.php [956]. It is used only in wp-includes/post.php [4400], but nowhere else that I can find. I also tried setting the hook priority to 20 and it still didn't take. The solution I posted in the comments section works in essence, but I would like to try and conform to the WP framework as close as possible.
Jul
12
comment Plugin Development: Wordpress processes twice on post update. How to skip process on the first?
I've posted an example.
Jul
12
comment Plugin Development: Wordpress processes twice on post update. How to skip process on the first?
The limit was 5 minutes to edit, hitting enter submitted prematurely, blame Facebook for the silly enter = submit nonsense.
Jul
12
comment Plugin Development: Wordpress processes twice on post update. How to skip process on the first?
The sample code provided by Wordpress has this same problem: codex.wordpress.org/Function_Reference/add_meta_box The class version. I'll put a generalized version above.