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 ACF | |
| ### install in bedrock | |
| https://roots.io/guides/using-acf-builder-with-sage/ | |
| ## ADD SAGE DIRECTIVES | |
| ### install in sage | |
| https://github.com/Log1x/sage-directives | |
| ## ADD SVG | |
| ### install in sage |
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 App\Http\Middleware; | |
| use Closure; | |
| use Illuminate\Support\Facades\Auth; | |
| class Role | |
| { | |
| /** |
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
| /* In functions.php, paste this code (replace YOUR_THEME_NAME by your theme name) */ | |
| /* Use this code with the plugin Theme and plugin translation for Polylang */ | |
| if (class_exists('Polylang_Theme_Translation')) { | |
| class Sage_Polylang_Theme_Translation extends Polylang_Theme_Translation | |
| { | |
| /** | |
| * Constructor. | |
| */ |
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
| /* In sage/resources/assets/build/webpack.config.js */ | |
| /*new webpack.LoaderOptionsPlugin({ | |
| test: /\.js$/, | |
| options: { | |
| eslint: { failOnWarning: false, failOnError: true }, | |
| }, | |
| }),*/ | |
| /*new StyleLintPlugin({ | |
| failOnError: !config.enabled.watcher, |
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 these lines to /sage/respirces/functions.php */ | |
| /* Generate custom menu array */ | |
| function b_get_menu_id( $location ) | |
| { | |
| $a = get_nav_menu_locations(); | |
| if (isset($a[$location])) return $a[$location]; | |
| return false; | |
| } | |
| function b_get_menu_items( $location ) |
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 these lines to /sage/app/filters.php */ | |
| /** | |
| * Use a custom vue for search form in Wordpress when call function get_search_form() | |
| * Create also a view searchform in "partials" for make the form. | |
| * | |
| */ | |
| add_filter('get_search_form', function () { | |
| return \App\template( 'partials.searchform' ); | |
| }); |
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
| // Disable guttenberg for entire wordpress website | |
| add_filter('use_block_editor_for_post', '__return_false', 10); | |
| add_filter('use_block_editor_for_post_type', '__return_false', 10); |
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
| /* REMOVE EMOJIS */ | |
| remove_action( 'wp_head', 'print_emoji_detection_script', 7 ); | |
| remove_action( 'admin_print_scripts', 'print_emoji_detection_script' ); | |
| remove_action( 'wp_print_styles', 'print_emoji_styles' ); | |
| remove_action( 'admin_print_styles', 'print_emoji_styles' ); | |
| /* Activer compression GZIP dans le .htaccess */ | |
| <IfModule mod_filter.c> | |
| AddOutputFilterByType DEFLATE "application/atom+xml" \ | |
| "application/javascript" \ |
NewerOlder