Use roots/sage-lib (incl. new config system)
This commit is contained in:
51
config/view.php
Normal file
51
config/view.php
Normal file
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| View Storage Paths
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Most template systems load templates from disk. Here you may specify
|
||||
| an array of paths that should be checked for your views.
|
||||
|
|
||||
*/
|
||||
|
||||
'paths' => [
|
||||
get_theme_file_path().'/resources/views',
|
||||
get_parent_theme_file_path().'/resources/views',
|
||||
],
|
||||
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Compiled View Path
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option determines where all the compiled Blade templates will be
|
||||
| stored for your application. Typically, this is within the uploads
|
||||
| directory. However, as usual, you are free to change this value.
|
||||
|
|
||||
*/
|
||||
|
||||
'compiled' => wp_upload_dir()['basedir'].'/cache',
|
||||
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| View Namespaces
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Blade has an underutilized feature that allows developers to add
|
||||
| supplemental view paths that may contain conflictingly named views.
|
||||
| These paths are prefixed with a namespace to get around the conflicts.
|
||||
| A use case might be including views from within a plugin folder.
|
||||
|
|
||||
*/
|
||||
|
||||
'namespaces' => [
|
||||
// In your views use something like: @include(WC::some.view.or.partial.here)
|
||||
'WC' => WP_PLUGIN_DIR.'/woocommerce/templates/',
|
||||
],
|
||||
];
|
||||
Reference in New Issue
Block a user