Is there a hook for when you switch themes?

There is a ‘switch_theme’ action that runs right after the theme is switched. function my_on_switch_theme($new_theme) { $current_themes = wp_get_themes(); /* Fixed deprecated function */ $new_theme_info = $current_themes[$new_theme]; /* $new_theme_info should now be an associative array with the following: $new_theme_info[‘Title’]; $new_theme_info[‘Version’]; $new_theme_info[‘Parent Theme’]; $new_theme_info[‘Template Dir’]; $new_theme_info[‘Stylesheet Dir’]; $new_theme_info[‘Template’]; $new_theme_info[‘Stylesheet’]; $new_theme_info[‘Screenshot’]; $new_theme_info[‘Description’]; $new_theme_info[‘Author’]; $new_theme_info[‘Tags’]; $new_theme_info[‘Theme Root’]; $new_theme_info[‘Theme … Read more

How to implement bulk actions in my plugin?

Unfortunately there isn’t a way of doing this yet, see this trac report. While it would have been possible to add actions to the bulk-actions drop-down menu, there doesn’t exist (yet) a way of handling custom actions. It seems that WordPress deliberately prevents you from adding custom actions (presumably until it’s decided how bulk actions … Read more

Is There A Hook To Process The Content Of The Text Widget?

Filter widget_text (for the text) widget_title (for the title) Example function add_smiley($content) { $new_content=””; $new_content.= $content . ‘:)’; return $new_content; } add_filter(‘widget_text’, ‘add_smiley’); Note that this works only for the content so not if you have a widget with only a title. Reference http://codex.wordpress.org/WordPress_Widgets https://stackoverflow.com/questions/1385954/do-wordpress-widget-or-sidebar-hooks-exist https://stackoverflow.com/search?q=wordpress+widget

Replace audio/video enclosure with player?

I believe part of what you’re looking for is the WP_Embed class defined in wp-includes/media.php. It implements a framework for automatically replacing urls with the output of embed handlers. I’m afraid you’ll have to do the deeper research yourself (this was apparently introduces in 2.9.0, so documentation might still be thin). I doubt WordPress core … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)