Changeset 3510 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/shortcodes/class-developers.php
- Timestamp:
- 06/20/2016 04:37:50 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/shortcodes/class-developers.php
r3435 r3510 32 32 $output .= '</ul>'; 33 33 34 if ( is_user_logged_in() ) { 35 $subscribed = Tools::subscribed_to_plugin_commits( $post, get_current_user_id() ); 36 37 $subscribe_change_url = esc_url( add_query_arg( 38 array( 39 '_wpnonce' => wp_create_nonce( 'wp_rest' ), 40 ( $subscribed ? 'unsubscribe' : 'subscribe' ) => '1' 41 ), 42 home_url( 'wp-json/plugins/v1/plugin/' . $post->post_name . '/commit-subscription' ) 43 ) ); 44 } 45 34 46 return $output . 35 47 '<h5>' . __( 'Browse the code', 'wporg-plugins' ) . '</h5>' . … … 37 49 '<li>' . 38 50 '<a href="' . esc_url( "https://plugins.trac.wordpress.org/log/{$post->post_name}/" ) . '" rel="nofollow">' . __( 'Development Log', 'wporg-plugins' ) . '</a>' . "\n" . 39 '<a href="' . esc_url( "https://plugins.trac.wordpress.org/log/{$post->post_name}/?limit=100&mode=stop_on_copy&format=rss" ) . '" rel="nofollow"><img src=" //s.w.org/style/images/feedicon.png" /></a>' .51 '<a href="' . esc_url( "https://plugins.trac.wordpress.org/log/{$post->post_name}/?limit=100&mode=stop_on_copy&format=rss" ) . '" rel="nofollow"><img src="https://s.w.org/style/images/feedicon.png" /></a>' . 40 52 '</li>' . 41 53 '<li><a href="' . esc_url( "https://plugins.svn.wordpress.org/{$post->post_name}/" ) . '" rel="nofollow">' . __( 'Subversion Repository', 'wporg-plugins' ) . '</a></li>' . 42 54 '<li><a href="' . esc_url( "https://plugins.trac.wordpress.org/browser/{$post->post_name}/" ) . '" rel="nofollow">' . __( 'Browse in Trac', 'wporg-plugins' ) . '</a></li>' . 43 55 '<li><a href="' . esc_url( "https://translate.wordpress.org/projects/wp-plugins/{$post->post_name}/" ) . '" rel="nofollow">' . __( 'Translation Contributors', 'wporg-plugins' ) . '</a></li>' . 56 ( !is_user_logged_in() ? '' : ( 57 $subscribed ? 58 "<li><a href='$subscribe_change_url'>" . __( 'Unsubscribe from plugin commits', 'wporg-plugins' ) . '</a></li>' : 59 "<li><a href='$subscribe_change_url'>" . __( 'Subscribe to plugin commits via email', 'wporg-plugins' ) . '</a></li>' 60 ) ) . 44 61 '</ul>'; 45 62 }
Note: See TracChangeset
for help on using the changeset viewer.