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 | |
defined( 'NDA' ) || exit('Access denied.'); | |
/** | |
* A community consists of a group of people who have passed a test to become members. | |
*/ | |
abstract class Community { | |
/** |
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 | |
/** Do not allow direct access */ | |
defined( 'NDA' ) || exit('Access Denied.'); | |
/** | |
* Interface | |
* | |
* This file attempts to implement formatting and documentation standards | |
* so that it can be used with a higher degree of confidence as a template. |
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 | |
defined( 'NDA' ) || exit('Access Denied.'); | |
/** | |
* Pattern Abstract Class Function | |
* | |
* @link http://www.primitivetype.com/articles/php_5_abstract_classes_and_methods.php | |
*/ |
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 | |
defined('NDA') || exit('Access denied.'); | |
/** | |
* Plugin Name: OOP Plugin | |
* Description: A very basic plugin using OOP (Interface, Abstract Class, Class and Function). | |
* Version: 2018.08.24 | |
* License: GPLv2+ | |
*/ |
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
{ | |
"name":"Reverse Grocery Shopping List", | |
"type":"maxium", | |
"store":"high-end", | |
"date":"2018-08-25", | |
"desc":"The most that could be spent to guarantee that the item could be bought for that price.", | |
"method":"Starting in the area where one enters the store, quickly jotting down the price of the item with pen and notebook, as well as the volume or weight and the most expected that the item could be sold for, within the next year. Not the sale price. Including tax and a small margin. Generous, not minimal, even in a 'low end' store. This ensures that one can walk out with the items on the list, with some to spare.", | |
"list" :[ | |
{ | |
"name":"juice", |
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
{ | |
"name":"Reverse Grocery Shopping List", | |
"type":"maxium", | |
"store":"low-end", | |
"date":"2018-08-26", | |
"desc":"The most that could be spent to guarantee that the item could be bought for that price.", | |
"method":"Starting in the area where one enters the store, quickly jotting down the price of the item with pen and notebook, as well as the volume or weight and the most expected that the item could be sold for, within the next year. Not the sale price. Including tax and a small margin. Generous, not minimal, even in a 'low end' store. This ensures that one can walk out with the items on the list, with some to spare.", | |
"list" :[ | |
{ | |
"name":"sweet-corn", |
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
# Logic based routing. | |
# STEP 1. BASED ON TIME. | |
# A. If the time is between 9 AM and 5 PM (local), we are open. | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{TIME_HOUR} <18 | |
RewriteCond %{TIME_HOUR} >08 |
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
# Time Based Page Display | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{TIME_SEC} <30 | |
RewriteRule ^index\.html$ page/one.html [L] | |
RewriteCond %{TIME_SEC} >29 | |
RewriteRule ^index\.html$ page/two.html [L] | |
</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
# Time of day based page display. | |
<IfModule mod_rewrite.c> | |
Options +FollowSymLinks | |
RewriteEngine On | |
RewriteBase / | |
# 5am > < 8am | |
RewriteCond %{TIME_HOUR} >02 | |
RewriteCond %{TIME_HOUR} <05 |
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
/** | |
* Change the /wp-admin url to /admin | |
* | |
* Adapted from {@link https://gist.github.com/hakre/701245} | |
*/ | |
class WPAdminUrl { | |
/** | |
* The instance of the class | |
*/ |
OlderNewer