<?php
/**
 * Plugin Name: Settings Customizer
 * Plugin Author: celloexpressions
 * Description: Adds all of WordPress' core settings to a panel in the Customizer. Currently just adds panel & sections.
 * Version: 0.0
 */

// Enqueue scripts

// Register all settings and controls.
add_action( 'customize_register', 'settings_customizer_register' );
function settings_customizer_register( $wp_customize ) {
	// Register settings in the Customizer.
	
	
	// Add the Settings panel.
	$wp_customize->add_panel( 'settings', array(
		'title' => __( 'Settings' ),
		'description' => __( 'All of these settings are also found in the WordPress adminstration interface, under the "Settings" menu.' ),
		'priority' => 200,
	) );

	// Add sections to organize the controls.
	$wp_customize->add_section( 'administration', array(
		'title'    => __( 'Administration' ),
		'panel'    => 'settings',
		'priority' => 5,// admin email, convert emotions, correct xhtml nesting, default post category, default post format, (default link category)
	) );
	$wp_customize->add_section( 'datetime', array(
		'title'    => __( 'Date and Time' ), // Locale instead?
		'panel'    => 'settings',
		'priority' => 10,// language, timezone, date format, time format, (week starts on, if not removed)
	) );
	$wp_customize->add_section( 'media', array(
		'title'    => __( 'Media' ),
		'panel'    => 'settings',
		'priority' => 15,// image sizes thumbnail, medium, large, crop or proportional thumbnails
	) );
	$wp_customize->add_section( 'discussion', array(
		'title'    => __( 'Discussion' ),
		'panel'    => 'settings',
		'priority' => 20,// give this a major overhaul
	) );
	$wp_customize->add_section( 'under_hood', array(
		'title'    => __( 'Under the Hood' ),
		'description' => __( 'These settings should only be changed once, when you first set up your site. Use caution when changing them later.' ),
		'panel'    => 'settings',
		'priority' => 25, // search engine visibility, permalinks, 
	) );
	
	// uncategorized settings: blog pages show X posts, feeds,
	
	// @todo these are placeholders for mockup purposes.
	$sections = array( 'administration', 'datetime', 'discussion', 'media', 'under_hood' );
	foreach ( $sections as $section ) {
		$wp_customize->add_setting( $section, array( 'default' => '', 'type' => 'option' ) );
		$wp_customize->add_control( $section, array( 'type' => 'text', 'label' => ucfirst($section), 'section' => $section ) );
	}
}





