Skip to content

Instantly share code, notes, and snippets.

View anthonysbrown's full-sized avatar

Anthony Brown anthonysbrown

  • Worcester, MA USA
View GitHub Profile
@anthonysbrown
anthonysbrown / index.html
Last active August 29, 2015 14:23
Javascript Linkout Script Using Colorbox
<div style="display:none">
<div class="dove-tail-linkout-content">
<p>You are currently leaving the site! please confirm you would like to leave</p>
</div>
</div>
@anthonysbrown
anthonysbrown / functions.php
Last active November 3, 2015 15:03
Events Manager Pro highlight RVP'd event on month view
<?php
function highlight_attending_events(){
global $current_user;
$args = array(
'post_type' => 'tribe_events','posts_per_page'=>-1, 'post_status' => 'publish'
);
@anthonysbrown
anthonysbrown / jquery.mobile.customized.min.js
Last active February 23, 2016 20:28
Remove jqueryui widget from jquery.mobile.customized.min.js for cherry framework 3.1.5
window.define = function() {
Array.prototype.slice.call(arguments).pop()(window.jQuery)
};
define(["jquery", "./jquery.ui.widget"], function(a) {
(function(a, b) {
a.widget("mobile.widget", {
_createWidget: function() {
a.Widget.prototype._createWidget.apply(this, arguments);
this._trigger("init")
},
@anthonysbrown
anthonysbrown / functions.php
Last active April 7, 2016 14:43
Use sharethis buttons with funeralpress
<?php
#hook into wordpress wp_head
add_action('wp_head','wpfh_custom_share_button_scripts');
#hook into above tabs in funeralpress
add_action('wpfh/obituary/above_tabs','wpfh_custom_share_button',10,2);
function wpfh_custom_share_button_scripts(){
<div class="cart">
<a href="/store/shopping-cart/">
<img src="<?php echo esc_attr( get_bloginfo( 'stylesheet_directory' ) ); ?>/img/cart.png" />
<div id="cart-contents"><?php _e( 'Cart:', TEMPLATE_DOMAIN ) ?> <span><?php echo sprintf(__('%s item(s)', TEMPLATE_DOMAIN ), mp_items_count_in_cart()); ?></span></div>
</a>
</div>
<?php
// the query
$args = array(
'post_type' => 'post',
'posts_per_page' => 1,
);
$the_query = new WP_Query( $args ); ?>
<?php
$funeralpress_theme = new funeralpress_theme;
add_action( 'wp_enqueue_scripts',array($funeralpress_theme , 'scripts'));
add_action( 'wp_head',array($funeralpress_theme , 'wp_head'));
add_action( 'after_setup_theme',array($funeralpress_theme , 'register_menu'));
add_action( 'woo_header_inside', array($funeralpress_theme , 'header_contact'), 11 );
#add_filter( 'wpfh/obituary/top', array($funeralpress_theme , 'obit_top'), 11,2 );
@anthonysbrown
anthonysbrown / new_tab.php
Created May 31, 2016 15:26
Create a new tab in funeralpress
<?php
$wpfh_obits_extra_tab = new wpfh_obits_extra_tab;
add_filter('wpfh_obit_permissions', array(
$wpfh_obits_extra_tab,
'permissions'
));
add_filter('wpfp_frontend_top_obit_content', array(
@anthonysbrown
anthonysbrown / above_obit.php
Created July 18, 2016 18:04
Add something cool to above the obituaries
<?php
add_filter('wpfp_frontend_obit_below_breadcrumbs', 'my_custom_obit_filter');
function my_custom_obit_filter($r){
#obit array
$obit = $r[0];
#do something with the obituary data
@anthonysbrown
anthonysbrown / functions.php
Last active October 3, 2016 20:24
Change any text in Funeralpress
function funeralpress_custom_localize( $translated_text, $untranslated_text, $domain ) {
if($untranslated_text == 'Burial Date'&& $domain = 'sp-wpfh'){
$translated_text = 'Services Date';
}
return $translated_text;
}