Admin wp_capabilities
wp_user_level
10
a:1:{s:13:"administrator";b:1;}
Contributor wp_capabilities
wp_user_level
1
<?php | |
/** | |
* Plugin Name: Send Reads to Master | |
* Description: Suggested fix for backend replication lag | |
* Author: WP Engine | |
* Version: 0.2 | |
* | |
*/ | |
if ( is_admin() ) { |
var robot = require("robotjs"); | |
var image = robot.screen.capture(); | |
var hex = image.colorAt(25, 25); | |
console.log("#" + hex); | |
//#ebebeb |
//Move the mouse across the screen as a sine wave. | |
var robot = require("robotjs"); | |
//Speed up the mouse. | |
robot.setMouseDelay(2); | |
var twoPI = Math.PI * 2.0; | |
var screenSize = robot.getScreenSize(); | |
var height = (screenSize.height / 2) - 40; | |
var width = screenSize.width; |
<?php | |
add_action( 'init', 'force_clear_woocommerce_cart' ); | |
function force_clear_woocommerce_cart() | |
{ | |
$user_ID = get_current_user_id(); | |
if ($user_ID === 68364) | |
{ |
<?php | |
/* | |
Plugin Name: Automatically purge object cache | |
Description: Automatically purge object cache on post changes. | |
*/ | |
foreach ( array( 'trashed_post', 'delete_post', 'edit_post', 'publish_page', 'publish_post', 'save_post' ) as $hook ) { | |
add_action( $hook, 'wp_cache_flush' ); | |
} |
<?php | |
/* | |
Plugin Name: PHP Compatibility Custom Timeout | |
*/ | |
function custom_timeout( $timeout ) { | |
return 0; | |
} | |
add_filter( 'wpephpcompat_scan_timeout', 'custom_timeout', 10 ); |
<?php | |
/* | |
Plugin Name: If No Title | |
Description: Modify the edit.php screen to show post excerpts if there is no title. | |
Version: 0.0.1 | |
*/ | |
add_action( 'load-edit.php', function() | |
{ | |
add_filter( 'the_title', function( $title ) |
/** | |
* Send a bulk update to Firebase from an array or an object literal. | |
* | |
* When .push() is called on a Firebase reference without a parameter passed no | |
* trip to the server is made. | |
* | |
* ex: | |
* var childRef = ref.push(); | |
* | |
* A reference is returned which has a push-id that can be returned by calling .name(). |