Changeset 5069 for trunk/includes/topics/template.php
- Timestamp:
- 08/14/2013 09:34:56 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/topics/template.php
r5060 r5069 2462 2462 'link_after' => '', 2463 2463 'sep' => ' | ', 2464 'trash_text' => __( 'Trash', 'bbpress' ),2465 'restore_text' => __( 'Restore', 'bbpress' ),2466 'delete_text' => __( 'Delete', 'bbpress' )2464 'trash_text' => esc_html__( 'Trash', 'bbpress' ), 2465 'restore_text' => esc_html__( 'Restore', 'bbpress' ), 2466 'delete_text' => esc_html__( 'Delete', 'bbpress' ) 2467 2467 ), 'get_topic_trash_link' ); 2468 2468 … … 2475 2475 2476 2476 if ( bbp_is_topic_trash( $topic->ID ) ) { 2477 $actions['untrash'] = '<a title="' . esc_attr__( 'Restore this item from the Trash', 'bbpress' ) . '" href="' . esc_url( wp_nonce_url( add_query_arg( array( 'action' => 'bbp_toggle_topic_trash', 'sub_action' => 'untrash', 'topic_id' => $topic->ID ) ), 'untrash-' . $topic->post_type . '_' . $topic->ID ) ) . '">' . esc_html( $r['restore_text'] ). '</a>';2477 $actions['untrash'] = '<a title="' . esc_attr__( 'Restore this item from the Trash', 'bbpress' ) . '" href="' . esc_url( wp_nonce_url( add_query_arg( array( 'action' => 'bbp_toggle_topic_trash', 'sub_action' => 'untrash', 'topic_id' => $topic->ID ) ), 'untrash-' . $topic->post_type . '_' . $topic->ID ) ) . '">' . $r['restore_text'] . '</a>'; 2478 2478 } elseif ( EMPTY_TRASH_DAYS ) { 2479 $actions['trash'] = '<a title="' . esc_attr__( 'Move this item to the Trash', 'bbpress' ) . '" href="' . esc_url( wp_nonce_url( add_query_arg( array( 'action' => 'bbp_toggle_topic_trash', 'sub_action' => 'trash', 'topic_id' => $topic->ID ) ), 'trash-' . $topic->post_type . '_' . $topic->ID ) ) . '">' . esc_html( $r['trash_text'] ). '</a>';2479 $actions['trash'] = '<a title="' . esc_attr__( 'Move this item to the Trash', 'bbpress' ) . '" href="' . esc_url( wp_nonce_url( add_query_arg( array( 'action' => 'bbp_toggle_topic_trash', 'sub_action' => 'trash', 'topic_id' => $topic->ID ) ), 'trash-' . $topic->post_type . '_' . $topic->ID ) ) . '">' . $r['trash_text'] . '</a>'; 2480 2480 } 2481 2481 2482 2482 if ( bbp_is_topic_trash( $topic->ID ) || !EMPTY_TRASH_DAYS ) { 2483 $actions['delete'] = '<a title="' . esc_attr__( 'Delete this item permanently', 'bbpress' ) . '" href="' . esc_url( wp_nonce_url( add_query_arg( array( 'action' => 'bbp_toggle_topic_trash', 'sub_action' => 'delete', 'topic_id' => $topic->ID ) ), 'delete-' . $topic->post_type . '_' . $topic->ID ) ) . '" onclick="return confirm(\'' . esc_js( __( 'Are you sure you want to delete that permanently?', 'bbpress' ) ) . '\' );">' . esc_html( $r['delete_text'] ). '</a>';2483 $actions['delete'] = '<a title="' . esc_attr__( 'Delete this item permanently', 'bbpress' ) . '" href="' . esc_url( wp_nonce_url( add_query_arg( array( 'action' => 'bbp_toggle_topic_trash', 'sub_action' => 'delete', 'topic_id' => $topic->ID ) ), 'delete-' . $topic->post_type . '_' . $topic->ID ) ) . '" onclick="return confirm(\'' . esc_js( __( 'Are you sure you want to delete that permanently?', 'bbpress' ) ) . '\' );">' . $r['delete_text'] . '</a>'; 2484 2484 } 2485 2485 … … 2592 2592 'link_before' => '', 2593 2593 'link_after' => '', 2594 'stick_text' => __( 'Stick','bbpress' ),2595 'unstick_text' => __( 'Unstick','bbpress' ),2596 'super_text' => __( 'to front', 'bbpress' ),2594 'stick_text' => esc_html__( 'Stick', 'bbpress' ), 2595 'unstick_text' => esc_html__( 'Unstick', 'bbpress' ), 2596 'super_text' => esc_html__( '(to front)', 'bbpress' ), 2597 2597 ), 'get_topic_stick_link' ); 2598 2598 … … 2607 2607 $stick_uri = wp_nonce_url( $stick_uri, 'stick-topic_' . $topic->ID ); 2608 2608 2609 $stick_display = true === $is_sticky? $r['unstick_text'] : $r['stick_text'];2609 $stick_display = ( true === $is_sticky ) ? $r['unstick_text'] : $r['stick_text']; 2610 2610 $stick_display = '<a href="' . esc_url( $stick_uri ) . '">' . $stick_display . '</a>'; 2611 2611 … … 2614 2614 $super_uri = wp_nonce_url( $super_uri, 'stick-topic_' . $topic->ID ); 2615 2615 2616 $super_display = ' (<a href="' . esc_url( $super_uri ) . '">' . $r['super_text'] . '</a>)';2616 $super_display = ' <a href="' . esc_url( $super_uri ) . '">' . $r['super_text'] . '</a>'; 2617 2617 } else { 2618 2618 $super_display = ''; … … 2663 2663 'link_before' => '', 2664 2664 'link_after' => '', 2665 'merge_text' => __( 'Merge', 'bbpress' ),2665 'merge_text' => esc_html__( 'Merge', 'bbpress' ), 2666 2666 ), 'get_topic_merge_link' ); 2667 2667 … … 2719 2719 'link_after' => '', 2720 2720 'sep' => ' | ', 2721 'spam_text' => __( 'Spam', 'bbpress' ),2722 'unspam_text' => __( 'Unspam', 'bbpress' )2721 'spam_text' => esc_html__( 'Spam', 'bbpress' ), 2722 'unspam_text' => esc_html__( 'Unspam', 'bbpress' ) 2723 2723 ), 'get_topic_spam_link' ); 2724 2724 … … 2768 2768 'link_before' => '', 2769 2769 'link_after' => '', 2770 'reply_text' => __( 'Reply', 'bbpress' ),2770 'reply_text' => esc_html__( 'Reply', 'bbpress' ), 2771 2771 ), 'get_topic_reply_link' ); 2772 2772 … … 2782 2782 // Add $uri to the array, to be passed through the filter 2783 2783 $r['uri'] = $uri; 2784 $retval = $r['link_before'] . '<a href="' . esc_url( $r['uri'] ) . '" class="bbp-topic-reply-link">' . esc_html( $r['reply_text'] ). '</a>' . $r['link_after'];2784 $retval = $r['link_before'] . '<a href="' . esc_url( $r['uri'] ) . '" class="bbp-topic-reply-link">' . $r['reply_text'] . '</a>' . $r['link_after']; 2785 2785 2786 2786 return apply_filters( 'bbp_get_topic_reply_link', $retval, $r, $args );
Note: See TracChangeset
for help on using the changeset viewer.