WP-Members redirect if member ALREADY logged in

I assume because the function is not called until someone logs in. That is correct. wpmem_login_redirect is a filter that happens when a user is actually logging in. If they are coming to the site and, due to having a valid cookie, are in a logged in state, they will not be redirected. From a … Read more

How to find installed plugins

On the admin side, which I assume is where you want to run this, the get_plugins function will retrieve an array of plugins along with data about each. function dump_plugins() { var_dump(get_plugins()); } add_action(‘admin_init’,’dump_plugins’); Obviously, that code is illustrative only. It will make a big mess of your site.

How extend shortcode default values for a plugin?

You can hijack the shortcode and use your own additional logic. Sample code, not tested: add_action( ‘after_setup_theme’, function() { // Replace the plugin shortcode handler with your own. add_shortcode( ‘standout-css3-button’, function( $atts, $content = NULL ) { // Let the plugin make the button and store the result. $button = scss3button( $atts, $content ); // … Read more

Show a confirmation message on plugin deactivation

I have implemented a workaround with JavaScript. I’m loading my own JavaScript file: wp_enqueue_script(‘wp-deactivation-message’, plugins_url(‘js/message.js’, dirname(__FILE__)), array()); which contains a script that adds following Event Listener – when user clicks on our plugin deactivate button it prevent it from performing this action and display a JavaScript popup asking what you need, if user accepts it … Read more

Determine plugin name from within plugin_action_links filter

There are currently four filters and they carry lots of information: $prefix = $screen->in_admin( ‘network’ ) ? ‘network_admin_’ : ”; $actions = apply_filters( $prefix . ‘plugin_action_links’, array_filter( $actions ), $plugin_file, $plugin_data, $context ); $actions = apply_filters( $prefix . “plugin_action_links_$plugin_file”, $actions, $plugin_file, $plugin_data, $context ); This is a var dump of the parameters for Advanced Custom … Read more

Disable / Deregister all JS from all plugins

You could install a plug-in like asset Queue Manager to keep track of all the active stylesheets and javascript files (it’s preaty neat, you can live-preview how the page would look without an asset to see if your site gets broken or not), and then in your theme’s functions.php file, put a code like the … Read more

Hide plugin list

WordPress needs themes and plugins to be in web-accessible folder, so that any scripts and styles from them can be downloaded by browsers and work. From there it’s technologically easy to detect such resources in page source and/or proactively scan site for presence of files belonging to popular plugins. There is nothing to be done … Read more

register_theme_directory somehow “fails” when folder is outside of WP-Folder

While I cannot speak to your specific white-screen issue, registered theme directories must be within the Apache document root, at minimum. Many files in themes, such as CSS, JS, images, etc, are served directly by the webserver, not via calls to WordPress. So having a theme directory that is not directly accessible and serve-able by … Read more