web-dev-qa-db-fra.com

Où est la barre d'administration instanciée?

Il y a tellement de ressources sur la façon d'activer, de désactiver, de changer et de corriger la barre d'administration, mais pour une question d'un étudiant, nous souhaitons simplement suivre le chemin qui a suivi.

Ce que nous savons: 1. Le parcours commence par footer.php -> wp_footer (); 2. Le parcours se termine par wp_includes/adminbar.php

Quelle est la piste au milieu?

1

Voici la trace du rendu de la barre d’administration dans la page d’accueil du backend pour WordPress 4.9.2

array (
  'file' => 'wp-admin/index.php',
  'line' => 100,
  'function' => 'include',
)
array (
  'file' => 'wp-admin/admin-header.php',
  'line' => 219,
  'function' => 'do_action',
)
array (
  'file' => 'wp-includes/plugin.php',
  'line' => 457,
  'function' => 'do_action',
  'class' => 'WP_Hook',
  'type' => '->',
)
array (
  'file' => 'wp-includes/class-wp-hook.php',
  'line' => 310,
  'function' => 'apply_filters',
  'class' => 'WP_Hook',
  'type' => '->',
)
array (
  'file' => 'wp-includes/class-wp-hook.php',
  'line' => 286,
  'function' => 'wp_admin_bar_render',
)
array (
  'file' => 'wp-includes/admin-bar.php',
  'line' => 92,
  'function' => 'render',
  'class' => 'WP_Admin_Bar',
  'type' => '->',
)
array (
  'file' => 'wp-includes/class-wp-admin-bar.php',
  'line' => 263,
  'function' => '_render',
  'class' => 'WP_Admin_Bar',
  'type' => '->',
)
array (
  'file' => 'wp-includes/class-wp-admin-bar.php',
  'line' => 413,
)

et voici le chemin sur la page d'accueil

array (
  'file' => 'index.php',
  'line' => 17,
  'function' => 'require',
)
array (
  'file' => 'wp-blog-header.php',
  'line' => 19,
  'function' => 'require_once',
)
array (
  'file' => 'wp-includes/template-loader.php',
  'line' => 74,
  'function' => 'include',
)
array (
  'file' => 'wp-content/themes/storefront/page.php',
  'line' => 38,
  'function' => 'get_footer',
)
array (
  'file' => 'wp-includes/general-template.php',
  'line' => 76,
  'function' => 'locate_template',
)
array (
  'file' => 'wp-includes/template.php',
  'line' => 647,
  'function' => 'load_template',
)
array (
  'file' => 'wp-includes/template.php',
  'line' => 688,
  'function' => 'require_once',
)
array (
  'file' => 'wp-content/themes/storefront/footer.php',
  'line' => 36,
  'function' => 'wp_footer',
)
array (
  'file' => 'wp-includes/general-template.php',
  'line' => 2630,
  'function' => 'do_action',
)
array (
  'file' => 'wp-includes/plugin.php',
  'line' => 457,
  'function' => 'do_action',
  'class' => 'WP_Hook',
  'type' => '->',
)
array (
  'file' => 'wp-includes/class-wp-hook.php',
  'line' => 310,
  'function' => 'apply_filters',
  'class' => 'WP_Hook',
  'type' => '->',
)
array (
  'file' => 'wp-includes/class-wp-hook.php',
  'line' => 286,
  'function' => 'wp_admin_bar_render',
)
2
mmm