Skip to content

Commit

Permalink
Merge pull request #276 from codepress/release/4.1.2
Browse files Browse the repository at this point in the history
Release/4.1.2
  • Loading branch information
DGStefan authored Apr 8, 2020
2 parents b6fff81 + 7ba82f0 commit 6268b6f
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 8 deletions.
3 changes: 1 addition & 2 deletions classes/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,14 @@ protected function create_menu_link( $slug ) {
/**
* @return Page
*/

private function get_current_page() {
$slug = filter_input( INPUT_GET, 'tab' );

if ( $this->pages->has( $slug ) ) {
return $this->pages->get( $slug );
}

return $this->pages->current();
return $this->pages->first();
}

/**
Expand Down
7 changes: 7 additions & 0 deletions classes/Admin/PageCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,11 @@ public function add( Page $page ) {
return $this;
}

/**
* @return Page
*/
public function first() {
return parent::first();
}

}
4 changes: 4 additions & 0 deletions classes/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ public function rewind() {
reset( $this->items );
}

public function first() {
return reset( $this->items );
}

public function current() {
return current( $this->items );
}
Expand Down
2 changes: 1 addition & 1 deletion classes/Controller/ListScreenRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ private function get_first_available_list_screen( $list_key ) {
return null;
}

return $list_screens->current();
return $list_screens->get_first();
}

/**
Expand Down
3 changes: 1 addition & 2 deletions classes/ListScreenRepository/Sort/ManualOrder.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ public function sort( ListScreenCollection $list_screens ) {
return $list_screens;
}

$list_screens->rewind();
$key = $list_screens->current()->get_key();
$key = $list_screens->get_first()->get_key();

$layouts = [];

Expand Down
4 changes: 2 additions & 2 deletions codepress-admin-columns.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/*
Plugin Name: Admin Columns
Version: 4.1.1
Version: 4.1.2
Description: Customize columns on the administration screens for post(types), pages, media, comments, links and users with an easy to use drag-and-drop interface.
Author: AdminColumns.com
Author URI: https://www.admincolumns.com
Expand Down Expand Up @@ -36,7 +36,7 @@
}

define( 'AC_FILE', __FILE__ );
define( 'AC_VERSION', '4.1.1' );
define( 'AC_VERSION', '4.1.2' );

require_once __DIR__ . '/classes/Dependencies.php';

Expand Down
7 changes: 6 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Tags: plugins, wordpress, admin, column, columns, custom columns, custom fields,
Requires at least: 4.7
Tested up to: 5.4
Requires PHP: 5.6.20
Stable tag: 4.1.1
Stable tag: 4.1.2

Customise columns on the administration screens for post(types), pages, media, comments, links and users with an easy to use drag-and-drop interface.

Expand Down Expand Up @@ -213,6 +213,11 @@ You can find a list of the available actions and filters (and examples on how to

== Changelog ==

= 4.1.2 =
Release Date: April 8th, 2020

* [Fixed] PHP5.6 error when loading the settings page from the menu

= 4.1.1 =
Release Date: April 7th, 2020

Expand Down

0 comments on commit 6268b6f

Please sign in to comment.