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 | |
/** | |
* Add shortcode | |
*/ | |
add_shortcode( 'button', 'aqua_btn_shortcode' ); | |
function aqua_btn_shortcode( $attr, $content = "" ) { | |
extract( shortcode_atts( array( | |
'label' => 'Button', | |
'link' => '#', | |
'new_tab' => '', |
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 | |
define( 'AQUAMIN_ADMIN_LOCKOUT', true ); | |
add_action( 'admin_init', function() { | |
if( AQUAMIN_ADMIN_LOCKOUT && ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) ) { | |
header( 'location: http://www.thinkaquamarine.com/maintenance.html' ); | |
// or use this to redirect internally: wp_safe_redirect( home_url( '/maint.html' ) ); | |
exit; | |
} | |
} ); |
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 | |
//Usage: [include template='template' part='part'] | |
function template_part_shortcode($atts) { | |
extract(shortcode_atts(array( | |
'template' => 'templates/parts/page', | |
'part' => null | |
), $atts)); | |
ob_start(); | |
get_template_part($template, $part); |
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
/* | |
* Mini Admin Bar | |
* Modified from plugin URI: http://www.netyou.co.il/ | |
* Description: Makes the admin bar a small button on the left and expands on hover. | |
*/ | |
add_action('get_header', 'my_filter_head'); | |
function my_filter_head() { remove_action('wp_head', '_admin_bar_bump_cb'); } | |
function my_admin_css() { |
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 global $template; echo $template;?> |
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 | |
/* | |
* Use Parent Category | |
* Description: Causes subcategories to use their parent's template | |
*/ | |
function new_subcategory_hierarchy() { | |
$category = get_queried_object(); | |
$parent_id = $category->category_parent; |
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
li ul:after { | |
content: ""; | |
position: absolute; | |
top: -10px; | |
bottom: -40px; | |
left: -40px; | |
right: -40px; | |
//IE hack | |
background-color: #000; | |
filter:alpha(opacity=0); |
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 | |
/** | |
* Set up faux the_content() simulation | |
* | |
* You can use this to simulate the_content() through a shortcode. Simply | |
* add the shortcode [faux] on any page in wp-admin and publish. Then, | |
* Then, make all your changes in your favorite text editor in the includes/faux-content.php | |
* file. Once finished, paste the contents of includes/faux-content.php into the page in wp-admin. | |
*/ | |
function faux_the_content_() { |