A Pen by Ryan Mitchell on CodePen.
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
<?xml version="1.0" encoding="UTF-8"?> | |
<project version="4"> | |
<component name="BladeInjectionConfiguration" default="false"> | |
<directives> | |
<!-- Sage Directives - WordPress - https://log1x.github.io/sage-directives-docs/usage/wordpress.html--> | |
<data directive="@query" injection="true" prefix="(" suffix=")"/> | |
<data directive="@posts" injection="true" prefix="(" suffix=")"/> | |
<data directive="@hasposts" injection="true" prefix="(" suffix=")"/> | |
<data directive="@noposts" injection="true" prefix="(" suffix=")"/> | |
<data directive="@titl"/> |
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 is_frontend_context() { | |
// Check if page is being loaded in the editor by checking URL structure of the ServerSideRender source for block-renderer | |
$url = 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']; | |
if (strpos($url,'block-renderer') !== false) { | |
// In wp-admin | |
return false; | |
} else { | |
// front end |
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
window.onload = function() { | |
if (window.jQuery) { | |
// jQuery is loaded | |
alert("Yeah!"); | |
} else { | |
// jQuery is not loaded | |
alert("Doesn't Work"); | |
} | |
} |
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
<select name="age.birth_year" required="" data-validate="{"required":true}"><option value="">YYYY</option><optgroup label="2010s"><option value="2017">2017</option><option value="2016">2016</option><option value="2015">2015</option><option value="2014">2014</option><option value="2013">2013</option><option value="2012">2012</option><option value="2011">2011</option><option value="2010">2010</option></optgroup><optgroup label="2000s"><option value="2009">2009</option><option value="2008">2008</option><option value="2007">2007</option><option value="2006">2006</option><option value="2005">2005</option><option value="2004">2004</option><option value="2003">2003</option><option value="2002">2002</option><option value="2001">2001</option><option value="2000">2000</option></optgroup><optgroup label="1990s"><option value="1999">1999</option><option value="1998">1998</option><option value="1997">1997</option><option value="1996">1996</option><option value="1995">1995</option><option value="1994">1994</optio |
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 | |
/* | |
This program is free software; you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by | |
the Free Software Foundation; either version 2 of the License, or | |
(at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
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 | |
/* | |
Template Name: My Awesome Custom Page | |
*/ |
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
browser-sync start --server --files "**/**" |
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 -S localhost:8000 |
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
var d = new Date(); | |
var hr = d.getHours(); | |
var min = d.getMinutes(); | |
// combine hours and minutes and convert string to number | |
var currenttime = parseFloat(""+ hr+min); | |
//set open and close times | |
var opentime = 830; | |
var closetime = 2044; |
NewerOlder