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 | |
$args = array( | |
'post_id' => get_the_ID(), | |
'size' => 'article-hero' | |
); | |
$hero_image = PMC_Awardsline::get_hero_image( $args, 'featured', 'array' ); | |
if ( $hero_image ) { | |
?> | |
<figure class="a-center"> | |
<img src="<?php echo esc_url( $hero_image['src'] ); ?>" width="602" height="360" alt="<?php echo esc_attr( $hero_image['alt'] ); ?>" /> |
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
/** | |
* WP 3.5 doesn't update menu_order for ordering attachments, so this function updates the menu_order so that you can orderby menu_order | |
* @param int $id | |
*/ | |
function pmc_gallery_menu_order_fix($id) { | |
$regex_pattern = get_shortcode_regex(); | |
preg_match ('/'.$regex_pattern.'/s', stripslashes($_POST['content']), $regex_matches); | |
if ( ! $regex_matches ) { | |
return false; | |
} |
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
#!/bin/bash | |
WP_UPGRADE_ROOT="/cygdrive/r/bgr/wordpress-3.3.1" | |
SITE_ROOT="/cygdrive/r/bgr/bgr2010" | |
PATCH_ROOT="/cygdrive/r/bgr" | |
DRY_RUN=01 | |
if [[ "$DRY_RUN" -eq "0" ]] ; then | |
DRY_RUN="" | |
else |
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
#!/bin/bash | |
PLUGIN_DIR="/cygdrive/r/bgr/plugins" | |
SITE_ROOT="/cygdrive/r/bgr/bgr2010" | |
DRY_RUN=01 | |
if [[ "$DRY_RUN" -eq "0" ]] ; then | |
DRY_RUN="" | |
else | |
DRY_RUN="--dry-run" |
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
#!/bin/bash | |
path="/var/www/sites/htdocs/wp-content/themes/vip/"; | |
git_path="https://username:[email protected]/penskemediacorp/"; | |
git_array=( plugins pmc-variety pmc-plugins ); | |
git_path_array=("${git_array[@]}") |
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 | |
abstract class PMC_Base { | |
private static $_instance = array(); | |
private function __construct() {} | |
public static function get_instance() { | |
$class = get_called_class(); | |
if ( ! isset( self::$_instance[$class] ) ) { | |
self::$_instance[$class] = new $class(); |
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 | |
/** | |
* Determine whether a string is trying to be a URL | |
* | |
* @see http://daringfireball.net/2010/07/improved_regex_for_matching_urls | |
* | |
* @param string $url | |
* @return bool preg_match() returns 1 if the pattern matches given subject, 0 if it does not, or FALSE if an error occurred. | |
*/ | |
function is_valid_url( $url ) { |
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
select tt.`count`, t.name from `wp_term_taxonomy` tt join wp_terms t on (tt.term_id=t.term_id) where tt.taxonomy='post_tag' order by tt.`count` desc limit 100; |
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
index index.php index.html index.htm; | |
upstream phpfcgi { | |
server 127.0.0.1:9000; | |
} | |
upstream memcached { | |
server example.compute-1.amazonaws.com:11211 max_fails=1 fail_timeout=2s; | |
server example.compute-1.amazonaws.com:11211 max_fails=1 fail_timeout=2s; | |
} |
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
jQuery(':button, :submit, #post-preview, .submitdelete', '#submitpost').each(function(){ | |
var t = jQuery(this); | |
if ( t.hasClass('button-primary') ) | |
t.addClass('button-primary-disabled'); | |
else | |
t.addClass('button-disabled'); | |
t.prop('disabled', true); | |
t.on('click', function() { |