Permalink
Browse files

Changed the visibility of the `_isInThePage()` method.

This is for code design consistency.
  • Loading branch information...
michaeluno committed Jan 11, 2017
1 parent b284a25 commit 8c606a87233485d60e933170093c60873fe69652
@@ -222,10 +222,10 @@ protected function _isInstantiatable() {
* @remark This method should be called AFTER current screen is determined such as after the `current_screen` action hook.
* @since 3.0.3
* @since 3.2.0 Changed the visibility scope to `public` from `protected` as the head tag object will access it.
- * @todo Change the visibility scope to `protected` as the public version of the method `isInThePage()` has been introduced to make the design consitent.
+ * @since 3.8.14 Changed the visibility scope to `protected` from `public` as there is the `isInThePage()` public method.
* @internal
*/
- public function _isInThePage() {
+ protected function _isInThePage() {
return true;
}
@@ -91,10 +91,11 @@ protected function _formatHelpDescription( $sHelpDescription ) {
*
* @since 3.7.10
* @internal
+ * @deprecated 3.8.14
*/
- protected function _isInThePage() {
- return $this->oProp->oCaller->isInThePage();
- }
+// protected function _isInThePage() {
+// return $this->oProp->oCaller->isInThePage();
+// }
/**
* Adds the given HTML text to the contextual help pane.
@@ -144,7 +145,7 @@ public function _addHelpTextForFormFields( $sFieldTitle, $sHelpText, $sHelpTextS
public function _replyToRegisterHelpTabText() {
// Check if the currently loaded page is of meta box page.
- if ( ! $this->_isInThePage() ) {
+ if ( ! $this->oProp->oCaller->isInThePage() ) {
return false;
}
@@ -467,7 +467,7 @@ protected function _printClassSpecificScripts( $sIDPrefix ) {
public function _replyToAddStyle() {
$_oCaller = $this->oProp->oCaller;
- if ( ! $_oCaller->_isInThePage() ) {
+ if ( ! $_oCaller->isInThePage() ) {
return;
}
@@ -487,7 +487,7 @@ public function _replyToAddStyle() {
public function _replyToAddScript() {
$_oCaller = $this->oProp->oCaller;
- if ( ! $_oCaller->_isInThePage() ) {
+ if ( ! $_oCaller->isInThePage() ) {
return;
}
@@ -59,7 +59,7 @@ public function _replyToPrintSettingNotice() {
*/
private function _shouldProceed() {
- if ( ! $this->oFactory->_isInThePage() ) {
+ if ( ! $this->oFactory->isInThePage() ) {
return false;
}
@@ -293,11 +293,12 @@ protected function _isInstantiatable() {
* Checks whether the currently loading page is of the given pages.
*
* @since 3.0.2
- * @since 3.2.0 Changed the scope to public from protected as the head tag object will access it.
+ * @since 3.2.0 Changed the scope to `public` from `protected` as the head tag object will access it.
* @since 3.3.1 Moved from `AdminPageFramework_Base`.
+ * @since 3.8.14 Changed the visibility scope to `protected` from `public` as there is the `isInThePage()` public method.
* @internal
*/
- public function _isInThePage() {
+ protected function _isInThePage() {
// If the setUp method is not loaded yet,
if ( ! did_action( 'set_up_' . $this->oProp->sClassName ) ) {
@@ -65,7 +65,7 @@ public function __construct( $oProp ) {
*/
public function _replyToRegisterHelpTabs() {
- if ( ! $this->_isInThePage() ) {
+ if ( ! $this->oProp->oCaller->isInThePage() ) {
return;
}
@@ -90,7 +90,7 @@ public function _replyToCheckRedirects() {
private function _shouldProceed() {
// Check if it's one of the plugin's added page. If not, do nothing.
- if ( ! $this->oFactory->_isInThePage() ) {
+ if ( ! $this->oFactory->isInThePage() ) {
return false;
}
@@ -59,11 +59,12 @@ public function __construct( $sMetaBoxID, $sTitle, $asPostTypeOrScreenID=array(
* Determines whether the meta box belongs to the loading page.
*
* @since 3.0.3
- * @since 3.2.0 Changed the scope to public from protected as the head tag object will access it.
+ * @since 3.2.0 Changed the scope to `public` from `protected` as the head tag object will access it.
* @since 3.3.0 Moved from `AdminPageFramework_MetaBox`.
+ * @since 3.8.14 Changed the visibility scope to `protected` from `public` as there is the `isInThePage()` public method.
* @internal
*/
- public function _isInThePage() {
+ protected function _isInThePage() {
if ( ! in_array( $this->oProp->sPageNow, array( 'post.php', 'post-new.php' ) ) ) {
return false;
@@ -29,7 +29,7 @@ class AdminPageFramework_HelpPane_post_meta_box extends AdminPageFramework_HelpP
public function _replyToRegisterHelpTabText() {
// Check if the currently loaded page is of meta box page.
- if ( ! $this->_isInThePage() ) {
+ if ( ! $this->oProp->oCaller->isInThePage() ) {
return false;
}
@@ -38,10 +38,11 @@ protected function _isInstantiatable() {
* Determines whether the meta box belongs to the loading page.
*
* @since 3.0.3
- * @since 3.2.0 Changed the scope to public from protected as the head tag object will access it.
+ * @since 3.2.0 Changed the scope to `public` from `protected` as the head tag object will access it.
+ * @since 3.8.14 Changed the visibility scope to `protected` from `public` as there is the `isInThePage()` public method.
* @internal
*/
- public function _isInThePage() {
+ protected function _isInThePage() {
if ( ! $this->oProp->bIsAdmin ) {
return false;
@@ -111,9 +111,10 @@ protected function _getPageLoadObject() {
* @internal
* @since 3.0.4
* @since 3.2.0 Changed the scope to public from protected as the head tag object will access it.
+ * @since 3.8.14 Changed the visibility scope to `protected` from `public` as there is the `isInThePage()` public method.
* @return boolean
*/
- public function _isInThePage() {
+ protected function _isInThePage() {
// If it's not in one of the post type's pages
if ( ! $this->oProp->bIsAdmin ) {
@@ -49,10 +49,11 @@ public function __construct( $oProp ) {
*
* @internal
* @since 3.0.3
- * @since 3.2.0 Changed the scope to public from protected as the head tag object will access it.
+ * @since 3.2.0 Changed the scope to `public` from `protected` as the head tag object will access it.
* @since 3.5.0 Moved from `AdminPageFramework_TaxonomyField`.
+ * @since 3.8.14 Changed the visibility scope to `protected` from `public` as there is the `isInThePage()` public method.
*/
- public function _isInThePage() {
+ protected function _isInThePage() {
if ( 'admin-ajax.php' == $this->oProp->sPageNow ) {
return true;
@@ -45,9 +45,10 @@ public function __construct( $oProp ) {
*
* @internal
* @since 3.5.0
+ * @since 3.8.14 Changed the visibility scope to `protected` from `public` as there is the `isInThePage()` public method.
* @return boolean
*/
- public function _isInThePage() {
+ protected function _isInThePage() {
if ( ! $this->oProp->bIsAdmin ) {
return false;

0 comments on commit 8c606a8

Please sign in to comment.