This file contains hidden or 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: Bladerunner View | |
Description: Replace Bladerunner with new blade view compiler | |
Version: 1.0.0 | |
Author: EkAndreas | |
License: MIT License | |
*/ | |
function bladeViewPaths() |
This file contains hidden or 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
vendor | |
dist | |
web/app/mu-plugins/*/ | |
!web/app/mu-plugins/bedrock-autoloader.php | |
!web/app/mu-plugins/disallow-indexing.php | |
!web/app/mu-plugins/register-theme-directory.php | |
web/app/plugins/*/ | |
web/wp | |
web/app/db.php |
This file contains hidden or 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_filter( 'wp_handle_upload_prefilter', function ( $file ) { | |
if ( ! is_array( $file ) && ! is_string( $file ) ) { | |
return $file; | |
} | |
if ( ! is_array( $file ) ) { | |
$file = [ | |
'name' => $file, | |
]; |
This file contains hidden or 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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# This script to install Kubernetes will get executed after we have provisioned the box | |
$script = <<-SCRIPT | |
# Install kubernetes | |
apt-get update && apt-get install -y apt-transport-https | |
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - | |
cat <<EOF >/etc/apt/sources.list.d/kubernetes.list |
This file contains hidden or 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 | |
/* | |
* Legacy autoload example | |
*/ | |
spl_autoload_register(function ($requestedClass) { | |
$baseClass='ElseifAB\\Regnradar'; | |
if (0!=strpos($requestedClass, $baseClass.'\\', 0)) { | |
return false; | |
} |
This file contains hidden or 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 Deployer; | |
require 'recipe/composer.php'; | |
set('repository', 'path-to-repo'); | |
set('git_tty', true); | |
set('shared_files', ['.env','web/.htaccess']); | |
set('shared_dirs', ['web/app/uploads']); |
This file contains hidden or 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
# FORGE CONFIG (DO NOT REMOVE!) | |
include forge-conf/mwb.digital/before/*; | |
#ADDED | |
fastcgi_cache_path /etc/nginx/cache levels=1:2 keys_zone=MWBROOT:100m inactive=60m; | |
fastcgi_cache_key "$scheme$request_method$host$request_uri"; | |
#/ADDED | |
server { | |
listen 443 ssl http2; |
This file contains hidden or 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 | |
/** | |
* Install WordPress languages after php deployer deploy. | |
* Please, set wp_languages as array with language codes! | |
* Support added for local development environment | |
*/ | |
namespace Deployer; | |
use Deployer\Task\Context; |
This file contains hidden or 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 model_post_latest($post_type = 'post', $max = 5) | |
{ | |
return get_posts([ | |
'post_type' => $post_type, | |
'posts_per_page' => $max, | |
]); | |
} |
This file contains hidden or 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_filter('bladerunner/controller/paths', function ($paths) { | |
$paths = get_template_directory() . '/controllers'; | |
return $paths; | |
}); | |
add_filter('bladerunner/template/bladepath', function($paths) { | |
$paths = get_template_directory() . '/views'; | |
return $paths; | |
}); |
NewerOlder