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": "johnpbloch/test-4", | |
"license": "MIT", | |
"authors": [ | |
{ | |
"name": "John P Bloch", | |
"email": "me@johnpbloch.com" | |
} | |
], | |
"repositories":[ |
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": "10up", | |
"hostname": [ | |
"10up.dev", | |
"www.10up.dev" | |
], | |
"maintainers": [ | |
{ | |
"name": "Taylor Lovett", | |
"email": "taylor.lovett@10up.com" |
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 JPB; | |
function wp_insert_post_data( $data, $postarr ){ | |
if($data['foo'] !== 'bar' || $data['baz'] !== 'bat'){ | |
wp_redirect( add_query_arg( array( 'post' => $data['ID'], 'action' => 'edit', 'message' => 11 ), admin_url( 'post.php' ) ) ); | |
exit; | |
} | |
return $data; |
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 | |
/* | |
* Plugin Name: TinyMCE Advanced Multisite Fixer | |
* Description: Forces TinyMCE Advanced to use site options for its settings when it's network activated. | |
* Version: 0.1 | |
* Author: John P. Bloch | |
* Author URI: http://www.johnpbloch.com/ | |
*/ |
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
// Define a JSON data-structure that will look and perform like the real deal | |
// What is common to every post? Lets examine the details: | |
var forumData = { // Defining the object structure | |
"Posts" : [ // array of Posts | |
// single post item in the array | |
{ | |
// definition of properties | |
"id" : "1", | |
"user" : "Melvin", | |
"title" : "Yes, I beleive you have my stapler...", |
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 | |
abstract class JPB_Options { | |
/** | |
* The database option name value. Must be declared in extending classes. | |
* @var string | |
*/ | |
protected $_option_name = null; |
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
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteRule ^(wp-admin/.*)$ /wp/$1 [L] | |
RewriteRule ^(wp-[^/]+\.php)$ /wp/$1 [L] | |
RewriteRule ^xmlrpc\.php$ /wp/xmlrpc.php [L] | |
RewriteRule ^(wp-includes/.*)$ /wp/$1 [L] | |
</IfModule> | |
# BEGIN WordPress |
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 | |
function _jpb_featured_image_setup(){ | |
define( 'JPB_THEME_REALLY_SUPPORTS_POST_THUMBNAILS', current_theme_supports('post-thumbnails') ); | |
if(!JPB_THEME_REALLY_SUPPORTS_POST_THUMBNAILS){ | |
add_theme_support( 'post-thumbnails' ); | |
} | |
} | |
add_action('after_setup_theme', '_jpb_featured_image_setup', 101); |
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 | |
if (WP_STAGE == 'production') { | |
return; | |
} | |
if(!class_exists('WP_Stack_Plugin')){class WP_Stack_Plugin{function hook($h){$p=10;$m=$this->sanitize_method($h);$b=func_get_args();unset($b[0]);foreach((array)$b as $a){if(is_int($a))$p=$a;else $m=$a;}return add_action($h,array($this,$m),$p,999);}private function sanitize_method($m){return str_replace(array('.','-'),array('_DOT_','_DASH_'),$m);}}} | |
class AVM_Staging_Url_Rewrite extends WP_Stack_Plugin { |
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
console.log('Here'); |