DEV Community

Cover image for WordPress: Custom link in taxonomy row actions
Alexey
Alexey

Posted on

2 1

WordPress: Custom link in taxonomy row actions

add_action( 'category_row_actions',  'zl_actions_rows' , 10 ,2 );
public function 'zl_actions_rows' ( $actions, $category ) {
    $new_actions                         = array();
    $new_actions['edit']                 = $actions['edit'];
    $new_actions['template']             = '<a href="#" aria-label="' . __( 'Custom Link', 'zl') . '">' . __( 'Custom Link', 'zl') . '</a>';
    $new_actions['view']                 = $actions['view'];
    $new_actions['inline hide-if-no-js'] = $actions['inline hide-if-no-js'];

    return $new_actions;
}
Enter fullscreen mode Exit fullscreen mode

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay