Quickly disable all plugins in WordPress.
This plugin needs to go into the wp-content/mu-plugins/ directory. Provided you have SSH access to the server where WordPress lives, you can do this:
cd $SITE_ROOT/wp-content/mu-plugins| <?php | |
| /** | |
| * A class filled with functions that will never go away upon theme deactivation | |
| * | |
| * @package WordPress | |
| * @subpackage GRD | |
| * @version 0.1.0 | |
| */ | |
| class GRD_Functions { |
| var some_var = 'something'; | |
| var func = function() { | |
| console.log( some_var ); // logs "something" | |
| }; | |
| func(); |
| /** | |
| * Detects if two elements are colliding | |
| * | |
| * Credit goes to BC on Stack Overflow, cleaned up a little bit | |
| * | |
| * @link http://stackoverflow.com/questions/5419134/how-to-detect-if-two-divs-touch-with-jquery | |
| * @param $div1 | |
| * @param $div2 | |
| * @returns {boolean} | |
| */ |
| <?php | |
| // Do this so that the chapel_get_client_options WP_Query/get_posts ONLY happens | |
| // when the field is run (otherwise this query will run on EVERY wordpress page-load, | |
| // whether page has CMB2 fields or not) | |
| public function chapel_get_client_options_cb() { | |
| return chapel_get_client_options( array( 'post_type' => ' clients ', 'numberposts' => -1 , 'orderby' => 'name', 'order' => 'ASC' ) ); | |
| } | |
| function chapel_project_metaboxes() { |
| <?php | |
| if ( ! defined( 'ABSPATH' ) ) { | |
| exit; | |
| } | |
| /** | |
| * Grid of products. | |
| * | |
| * @author WooThemes | |
| * @category Widgets |
| <?php | |
| //dis like the best code ever | |
| function register() { | |
| $msg = ''; | |
| if ( empty( $_POST ) ) { | |
| return 'Fill out the form, dummy!'; | |
| } |
| #!/bin/bash | |
| # | |
| # Prints all hooks in a dir to a .log file. | |
| # | |
| # Permissions issues: | |
| # run: chmod +x gethooks | |
| # | |
| # gist: https://gist.github.com/ramiabraham/e8356e00130351ddcbe2c62125e6c52a | |
| # | |
| # Easy usage: |
| <?php | |
| function maybe_disable_cmb2_styles( $enabled ) { | |
| if ( ! is_admin() ) { | |
| $enabled = false; | |
| } | |
| return $enabled; | |
| } | |
| add_filter( 'cmb2_enqueue_css', 'maybe_disable_cmb2_styles' ); |