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
| add_filter('acf/options_page/settings', 'showcase_options_page_settings'); | |
| function showcase_options_page_settings( $settings ) { | |
| $settings['title'] = 'Site Options'; | |
| $settings['slug'] = 'custom-theme-options'; | |
| $settings['menu'] = 'Site Options'; | |
| $settings['pages'] = array_merge(array('Site Options'), $settings['pages']); | |
| return $settings; | |
| } |
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 | |
| # This file contains functions that are related with videos | |
| # | |
| # Filters/resizes video embed codes. | |
| # | |
| function filter_video($html, $wmode = false, $width = false, $height = false) { | |
| $final_html = $html; | |
| if ($wmode) { | |
| if (strpos($final_html, 'iframe') !== FALSE && strpos($final_html, 'youtube') !== FALSE) { |
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
| -webkit-transition: background-color 0.2s; | |
| -moz-transition: background-color 0.2s; | |
| -o-transition: background-color 0.24s; | |
| -ms-transition: background-color 0.2s; | |
| transition: background-color 0.2s; |
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 | |
| /*==================================================*/ | |
| /*======= Indexhibit full background image =========*/ | |
| /*======= Plugin version 1.0 =========*/ | |
| /*==================================================*/ | |
| /* @author Steffen Görg aka G470 http://gatonet.de */ | |
| /*===================== USAGE ======================*/ |
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
| add_filter('tribe_ical_feed_item','tribe_add_attachment_to_ical', 10, 2); | |
| function tribe_add_attachment_to_ical($item, $event){ | |
| $args = array( | |
| 'post_type' => 'attachment', | |
| 'numberposts' => -1, | |
| 'post_status' => null, | |
| 'post_parent' => $event->ID | |
| ); |
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
| add_filter( 'avatar_defaults', 'newgravatar' ); | |
| function newgravatar ($avatar_defaults) { | |
| $myavatar = get_bloginfo('template_directory') . '/images/buildinternet-gravatar.jpg'; | |
| $avatar_defaults[$myavatar] = "Build Internet"; | |
| return $avatar_defaults; | |
| } |
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
| $args = array( | |
| 'post_type' => 'attachment', | |
| 'post_mime_type' => 'image', | |
| 'post_parent' => $post->ID | |
| ); | |
| $images = get_posts( $args ); | |
| foreach($images as $image): | |
| echo wp_get_attachment_image($image->ID, 'medium'); | |
| endforeach; |
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
| // http://www.binarymoon.co.uk/2012/02/complete-timthumb-parameters-guide/ | |
| function get_thumb_src($src, $width="100", $height="100", $quality="85", $alignment="", $zoomcrop="", $filters="", $sharpen="", $canvascolor="", $transparency=""){ | |
| if($src=="") return FALSE; | |
| $src = "src=".$src; | |
| $width = "&w=".$width; | |
| $height = "&h=".$height; | |
| $quality = "&q=".$quality; | |
| $alignment = (!empty($alignment)) ? "&a=".$alignment : ""; |
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
| foreach(get_field('relationship') as $related) : | |
| $args = array( | |
| 'post_type' => 'attachment', | |
| 'numberposts' => -1, | |
| 'post_status' => null, | |
| 'post_parent' => $related->ID, | |
| ); | |
| $attachments = get_posts( $args ); | |
| foreach ( $attachments as $attachment ) : | |
| $headshot = wp_get_attachment_image_src($attachment->ID, "medium"); |
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
| .shadowed { | |
| -webkit-filter: drop-shadow(0px 0px 5px rgba(0,0,0,0.8)); | |
| filter: url(shadow.svg#drop-shadow); | |
| -ms-filter: "progid:DXImageTransform.Microsoft.Dropshadow(OffX=12, OffY=12, | |
| Color='#444')"; | |
| filter: "progid:DXImageTransform.Microsoft.Dropshadow(OffX=12, OffY=12, | |
| Color='#444')"; | |
| } |