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 | |
global $post; | |
$args = array( | |
'post_type' => 'mca_exhibitions', | |
'posts_per_page' => -1 | |
); | |
$myposts = get_posts( $args ); |
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 populate_checkbox($form) { | |
if ( $form['id'] != 15 ) : | |
return $form; | |
endif; | |
foreach($form['fields'] as &$field) : |
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 | |
// Curl helper function | |
function curl_get($url) { | |
$curl = curl_init($url); | |
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); | |
curl_setopt($curl, CURLOPT_TIMEOUT, 30); | |
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1); | |
$return = curl_exec($curl); | |
curl_close($curl); |
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
var myScrollTop = 0; | |
jQuery.fn.openLightbox = function() { | |
if (/iPhone|iPad|iPod/i.test(navigator.userAgent)) { | |
myScrollTop = $('body').scrollTop(); | |
var wpadminbar = 0; | |
if ($('#wpadminbar').length != 0) { | |
wpadminbar = $('#wpadminbar').outerHeight(); |
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
// Image Sizes | |
add_image_size( 'padmini', 1024 ); | |
add_image_size( 'phone', 1136 ); | |
add_image_size( 'phoneplus', 1334 ); | |
add_image_size( 'padretina', 2048 ); | |
function spellerberg_get_image($imageid,$fallbacksize = 'full') { | |
$sizes[] = wp_get_attachment_image_src( $imageid, 'padmini'); | |
$sizes[] = wp_get_attachment_image_src( $imageid, 'phone'); |
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 decoy_page( $query ) { | |
global $wp; | |
if ( !is_admin() && $query->is_main_query() ) { | |
if ( ( $query->get( 'page_id' ) == get_option( 'page_on_front' ) && get_option( 'page_on_front' ) ) || empty( $wp->query_string ) ) { | |
echo 'This displays when set to A Static Page and the homepage is showing.'; |
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 | |
/* | |
Plugin Name: Connections | |
*/ | |
function clock_p2p_register_connections() { | |
p2p_register_connection_type( array( | |
'name' => 'posts_to_tribe_events', |
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 | |
/** | |
* Product Loop Start | |
* | |
* This template can be overridden by copying it to yourtheme/woocommerce/loop/loop-start.php. | |
* | |
* HOWEVER, on occasion WooCommerce will need to update template files and you | |
* (the theme developer) will need to copy the new files to your theme to | |
* maintain compatibility. We try to do this as little as possible, but it does | |
* happen. When this occurs the version of the template file will be bumped and |
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 | |
/** | |
* @package Cecil | |
*/ | |
namespace Carnegie_Museums\Warhol\Theme; | |
use Carnegie_Museums\Warhol\Theme\Helpers; | |
if ( is_page('calendar-2') ) : |