assets
data
dependencies
amphp
berlindb
composer
daverandom
delight-im
doctrine
guzzlehttp
hashids
ifsnop
jasny
kelunik
league
mexitek
mpdf
myclabs
nesbot
nyholm
pablo-sg-pacheco
paragonie
phpdocumentor
phpseclib
phpstan
psr
rakit
ralouphie
remotelyliving
rpnzl
scssphp
setasign
spatie
stripe
symfony
webmozart
woocommerce
yahnis-elsts
plugin-update-checker
Puc
v4
v4p11
DebugBar
Extension.php
Panel.php
PluginExtension.php
PluginPanel.php
ThemePanel.php
Plugin
Theme
Vcs
Autoloader.php
Factory.php
InstalledPackage.php
Metadata.php
OAuthSignature.php
Scheduler.php
StateStore.php
Update.php
UpdateChecker.php
UpgraderStatus.php
Utils.php
css
js
vendor
load-v4p11.php
plugin-update-checker.php
autoload.php
scoper-autoload.php
inc
lang
views
.gitignore
LICENSE
autoload.php
composer.json
constants.php
loco.xml
readme.txt
sunrise.php
uninstall.php
wp-multisite-waas.php
34 lines
966 B
PHP
34 lines
966 B
PHP
<?php
|
|
if ( !class_exists('Puc_v4p11_DebugBar_PluginExtension', false) ):
|
|
|
|
class Puc_v4p11_DebugBar_PluginExtension extends Puc_v4p11_DebugBar_Extension {
|
|
/** @var Puc_v4p11_Plugin_UpdateChecker */
|
|
protected $updateChecker;
|
|
|
|
public function __construct($updateChecker) {
|
|
parent::__construct($updateChecker, 'Puc_v4p11_DebugBar_PluginPanel');
|
|
|
|
add_action('wp_ajax_puc_v4_debug_request_info', array($this, 'ajaxRequestInfo'));
|
|
}
|
|
|
|
/**
|
|
* Request plugin info and output it.
|
|
*/
|
|
public function ajaxRequestInfo() {
|
|
if ( $_POST['uid'] !== $this->updateChecker->getUniqueName('uid') ) {
|
|
return;
|
|
}
|
|
$this->preAjaxRequest();
|
|
$info = $this->updateChecker->requestInfo();
|
|
if ( $info !== null ) {
|
|
echo 'Successfully retrieved plugin info from the metadata URL:';
|
|
echo '<pre>', htmlentities(print_r($info, true)), '</pre>';
|
|
} else {
|
|
echo 'Failed to retrieve plugin info from the metadata URL.';
|
|
}
|
|
exit;
|
|
}
|
|
}
|
|
|
|
endif;
|