123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118 |
- <?php
- /*
- |--------------------------------------------------------------------------
- | Register The Auto Loader
- |--------------------------------------------------------------------------
- |
- | Composer provides a convenient, automatically generated class loader for
- | our theme. We will simply require it into the script here so that we
- | don't have to worry about manually loading any of our classes later on.
- |
- */
- if (! file_exists($composer = __DIR__.'/vendor/autoload.php')) {
- wp_die(__('Error locating autoloader. Please run <code>composer install</code>.', 'sage'));
- }
- require $composer;
- /*
- |--------------------------------------------------------------------------
- | Register The Bootloader
- |--------------------------------------------------------------------------
- |
- | The first thing we will do is schedule a new Acorn application container
- | to boot when WordPress is finished loading the theme. The application
- | serves as the "glue" for all the components of Laravel and is
- | the IoC container for the system binding all of the various parts.
- |
- */
- if (! function_exists('\Roots\bootloader')) {
- wp_die(
- __('You need to install Acorn to use this theme.', 'sage'),
- '',
- [
- 'link_url' => 'https://roots.io/acorn/docs/installation/',
- 'link_text' => __('Acorn Docs: Installation', 'sage'),
- ]
- );
- }
- \Roots\bootloader()->boot();
- /*
- |--------------------------------------------------------------------------
- | Register Sage Theme Files
- |--------------------------------------------------------------------------
- |
- | Out of the box, Sage ships with categorically named theme files
- | containing common functionality and setup to be bootstrapped with your
- | theme. Simply add (or remove) files from the array below to change what
- | is registered alongside Sage.
- |
- */
- collect(['setup', 'filters'])
- ->each(function ($file) {
- if (! locate_template($file = "app/{$file}.php", true, true)) {
- wp_die(
- /* translators: %s is replaced with the relative file path */
- sprintf(__('Error locating <code>%s</code> for inclusion.', 'sage'), $file)
- );
- }
- });
- //ajout des champs personnalisés Minutage et Images; pour les afficher rdv dans le fichier content-single
- //le faire qu'une suele fois et après mettre en commentaire
- // function ajout_champs() {
- // add_post_meta(get_the_ID(), 'Index', true);
- // add_post_meta(get_the_ID(), 'Minutage', true);
- // add_post_meta(get_the_ID(), 'Images', true);
- // add_post_meta(get_the_ID(), 'BandeSon', true);
- // add_post_meta(get_the_ID(), 'Ecrits', true);
- // add_post_meta(get_the_ID(), 'VoixOffIn', true);
- // add_post_meta(get_the_ID(), 'isMainPart', true);
- // add_post_meta(get_the_ID(), 'isSubPart', true);
- // }
- // add_action('init', 'ajout_champs');
-
- function cacher_bloc_head_admin() {
- // Cache le bloc head du plugin de PublicPress
- echo '<style>.pp-version-notice-bold-purple { display: none; }</style>';
- echo '<style>.notice-warning { display: none; }</style>';
-
- }
- add_action('admin_head', 'cacher_bloc_head_admin');
-
- function cacher_bloc_foot_admin() {
- // Cache le bloc foot du plugin de PublicPress
- echo '<style>.pp-rating { display: none; }</style>';
- echo '<style>.pp-pressshack-logo { display: none; }</style>';
- echo '<style> footer nav{ display: none; }</style>';
- echo '<style> ul.subsubsub li:nth-child(1) a { display: none;}</style>';
-
- }
- add_action('admin_footer', 'cacher_bloc_foot_admin');
-
-
- // function supprimer_tous_les_articles() {
- // $args = array(
- // 'post_type' => 'post',
- // 'posts_per_page' => -1,
- // );
-
- // $posts = get_posts($args);
-
- // foreach ($posts as $post) {
- // wp_delete_post($post->ID, true);
- // }
- // }
- // add_action('init', 'supprimer_tous_les_articles');
|