Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixed bug with external url parameter

  • Loading branch information...
commit d5aa7840d86280a7557b312fb60624dba5213342 1 parent 87138b9
@thomasgriffin thomasgriffin authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 tgm-plugin-activation/class-tgm-plugin-activation.php
View
6 tgm-plugin-activation/class-tgm-plugin-activation.php
@@ -655,8 +655,8 @@ public function notices() {
foreach ( $plugin_groups as $plugin_group_single_name ) {
$external_url = $this->_get_plugin_data_from_name( $plugin_group_single_name, 'external_url' );
$source = $this->_get_plugin_data_from_name( $plugin_group_single_name, 'source' );
-
- if ( ! $external_url || preg_match( '|^http(s)?://|', $external_url ) ) {
+
+ if ( $external_url && preg_match( '|^http(s)?://|', $external_url ) ) {
$linked_plugin_groups[] = '<a href="' . esc_url( $external_url ) . '" title="' . $plugin_group_single_name . '" target="_blank">' . $plugin_group_single_name . '</a>';
}
elseif ( ! $source || preg_match( '|^http://wordpress.org/extend/plugins/|', $source ) ) {
@@ -1066,7 +1066,7 @@ protected function _gather_plugin_data() {
$external_url = $this->_get_plugin_data_from_name( $plugin['name'], 'external_url' );
$source = $this->_get_plugin_data_from_name( $plugin['name'], 'source' );
- if ( ! $external_url || preg_match( '|^http(s)?://|', $external_url ) ) {
+ if ( $external_url && preg_match( '|^http(s)?://|', $external_url ) ) {
$table_data[$i]['plugin'] = '<strong><a href="' . esc_url( $external_url ) . '" title="' . $plugin['name'] . '" target="_blank">' . $plugin['name'] . '</a></strong>';
}
elseif ( ! $source || preg_match( '|^http://wordpress.org/extend/plugins/|', $source ) ) {
Please sign in to comment.
Something went wrong with that request. Please try again.