PluginProbe ʕ •ᴥ•ʔ
Pods – Custom Content Types and Fields / 2.8.23.4
Pods – Custom Content Types and Fields v2.8.23.4
2.7.31.4 2.8.23.5 2.9.19.5 3.0.10.5 3.1.4.3 3.2.8.4 3.3.9.2 2.8.23.4 2.9.19.4 3.0.10.4 3.1.4.2 3.2.8.3 3.3.9.1 trunk 1.14.8 2.7.31.3 2.8.23.3 2.9.19.3 3.0.10.3 3.1.4.1 3.2.0 3.2.1 3.2.1.1 3.2.2 3.2.4 3.2.5 3.2.6 3.2.7 3.2.7.1 3.2.8 3.2.8.1 3.2.8.2 3.3.0 3.3.1 3.3.2 3.3.3 3.3.4 3.3.5 3.3.6 3.3.7 3.3.8 3.3.9
pods / tribe-common / src / Tribe / Service_Providers / PUE.php
pods / tribe-common / src / Tribe / Service_Providers Last commit date
Body_Classes.php 2 weeks ago Crons.php 2 weeks ago Debug_Bar.php 2 weeks ago Dialog.php 2 weeks ago PUE.php 2 weeks ago Processes.php 2 weeks ago Promoter.php 2 weeks ago Shortcodes.php 2 weeks ago Tooltip.php 2 weeks ago Widgets.php 2 weeks ago
PUE.php
51 lines
1 <?php
2 namespace Tribe\Service_Providers;
3
4 use Tribe\PUE\Update_Prevention;
5
6 /**
7 * Hooks and manages the implementation and loading of PUE.
8 *
9 * We are still moving pieces into this Service Provider, so look around
10 * the `src/Tribe/PUE/` folder for other items that are not managed here
11 * just yet.
12 *
13 * @since 4.9.12
14 */
15 class PUE extends \tad_DI52_ServiceProvider {
16 /**
17 * Binds and sets up implementations.
18 *
19 * @since 4.9.12
20 */
21 public function register() {
22 $this->container->singleton( Update_Prevention::class, Update_Prevention::class );
23
24 // Setup all of WP hooks associated with PUE.
25 $this->register_hooks();
26 }
27
28 /**
29 * Registers the provider handling all the 1st level filters and actions for PUE.
30 *
31 * @since 4.9.2
32 */
33 protected function register_hooks() {
34 add_filter( 'upgrader_source_selection', [ $this, 'filter_upgrader_source_selection' ], 15, 4 );
35 }
36
37 /**
38 * Filters the source file location for the upgrade package for the PUE Update_Prevention engine.
39 *
40 * @since 4.9.12
41 *
42 * @param string $source File source location.
43 * @param string $remote_source Remote file source location.
44 * @param WP_Upgrader $upgrader WP_Upgrader instance.
45 * @param array $extra Extra arguments passed to hooked filters.
46 */
47 public function filter_upgrader_source_selection( $source, $remote_source, $upgrader, $extras ) {
48 return $this->container->make( Update_Prevention::class )->filter_upgrader_source_selection( $source, $remote_source, $upgrader, $extras );
49 }
50 }
51