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: APC Object Cache | |
* Description: An object cache implementation that uses APC. | |
* Author: Christopher Davis | |
* Author URI: http://christopherdavis.me | |
* Version: 0.1 | |
* | |
* Based on Mark Jaquith's APC object cache | |
* http://txfx.net/wordpress-plugins/apc/ |
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: Post Meta Revisions | |
Description: Revisions for the 'foo' post meta field | |
Version: 1.0 | |
Author: John Blackbourn | |
Plugin URI: http://lud.icro.us/post-meta-revisions-wordpress | |
*/ | |
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
'use strict'; | |
module.exports = function(grunt) { | |
// load all grunt tasks matching the `grunt-*` pattern | |
// Ref. https://npmjs.org/package/load-grunt-tasks | |
require('load-grunt-tasks')(grunt); | |
grunt.initConfig({ | |
// Fontello Icons | |
// Note: This is one time running task, so run grunt after update assets/fontello/config.json file | |
// Ref. https://npmjs.org/package/grunt-fontello | |
fontello: { |
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
/* | |
##Device = Desktops | |
##Screen = 1281px to higher resolution desktops | |
*/ | |
@media (min-width: 1281px) { | |
/* CSS */ | |
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
function fb_filter_query( $query, $error = true ) { | |
if ( is_search() ) { | |
$query->is_search = false; | |
$query->query_vars[s] = false; | |
$query->query[s] = false; | |
// to error | |
if ( $error == true ) | |
$query->is_404 = true; |
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 | |
/** | |
* Run with `wp --require=import-cache.php import ... | |
*/ | |
WP_CLI::add_hook( 'after_wp_load', function(){ | |
// Only intercept HTTP requests when the importer is running | |
if ( ! defined( 'WP_IMPORTING') || ! WP_IMPORTING ) { | |
return; |
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
#!bin/bash | |
# | |
# NOTE:This file takes param as site name for | |
# | |
# This script currenty only works with easyengine. | |
# | |
# What this does essentially is clones mu-plugin repo of vip-mu-plugins-public | |
# and write nginx rule to handle static files via php. | |
# | |
# WARNING: This does not match extact vip go environment like php version and stuff |
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 Customize_Postmeta_Setting. | |
* | |
* @package WPSE_257322 | |
*/ | |
namespace WPSE_257322; | |
/** |
Using the REST API to upload a file to WordPress is
quite simple. All you need is to send the file in a
POST
-Request to the wp/v2/media
route.
There are two ways of sending a file. The first method simply sends the file in the body of the request. The following PHP script shows the basic principle:
OlderNewer