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
(function($){ | |
var media = wp.media, | |
jeditor = { | |
oldMainMenu : media.view.MediaFrame.Post.prototype.mainMenu, | |
init : function(){ | |
media.view.MediaFrame.Post.prototype.mainMenu = function(view){ | |
jeditor.oldMainMenu(view); | |
var jState = new media.controller.Library({ | |
id: 'test', | |
library: media.query({uploadedTo: media.view.settings.post.id}), |
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'); |
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
/*global module:false*/ | |
module.exports = function(grunt) { | |
// Project configuration. | |
grunt.initConfig({ | |
exec: { | |
commit: { | |
command: function(grunt){ | |
var d = new Date(), | |
datetime = d.toString(); |
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 | |
// Here we are, in any scope imaginable. It doesn't matter which | |
$my_object = new My_Class(); | |
add_filter( 'jpb.provider.my_class', function() use ( $my_object ) { | |
return $my_object || new My_Class(); | |
} ); | |
// This is in the global scope |
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\Some_Plugin; | |
function get_hook_suffix() { | |
return apply_filters( 'jpb.some_plugin.get_hook_suffix', '' ); | |
} | |
function register_page() { | |
$hook_suffix = add_submenu_page( /* Arguments */ ); |
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 | |
class MyTestClass extends PHPUnit_Framework_TestCase { | |
public function setUp() { | |
\WP_Mock::setUp(); | |
} | |
public function tearDown() { | |
\WP_Mock::tearDown(); | |
} |
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
1CD8_rundll32.0 | |
1E64_notepad.0 | |
2DCB_Bridge.0 | |
2EF4_wordpad.0 | |
31B7_G2MInstaller.0 | |
3F06_ProgramMenuShortcut_E9787678103300008E670000000001_1.0 | |
406F_NewShortcut2_B74D4E10103300000000000000000001.0 | |
4137_winhlp32.0 | |
6B9F_AdobeBridge_B74D4E10103300000000000000000001_1.0 | |
7765_winebrowser.0 |
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
config.vm.provision :puppet do |puppet| | |
# Add a folder in your root named .ppt | |
puppet.manifests_path = ".ppt/manifests" | |
# vagrant.pp is your main manifest and goes in .ppt/manifests | |
puppet.manifest_file = "vagrant.pp" | |
# Add puppet modules in .ppt/modules as git submodules; they will be pre-installed in Vagrant this way | |
puppet.module_path = ".ppt/modules" | |
# Config files, etc. go in .ppt/files. fileserver.conf (see below) defines the path for puppet to add | |
# when looking for files. That way, you can reference files with puppet:// protocols. Make sure you | |
# add the directory defined in fileserver.conf as a shared directory in the main Vagrantfile config |