Ticket #2767: 2767.2.patch
File 2767.2.patch, 4.1 KB (added by , 8 years ago) |
---|
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-template.php
400 400 } 401 401 402 402 /** 403 * Returns the URL to the plugin support forum. 404 * 405 * @static 406 * 407 * @param int|\WP_Post|null $post Optional. Post ID or post object. Defaults to global $post. 408 * @return string 409 */ 410 public static function get_support_url( $post = null ) { 411 $post = get_post( $post ); 412 413 /* 414 * bbPress and BuddyPress get special treatment here. 415 * In the future we could open this up to all plugins that define a custom support URL. 416 */ 417 if ( 'buddypress' === $post->post_name ) { 418 $url = 'https://buddypress.org/support/'; 419 } elseif ( 'bbpress' === $post->post_name ) { 420 $url = 'https://bbpress.org/forums/'; 421 } else { 422 $url = 'https://wordpress.org/support/plugin/' . $post->post_name; 423 } 424 425 return $url; 426 } 427 428 /** 403 429 * A helper method to create dashicon stars. 404 430 * 405 431 * @static -
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/widgets/class-support.php
1 1 <?php 2 2 namespace WordPressdotorg\Plugin_Directory\Widgets; 3 use WordPressdotorg\Plugin_Directory\Template; 3 4 4 5 /** 5 6 * A Widget to display support information about a plugin. … … 31 32 $threads = get_post_meta( $post->ID, 'support_threads', true ) ?: 0; 32 33 $resolved = get_post_meta( $post->ID, 'support_threads_resolved', true ) ?: 0; 33 34 $resolutions = (bool) $threads; 34 $support_url = 'https://wordpress.org/support/plugin/' . $post->post_name;35 $support_url = Template::get_support_url(); 35 36 36 /*37 * bbPress and BuddyPress get special treatment here.38 * In the future we could open this up to all plugins that define a custom support URL.39 */40 if ( 'buddypress' === $post->post_name ) {41 $resolutions = false;42 $support_url = 'https://buddypress.org/support/';43 } else if ( 'bbpress' === $post->post_name ) {44 $resolutions = false;45 $support_url = 'https://bbpress.org/forums/';46 }47 48 37 echo $args['before_widget']; 49 38 echo $args['before_title'] . $title . $args['after_title']; 50 39 -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/template-parts/plugin-single.php
125 125 <ul class="tabs clear"> 126 126 <li id="tablink-description"><a href='#description'><?php _e( 'Details', 'wporg-plugins' ); ?></a></li> 127 127 <li id="tablink-reviews"><a href='#reviews'><?php _e( 'Reviews', 'wporg-plugins' ); ?></a></li> 128 <?php if ( isset( $content[ 'installation' ] ) ) { ?>129 <li id="tablink-installation"><a href='#installation'><?php _e( 'Installation', 'wporg-plugins' ); ?></a></li>130 <?php } ?>131 <li id="tablink-support"><a href=' https://wordpress.org/support/plugin/<?php echo $post->post_name; ?>'><?php _e( 'Support', 'wporg-plugins' ); ?></a></li>128 <?php if ( isset( $content[ 'installation' ] ) ) { ?> 129 <li id="tablink-installation"><a href='#installation'><?php _e( 'Installation', 'wporg-plugins' ); ?></a></li> 130 <?php } ?> 131 <li id="tablink-support"><a href='<?php echo Template::get_support_url(); ?>'><?php _e( 'Support', 'wporg-plugins' ); ?></a></li> 132 132 <li id="tablink-developers"><a href='#developers'><?php _e( 'Development', 'wporg-plugins' ); ?></a></li> 133 133 </ul> 134 134 <?php } ?>