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 | |
Sometimes we want to give clients access to additional styles in TinyMCE. These functions also handle backwards compatibility with WordPress as TinyMCE 3 and TinyMCE 4 handle this differently | |
function sennza_mce_buttons( $buttons ) { | |
array_unshift( $buttons, 'styleselect' ); | |
return $buttons; | |
} | |
add_filter( 'mce_buttons_2', 'sennza_mce_buttons' ); | |
function sennza_mce_before_init( $init_array ) { |
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 sz_get_testimonials( $page_id ){ | |
$testimonials = get_post_meta( $page_id, 'testimonial', false ); | |
if ( $testimonials ) { | |
$testimonial_list = "\n<ul>\n"; | |
foreach ( $testimonials as $testimonial ) { | |
$testimonial_image = false; | |
$testimonial_content = false; | |
$testimonial_list .= "\t<li class='row'>"; | |
if ( $testimonial['testimonial-image'] ) { | |
$testimonial_image = wp_get_attachment_image( $testimonial['testimonial-image'], 'full', '', array( 'class' => 'columns small-3' ) ); |
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 | |
/** | |
* Pop this into your functions.php if you like :) | |
* | |
*/ | |
function jordesigns_mce_buttons( $buttons ) { | |
array_unshift( $buttons, 'styleselect' ); | |
return $buttons; | |
} | |
add_filter( 'mce_buttons_2', 'jordesigns_mce_buttons' ); |
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 | |
/** | |
* We need to filter our post thumbnails so we can output them in a format that Foundations Interchange needs. | |
* We also need a fallback for no JavaScript | |
* | |
* @param $html | |
* @param $post_id | |
* @param $post_thumbnail_id | |
* @param $size | |
* @param $attr |
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
/* Set up a variable for maths */ | |
$doc-font-size: 16; | |
/* the font-size mixin */ | |
@mixin font-size($size) { | |
font-size: 0px + $size; | |
font-size: 0rem + $size / $doc-font-size; | |
} |
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
@import "compass"; | |
$base-font-family: "Open Sans", sans-serif; | |
$menu-base-color: #111; | |
$mid-menu-color: lighten( $menu-base-color, 6.5% ); | |
$light-menu-color: lighten( $menu-base-color, 13.5% ); | |
$menu-highlight-color: #682E93; | |
$active-plugins: lighten( $menu-highlight-color, 66.5% ); | |
/* Need to revisit this */ | |
$active-plugin-check-column: saturate( $menu-highlight-color, 50% ); | |
@if $active-plugins == white { |
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 sennza_change_first_name( $label, $form_id ){ | |
return "First Name"; | |
} | |
add_filter( 'gform_name_first', 'sennza_change_first_name', 10, 2 ); | |
function sennza_change_last_name( $label, $form_id ){ | |
return "Last Name"; | |
} | |
add_filter( 'gform_name_last', 'sennza_change_last_name', 10, 2 ); |
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 | |
add_action( 'comment_unapproved_to_approved', 'sennza_run_approved_comment_awesomeness', 10, 1 ); |
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 | |
/* Added to functions.php in the theme */ | |
function ts_change_groups_slug(){ | |
global $bp; | |
$bp->groups->root_slug = 'teams'; | |
return $bp->groups->root_slug; | |
} | |
add_filter( 'bp_get_groups_slug', 'ts_change_groups_slug' ); | |
add_filter( 'bp_get_groups_root_slug', 'ts_change_groups_slug' ); |
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
function g8_aus_address( $address_types, $form_id ){ | |
$address_types["australia"] = array( | |
"label" => "Australian", | |
"country" => "Australia", | |
"zip_label" => "Postcode", | |
"state_label" => "State", | |
"states" => array( | |
"NT" => "NT", | |
"ACT" => "ACT", | |
"NSW" => "NSW", |