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 | |
/** | |
* The base class for all Wallpaper subclasses | |
* | |
* @package Wallpapers | |
* @access public | |
*/ | |
class BaseWallpaper { | |
/** a handle to the image */ |
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
### Keybase proof | |
I hereby claim: | |
* I am andrewwoods on github. | |
* I am awoods (https://keybase.io/awoods) on keybase. | |
* I have a public key whose fingerprint is 6FAE A355 37B1 9509 CB9A 102F C9CA 6422 EBB1 3F8A | |
To claim this, I am signing this object: |
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
#!/usr/bin/php | |
<?php | |
/** | |
* Generate a password based on a pattern | |
* | |
* @package Command Line | |
* @subpackage Utilities | |
* @version 1.0 | |
* @author Andrew Woods <[email protected]> | |
* |
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
-- Removing the keyword PASSWORD will set the password in plain text. | |
CREATE USER 'wp'@'%' IDENTIFIED BY 'password'; | |
-- | |
-- Assign permissions to the user you just created | |
-- | |
GRANT |
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 | |
/** | |
* The base configurations of the WordPress. | |
* | |
* <ENVIRONMENT> Environment | |
* | |
* This file has the following configurations: MySQL settings, Table Prefix, | |
* Secret Keys, WordPress Language, and ABSPATH. You can find more information | |
* by visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing | |
* wp-config.php} Codex page. You can get the MySQL settings from your web host. |
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( 'widgets_init', 'register_my_widget' ); | |
class My_Widget extends WP_Widget | |
{ | |
function __construct() { | |
$widget_options = array( | |
'classname' => 'my-widget-class' |
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
# Common wordpress files to ignore | |
wp-config.php | |
wp-content/debug.log | |
wp-content/advanced-cache.php | |
wp-content/wp-cache-config.php | |
# Common wp-content directories | |
wp-content/backup-db/ |
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> | |
<meta charset="utf-8"> | |
<title>Rick Roll Example</title> | |
<script> | |
document.addEventListener( "DOMContentLoaded", function( event ) { | |
// Sun=0 | |
// Mon=1 |
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
Source URL http://www.sitepoint.com/simple-inheritance-javascript/ | |
This article makes inheritance in OOP easy to understand. | |
It did get me thinking. In the article above, the author uses | |
var inheritsFrom = function (child, parent) { | |
child.prototype = Object.create(parent.prototype); | |
}; | |
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 this in your primary plugin file | |
* | |
* Create a 'classes' directory in your plugin directory. | |
* To load a class nameed So_Awesome, it should be in classes/class-so-awesome.php | |
*/ | |
function your_plugin_autoloader( $class_name ) { | |
$slug = sanitize_title_with_dashes( $class_name, '', 'save' ); | |
$slug = str_replace('_', '-', $slug); |
OlderNewer