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 | |
function handle_notices(){ | |
$updated = isset( $_GET['whatever-updated'] ) ? $_GET['whatever-updated'] : false; | |
if( $updated !== false ){ | |
$type = $updated ? 'success' : 'error'; | |
$message = $updated ? __( 'Your whatever was updated.', 'cgc' ) : __( 'There was a problem updating whatever.', 'cgc' ); | |
cgc_add_notice( $message, $type ); | |
} | |
} | |
add_action( 'cgc_notices', 'handle_notices' ); |
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 | |
if( function_exists('cgc_ub_show_user_badges') ) { | |
$member = cgc_get_user_data(); | |
cgc_ub_show_user_badges( $member->ID ); | |
} |
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 | |
function display_dynamic_pricing_table(){ | |
global $post; | |
# see line 42 of woocommerce_pricing_by_product.class.php | |
$pricing_rule_sets = get_option('_a_category_pricing_rules', array()); | |
$found = false; | |
if(count($pricing_rule_sets)){ | |
global $woocommerce_pricing; | |
foreach ($pricing_rule_sets as $pricing_rule_set) { |
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
Sublime Text 2 Setup: | |
Packages: | |
1. Package Control: https://sublime.wbond.net/installation - This will allow you easily install other packages | |
2. DocBlockr | |
3. Gist (You'll need to setup the config for this to work) | |
4. Goto Documentation (Customize this for super+click) | |
5. LiveReload | |
6. Prefixr | |
7. Sass |
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 do_action( 'it_exchange_content_registration_before_company_element' ); ?> | |
<div class="it-exchange-registration-company"> | |
<?php it_exchange( 'dichiara_registration', 'company' ); ?> | |
</div> | |
<?php do_action( 'it_exchange_content_registration_after_company_element' ); ?> |
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 | |
# ... | |
function miniloops_shortcoder( $input ) { | |
$input = wp_filter_post_kses( $input ); | |
//give our shortcodes the correct prefix | |
$input = str_replace( '[', '[ml_', $input ); | |
$input = str_replace( '[/', '[/ml_', $input ); | |
//make sure we haven't doubled-up |
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 | |
/** | |
* Run the wp query to fetch the posts for listing on the edit posts page | |
* | |
* @since 2.5.0 | |
* | |
* @param array|bool $q Array of query variables to use to build the query or false to use $_GET superglobal. | |
* @return 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
<?php | |
/** | |
* My Virtual Merchant Submission Button | |
* Description: This button will allow users to send customers and clients to the My Virtual Merchant payment form | |
* Version: 1.0.0 | |
* Author: Brian DiChiara | |
* Author URI: http://www.briandichiara.com | |
*/ | |
$post_url = 'https://www.myvirtualmerchant.com/VirtualMerchant/process.do'; |
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 get_header(); ?> | |
<div id="content" class="clearfix row"> | |
<div id="main" class="col-sm-8 clearfix" role="main"> | |
<div class="page-header"> | |
<?php if (is_category()) { ?> | |
<h1 class="archive_title h2"> | |
<span><?php _e("Posts Categorized:", "wpbootstrap"); ?></span> <?php single_cat_title(); ?> |