diff -r c7c34916027a -r 177826044cd9 wp/wp-admin/includes/class-wp-links-list-table.php --- a/wp/wp-admin/includes/class-wp-links-list-table.php Mon Oct 14 18:06:33 2019 +0200 +++ b/wp/wp-admin/includes/class-wp-links-list-table.php Mon Oct 14 18:28:13 2019 +0200 @@ -27,14 +27,15 @@ * @param array $args An associative array of arguments. */ public function __construct( $args = array() ) { - parent::__construct( array( - 'plural' => 'bookmarks', - 'screen' => isset( $args['screen'] ) ? $args['screen'] : null, - ) ); + parent::__construct( + array( + 'plural' => 'bookmarks', + 'screen' => isset( $args['screen'] ) ? $args['screen'] : null, + ) + ); } /** - * * @return bool */ public function ajax_user_can() { @@ -42,7 +43,6 @@ } /** - * * @global int $cat_id * @global string $s * @global string $orderby @@ -53,16 +53,23 @@ wp_reset_vars( array( 'action', 'cat_id', 'link_id', 'orderby', 'order', 's' ) ); - $args = array( 'hide_invisible' => 0, 'hide_empty' => 0 ); + $args = array( + 'hide_invisible' => 0, + 'hide_empty' => 0, + ); - if ( 'all' != $cat_id ) + if ( 'all' != $cat_id ) { $args['category'] = $cat_id; - if ( !empty( $s ) ) + } + if ( ! empty( $s ) ) { $args['search'] = $s; - if ( !empty( $orderby ) ) + } + if ( ! empty( $orderby ) ) { $args['orderby'] = $orderby; - if ( !empty( $order ) ) + } + if ( ! empty( $order ) ) { $args['order'] = $order; + } $this->items = get_bookmarks( $args ); } @@ -74,50 +81,48 @@ } /** - * * @return array */ protected function get_bulk_actions() { - $actions = array(); + $actions = array(); $actions['delete'] = __( 'Delete' ); return $actions; } /** - * * @global int $cat_id * @param string $which */ protected function extra_tablenav( $which ) { global $cat_id; - if ( 'top' != $which ) + if ( 'top' != $which ) { return; -?> + } + ?>
- $cat_id, - 'name' => 'cat_id', - 'taxonomy' => 'link_category', + 'selected' => $cat_id, + 'name' => 'cat_id', + 'taxonomy' => 'link_category', 'show_option_all' => get_taxonomy( 'link_category' )->labels->all_items, - 'hide_empty' => true, - 'hierarchical' => 1, - 'show_count' => 0, - 'orderby' => 'name', + 'hide_empty' => true, + 'hierarchical' => 1, + 'show_count' => 0, + 'orderby' => 'name', ); echo ''; wp_dropdown_categories( $dropdown_options ); submit_button( __( 'Filter' ), '', 'filter_action', false, array( 'id' => 'post-query-submit' ) ); -?> + ?>
- __( 'Categories' ), 'rel' => __( 'Relationship' ), 'visible' => __( 'Visible' ), - 'rating' => __( 'Rating' ) + 'rating' => __( 'Rating' ), ); } /** - * * @return array */ protected function get_sortable_columns() { @@ -141,7 +145,7 @@ 'name' => 'name', 'url' => 'url', 'visible' => 'visible', - 'rating' => 'rating' + 'rating' => 'rating', ); } @@ -179,7 +183,8 @@ */ public function column_name( $link ) { $edit_link = get_edit_bookmark_link( $link ); - printf( '%s', + printf( + '%s', $edit_link, /* translators: %s: link name */ esc_attr( sprintf( __( 'Edit “%s”' ), $link->link_name ) ), @@ -285,14 +290,14 @@ public function display_rows() { foreach ( $this->items as $link ) { - $link = sanitize_bookmark( $link ); - $link->link_name = esc_attr( $link->link_name ); + $link = sanitize_bookmark( $link ); + $link->link_name = esc_attr( $link->link_name ); $link->link_category = wp_get_link_cats( $link->link_id ); -?> + ?> - single_row_columns( $link ) ?> + single_row_columns( $link ); ?> -' . __('Edit') . ''; - $actions['delete'] = "link_id) . "' onclick=\"if ( confirm( '" . esc_js(sprintf(__("You are about to delete this link '%s'\n 'Cancel' to stop, 'OK' to delete."), $link->link_name)) . "' ) ) { return true;}return false;\">" . __('Delete') . ""; + $actions = array(); + $actions['edit'] = '' . __( 'Edit' ) . ''; + $actions['delete'] = "link_id ) . "' onclick=\"if ( confirm( '" . esc_js( sprintf( __( "You are about to delete this link '%s'\n 'Cancel' to stop, 'OK' to delete." ), $link->link_name ) ) . "' ) ) { return true;}return false;\">" . __( 'Delete' ) . ''; return $this->row_actions( $actions ); } }