How can i link post_row_actions() with a custom action function

You’d have to use the $_GET method. Here, I’m hooking in admin_head-{$pagenow}, depending on your functionality maybe you’ll need to hook in load-{$pagenow}.

Prefix your var names to not colide with any WordPress internals, in this case my-update for the action name:

edit.php?post_type=league&action=my-update&post_id

Sample code:

add_action( 'admin_head-edit.php', 'custom_get_http_wpse_82761' );

function custom_get_http_wpse_82761()
{
    global $typenow;
    if( 'league' != $typenow )
        return;

    if( isset( $_GET['my-update'] ) )
    {
        // do stuff
    }
}

Leave a Comment