This file contains hidden or 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 NYT\Cache; | |
use NYT\{Logger,Singleton}; | |
class ObjectCache { | |
use Singleton; | |
const DEFAULT_EXPIRATION = 0; |
This file contains hidden or 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 React_YOLO { | |
public function __construct() { | |
add_action( 'admin_menu', array( $this, 'admin_menu' ) ); | |
} | |
public function admin_menu() { | |
add_menu_page( 'React', 'React', 'edit_posts', 'react', array( $this, 'page' ) ); | |
} |
This file contains hidden or 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 | |
header( 'Cache-Control: no-cache, no-store' ); | |
header( 'User-Agent: My Cool Download Script' ); | |
header( 'Content-Disposition: inline; filename=TARGET_FILENAME_WITH_NO_PATH' ); | |
header( 'Content-type: MIME_TYPE_OF_FILE;charset=CHARSET_OF_FILE' ); | |
header( 'Vary: Accept-Encoding' ); | |
header( 'Keep-Alive: timeout=15, max=1024' ); | |
header( 'Connection: Keep-Alive' ); | |
// readfile() or echo contents of file, whatever |
This file contains hidden or 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
filter: | |
excluded_paths: | |
- 'vendor/*' | |
- 'tests/*' | |
- 'src/wp-admin/includes/class-ftp*' | |
- src/wp-admin/includes/class-pclzip.php | |
- 'src/wp-content/*' | |
- 'src/wp-includes/ID3/*' | |
- 'src/wp-includes/SimplePie/*' | |
- 'src/wp-includes/Text/*' |
This file contains hidden or 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 | |
/** | |
* | |
* @param array $set | |
* @param string $prop | |
* @return boolean | |
*/ | |
function _truthy_prop( $set, $prop ) { | |
if ( ! isset( $set[$prop] ) ) | |
return; |
This file contains hidden or 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
// Create the media frame. | |
mediaFrame = wp.media.frames.formatMedia = wp.media({ | |
frame : 'select', | |
displaySettings: true, | |
// Set the title of the modal. | |
title: $el.data('choose'), | |
// Tell the modal to show only items matching the current mime type. | |
library: { |
This file contains hidden or 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 | |
function get_content_link( &$content, $remove = false ) { | |
if ( empty( $content ) ) | |
return; | |
$lines = explode( "\n", $content ); | |
$line = trim( array_shift( $lines ) ); | |
if ( 0 === stripos( $line, 'http' ) ) { | |
if ( $remove ) |
This file contains hidden or 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 | |
/** | |
* Handle oEmbed and embedded media | |
* | |
* @param $content | |
*/ | |
function the_featured_audio( &$content ) { | |
$url = trim( array_shift( explode( "\n", $content ) ) ); | |
if ( 0 === strpos( $url, 'http://' ) ) { |
This file contains hidden or 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: Memcached Redux | |
Description: The real Memcached (not Memcache) backend for the WP Object Cache. | |
Version: 3.0 | |
Plugin URI: http://wordpress.org/extend/plugins/memcached/ | |
Author: Scott Taylor - uses code from Ryan Boren, Denis de Bernardy, Matt Martz | |
Install this file to wp-content/object-cache.php | |
*/ |
This file contains hidden or 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
Set-Cookie: EMID=13cbc37f7e44e825ef0c8; Domain=.emusic.com; Expires=Sun, 06-Feb-2022 23:50:50 GMT; Path=/ | |
Set-Cookie: oatmeal=em=&rsc=&cc=&t=1000000&e=&r=&p=3&bp=170005&rv=5&pv=2&gme=false&sn=&us=&pu=&tb=&id=&bo=&ris=&purl=%2Fwelcome%2Fhome%2F%3Ffref%3D1000000%26p%3D3%26bp%3D170005&ups=true&crs=true; Domain=.emusic.com; Expires=Sun, 06-Feb-2022 23:50:50 GMT; Path=/ | |
Set-Cookie: sugar=ftu=false&fd=false&gm=false; Domain=.emusic.com; Expires=Sun, 06-Feb-2022 23:50:50 GMT; Path=/ | |
Set-Cookie: JSESSIONID=67A3F2A395E6D8EBB2EE5677CB9AA8AF.abv-app-04; Path=/ | |
Set-Cookie: oatmeal=em=&rsc=US&cc=US&t=666666&e=&r=&p=111776&bp=&rv=5&pv=2&gme=false&sn=&us=-1&pu=&tb=&id=&bo=&ris=&purl=%2Fwelcome%2Femusic-trial-50-14%2F%3Ffref%3D666666%26p%3D111776%26bp%3D2&ups=true&crs=true; Domain=.emusic.com; Expires=Sun, 06-Feb-2022 23:50:50 GMT; |