Skip to content

Commit ae5789b

Browse files
committed
Rename classes for 4.12
1 parent 4525927 commit ae5789b

36 files changed

+209
-209
lines changed

Puc/v4/Factory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
if ( !class_exists('Puc_v4_Factory', false) ):
33

4-
class Puc_v4_Factory extends Puc_v4p11_Factory { }
4+
class Puc_v4_Factory extends Puc_v4p12_Factory { }
55

66
endif;

Puc/v4p12/Autoloader.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?php
22

3-
if ( !class_exists('Puc_v4p11_Autoloader', false) ):
3+
if ( !class_exists('Puc_v4p12_Autoloader', false) ):
44

5-
class Puc_v4p11_Autoloader {
5+
class Puc_v4p12_Autoloader {
66
private $prefix = '';
77
private $rootDir = '';
88
private $libraryDir = '';

Puc/v4p12/DebugBar/Extension.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<?php
2-
if ( !class_exists('Puc_v4p11_DebugBar_Extension', false) ):
2+
if ( !class_exists('Puc_v4p12_DebugBar_Extension', false) ):
33

4-
class Puc_v4p11_DebugBar_Extension {
4+
class Puc_v4p12_DebugBar_Extension {
55
const RESPONSE_BODY_LENGTH_LIMIT = 4000;
66

7-
/** @var Puc_v4p11_UpdateChecker */
7+
/** @var Puc_v4p12_UpdateChecker */
88
protected $updateChecker;
9-
protected $panelClass = 'Puc_v4p11_DebugBar_Panel';
9+
protected $panelClass = 'Puc_v4p12_DebugBar_Panel';
1010

1111
public function __construct($updateChecker, $panelClass = null) {
1212
$this->updateChecker = $updateChecker;
@@ -163,11 +163,11 @@ private function getLibraryUrl($filePath) {
163163
$absolutePath = realpath(dirname(__FILE__) . '/../../../' . ltrim($filePath, '/'));
164164

165165
//Where is the library located inside the WordPress directory structure?
166-
$absolutePath = Puc_v4p11_Factory::normalizePath($absolutePath);
166+
$absolutePath = Puc_v4p12_Factory::normalizePath($absolutePath);
167167

168-
$pluginDir = Puc_v4p11_Factory::normalizePath(WP_PLUGIN_DIR);
169-
$muPluginDir = Puc_v4p11_Factory::normalizePath(WPMU_PLUGIN_DIR);
170-
$themeDir = Puc_v4p11_Factory::normalizePath(get_theme_root());
168+
$pluginDir = Puc_v4p12_Factory::normalizePath(WP_PLUGIN_DIR);
169+
$muPluginDir = Puc_v4p12_Factory::normalizePath(WPMU_PLUGIN_DIR);
170+
$themeDir = Puc_v4p12_Factory::normalizePath(get_theme_root());
171171

172172
if ( (strpos($absolutePath, $pluginDir) === 0) || (strpos($absolutePath, $muPluginDir) === 0) ) {
173173
//It's part of a plugin.

Puc/v4p12/DebugBar/Panel.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22

3-
if ( !class_exists('Puc_v4p11_DebugBar_Panel', false) && class_exists('Debug_Bar_Panel', false) ):
3+
if ( !class_exists('Puc_v4p12_DebugBar_Panel', false) && class_exists('Debug_Bar_Panel', false) ):
44

5-
class Puc_v4p11_DebugBar_Panel extends Debug_Bar_Panel {
6-
/** @var Puc_v4p11_UpdateChecker */
5+
class Puc_v4p12_DebugBar_Panel extends Debug_Bar_Panel {
6+
/** @var Puc_v4p12_UpdateChecker */
77
protected $updateChecker;
88

99
private $responseBox = '<div class="puc-ajax-response" style="display: none;"></div>';

Puc/v4p12/DebugBar/PluginExtension.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<?php
2-
if ( !class_exists('Puc_v4p11_DebugBar_PluginExtension', false) ):
2+
if ( !class_exists('Puc_v4p12_DebugBar_PluginExtension', false) ):
33

4-
class Puc_v4p11_DebugBar_PluginExtension extends Puc_v4p11_DebugBar_Extension {
5-
/** @var Puc_v4p11_Plugin_UpdateChecker */
4+
class Puc_v4p12_DebugBar_PluginExtension extends Puc_v4p12_DebugBar_Extension {
5+
/** @var Puc_v4p12_Plugin_UpdateChecker */
66
protected $updateChecker;
77

88
public function __construct($updateChecker) {
9-
parent::__construct($updateChecker, 'Puc_v4p11_DebugBar_PluginPanel');
9+
parent::__construct($updateChecker, 'Puc_v4p12_DebugBar_PluginPanel');
1010

1111
add_action('wp_ajax_puc_v4_debug_request_info', array($this, 'ajaxRequestInfo'));
1212
}

Puc/v4p12/DebugBar/PluginPanel.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?php
22

3-
if ( !class_exists('Puc_v4p11_DebugBar_PluginPanel', false) ):
3+
if ( !class_exists('Puc_v4p12_DebugBar_PluginPanel', false) ):
44

5-
class Puc_v4p11_DebugBar_PluginPanel extends Puc_v4p11_DebugBar_Panel {
5+
class Puc_v4p12_DebugBar_PluginPanel extends Puc_v4p12_DebugBar_Panel {
66
/**
7-
* @var Puc_v4p11_Plugin_UpdateChecker
7+
* @var Puc_v4p12_Plugin_UpdateChecker
88
*/
99
protected $updateChecker;
1010

Puc/v4p12/DebugBar/ThemePanel.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?php
22

3-
if ( !class_exists('Puc_v4p11_DebugBar_ThemePanel', false) ):
3+
if ( !class_exists('Puc_v4p12_DebugBar_ThemePanel', false) ):
44

5-
class Puc_v4p11_DebugBar_ThemePanel extends Puc_v4p11_DebugBar_Panel {
5+
class Puc_v4p12_DebugBar_ThemePanel extends Puc_v4p12_DebugBar_Panel {
66
/**
7-
* @var Puc_v4p11_Theme_UpdateChecker
7+
* @var Puc_v4p12_Theme_UpdateChecker
88
*/
99
protected $updateChecker;
1010

Puc/v4p12/Factory.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
2-
if ( !class_exists('Puc_v4p11_Factory', false) ):
2+
if ( !class_exists('Puc_v4p12_Factory', false) ):
33

44
/**
55
* A factory that builds update checker instances.
@@ -11,7 +11,7 @@
1111
* At the moment it can only build instances of the UpdateChecker class. Other classes are
1212
* intended mainly for internal use and refer directly to specific implementations.
1313
*/
14-
class Puc_v4p11_Factory {
14+
class Puc_v4p12_Factory {
1515
protected static $classVersions = array();
1616
protected static $sorted = false;
1717

@@ -23,7 +23,7 @@ class Puc_v4p11_Factory {
2323
*
2424
* @param string $fullPath Full path to the main plugin file or the theme's style.css.
2525
* @param array $args Optional arguments. Keys should match the argument names of the buildUpdateChecker() method.
26-
* @return Puc_v4p11_Plugin_UpdateChecker|Puc_v4p11_Theme_UpdateChecker|Puc_v4p11_Vcs_BaseChecker
26+
* @return Puc_v4p12_Plugin_UpdateChecker|Puc_v4p12_Theme_UpdateChecker|Puc_v4p12_Vcs_BaseChecker
2727
*/
2828
public static function buildFromHeader($fullPath, $args = array()) {
2929
$fullPath = self::normalizePath($fullPath);
@@ -54,15 +54,15 @@ public static function buildFromHeader($fullPath, $args = array()) {
5454
* This method automatically detects if you're using it for a plugin or a theme and chooses
5555
* the appropriate implementation for your update source (JSON file, GitHub, BitBucket, etc).
5656
*
57-
* @see Puc_v4p11_UpdateChecker::__construct
57+
* @see Puc_v4p12_UpdateChecker::__construct
5858
*
5959
* @param string $metadataUrl The URL of the metadata file, a GitHub repository, or another supported update source.
6060
* @param string $fullPath Full path to the main plugin file or to the theme directory.
6161
* @param string $slug Custom slug. Defaults to the name of the main plugin file or the theme directory.
6262
* @param int $checkPeriod How often to check for updates (in hours).
6363
* @param string $optionName Where to store book-keeping info about update checks.
6464
* @param string $muPluginFile The plugin filename relative to the mu-plugins directory.
65-
* @return Puc_v4p11_Plugin_UpdateChecker|Puc_v4p11_Theme_UpdateChecker|Puc_v4p11_Vcs_BaseChecker
65+
* @return Puc_v4p12_Plugin_UpdateChecker|Puc_v4p12_Theme_UpdateChecker|Puc_v4p12_Vcs_BaseChecker
6666
*/
6767
public static function buildUpdateChecker($metadataUrl, $fullPath, $slug = '', $checkPeriod = 12, $optionName = '', $muPluginFile = '') {
6868
$fullPath = self::normalizePath($fullPath);

Puc/v4p12/InstalledPackage.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<?php
2-
if ( !class_exists('Puc_v4p11_InstalledPackage', false) ):
2+
if ( !class_exists('Puc_v4p12_InstalledPackage', false) ):
33

44
/**
55
* This class represents a currently installed plugin or theme.
66
*
77
* Not to be confused with the "package" field in WP update API responses that contains
88
* the download URL of a the new version.
99
*/
10-
abstract class Puc_v4p11_InstalledPackage {
10+
abstract class Puc_v4p12_InstalledPackage {
1111
/**
12-
* @var Puc_v4p11_UpdateChecker
12+
* @var Puc_v4p12_UpdateChecker
1313
*/
1414
protected $updateChecker;
1515

Puc/v4p12/Metadata.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
2-
if ( !class_exists('Puc_v4p11_Metadata', false) ):
2+
if ( !class_exists('Puc_v4p12_Metadata', false) ):
33

44
/**
55
* A base container for holding information about updates and plugin metadata.
@@ -8,7 +8,7 @@
88
* @copyright 2016
99
* @access public
1010
*/
11-
abstract class Puc_v4p11_Metadata {
11+
abstract class Puc_v4p12_Metadata {
1212

1313
/**
1414
* Create an instance of this class from a JSON document.

0 commit comments

Comments
 (0)