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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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": "heisenberg", | |
"version": "0.0.1", | |
"authors": [ | |
"Jacob Arriola <jacob@zeek.com>", | |
"Steve Zehngut <steve@zeek.com>", | |
"David Arceneaux <david@zeek.com>" | |
], | |
"description": "WordPress starter theme", | |
"keywords": [ |
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
add_action('wp_loaded','webendev_register_nav_menu_class'); | |
/** | |
* New walker class to extend Walker_Nav_Menu | |
* Dynamically adds child categories to menu | |
* | |
*/ | |
function webendev_register_nav_menu_class(){ | |
class Submenu_Walker_Nav_Menu extends Walker_Nav_Menu { |
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
1. call_user_func_array passes the callback function an array of parameters. | |
2. $args = func_get_args(); | |
2a. | |
array (size=3) | |
0 => string 'This is Episode Number' (length=22) | |
1 => int 4 | |
2 => |
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
1. | |
array (size=2) | |
'function' => string '_config_wp_siteurl' (length=18) | |
'accepted_args' => int 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
1. | |
array (size=2) | |
'function' => string '_config_wp_siteurl' (length=18) | |
'accepted_args' => int 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
1. | |
array (size=2) | |
'function' => string '_config_wp_siteurl' (length=18) | |
'accepted_args' => int 1 | |
2. a - an array comprising the argument list / the variables - as declared at the time of creating the filter. A dev can declare as many variables as he wants. | |
b. $arg stores the arguments / the variables declared when a developer uses the apply_filters function. It has to store the arguments assigned to that $tag. | |
Code Challenge 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
<?php | |
/** | |
* Config file for registering custom post types. | |
* | |
* This is an array of custom post types and the common settings | |
* each cpt is to share. If each cpt is to have unique settings | |
* ( ie: some with archives and others without ) then you can | |
* add those keys and values to the main arrays, omitting the | |
* settings array completely. |
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
# ----------------------------------------------------------------- | |
# .gitignore for WordPress @salcode | |
# ver 20150227 | |
# | |
# From the root of your project run | |
# curl -O https://gist.githubusercontent.com/salcode/b515f520d3f8207ecd04/raw/.gitignore | |
# to download this file | |
# | |
# By default all files are ignored. You'll need to whitelist | |
# any mu-plugins, plugins, or themes you want to include in the repo. |
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 namespace POD_Core\Config; | |
use InvalidArgumentException; | |
use RuntimeException; | |
class ArrayConfig implements I_Config { | |
protected $config; |
OlderNewer