Skip to content

Instantly share code, notes, and snippets.

Avatar

Anthony Brown anthonysbrown

  • Worcester, MA USA
View GitHub Profile
@anthonysbrown
anthonysbrown / index.html
Last active Aug 29, 2015
Javascript Linkout Script Using Colorbox
View index.html
<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 Nov 3, 2015
Events Manager Pro highlight RVP'd event on month view
View functions.php
<?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 Feb 23, 2016
Remove jqueryui widget from jquery.mobile.customized.min.js for cherry framework 3.1.5
View jquery.mobile.customized.min.js
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 Apr 7, 2016
Use sharethis buttons with funeralpress
View functions.php
<?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(){
View header.php
<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>
View mike.php
<?php
// the query
$args = array(
'post_type' => 'post',
'posts_per_page' => 1,
);
$the_query = new WP_Query( $args ); ?>
View functions.php
<?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
Create a new tab in funeralpress
View new_tab.php
<?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 Jul 18, 2016
Add something cool to above the obituaries
View above_obit.php
<?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 Oct 3, 2016
Change any text in Funeralpress
View functions.php
function funeralpress_custom_localize( $translated_text, $untranslated_text, $domain ) {
if($untranslated_text == 'Burial Date'&& $domain = 'sp-wpfh'){
$translated_text = 'Services Date';
}
return $translated_text;
}