Jacorre
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Post Status Transitions and wp_mailI did further testing with this and found that I believe it’s an issue with post transitions with custom post types. If I use publish_[custom_post_type] it works fine, but I don’t want follow up emails if I update the custom post type.
So I want to use pending_to_publish_[custom_post_type] so that it only applies when the status transitions that one time. But unfortunately it’s not working with the post transition. I also tried new_to_publish_[custom_post_type] and still doesn’t work.
Forum: Plugins
In reply to: [ReciPress] A quick view of recipressThanks Tammy.
One other question if you have time. For the total time (prep time + cook time), I’d like to save that in the database too so I can use it as a sort option. But I don’t need users to fill the field out.
Do you think creating a field type of “hidden” would be the best route for this?
Forum: Fixing WordPress
In reply to: How to implement drop down sort by title, date, custom field, etc?If a user performs a search the url will have the search values. For example, ?s=searchphrase&taxonomy=whatever.
Then I have the sort options they could use and submit, which should just add the orderby and order values to the end of the url. For example,
?s=searchphrase&taxonomy=whatever&orderby=title&order=asc
But I can’t get the original url to stay while the orderby and order values are being appended.
Any way to do that?
Forum: Fixing WordPress
In reply to: How to implement drop down sort by title, date, custom field, etc?Think I just realized what I was missing. You can manipulate the url to include the orderby and order values. Interesting, I think I got it!
Forum: Plugins
In reply to: [ReciPress] A quick view of recipressHi Tammy,
Do the input fields for the recipe details need to have any checks in place for malicious code? Or is that already taken care of because we’re filing the information along with the post and it uses the post’s checks?
I guess I’m just worried if I was to allow for users to add recipes would they be able to inject any bad code into the fields?
Forum: Fixing WordPress
In reply to: How do you use esc_html for form inputs?The form field is:
<input type="text" name="search-string" />
Then in the processing file that it points to, I’m storing the value as a variable.
How do I make sure that what the visitor typed in isn’t malicious?
Because when I use the search string variable it will be in the location header.
Is esc_html enough or should I use wp_kses? Also having trouble with that one getting to work?
Forum: Plugins
In reply to: [ReciPress] A quick view of recipressNevermind, I find the issue. When I copied the line I missed removing a couple things!
Forum: Plugins
In reply to: [ReciPress] A quick view of recipressHi Tammy,
I changed the measurements field from a select to an input field. It will be easier to use that way.
One thing I’m noticing though is that when I click the plus sign to add a new ingredient, the page jumps to the top instead staying in place.
It doesn’t do that with the instructions table.
My thought was because of the javascript and I tried removing the find for the select but didn’t see a difference?
Forum: Fixing WordPress
In reply to: Can you echo a custom panel option value within a function?Saw the mistake I was making thanks!
Forum: Fixing WordPress
In reply to: Are functions within a plugin available to use in theme?Nevermind. I found that I wasn’t echoing the results!
Forum: Plugins
In reply to: [ReciPress] A quick view of recipressI guess the other reason I wanted to use measurements as a taxonomy was in case I needed to add new measurements to the array. By doing so, wouldn’t that mess up entries that already have been filed?
Oh wait, probably not because we’re not using the array’s subscript as a value, we’re filing the name. So it wouldn’t affect anything if I add measurements above or below in the array.
Forum: Plugins
In reply to: [ReciPress] A quick view of recipressYeah I was just about to say that didn’t work!
I have the taxonomy defined as measurement.
I defined $measurements = get_terms(‘measurement’, ‘get=all’) further up in the code where your manual array entry is.
Further down in the code, I have not touched the cases for each of the field outputs except trying to add ->slug and ->name to the $measurement variables in the select output.
I get the word Array appearing in the drop down when this done. Makes sense because the $measurements variable has more than just the measurement’s name. Is there a function for just retrieving a taxonomy’s name? Seems like it’s the wp_get_object_terms but the first argument is post->ID which doesn’t exist yet when creating a new post.
Forum: Plugins
In reply to: [ReciPress] A quick view of recipressHi Tammy,
Shouldn’t using the following, which is exactly like the tax_select version work?
$measurements = get_terms('measurement','get=all');
Further down, it then grabs the $measurements array and uses a foreach loop just like the tax_select.
All I did was add in ->slug and ->name to the option values.
Still didn’t get any output though?
Forum: Plugins
In reply to: [ReciPress] A quick view of recipressYeah I have been working on creating a new entry specifically for measurements based on the tax_select case. Just need to work it into the ingredient table. Thanks for the suggestion!
Forum: Plugins
In reply to: [ReciPress] A quick view of recipressI’m setting them up as taxonomies in case new ones need to be added. I’d rather have the option off the menu instead of having to go into the code to add them, especially if I’m getting help from other users who aren’t code savy.