switch theme on fly

You can use Theme Switch and Preview. If you are up for coding this yourself, you can use the template and stylesheet filters. E.g.: to switch to Twenty Ten: function custom_load_twenty_ten_template() { return ‘twentyten’; } function custom_load_twenty_ten_stylesheet() { return ‘twentyten’; } add_filter( ‘template’, ‘custom_load_twenty_ten_template’ ); add_filter( ‘stylesheet’, ‘custom_load_twenty_ten_stylesheet’ );

Enable / Add Custom Keyboard Shortcuts To Work With WordPress’ HTML Editor

The toolbar / editor used on Stack Exchange websites (and in my plug-in WP-MarkDown) is PageDown. This comes with three JavaScript files: One that handles MarkDown to HTML conversion One that handles sanitization One that handles the editor (the toolbar and previewer) Included in the latter are the MarkDown keyboard shortcuts you mentioned. The following … Read more

How to search in a Custom Field?

The following function needs to be put in the functions.php of your template code. Or in a plugin. function custom_search_query( $request ) { $query = new WP_Query(); // the query isn’t run if we don’t pass any query vars $query->parse_query($request); $request[‘post_type’] = ‘LAW’; // this is the actual manipulation; do whatever you need here if(isset($_GET[‘search’])) … Read more

get_delete_post_link redirect

To redirect after the use of get_delete_post_link() it’s probably easiest to hook into the trashed_post action: Code: add_action( ‘trashed_post’, ‘wpse132196_redirect_after_trashing’, 10 ); function wpse132196_redirect_after_trashing() { wp_redirect( home_url(‘/your-custom-slug’) ); exit; } Or you could make it dependent on the according $_GET variable by hooking into the the action parse_request: Code: add_action( ‘parse_request’, ‘wpse132196_redirect_after_trashing_get’ ); function wpse132196_redirect_after_trashing_get() … Read more

How do I extend one plugin I’m writing with another I’m writing using classes?

If the classes are not in the same file, you’ll need to require it into the child class ( myCustomClass ). Are you doing that? Example : //get the base class if(!class_exists(‘MyParentClass’)) { require_once plugin_dir_path( __FILE__ ) . ‘/_inc/MyParentClass.php’; } /** * Class Definition */ class MyChildClass extends MyParentClass{ // class definition }

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