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 generate_options_css($newdata) { | |
/** Define some vars **/ | |
$data = $newdata; | |
$uploads = wp_upload_dir(); | |
$css_dir = get_template_directory() . '/css/'; // Shorten code, save 1 call | |
/** Save on different directory if on multisite **/ | |
if(is_multisite()) { | |
$aq_uploads_dir = trailingslashit($uploads['basedir']); |
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 dummy_wp_get_attachment_url( $url, $post_id ){ | |
return 'http://dummy/image/URL'; | |
} | |
add_filter( 'wp_get_attachment_url' , 'dummy_wp_get_attachment_url' , 10 , 2 ); |
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
class My_Custom_Block extends AQ_Block { | |
function __construct() { | |
// block actual processes | |
} | |
function form( $instance ) { | |
// outputs the options form on admin | |
} |
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 aq_fix_query( $query ) { | |
global $paged; | |
if( $query->is_main_query() && $query->is_home() ) { | |
$query->set( 'post_type', array( 'post', 'listings' ) ); | |
} | |
} | |
add_action( 'pre_get_posts', 'aq_fix_query' ); |
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
/** | |
* Get rid of "Cheatin' uh?" error | |
* note: this will create a persistent "Hello World" post | |
*/ | |
function aq_cheatin_uh(){ | |
$id = 1; | |
$check = get_post($id); | |
if(! $check ) { | |
$post = 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
//Fix for home page navigation error on WP 3.4 | |
function aq_query_for_homepage( $query ) { | |
global $paged; | |
if(get_option('lp_include_reviews') == "true") { $include_reviews = "reviews"; } | |
if(get_option('lp_include_videos') == "true") { $include_videos = "videos"; } | |
if(get_option('lp_include_screenshots') == "true") { $include_screenshots = "screenshots"; } | |
if( $query->is_main_query() && $query->is_home() ) { | |
$query->set( 'post_type', array( 'post', $include_reviews, $include_videos, $include_screenshots ) ); |
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 | |
/* | |
Title : SMOF | |
Description : Slightly Modified Options Framework | |
Version : 1.4.0 | |
Author : Syamil MJ | |
Author URI : http://aquagraphite.com | |
License : WTFPL - http://sam.zoy.org/wtfpl/ | |
Credits : Thematic Options Panel - http://wptheming.com/2010/11/thematic-options-panel-v2/ | |
KIA Thematic Options Panel - https://github.com/helgatheviking/thematic-options-KIA |
NewerOlder