Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added 'Details' button to plugins on Settings page

Adds Thickbox Details link for all plugins on Settings page. Opens
Plugin Details modal window just like normal plugin administration.

Fixes #9
  • Loading branch information...
commit 7239ecaeb9e8bf4e03b61fec8298ddd17540807a 1 parent 8f4532f
@nickdaugherty nickdaugherty authored
Showing with 18 additions and 4 deletions.
  1. +13 −3 developer.php
  2. +5 −1 readme.txt
View
16 developer.php
@@ -5,7 +5,7 @@
Plugin Name: Developer
Plugin URI: http://wordpress.org/extend/plugins/developer/
Description: The first stop for every WordPress developer
-Version: 1.1.5
+Version: 1.1.6
Author: Automattic
Author URI: http://automattic.com
License: GPLv2 or later
@@ -24,7 +24,7 @@ class Automattic_Developer {
public $settings = array();
public $default_settings = array();
- const VERSION = '1.1.5';
+ const VERSION = '1.1.6';
const OPTION = 'a8c_developer';
const PAGE_SLUG = 'a8c_developer';
@@ -441,6 +441,10 @@ public function settings_page() {
// Plugins
add_settings_section( 'a8c_developer_plugins', esc_html__( 'Plugins', 'a8c-developer' ), array( $this, 'settings_section_plugins' ), self::PAGE_SLUG . '_status' );
+ wp_enqueue_script( 'plugin-install' );
+
+ add_thickbox();
+
$recommended_plugins = $this->get_recommended_plugins();
foreach ( $recommended_plugins as $plugin_slug => $plugin_details ) {
@@ -451,7 +455,13 @@ public function settings_page() {
$plugin_details = array_merge( (array) $details, array( 'slug' => $plugin_slug ), $plugin_details );
- add_settings_field( 'a8c_developer_plugin_' . $plugin_slug, $plugin_details['name'], array( $this, 'settings_field_plugin' ), self::PAGE_SLUG . '_status', 'a8c_developer_plugins', $plugin_details );
+ $label = '<strong>' . esc_html( $plugin_details['name'] ) . '</strong>';
+
+ $label .= '<br /><a href="' . self_admin_url( 'plugin-install.php?tab=plugin-information&amp;plugin=' . $plugin_slug .
+ '&amp;TB_iframe=true&amp;width=600&amp;height=550' ) . '" class="thickbox" title="' .
+ esc_attr( sprintf( __( 'More information about %s' ), $plugin_details['name'] ) ) . '">' . __( 'Details' ) . '</a>';
+
+ add_settings_field( 'a8c_developer_plugin_' . $plugin_slug, $label, array( $this, 'settings_field_plugin' ), self::PAGE_SLUG . '_status', 'a8c_developer_plugins', $plugin_details );
}
// Constants
View
6 readme.txt
@@ -3,7 +3,7 @@ Contributors: automattic, batmoo, Viper007Bond, nbachiyski, tott, danielbachhube
Tags: developer, development, local
Requires at least: 3.4
Tested up to: 3.5.1
-Stable tag: 1.1.5
+Stable tag: 1.1.6
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -40,6 +40,10 @@ Because you haven't asked one yet.
== Changelog ==
+= 1.1.6 (2013-04-08) =
+* Made purpose of activate/install links on Settings page more obvious
+* Added link to full plugin details on Settings page (opens in Thickbox)
+
= 1.1.5 (2013-04-05) =
* Added ability to define multiple project types for plugins
* Added ability to define project types for constants
Please sign in to comment.
Something went wrong with that request. Please try again.