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
/** | |
* Stack blur filter for fabricjs | |
* Example: | |
* obj.filters.push(new fabric.Image.filters.StackBlur(6)); | |
* obj.applyFilters(canvas.renderAll.bind(canvas)); | |
* | |
* Heavily inspired by: | |
* https://gist.github.com/pierrickouw/2ab679159beee9d80ca6 | |
* http://www.quasimondo.com/StackBlurForCanvas/StackBlurDemo.html | |
* uses stackBlurCanvasRGBA function but could be swapped be stackBlurCanvasRGB |
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
// Capital Framework Initials Thumbnail | |
.cfw-initails-thumbnail { | |
background: #d8d8d8; | |
color: #333; | |
width: 45px; | |
height: 45px; | |
display: inline-block; | |
border-radius: 50%; | |
margin-right: 15px; |
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 | |
$current_user = wp_get_current_user(); | |
/** | |
* @example Safe usage: $current_user = wp_get_current_user(); | |
* if ( !($current_user instanceof WP_User) ) | |
* return; | |
*/ | |
echo 'Username: ' . $current_user->user_login . '<br />'; | |
echo 'User email: ' . $current_user->user_email . '<br />'; | |
echo 'User first name: ' . $current_user->user_firstname . '<br />'; |
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
<style> | |
body { margin: 0; padding: 0} | |
#container { | |
position: absolute; | |
top: 30px; left: 50px; | |
bottom: 30px; right: 50px; | |
border: 1px solid #ccc | |
} | |
#container > div { |
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 mb_twitter($atts, $content = null ){ | |
extract(shortcode_atts(array('count'=>'3','user'=>''), $atts)); | |
//Cache user and then return last tweeted items (3 by default) | |
$via = '<div class="tweet-via"><a href="https://twitter.com/intent/user?screen_name='.$user.'" target="_blank" rel="nofollow">@'.$user.'</a></div>'; | |
return '<div class="twitter-feed"><ul id="twitter_update_list"><li>Twitter feed loading</li></ul>'.$via.'</div><script type="text/javascript" src="http://twitter.com/javascripts/blogger.js"></script> | |
<script type="text/javascript" src="https://api.twitter.com/1/statuses/user_timeline.json?screen_name='.$user.'&callback=twitterCallback2&count='.$count.'"></script>'; | |
} | |
add_shortcode('mb_twitter', 'mb_twitter'); | |
// use this shortcode [mb_tweets count=5 user="OnlineMarket"] |
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 include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); ?> | |
<?php is_plugin_active($plugin) ?> | |
// example: | |
<?php | |
include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); | |
If (is_plugin_active('plugin-directory/plugin-file.php')) { | |
//plugin is activated | |
} |
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($) { | |
"use strict"; | |
$(document).on('click','.thumbnails .zoom', function(){ | |
var photo_fullsize = $(this).find('img').attr('src').replace('-150x180',''); | |
$('.woocommerce-main-image img').attr('src', photo_fullsize); | |
return false; | |
}); | |
}); |
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 | |
add_filter( 'woocommerce_product_tabs', 'capitalh_rename_tabs', 98 ); | |
function capitalh_rename_tabs( $tabs ) { | |
if ( isset($tabs['description']) ) { | |
$tabs['description']['title'] = __( 'New Title', 'une_boutique' ); // Rename the description tab | |
} | |
if ( isset($tabs['reviews']) ) { |
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 previous_post_link('« %link'); ?> | |
<?php next_post_link('%link »'); ?> |