File Editor
Directories:
.. (Back)
Files:
Info_Section.php
Provider.php
Create New File
Create
Edit File: Provider.php
<?php /** * Service Provider for interfacing with tec-common Site Health. * * @since 5.6.0.1 * * @package TEC\Tickets\Site_Health */ namespace TEC\Tickets\Site_Health; use TEC\Common\Contracts\Service_Provider; /** * Class Provider * * @since 5.6.0.1 * @package TEC\Tickets\Site_Health */ class Provider extends Service_Provider { /** * Internal placeholder to pass around the section slug. * * @since 5.6.0.1 * * @var string */ protected $slug; public function register() { $this->slug = Info_Section::get_slug(); $this->add_actions(); $this->add_filters(); } public function add_actions() { } public function add_filters() { add_filter( 'tec_debug_info_sections', [ $this, 'filter_include_sections' ] ); } public function filter_include_sections( $sections ) { $sections[ Info_Section::get_slug() ] = $this->container->make( Info_Section::class ); return $sections; } }
Save Changes
Rename File
Rename