Akismet::row_actions( array $actions, WP_Post $post )
Description #
Add post row action to mark a post as a spam.
Parameters #
- $actionsarray (Required) List of actions.
- $postWP_Post (Required) Post object.
Source #
File: addons/akismet/akismet.php
public function row_actions( $actions, $post ) { if ( ! ap_is_cpt( $post ) || 'moderate' === $post->post_status ) { return $actions; } $nonce = wp_create_nonce( 'send_spam' ); $actions['report_spam'] = '<a href="' . admin_url( 'admin.php?action=ap_mark_spam&post_id=' . $post->ID . '&nonce=' . $nonce ) . '" aria-label="' . __( 'Mark this post as a spam', 'anspress-question-answer' ) . '">' . __( 'Mark as spam', 'anspress-question-answer' ) . '</a>'; return $actions; }
Expand full source code Collapse full source code View on GitHub: addons/akismet/akismet.php:254
Add your comment