AnsPress_Post_Table_Hooks::add_question_flag_link( array $actions, object $post )
Description #
Add clear flag action button in question list.
Parameters #
- $actionsarray (Required) Actions array.
- $postobject (Required) Post object.
Source #
File: admin/class-list-table-hooks.php
public static function add_question_flag_link( $actions, $post ) { if ( ap_get_post_field( 'flags', $post ) ) { $actions['flag'] = '<a href="#" data-query="ap_clear_flag::' . wp_create_nonce( 'clear_flag_' . $post->ID ) . '::' . $post->ID . '" class="ap-ajax-btn flag-clear" data-cb="afterFlagClear">' . __( 'Clear flag', 'anspress-question-answer' ) . '</a>'; } return $actions; }
Expand full source code Collapse full source code View on GitHub: admin/class-list-table-hooks.php:177
Add your comment