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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Manipulating PHP DateTime</title> | |
</head> | |
<body> | |
<h1>Working With DateTime Extension (PHP 5.2+)</h1> | |
<h4>Defaults to the time now and is an object:</h4> | |
<?php $date = new DateTime(); print_r($date); ?><br> |
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: Awesome Admin | |
Plugin URI: https://www.youtube.com/watch?v=ofPWdC9U7A&list=PLrG78JjvL7hXpxdunxZSb037-ZpYBdxw6 | |
Description: Dummy plugin for tutorial on creating a custom admin theme | |
Author: John Morris | |
Version: 1.0 | |
Author URI: http://johnmorrisonline.com | |
*/ |
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
<Files .htaccess> | |
order allow,deny | |
deny from all | |
</Files> | |
ErrorDocument 403 /errors/error.php | |
ErrorDocument 404 /errors/error.php | |
ErrorDocument 405 /errors/error.php | |
ErrorDocument 408 /errors/error.php | |
ErrorDocument 500 /errors/error.php |
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 | |
// Recipient | |
$to = 'RECIPIENT EMAIL ADDRESS'; | |
// Subject | |
$subject = 'This is our test email'; | |
// Message | |
$message = '<h1>Hi there.</h1><p>Thanks for testing!</p>'; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>How to Parse XML With SimpleXML and PHP</title> | |
</head> | |
<body> | |
<?php | |
$url = 'http://www.johnmorrisonline.com/feed/'; | |
$xml = simplexml_load_file($url) or die("Can't connect to URL"); |
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 oddeven($count, $increment = 2) { | |
$state = $count%$increment; | |
if ( ! $state ) { | |
return 'even'; | |
} | |
return 'odd'; | |
} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>jQuery Active Class</title> | |
<link href="style.css" rel="stylesheet" /> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> | |
<script src="script.js"></script> | |
</head> | |
<body> | |
<nav> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>jQuery DIV 100% Height of Container</title> | |
<style> | |
.container { | |
overflow: hidden; | |
border: 1px solid red; | |
} | |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>jQuery Accordion</title> | |
<style> | |
html, body { | |
font-size: 100%; | |
} | |
.accordion { |
NewerOlder