-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #275 from codepress/release/4.1.1
Release/4.1.1
- Loading branch information
Showing
30 changed files
with
1,928 additions
and
25 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
|
||
namespace AC\Integration; | ||
|
||
use AC\Integration; | ||
use AC\Screen; | ||
|
||
final class MetaBox extends Integration { | ||
|
||
public function __construct() { | ||
parent::__construct( | ||
'ac-addon-metabox/ac-addon-metabox.php', | ||
__( 'Meta Box', 'codepress-admin-columns' ), | ||
'assets/images/addons/metabox.svg', | ||
__( 'Instantly generate columns for your Meta Box custom fields!', 'codepress-admin-columns' ), | ||
null, | ||
'metabox' | ||
); | ||
} | ||
|
||
public function is_plugin_active() { | ||
return class_exists( 'RWMB_Loader', false ); | ||
} | ||
|
||
public function show_notice( Screen $screen ) { | ||
return $screen->get_id() === 'edit-meta-box'; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
|
||
namespace AC; | ||
|
||
/** | ||
* Adapter for the WP List Table | ||
*/ | ||
interface ListTable { | ||
|
||
/** | ||
* @param string $column | ||
* @param int $id | ||
* | ||
* @return string | ||
*/ | ||
public function get_column_value( $column, $id ); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
namespace AC\ListTable; | ||
|
||
use AC\ListTable; | ||
use WP_Comments_List_Table; | ||
|
||
class Comment implements ListTable { | ||
|
||
/** | ||
* @var WP_Comments_List_Table | ||
*/ | ||
private $table; | ||
|
||
public function __construct( WP_Comments_List_Table $table ) { | ||
$this->table = $table; | ||
} | ||
|
||
public function get_column_value( $column, $id ) { | ||
ob_start(); | ||
$this->table->column_default( get_comment( $id ), $column ); | ||
|
||
return ob_get_clean(); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
namespace AC\ListTable; | ||
|
||
use AC\ListTable; | ||
use WP_Posts_List_Table; | ||
|
||
class Post implements ListTable { | ||
|
||
/** | ||
* @var WP_Posts_List_Table | ||
*/ | ||
private $table; | ||
|
||
public function __construct( WP_Posts_List_Table $table ) { | ||
$this->table = $table; | ||
} | ||
|
||
public function get_column_value( $column, $id ) { | ||
ob_start(); | ||
$this->table->column_default( get_post( $id ), $column ); | ||
|
||
return ob_get_clean(); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
namespace AC\ListTable; | ||
|
||
use AC\ListTable; | ||
|
||
class Taxonomy implements ListTable { | ||
|
||
/** | ||
* @var string | ||
*/ | ||
private $taxonomy; | ||
|
||
public function __construct( $taxonomy ) { | ||
$this->taxonomy = $taxonomy; | ||
} | ||
|
||
public function get_column_value( $column, $id ) { | ||
return apply_filters( "manage_{$this->taxonomy}_custom_column", '', $column, $id ); | ||
} | ||
|
||
} |
Oops, something went wrong.