Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
programmieren:php:require_all_files_from_folder [2019/08/19 19:08] – created jgehrkeprogrammieren:php:require_all_files_from_folder [2022/12/17 12:28] (current) – external edit 127.0.0.1
Line 22: Line 22:
  
 } }
 +</code>
 +
 +===== Beispielanwendung in Wordpress =====
 +
 +So nutze ich es in Wordpress in der ''functions.php''
 +
 +<code php>
 +/* ******************* *\
 + *
 +        HELPER
 + *
 +\* ******************* */
 +
 +require_once 'functions/helper/require_all_files.php'; // Ermöglicht es ganze Folder automatisch zu includen
 +
 +
 +
 +/* ******************* *\
 + *
 +     VENDOR
 + *
 +\* ******************* */
 +
 +//require_once 'functions/plugin-management/plugins.php'; // Reuqiered WP-Plugins
 +require_all_files( 'functions/plugin-management/' );
 +require_all_files( 'functions/template-engine/' );
 +
 +
 +
 +/* ******************* *\
 + *
 +     THEME SETUP
 + *
 +\* ******************* */
 +
 +// Hier sind alle Files drin, wie theme_support, styles, scripts & menus
 +require_all_files( 'functions/theme-setup/' );
 +
 +
 +
 +/* ******************* *\
 + *
 +    GENERAL FUNCTIONS
 + *
 +\* ******************* */
 +
 +// Hier allgemeine Funktionen drin, die Files heißen
 +// wie die Funktion die man in Ihr findet
 +require_all_files( 'functions/' );
 +</code>
  
-<code> 

Page Tools