View functions.php
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
function woocommerce_nyp_price_input_no_price( $html, $product_id, $prefix ) { | |
// only get the posted price (price submitted on add-to-cart) otherwise NULL | |
$price = WC_Name_Your_Price_Helpers::get_posted_price( $product_id, $prefix ); | |
return sprintf( '<input id="nyp%s" name="nyp%s" type="text" value="%s" size="6" title="nyp" class="input-text amount nyp-input text" />', $prefix, $prefix, WC_Name_Your_Price_Helpers::format_price( $price ) ); | |
; | |
} | |
add_filter( 'woocommerce_get_price_input', 'woocommerce_nyp_price_input_no_price', 10, 3 ); |
View functions
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
add_filter( 'woocommerce_add_to_cart_validation', 'woocommerce_nyp_make_field_required', 10, 5 ); | |
function woocommerce_nyp_make_field_required( $passed, $product_id, $quantity, $variation_id = '', $variations= '' ) { | |
if( $variation_id ) | |
$product_id = $variation_id; | |
// skip if not a nyp product - send original status back | |
if ( ! WC_Name_Your_Price_Helpers::is_nyp( $product_id ) ){ | |
return $passed; |
View functions.php
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
/* | |
* Submit form even if user is already subscribed to AWeber List | |
* | |
* @param $msg - current message from Ninja Forms for AWeber | |
* @param $error_code - null, placeholder for when AWeber gets error codes | |
* @param $error_message - original message from AWeber | |
* @param $subscriber - array of info about the subscriber submitted via form | |
* -- nb the form's ID can be found in $subscriber['form_id'] | |
* @param $list_id the list ID | |
*/ |
View wpalchemy-tinymce-template.php
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 while($mb->have_fields_and_multi('GROUP-NAME')): ?> | |
<?php $mb->the_group_open(); ?> | |
<p class="update-warning">Remember, you must save the page for the sort order to take effect.</p> | |
<?php $metabox->the_field('CONTENT-FIELD'); ?> | |
<label for="<?php $metabox->the_name(); ?>">FIELD LABEL</label> | |
<div class="customEditor"> | |
<textarea rows="10" cols="50" name="<?php $mb->the_name(); ?>" id="<?php $mb->the_name(); ?>"><?php $mb->the_value(); ?></textarea> | |
</div> |
View editor_meta.php
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
<div class="my_meta_control"> | |
<?php $mb->the_field('test_editor'); | |
$settings = array( | |
'textarea_rows' => '10', | |
'media_buttons' => 'false', | |
'tabindex' =>2 | |
); |
View flexslider.css
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 FlexSlider v1.8 | |
* http://www.woothemes.com/flexslider/ | |
* | |
* Copyright 2012 WooThemes | |
* Free to use under the MIT license. | |
* http://www.opensource.org/licenses/mit-license.php | |
*/ | |
/* Browser Resets */ |
View content-extensions.php
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 | |
/** | |
* Content Extensions | |
* | |
* @package ThematicCoreLibrary | |
* @subpackage ContentExtensions | |
* @todo revisit docblock desciptions & tags | |
*/ | |
View nmr-session-roles.php
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 | |
/* | |
Plugin Name: Nav Menu Roles + Session Roles | |
Plugin URI: http://www.kathyisawesome.com/449/nav-menu-roles/ | |
Description: Hide custom menu items based on session variables | |
Version: 1.0.0 | |
Author: Kathy Darling | |
Author URI: http://www.kathyisawesome.com | |
License: GPL-3.0 |
View functions.php
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
/** | |
* Adds a box to the main column on the Post and Page edit screens. | |
*/ | |
function myplugin_add_meta_box() { | |
$screens = array( 'post', 'page' ); | |
foreach ( $screens as $screen ) { | |
add_meta_box( |
View functions.php
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 | |
/** | |
* Place this in your theme's functions.php file | |
* Or a site-specific plugin | |
* | |
*/ | |
// Switch the WP_User_Query args to a meta search | |
function kia_meta_search( $args ){ |
OlderNewer