Changeset 6312
- Timestamp:
- 02/26/2017 06:04:52 AM (8 years ago)
- Location:
- trunk/src/includes/admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/admin/replies.php
r6272 r6312 764 764 unset( $actions['inline hide-if-no-js'] ); 765 765 766 // View link 767 $view_link = bbp_get_reply_url( $reply->ID ); 768 769 // Maybe add view=all 770 if ( ! in_array( $reply->post_status, array( bbp_get_closed_status_id(), bbp_get_public_status_id() ), true ) ) { 771 $view_link = bbp_add_view_all( $view_link, true ); 772 } 773 766 774 // Reply view links to topic 767 $actions['view'] = '<a href="' . esc_url( bbp_get_reply_url( $reply->ID )) . '" title="' . esc_attr( sprintf( __( 'View “%s”', 'bbpress' ), bbp_get_reply_title( $reply->ID ) ) ) . '" rel="permalink">' . esc_html__( 'View', 'bbpress' ) . '</a>';775 $actions['view'] = '<a href="' . esc_url( $view_link ) . '" title="' . esc_attr( sprintf( __( 'View “%s”', 'bbpress' ), bbp_get_reply_title( $reply->ID ) ) ) . '" rel="permalink">' . esc_html__( 'View', 'bbpress' ) . '</a>'; 768 776 769 777 // User cannot view replies in trash 770 if ( ( bbp_get_trash_status_id() === $reply->post_status ) && ! current_user_can( 'view_trash' ) ) {778 if ( ( bbp_get_trash_status_id() === $reply->post_status ) && ! current_user_can( 'view_trash' ) ) { 771 779 unset( $actions['view'] ); 772 780 } … … 784 792 785 793 // Show the 'spam' link on published and pending replies and 'not spam' on spammed replies 786 if ( in_array( $reply->post_status, array( bbp_get_public_status_id(), bbp_get_pending_status_id(), bbp_get_spam_status_id() ) ) ) {794 if ( in_array( $reply->post_status, array( bbp_get_public_status_id(), bbp_get_pending_status_id(), bbp_get_spam_status_id() ), true ) ) { 787 795 $spam_uri = wp_nonce_url( add_query_arg( array( 'reply_id' => $reply->ID, 'action' => 'bbp_toggle_reply_spam' ), remove_query_arg( array( 'bbp_reply_toggle_notice', 'reply_id', 'failed', 'super' ) ) ), 'spam-reply_' . $reply->ID ); 788 796 if ( bbp_is_reply_spam( $reply->ID ) ) { … … 803 811 } 804 812 805 if ( bbp_get_trash_status_id() === $reply->post_status || ! EMPTY_TRASH_DAYS ) {813 if ( bbp_get_trash_status_id() === $reply->post_status || ! EMPTY_TRASH_DAYS ) { 806 814 $actions['delete'] = "<a class='submitdelete' title='" . esc_attr__( 'Delete this item permanently', 'bbpress' ) . "' href='" . esc_url( get_delete_post_link( $reply->ID, '', true ) ) . "'>" . esc_html__( 'Delete Permanently', 'bbpress' ) . "</a>"; 807 815 } elseif ( bbp_get_spam_status_id() === $reply->post_status ) { -
trunk/src/includes/admin/topics.php
r6272 r6312 918 918 unset( $actions['inline hide-if-no-js'] ); 919 919 920 // View link 921 $view_link = bbp_get_topic_permalink( $topic->ID ); 922 923 // Maybe add view=all 924 if ( ! in_array( $topic->post_status, array( bbp_get_closed_status_id(), bbp_get_public_status_id() ), true ) ) { 925 $view_link = bbp_add_view_all( $view_link, true ); 926 } 927 920 928 // Show view link if it's not set, the topic is trashed and the user can view trashed topics 921 929 if ( empty( $actions['view'] ) && ( bbp_get_trash_status_id() === $topic->post_status ) && current_user_can( 'view_trash' ) ) { 922 $actions['view'] = '<a href="' . esc_url( bbp_get_topic_permalink( $topic->ID )) . '" title="' . esc_attr( sprintf( __( 'View “%s”', 'bbpress' ), bbp_get_topic_title( $topic->ID ) ) ) . '" rel="permalink">' . esc_html__( 'View', 'bbpress' ) . '</a>';930 $actions['view'] = '<a href="' . esc_url( $view_link ) . '" title="' . esc_attr( sprintf( __( 'View “%s”', 'bbpress' ), bbp_get_topic_title( $topic->ID ) ) ) . '" rel="permalink">' . esc_html__( 'View', 'bbpress' ) . '</a>'; 923 931 } 924 932 … … 933 941 } elseif ( ! bbp_is_topic_private( $topic->ID ) ) { 934 942 $actions['approved'] = '<a href="' . esc_url( $approve_uri ) . '" title="' . esc_attr__( 'Approve this topic', 'bbpress' ) . '">' . _x( 'Approve', 'Approve Topic', 'bbpress' ) . '</a>'; 935 $actions['view'] = '<a href="' . esc_url( bbp_get_topic_permalink( $topic->ID )) . '" title="' . esc_attr( sprintf( __( 'View “%s”', 'bbpress' ), bbp_get_topic_title( $topic->ID ) ) ) . '" rel="permalink">' . esc_html__( 'View', 'bbpress' ) . '</a>';943 $actions['view'] = '<a href="' . esc_url( $view_link ) . '" title="' . esc_attr( sprintf( __( 'View “%s”', 'bbpress' ), bbp_get_topic_title( $topic->ID ) ) ) . '" rel="permalink">' . esc_html__( 'View', 'bbpress' ) . '</a>'; 936 944 } 937 945
Note: See TracChangeset
for help on using the changeset viewer.