Skip to content
This repository
Browse code

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

  • Loading branch information...
commit 1d37aeee7eba5d24f7b3ae6e1ab2b7280950ebf2 1 parent 1cb8194
Mohammad Jangda mjangda authored

Showing 1 changed file with 27 additions and 0 deletions. Show diff stats Hide diff stats

  1. +27 0 developer.php
27 developer.php
@@ -391,6 +391,7 @@ public function settings_page() {
391 391 });
392 392 </script>';
393 393
  394 + // Plugins
394 395 add_settings_section( 'a8c_developer_plugins', esc_html__( 'Plugins', 'a8c-developer' ), array( $this, 'settings_section_plugins' ), self::PAGE_SLUG . '_status' );
395 396 foreach ( $this->recommended_plugins as $plugin_slug => $plugin_details ) {
396 397 if ( 'all' != $plugin_details['project_type'] && $plugin_details['project_type'] != $this->settings['project_type'] )
@@ -400,6 +401,7 @@ public function settings_page() {
400 401 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 );
401 402 }
402 403
  404 + // Constants
403 405 add_settings_section( 'a8c_developer_constants', esc_html__( 'Constants', 'a8c-developer' ), array( $this, 'settings_section_constants' ), self::PAGE_SLUG . '_status' );
404 406 foreach ( $this->recommended_constants as $constant => $description ) {
405 407 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() {
408 410 ) );
409 411 }
410 412
  413 + // Settings
411 414 add_settings_section( 'a8c_developer_settings', esc_html__( 'Settings', 'a8c-developer' ), array( $this, 'settings_section_settings' ), self::PAGE_SLUG . '_status' );
412 415 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' );
413 416 if ( 'wpcom-vip' == $this->settings['project_type'] ) {
@@ -415,6 +418,16 @@ public function settings_page() {
415 418 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' );
416 419 }
417 420
  421 + // Resources
  422 + add_settings_section( 'a8c_developer_resources', esc_html__( 'Resources', 'a8c-developer' ), array( $this, 'settings_section_resources' ), self::PAGE_SLUG . '_status' );
  423 +
  424 + 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' );
  425 +
  426 + if ( 'wpcom-vip' == $this->settings['project_type'] )
  427 + 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' );
  428 +
  429 + if ( in_array( $this->settings['project_type'], array( 'wporg-theme', 'wpcom-vip' ) ) )
  430 + 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' );
418 431
419 432 # Add more sections and fields here as needed
420 433 ?>
@@ -541,6 +554,20 @@ public function settings_field_setting_shared_plugins() {
541 554 }
542 555 }
543 556
  557 + public function settings_section_resources() {}
  558 +
  559 + public function settings_field_setting_resource_codex() {
  560 + _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' );
  561 + }
  562 +
  563 + public function settings_field_setting_resource_vip_lobby() {
  564 + _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' );
  565 + }
  566 +
  567 + public function settings_field_setting_resource_starter_themes() {
  568 + _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' );
  569 + }
  570 +
544 571 public function settings_validate( $raw_settings ) {
545 572 $settings = array();
546 573

0 comments on commit 1d37aee

Please sign in to comment.
Something went wrong with that request. Please try again.