This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace WCM; | |
/** | |
* Plugin Name: (WCM) Meta Box Order Debug | |
* Description: Temporarily overrides the MetaBox-order by dismissing the user setting. | |
* Author: Franz Josef Kaiser | |
* Author URI: https://unserkaiser.com | |
* Version: 1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user www-data; | |
worker_processes 4; | |
worker_cpu_affinity 0001 0010 0100 1000; | |
error_log /var/log/nginx/error.log; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 2048; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// SearchWP/Sensei compat | |
function searchwp_sensei_compat() { | |
if ( is_post_type_archive() && is_search() ) { | |
add_filter( 'searchwp_outside_main_query', '__return_true' ); | |
} | |
} | |
add_action( 'parse_query', 'searchwp_sensei_compat' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Add the below line to your theme functions.php file | |
add_filter( 'woocommerce_prevent_admin_access', '__return_false' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: EdwinFrontPage | |
Plugin URI: https://gist.github.com/ideag/f97d513e84b523bd2dac | |
Description: Enable CPT posts to be set as front page. Usage: EdwinFrontPage::init( 'your_custom_post_type' ); Should be run on 'init' hook. | |
Author: Arūnas Liuiza | |
Version: 0.1.0 | |
Author URI: http://arunas.co/ | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This replaces the old window.send_to_editor function. | |
wp.media.editor.insert('your_content_goes_here'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Example { | |
public function __construct() { | |
$this->instantiate(); | |
} | |
public function instantiate() { | |
static $instance = null; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Callback for saving values from metaboxes. | |
* | |
* @since 1.0.0 | |
* | |
* @param int $post_id The current post ID. | |
* @param object $post The current post object. | |
*/ | |
function tgm_save_meta_boxes( $post_id, $post ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'add_meta_boxes', 'tgm_remove_all_the_metaboxes', 100 ); | |
/** | |
* Removes all metaboxes except the ones I WANT ON MY POST TYPE. RAGE. | |
* | |
* This assumes a specific post type. In my case, it is 'envira'. | |
* This function is very aggressive and removes every single metabox minus | |
* the needed submitdiv metabox (which allows you to publish something) and | |
* the metaboxes that I register with my plugin. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class CWS_Jetpack_Modules { | |
function __construct() { | |
add_filter( 'option_jetpack_active_modules', array( $this, 'active_modules' ) ); | |
} | |
function active_modules( $modules ) { | |
$allowed_modules = array( | |
'enhanced-distribution', |
OlderNewer