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
function tup_get_blogs_info() { | |
if ( ( $results = get_site_option( '_blogs_info_list' ) ) === false ) { | |
global $wpdb; | |
$results = $wpdb->get_results( 'SELECT blog_id, path, domain FROM ' . $wpdb->blogs, ARRAY_A ); | |
foreach ( $results as &$result ) { | |
switch_to_blog( $result['blog_id'] ); | |
$site_info = $wpdb->get_results( 'SELECT option_value FROM ' . $wpdb->options . " WHERE option_name = 'blogname' ", ARRAY_A ); | |
restore_current_blog(); |
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 test( $test ) { | |
echo $test; | |
} | |
$dang = 'dang'; | |
test( $dang ); | |
test( '123' ); |
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 | |
/** | |
* The base configurations of the WordPress. | |
* | |
* This file has the following configurations: MySQL settings, Table Prefix, | |
* Secret Keys, WordPress Language, and ABSPATH. You can find more information | |
* by visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing | |
* wp-config.php} Codex page. You can get the MySQL settings from your web host. | |
* | |
* This file is used by the wp-config.php creation script during the |
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: PMC Tag Scrubber | |
Plugin URI: http://www.pmc.com | |
Description: Download a .csv of tags/categories with their respective post counts. Flags duplicates automatically. | |
Author: Taylor Lovett, PMC, 10up | |
Version: 1.5 | |
Author URI: http://www.10up.com | |
*/ |
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
function pmc_variety_image_credit( $form_fields, $attachment ) { | |
$image_credit = array( | |
'label' => 'Image Credit', | |
'value' => get_post_meta( $attachment->ID, '_image_credit', true ), | |
'helps' => 'Image credit, e.g. "Copyright ' . date('Y') . ' Getty Images".', | |
'show_in_edit' => true, | |
); | |
$form_fields['image_credit'] = $image_credit; |
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 vb_catch_bitmob_redirect() { | |
if ( ! empty( $_GET['bitmob_redirect'] ) ) { | |
$redirect_post = get_page_by_path( $_GET['bitmob_redirect'], OBJECT, 'post' ); | |
if ( ! empty( $redirect_post ) ) | |
wp_safe_redirect( get_permalink( $redirect_post->ID ), 301 ); | |
} | |
} |
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 | |
error_reporting(E_ALL); | |
ini_set('display_errors','On'); | |
/*$con = mysql_connect( 'localhost', 'root', 'ventureTemp' ); | |
if ( ! $con ) { | |
//die( 'Could not connect: ' . mysql_error() ); | |
} |
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 | |
/** | |
* Replace the excerpt meta box with a more user friendly summary meta box. | |
* | |
*/ | |
class VB_Summary_Meta_Box { | |
/* | |
* Class variables | |
*/ |
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 | |
require_once 'vendor/autoload.php'; | |
use Guzzle\Http\Client; | |
$client = new Client( 'http://www.pehub.com/feed/' ); | |
$request = $client->get(); | |
$response = $request->send(); |
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
( function( $ ) { | |
$( '#pehub_post_quote_link' ).autocomplete( { | |
minLength: 3, | |
source: function( request, response ) { | |
var posts = []; | |
$.ajax( { | |
url: ajaxurl, |
OlderNewer