This file contains 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
/* ========== 410 TERMINATED EMPLOYEE PAGES =========== */ | |
function 410_status_header(){ | |
$terminatedEmployees = array('employee-1','employee-2','employee-3','employee-4','employee-5','employee-6','employee-7','employee-8', 'employee-9', 'employee-10'); | |
$currentURL = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; | |
$currentURL = rtrim(rawurldecode( $currentURL ), '/'); | |
foreach( $terminatedEmployees as $terminatedEmployee ): | |
if( get_bloginfo('url') . '/' . $terminatedEmployee === $currentURL ): | |
status_header( 410 ); | |
if( !locate_template( '410.php', true ) ) | |
echo 'Sorry, the page you requested has been permanently removed.'; |
This file contains 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 | |
if ( ! function_exists( 'shortcode_exists' ) ) : | |
/** | |
* Check if a shortcode is registered in WordPress. | |
* | |
* Examples: shortcode_exists( 'caption' ) - will return true. | |
* shortcode_exists( 'blah' ) - will return false. | |
*/ | |
function shortcode_exists( $shortcode = false ) { | |
global $shortcode_tags; |
This file contains 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
@mixin boxit ($dir) { | |
display:box; | |
display:-moz-box; | |
display:-webkit-box; | |
box-orient:$dir; | |
-moz-box-orient:$dir; | |
-webkit-box-orient:$dir; | |
} | |
@mixin order ($num) { |
This file contains 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( 'wp_enqueue_scripts', 'enqueue_my_styles' ); | |
function enqueue_my_styles() { | |
global $wp_styles; | |
// Load the main stylesheet | |
wp_enqueue_style( 'my-theme', get_template_directory_uri() . '/style.css' ); |
This file contains 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
@include keyframe(fadeout) { | |
0% { | |
opacity: 1; | |
} | |
100% { | |
opacity: 0; | |
} | |
} |
This file contains 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_theme_support( 'typecase', array( | |
// array of simple options | |
'simple' => array( | |
// each array is an option | |
// these options are displayed in the main theme fonts panel section | |
array( | |
// the label displayed in customizer | |
'label' => 'Body Copy', | |
// the CSS selector to apply the font to | |
'selector' => 'body', |
This file contains 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 | |
if (isset($_POST['environment'])){ | |
$req = pantheon_curl('https://api.live.getpantheon.com/sites/self/settings', NULL, 8443); | |
$meta = json_decode($req['body'], true); | |
if($meta['allow_cacheserver'] != 1){ | |
$req = pantheon_curl('https://api.live.getpantheon.com/sites/self/settings', '{"allow_cacheserver":true}', 8443, 'PUT'); | |
} | |
} |