Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add a resource section with useful links like the Codex, Lobby, and _s

  • Loading branch information...
commit 1d37aeee7eba5d24f7b3ae6e1ab2b7280950ebf2 1 parent 1cb8194
@mjangda mjangda authored
Showing with 27 additions and 0 deletions.
  1. +27 −0 developer.php
View
27 developer.php
@@ -391,6 +391,7 @@ public function settings_page() {
});
</script>';
+ // Plugins
add_settings_section( 'a8c_developer_plugins', esc_html__( 'Plugins', 'a8c-developer' ), array( $this, 'settings_section_plugins' ), self::PAGE_SLUG . '_status' );
foreach ( $this->recommended_plugins as $plugin_slug => $plugin_details ) {
if ( 'all' != $plugin_details['project_type'] && $plugin_details['project_type'] != $this->settings['project_type'] )
@@ -400,6 +401,7 @@ public function settings_page() {
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 );
}
+ // Constants
add_settings_section( 'a8c_developer_constants', esc_html__( 'Constants', 'a8c-developer' ), array( $this, 'settings_section_constants' ), self::PAGE_SLUG . '_status' );
foreach ( $this->recommended_constants as $constant => $description ) {
add_settings_field( 'a8c_developer_constant_' . $constant, $constant, array( $this, 'settings_field_constant' ), self::PAGE_SLUG . '_status', 'a8c_developer_constants', array(
@@ -408,6 +410,7 @@ public function settings_page() {
) );
}
+ // Settings
add_settings_section( 'a8c_developer_settings', esc_html__( 'Settings', 'a8c-developer' ), array( $this, 'settings_section_settings' ), self::PAGE_SLUG . '_status' );
add_settings_field( 'a8c_developer_setting_permalink_structure', esc_html__( 'Pretty Permalinks', 'a8c-developer' ), array( $this, 'settings_field_setting_permalink_structure' ), self::PAGE_SLUG . '_status', 'a8c_developer_settings' );
if ( 'wpcom-vip' == $this->settings['project_type'] ) {
@@ -415,6 +418,16 @@ public function settings_page() {
add_settings_field( 'a8c_developer_setting_shared_plugins', esc_html__( 'Shared Plugins', 'a8c-developer' ), array( $this, 'settings_field_setting_shared_plugins' ), self::PAGE_SLUG . '_status', 'a8c_developer_settings' );
}
+ // Resources
+ add_settings_section( 'a8c_developer_resources', esc_html__( 'Resources', 'a8c-developer' ), array( $this, 'settings_section_resources' ), self::PAGE_SLUG . '_status' );
+
+ add_settings_field( 'a8c_developer_setting_codex', esc_html__( 'Codex', 'a8c-developer' ), array( $this, 'settings_field_setting_resource_codex' ), self::PAGE_SLUG . '_status', 'a8c_developer_resources' );
+
+ if ( 'wpcom-vip' == $this->settings['project_type'] )
+ add_settings_field( 'a8c_developer_setting_vip_lobby', esc_html__( 'VIP Lobby', 'a8c-developer' ), array( $this, 'settings_field_setting_resource_vip_lobby' ), self::PAGE_SLUG . '_status', 'a8c_developer_resources' );
+
+ if ( in_array( $this->settings['project_type'], array( 'wporg-theme', 'wpcom-vip' ) ) )
+ add_settings_field( 'a8c_developer_setting_starter_themes', esc_html__( 'Starter Themes', 'a8c-developer' ), array( $this, 'settings_field_setting_resource_starter_themes' ), self::PAGE_SLUG . '_status', 'a8c_developer_resources' );
# Add more sections and fields here as needed
?>
@@ -541,6 +554,20 @@ public function settings_field_setting_shared_plugins() {
}
}
+ public function settings_section_resources() {}
+
+ public function settings_field_setting_resource_codex() {
+ _e( "The <a href='http://codex.wordpress.org/Developer_Documentation'>Developer Documentation section</a> of the Codex offers guidelines and references for anyone wishing to modify, extend, or contribute to WordPress.", 'a8c-developer' );
+ }
+
+ public function settings_field_setting_resource_vip_lobby() {
+ _e( "The <a href='http://lobby.vip.wordpress.com'>VIP Lobby</a> is a technical documentation resource for developing sites on WordPress.com including best practices and helpful tips to help you code better, faster, and stronger.", 'a8c-developer' );
+ }
+
+ public function settings_field_setting_resource_starter_themes() {
+ _e( "<a href='http://underscores.me'>_s (or underscores)</a>: a starter theme meant for hacking that will give you a \"1000-Hour Head Start\". Use it to create the next, most awesome WordPress theme out there.", 'a8c-developer' );
+ }
+
public function settings_validate( $raw_settings ) {
$settings = array();
Please sign in to comment.
Something went wrong with that request. Please try again.