Ticket #3503: 3503.patch
File 3503.patch, 2.1 KB (added by , 7 years ago) |
---|
-
trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-plugin-directory-compat.php
73 73 $plugin = $this->get_object( $slug ); 74 74 if ( ! $plugin ) { 75 75 return; 76 } else {77 $this->slug = $slug;78 $this->plugin = $plugin;79 $this->authors = $this->get_authors( $slug );80 $this->contributors = $this->get_contributors( $slug );81 $this->support_reps = $this->get_support_reps( $slug );82 76 } 77 78 $this->slug = $slug; 79 $this->plugin = $plugin; 80 $this->authors = $this->get_authors( $slug ); 81 $this->contributors = $this->get_contributors( $slug ); 82 $this->support_reps = $this->get_support_reps( $slug ); 83 83 } 84 84 85 85 public function do_view_sidebar() { … … 89 89 } 90 90 91 91 public function do_topic_sidebar() { 92 if ( file_exists( WPORGPATH . ' extend/plugins-plugins/_plugin-icons.php' ) ) {93 include_once WPORGPATH . ' extend/plugins-plugins/_plugin-icons.php';92 if ( file_exists( WPORGPATH . 'wp-content/plugins/plugin-directory/class-template.php' ) ) { 93 include_once WPORGPATH . 'wp-content/plugins/plugin-directory/class-template.php'; 94 94 } 95 95 96 96 $icon = ''; … … 102 102 $reviews = sprintf( '<a href="%s">%s</a>', home_url( '/plugin/' . esc_attr( $this->slug() ) . '/reviews/' ), __( 'Reviews', 'wporg-forums' ) ); 103 103 $create = ''; 104 104 105 if ( function_exists( 'wporg_get_plugin_icon' ) ) { 106 $icon = wporg_get_plugin_icon( $this->slug, 128 ); 105 if ( defined( 'WPORG_PLUGIN_DIRECTORY_BLOGID' ) && class_exists( '\WordPressdotorg\Plugin_Directory\Template' ) ) { 106 switch_to_blog( WPORG_PLUGIN_DIRECTORY_BLOGID ); 107 $icon = \WordPressdotorg\Plugin_Directory\Template::get_plugin_icon( $this->plugin, 'html' ); 108 restore_current_blog(); 107 109 } 108 110 109 111 $create_label = '';