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
.woocommerce-info { | |
border-top: 3px solid #5b95a4; | |
&:before { | |
background-color: #5b95a4; | |
} | |
} | |
.woocommerce-message { | |
border-top: 3px solid #6b9e56; |
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 | |
// func to sort the columns | |
add_action( 'pre_get_posts', 'floorplan_order_columns', 9999 ); | |
function floorplan_order_columns( $query ) { | |
// if we're not in the admin, or if it isn't the custom post type, exit | |
if( ! is_admin() || $query->get( 'post_type' ) !== 'floorplan' ) | |
return; | |
// get the orderby, if it is not set, leave it blank |
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 | |
switch( $orderby ) { | |
case 'fp_sf_tot': | |
$query->set( 'meta_key', 'fp_sf_tot' ); | |
$query->set( 'orderby', 'meta_value_num' ); | |
break; | |
case 'fp_pdf': | |
$query->set( 'meta_key', 'fp_pdf' ); | |
$query->set( 'orderby', 'meta_value' ); |
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 | |
// get our portfolio page | |
$args = array( | |
'post_type' => 'page', | |
'posts_per_page' => 1, | |
'meta_key' => '_wp_page_template', | |
'meta_value' => 'template-galleries.php' | |
); | |
$portfolio_page = get_posts( $args ); |
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
jQuery( document ).ready( function( $ ) { | |
// our variables | |
var page_template = $( '#page_template' ), // Page - page template select box | |
main_editor_container = $( '#postdivrich' ), // All - main editor | |
editor_expand_toggle = $( '#editor-expand-toggle' ); // All - the checkbox to turn autoresizing of the editor on and off. | |
// function that flips the switch to turn the auto resize of the MCE editor on and off | |
// basically, it gets it to reinitialize itself once we've shown it after hiding it, fixing layout issues | |
function expand_toggle(){ | |
if( editor_expand_toggle.prop( 'checked' ) ) { |
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 widget with WordPress. | |
*/ | |
function __construct() { | |
parent::__construct( | |
'foo_widget', // Base ID | |
__( 'Widget Title', 'text_domain' ), // Name | |
array( 'description' => __( 'A Foo Widget', 'text_domain' ), ) // Args | |
); |
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 widget with WordPress. | |
*/ | |
function __construct() { | |
parent::__construct( | |
'foo_widget', // Base ID | |
__( 'Widget Title', 'text_domain' ), // Name | |
array( | |
'classname' => 'YOUR WIDGET CLASSES', |
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
$( document ).trigger( 'widget-added', [ $widget ] ); |
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
// if a widget is added, then initialize the media_uploader in that widget | |
$( document ).on( 'widget-added', function( event, target ) { | |
init_media_uploader( target ); | |
} ); | |
OlderNewer