bbp_get_reply_move_link( mixed $args = '' )

Get move reply link

Description

Return the move link of the reply

Parameters

$args

(Optional) This function supports these arguments: - id: Reply id - link_before: HTML before the link - link_after: HTML after the link - move_text: Move text - move_title: Move title attribute

Default value: ''

Return

(string) Reply move link

Source

File: bp-forums/replies/template.php

	function bbp_get_reply_move_link( $args = '' ) {

		// Parse arguments against default values
		$r = bbp_parse_args( $args, array(
			'id'          => 0,
			'link_before' => '',
			'link_after'  => '',
			'split_text'  => esc_html__( 'Move',            'buddyboss' ),
			'split_title' => esc_attr__( 'Move this reply', 'buddyboss' )
		), 'get_reply_move_link' );

		$reply_id = bbp_get_reply_id( $r['id'] );
		$topic_id = bbp_get_reply_topic_id( $reply_id );

		if ( empty( $reply_id ) || !current_user_can( 'moderate', $topic_id ) )
			return;

		$uri = add_query_arg( array(
			'action'   => 'move',
			'reply_id' => $reply_id
		), bbp_get_reply_edit_url( $reply_id ) );

		$retval = $r['link_before'] . '<a href="' . esc_url( $uri ) . '" title="' . $r['split_title'] . '" class="bbp-reply-move-link">' . $r['split_text'] . '</a>' . $r['link_after'];

		return apply_filters( 'bbp_get_reply_move_link', $retval, $r );
	}

Changelog

Changelog
Version Description
bbPress (r4521) Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.