Comment.php
8 years ago
Link.php
8 years ago
Media.php
8 years ago
Post.php
8 years ago
User.php
8 years ago
Link.php
43 lines
| 1 | <?php |
| 2 | |
| 3 | if ( ! defined( 'ABSPATH' ) ) { |
| 4 | exit; |
| 5 | } |
| 6 | |
| 7 | class AC_ListScreen_Link extends AC_ListScreen { |
| 8 | |
| 9 | public function __construct() { |
| 10 | |
| 11 | $this->set_label( __( 'Links' ) ); |
| 12 | $this->set_singular_label( __( 'Link' ) ); |
| 13 | $this->set_screen_base( 'link-manager' ); |
| 14 | $this->set_key( 'wp-links' ); |
| 15 | $this->set_screen_id( 'link-manager' ); |
| 16 | $this->set_group( 'link' ); |
| 17 | |
| 18 | /* @see WP_Links_List_Table */ |
| 19 | $this->set_list_table_class( 'WP_Links_List_Table' ); |
| 20 | } |
| 21 | |
| 22 | public function set_manage_value_callback() { |
| 23 | add_action( 'manage_link_custom_column', array( $this, 'manage_value' ), 100, 2 ); |
| 24 | } |
| 25 | |
| 26 | /** |
| 27 | * @since 3.0 |
| 28 | * @return stdClass |
| 29 | */ |
| 30 | protected function get_object_by_id( $bookmark_id ) { |
| 31 | return get_bookmark( $bookmark_id ); |
| 32 | } |
| 33 | |
| 34 | public function manage_value( $column_name, $id ) { |
| 35 | echo $this->get_display_value_by_column_name( $column_name, $id ); |
| 36 | } |
| 37 | |
| 38 | protected function register_column_types() { |
| 39 | $this->register_column_types_from_dir( AC()->get_plugin_dir() . 'classes/Column/Link', 'AC_' ); |
| 40 | } |
| 41 | |
| 42 | } |
| 43 |