Skip to content

Instantly share code, notes, and snippets.

View marktenney's full-sized avatar

Mark Tenney marktenney

View GitHub Profile
@marktenney
marktenney / style.css
Created October 29, 2018 18:05
Fixed Footer Reveal Effect
footer {
bottom: 0;
left: 0;
position: fixed;
right: 0;
z-index: -100;
}
.fl-page-content {
margin-bottom:600px; /* change this value to match the height of the footer */
@marktenney
marktenney / admin-edit-menu-under-wallace-inline.php
Last active February 22, 2019 15:50
Create an Admin Edit Menu Dropdown under Wallace Inline
<?php
/*
Plugin Name: Wallace Inline Edit Submenu
Description: Contains Digital Church customizations to the admin section, including custom dashboard content and tweaks, custom adminbar content, and the intercom chat messenger. Should be network active.
Version: 1.0.1
Author: Digital Church
Author URI: https://digitalchurchplatform.com
License: GPL2
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/
function dgtl_filter_hidden_groups( $query_args ) {
if ( 'um_groups' == $query_args['settings']->post_type ) { // if the post type selected is 'um_groups'
$query_args['meta_key'] = '_um_groups_privacy'; // and custom field '_um_groups_privacy'
$query_args['meta_value'] = 'hidden'; // and field value 'hidden'
$query_args['meta_compare'] = '!='; // are not equal
}
return $query_args; // only show public & private groups
}
add_filter( 'fl_builder_loop_query_args', 'dgtl_filter_hidden_groups' );
@marktenney
marktenney / functions.php
Last active July 19, 2019 16:39 — forked from offroadkev/functions.php
Change Gravity Forms Spinner to CSS Spinner
// Changes Gravity Forms Ajax Spinner (next, back, submit) to a transparent image
// this allows you to target the css and create a pure css spinner like the one used below in the style.css file of this gist.
add_filter( 'gform_ajax_spinner_url', 'spinner_url', 10, 2 );
function spinner_url( $image_src, $form ) {
return 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7'; // relative to you theme images folder
}
@marktenney
marktenney / custom-admin.php
Last active July 27, 2019 12:36
Add intercom messenger to any network users who have admin access.
<?php
/****** Add Intercom ********/
/****** Be sure to add your APP ID on lines 12 + 29 ******/
add_action('wp_enqueue_scripts', 'dgtl_enqueue'); // This action adds the messenger to the front end.
function dgtl_enqueue() {
if ( current_user_can('edit_posts') ) { // Only run messenger if user can edit posts (contributor+).
global $current_user;
$current_user = wp_get_current_user();
?>
<?php
/*
Plugin Name: Blackline Client Portal
Plugin URI: https://blackline.limited/
Description: This is the client portal we use when we are actively designing and developing projects for clients.
Version: 1.0
Author: Blackline Branding Limited
Author URI: https://blackline.limited/
License: GPL2
*/
<?php
/*
Plugin Name: Connect Cards
Plugin URI: https://digitalchurchplatform.com
Description: Enable the Connect Card Content Library.
Version: 2.0
Author: Digital Church
Author URI: https://digitalchurchplatform.com
License: GPL2
*/
var curday;
var secTime;
var ticker;
function getSeconds() {
var nowDate = new Date();
var dy = 0 ; //Sunday through Saturday, 0 to 6
var countertime = new Date(nowDate.getFullYear(),nowDate.getMonth(),nowDate.getDate(),10,30,0); //10 out of 24 hours = 10am
var curtime = nowDate.getTime(); //current time
<?php
function fl_builder_events_loop_query_args_filter( $query_args ) {
$campus = rwmb_meta('campus') // Get the Campus of the page you are on from metabox value
if ( 'campus-events' == $query_args['settings']->id ) { // If the posts module has the ID 'campus-events'
$query_args['taxonomy'] = $campus; // Filter by events that also have the term of the same campus
}
return $query_args;
}
<?php
/*** Add a custom favicon for the admin area ***/
function custom_admin_favicon() {
$url = ''; // Place the path to your dashboard icon here.
echo '<link rel="Shortcut Icon" type="image/x-icon" href="' . $url . '" />';
}
add_action( 'admin_head', 'custom_admin_favicon' );
/*** Add a custom default front end favicon ***/