126 reputation
113
bio website
location
age
visits member for 2 years, 10 months
seen Sep 22 at 7:05

Nov
8
comment dynamically update permalink and title with the values of custom fileds
I've not been able to test this yet, but am accepting this as is because the WP documentation supports what you've said. Thanks!
Nov
5
comment dynamically update permalink and title with the values of custom fileds
I've updated the title to better reflect what Im after. I think hiding the title field is nessicary to prevent the user from getting the impression they can efect changes here. Ultimatly I would like to pull custom field data but wp_insert_post_data is exactly what I need to acomplish this. One question - what happens if two posts have exactly the same $data['post_name'] ?
Jul
31
comment admin_notices after register_uninstall / deactivate_hook
@kaiser Yes I've seen all the docs and that answer - but none allow a notice to the admin due (i believe) to the page refresh after they occur. Will update question in a moment.
Jul
31
comment Uninstall, Activate, Deactivate a plugin: typical features & how-to
Think this should do it: register_activation_hook( __FILE__, function() { add_option('Activated_Plugin','Plugin-Slug'); }); add_action('admin_init', 'load_plugin'); function load_plugin() { if ( ! current_user_can( 'activate_plugins' ) ) return; if(is_admin()&&get_option('Activated_Plugin')=='Plugin-Slug') { delete_option('Activated_Plugin'); add_action( 'admin_notices', 't5_check_admin_notices', 0 ); } }
Jul
31
comment Uninstall, Activate, Deactivate a plugin: typical features & how-to
Actually just stumbled on the easy way: stackoverflow.com/a/13927297/362445
Jul
31
comment Uninstall, Activate, Deactivate a plugin: typical features & how-to
I see - but if the plugin is activated outside the plugin page (say as part of a theme dependency) then your checks will get skipped no? So I tried moving add_action( 'admin_notices', 't5_check_admin_notices', 0 ); into an activation hook and the plugin activates without performing the checks . . .
Jul
31
comment Uninstall, Activate, Deactivate a plugin: typical features & how-to
Touch confused, so basically there isn't a call to register_activation_hook here -- why not use it? Also will this fire before or after register_activation_hook and will register_activation_hook fire even if the above doesn't pass?
Jun
26
comment WordPress MultiSite Active Directory integration and site privacy
How did you get on with this? Im researching a similar implementation for a school.
Mar
3
comment Conditionally Loading JavaScript/CSS for Shortcodes
bit of an aside but doesn't this assume that people are using header.php and footer.php. What about theme wrapping methods such those described by scribu.net/wordpress/theme-wrappers.html ? or themes like roots that keep their template parts elsewhere?
Feb
8
comment How to replace regular jquery calls with CDN calls from Google?
just noticed this nice little hack has been folded into the wordpress Roots theme - sweet github.com/retlehs/roots/blob/master/lib/scripts.php
Jan
10
comment passing markup thought a shortcode attribute
Sorry thought it was in the thread - the preview is a tinyMCE modal that allows the user to set parameters and see the changes in a live map. It then inserts the shortcode into the post. Transients are uncharted territory for me, so I was wondering if there was an easer way to handel my situation - hence my first attempt at shoving all the markup though a parameter! You've been very helpful by the way - thanks.
Jan
9
comment passing markup thought a shortcode attribute
Yes in some ways but it need not call the google API for marker data each time. Consider: a) at the preview stage we ping the API and pull associated address, content, images, ratings etc. and store that content/markup in the database for later use (ie we just add that content to a marker in the map - no api call needed) or B) only store the address and make a new api call each time the page is loaded. Option 'B' will, I believe be significantly slower. This is why Im still considering the WP transients API to store the details rather then shoving them explicitly as parameters in the shortcode
Jan
8
comment passing markup thought a shortcode attribute
Sorry for the late reply - Holidays took me by storm (literally in some respects). I'll follow your advice and break up the parameters as you've suggested. I was just hoping that there might be another way to go about it. Basically the maps API can grab a bunch of unknown items like ratings etc if they exist for the location in question. I just hoped I could get the output at the preview stage, without the plugin having to make another request later (or each time it was called).
Jan
8
comment passing markup thought a shortcode attribute
s_ha_dum, fabulous write up.
Jun
24
comment hijacking home_url for root relative paths
FYI this query is related to github.com/retlehs/roots/issues/490
Jun
24
comment hijacking home_url for root relative paths
I revised get_home_url and tried it in a functionality plugin, as wellas in the functions.php of child and parent. function tr_get_home_url( $blog_id = null, $path = '', $scheme = null ) { $orig_scheme = $scheme; $scheme = 'http'; $url = '/'; if ( !empty( $path ) && is_string( $path ) && strpos( $path, '..' ) === false ) $url .= '/'; return apply_filters( 'home_url', $url, $path, $orig_scheme, $blog_id ); } With no effect––So I guess that this would mean that home_url is already being filtered elsewhere in the theme?
Jun
24
comment hijacking home_url for root relative paths
Humm - I've done as much. Basically I revised get_home_url and put it in a functionality plugin, just to see.
May
27
comment post_class() breaks out of formatting. . . extra markup also generated
Ahh - wordpress.org/support/topic/… Even though the image is already contained in a div, WP dosen't know it - so it automatically wraps it in a <p> to make valid markup. Adding wrapping <div> tags to my function prevents this - though completely superfluous markup IMHO. - I was conflating the two issues as they were appearing concurrently. Still would love to know why post_class() dosen't play nice.
May
27
comment post_class() breaks out of formatting. . . extra markup also generated
Further substituting post_class() with something like 'class="' . implode(get_post_class($class)) . '" dosen't solve the added <p> elements which are being injected into the markup.
May
27
comment post_class() breaks out of formatting. . . extra markup also generated
Thanks, but I went to the codex first, Im not being lazy here - honest. I wouldn't waste your time if the answer was evident (to me). My question still stands - In this use case post_class is exactly what I want - I want it to spit out class="some list" so why dosent it output where I've placed it in the markup? - what's gong on? Otherwise we would use get_post_class() in all cases - no? I didn't use get_post_class() because I dont need to further process the array, which is as I understand, what it is for.