Skip to content

Commit

Permalink
change PAnD method to static per repo owner
Browse files Browse the repository at this point in the history
  • Loading branch information
afragen committed Aug 7, 2016
1 parent b5a6d3e commit 2f558a9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/GitHub_Updater/Messages.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public function show_403_error_message() {
foreach ( self::$error_code as $repo ) {
if ( 403 === $repo['code'] && 'github' === $repo['git'] && ! $_403 ) {
$_403 = true;
if ( ! \PAnD::instance()->is_admin_notice_active( 'data-403-error-1' ) ) {
if ( ! \PAnD::is_admin_notice_active( 'data-403-error-1' ) ) {
return;
}
?>
Expand Down Expand Up @@ -144,7 +144,7 @@ public function show_401_error_message() {
foreach ( self::$error_code as $repo ) {
if ( 401 === $repo['code'] && ! $_401 ) {
$_401 = true;
if ( ! \PAnD::instance()->is_admin_notice_active( 'data-401-error-1' ) ) {
if ( ! \PAnD::is_admin_notice_active( 'data-401-error-1' ) ) {
return;
}
?>
Expand Down Expand Up @@ -172,7 +172,7 @@ public function gitlab_error() {
( empty( parent::$options['gitlab_private_token'] ) &&
parent::$auth_required['gitlab'] )
) {
if ( ! \PAnD::instance()->is_admin_notice_active( 'data-gitlab-error-1' ) ) {
if ( ! \PAnD::is_admin_notice_active( 'data-gitlab-error-1' ) ) {
return;
}
?>
Expand All @@ -189,7 +189,7 @@ public function gitlab_error() {
* Generate error message for WP_Error.
*/
public function show_wp_error() {
if ( ! \PAnD::instance()->is_admin_notice_active( 'data-wp-error-1' ) ) {
if ( ! \PAnD::is_admin_notice_active( 'data-wp-error-1' ) ) {
return;
}
?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public function dismiss_admin_notice() {
*
* @return bool
*/
public function is_admin_notice_active( $arg ) {
public static function is_admin_notice_active( $arg ) {
$array = explode( '-', $arg );
$length = array_pop( $array );
$option_name = implode( '-', $array );
Expand Down

0 comments on commit 2f558a9

Please sign in to comment.