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 | |
/** | |
* 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 ); | |
} ); | |
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
stdClass Object | |
( | |
[id] => | |
[packed] => Array | |
( | |
[0] => WC_Boxpack_Item Object | |
( | |
[weight] => 7.00 | |
[height] => 2.50 | |
[width] => 12.00 |
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
stdClass Object | |
( | |
[id] => | |
[packed] => Array | |
( | |
[0] => WC_Boxpack_Item Object | |
( | |
[weight] => 7.00 | |
[height] => 2.50 | |
[width] => 12.00 |
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 | |
/** | |
* Removes "Town" from label/placeholder in checkout forms | |
*/ | |
function jp_address_field_filter( $fields ) { | |
// fields we want to look for | |
$search = array( | |
'billing_city', | |
'shipping_city', |
OlderNewer