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 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
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 | |
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
<?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 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 | |
class Tribe_Image_Widget extends WP_Widget { | |
// ... | |
private function get_image_html( $instance, $include_link = true ) { | |
// Backwards compatible image display. | |
if ( $instance['attachment_id'] == 0 && $instance['image'] > 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
$prefix = hybrid_get_prefix(); | |
add_filter( "{$prefix}_byline", 'wwon_byline'); | |
function wwon_byline($byline){ | |
if(!is_single()){ | |
$byline = '<div class="post-date"> | |
<span class="post-date-month">'.get_the_date('M').'</span> | |
<span class="post-date-day">'.get_the_date('d').'</span> | |
</div> |
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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html" /> | |
<meta name="author" content="Brian DiChiara" /> | |
<title>Launching...</title> | |
<style type="text/css"> | |
* { margin:0; padding:0; } | |
body, html, .container { background:#2f2f2f; } | |
p { margin:100px auto; text-align:center; font-size:0; width:373px; height:29px; background:url(http://assets.infomedia.net/launching.gif) no-repeat 50% 50%; } |
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 | |
/** | |
* Plugin Name: Delete Them All! | |
* Plugin URI: http://infomedia.com | |
* Description: Delete ALL posts and associated data, leaving your database nice and clean! | |
* Version: 1.0 | |
* Author: Brian DiChiara | |
* Author URI: http://www.briandichiara.com | |
*/ |