AnsPress_Post_Table_Hooks::flag_view( array $views )
Description #
Add flagged post view.
Parameters #
- $viewsarray (Required) Views array.
Source #
File: admin/class-list-table-hooks.php
public static function flag_view( $views ) { global $post_type_object; $flagged_count = ap_total_posts_count( 'answer' === $post_type_object->name ? 'answer' : 'question', 'flag' ); $class = ap_sanitize_unslash( 'flagged', 'p' ) ? 'class="current" ' : ''; $views['flagged'] = '<a ' . $class . 'href="edit.php?flagged=true&post_type=' . $post_type_object->name . '">' . __( 'Flagged', 'anspress-question-answer' ) . ' <span class="count">(' . $flagged_count->total . ')</span></a>'; return $views; }
Expand full source code Collapse full source code View on GitHub: admin/class-list-table-hooks.php:56
Add your comment