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
// | |
// Alerts | |
// -------------------------------------------------- | |
// Base styles | |
// ------------------------- | |
.alert, | |
.validation_error, |
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
<pre><?php | |
require 'wp-load.php'; | |
$postmeta_field_name = 'video_url'; // fill it | |
echo $query = "SELECT * FROM {$wpdb->postmeta} WHERE meta_key = '$postmeta_field_name';"; | |
$data = $wpdb->get_results( $query ); |
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 | |
/** | |
* Register Styles and Scripts | |
*/ | |
add_action( 'wp_enqueue_scripts', 'ft_scripts_styles' ); | |
function ft_scripts_styles() { |
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 getDateDiff($date) | |
{ | |
$diff_info=array(); | |
$timestamp=strtotime($date); | |
$timestamp_diff=$timestamp-time(); | |
//test if $date is future | |
$diff_info['future']=$timestamp_diff>0; |
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 | |
/** | |
* Rackspace Cloud Server API PHP Library | |
* | |
* @package RscApi | |
*/ | |
/** | |
* Rackspace Cloud Server API PHP Library | |
* |
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 | |
export ACCOUNT_ROOT="account root" | |
export WEB_ROOT="${ACCOUNT_ROOT}/web/content" | |
export DB_HOST="db host" | |
export DB_USER="db user" | |
export DB_PASSWORD="db password" | |
export DB_NAME="db name" | |
echo "Rotating backups..." |
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 Site Settings for Rackspace Cloud Sites | |
php_value max_execution_time 3600 | |
php_value upload_max_filesize 100M | |
php_value post_max_size 220M | |
php_value memory_limit 256M | |
# End PHP Site Settings | |
# BEGIN WordPress | |
<IfModule mod_rewrite.c> | |
RewriteEngine On |
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 | |
/** | |
* Add 'class="span4"' to all widgets in the Content Bottom sidebar | |
*/ | |
function bb_content_bottom_widget_class($params) { | |
if ($params[0]['id'] == 'roots-content-bottom') { | |
$class = 'class="span4 '; | |
$params[0]['before_widget'] = preg_replace('/class=\"/', "$class", $params[0]['before_widget'], 1); | |
} |
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 | |
/** | |
* Subnav widget | |
* | |
* Base CSS: | |
* | |
* .widget_roots_subpages ul { | |
* margin-top: 10px; | |
* padding: 0; |