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 | |
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 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 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 | |
require( '../wordpress/wp-load.php' ); | |
if ( !class_exists( 'IXR_Client' ) ) { | |
require( '../wordpress/wp-includes/class-IXR.php' ); | |
} | |
function repair_strlen( $ser ) { | |
return preg_replace('!s:(\d+):"(.*?)";!se', "'s:'.strlen('$2').':\"$2\";'", $ser ); | |
} |
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 LegacyOfferConfig extends eMusicPostTypes implements PostType { | |
var $post_type; | |
var $boxes; | |
var $lists; | |
var $qas; | |
function init() { | |
$this->post_type = 'legacy_offer_config'; | |
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 | |
$me = new Lover; | |
$me->partner = $you; | |
$me->feelings = array('adore','miss','want','love'); | |
foreach ($feelings as $feeling) { | |
$me->express_feeling($feeling); |
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
/*globals window, document, $, jQuery */ | |
(function ($) { | |
"use strict"; | |
var loaded = false, | |
hashbang = '#!', | |
anychar = '.*?', | |
the_hash, | |
lastPath, | |
thePath, |
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
/* | |
Please do not edit this file directly (unless you intend to fork). | |
It's been open-sourced here: | |
http://github.com/dgouldin/django-hashsignal | |
Requires | |
* jQuery hashchange event - v1.2 - 2/11/2010 | |
* http://benalman.com/projects/jquery-hashchange-plugin/ | |
*/ | |
/*globals ActiveXObject, _gaq, window, jQuery */ |
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 | |
function get_cpage_comment_count() { | |
$counter = $start = 0; | |
wp_list_comments( array( 'callback' => function ( $comment ) use ( &$counter, &$start ) { | |
global $wpdb; | |
if ( 0 === $counter ) { | |
$sql = $wpdb->prepare( | |
"SELECT COUNT(comment_ID) FROM {$wpdb->comments} | |
WHERE comment_approved = 1 AND |
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 | |
function wp_ajax_autocomplete_site() { | |
if ( ! is_multisite() || ! current_user_can( 'manage_sites' ) || wp_is_large_network( 'sites' ) ) | |
wp_die( -1 ); | |
$return = array(); | |
global $wpdb; | |
$value = stripslashes( $_REQUEST['term'] ); |
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 | |
/** | |
* Set DOING_AJAX so the app doesn't try to set eMusic cookies | |
* | |
*/ | |
define( 'DOING_AJAX', 1 ); | |
define( 'SHORTINIT', 1 ); | |
require( $_SERVER['DOCUMENT_ROOT'] . '/wordpress/wp-load.php' ); | |
require( WP_CONTENT_DIR . '/mu-plugins/emusic-auth.php' ); |
OlderNewer