[wp-hackers] update_option problem
Mike Schinkel
mikeschinkel at newclarity.net
Thu May 14 03:08:26 GMT 2009
Where is your code actually updating the permalink structure?
Have you called $wp_rewrite->flush_rules()? If not that might be your problem.
Also, I'm not familiar with 'update_option_permalink_structure'
Finally, you typically want to update rewrite rules on an plugin activation:
http://funcdoc.wordpress.com/2008/01/08/writing-plugins-activation-and-deactivation/
HTH.
-Mike Schinkel
Custom Wordpress Plugins
http://mikeschinkel.com/custom-wordpress-plugins
----- Original Message -----
From: "aesqe" <aesqe at skyphe.org>
To: wp-hackers at lists.automattic.com
Sent: Wednesday, May 13, 2009 7:59:18 PM GMT -05:00 US/Canada Eastern
Subject: [wp-hackers] update_option problem
Hi all :)
I've been trying to figure out why the following doesn't work:
<?php
/*
Plugin Name: permalink check
Plugin URI: ...
Description: ...
Author: ...
Version: 1.0
Author URI: ...
*/
function permalinkage()
{
global $wp_rewrite;
echo $wp_rewrite->get_category_permastruct();
}
add_action('update_option_permalink_structure', 'permalinkage');
?>
Permalink structure gets updated, but get_category_permastruct() returns
previous value each time.
Is this related to option caching, maybe?
Any ideas would be greatly appreciated.
Thanks!
--
-._______________KAWAII!_______________.-
Skyphe.org : It'll all make sense one day
http://skyphe.org .:. http://breedart.org
_______________________________________________
wp-hackers mailing list
wp-hackers at lists.automattic.com
http://lists.automattic.com/mailman/listinfo/wp-hackers
More information about the wp-hackers
mailing list