2017 © Pedro Peláez
 

library voce-theme-customizer

Adds several Theme Customizer controls

image

voceconnect/voce-theme-customizer

Adds several Theme Customizer controls

  • Wednesday, November 18, 2015
  • by kevinlangleyjr
  • Repository
  • 15 Watchers
  • 2 Stars
  • 1,076 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 11 Versions
  • 4 % Grown

The README.md

Voce Theme Customizer

Contributors: banderon, kevinlangleyjr
Tags: theme, customizer, image, media, library, dropdown, textarea
Requires at least: 3.5.0
Tested up to: 3.6
Stable tag: 1.2.1
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html, (*1)

Description

Adds several Theme Customizer controls., (*2)

  • An image selector that uses the Media Library, saving either the image source (as WordPress currently does) or the image ID
  • A dropdown
  • A textarea
  • A Post Selection UI

Installation

As standard plugin:

See Installing Plugins., (*3)

Usage

Example with an image, saving the image src

add_section( 'new_section' , array(
        'title'    => 'New Section',
        'priority' => 30,
    ) );

    $id = 'new_image';
    $wp_customize->add_setting( $id );
    $wp_customize->add_control( new Voce_Customize_Image_Control( $wp_customize, $id, array(
        'label'    => 'My New Image',
        'settings' => $id,
        'section'  => 'new_section',
    ) ) );
} );
?>

Example with an image, saving the image ID

add_section( 'new_section' , array(
        'title'    => 'New Section',
        'priority' => 30,
    ) );

    $id = 'new_image';
    $wp_customize->add_setting( $id );
    $wp_customize->add_control( new Voce_Customize_Image_Control( $wp_customize, $id, array(
        'label'         => 'My New Image',
        'settings'      => $id,
        'section'       => 'new_section',
        'output_format' => 'id',
    ) ) );
} );
?>

Example with a dropdown and a textarea

add_section( 'new_section' , array(
        'title'    => 'New Section',
        'priority' => 30,
    ) );

    $id1 = 'new_dropdown';
    $opts = array(
        'val1' => 'Value 1',
        'val2' => 'Value 2',
        'val3' => 'Value 3',
        'val4' => 'Value 4',
    );
    $wp_customize->add_setting( $id1 );
    $wp_customize->add_control( new Voce_Customize_Dropdown_Control( $wp_customize, $id1, array(
        'label'         => 'My New Dropdown',
        'settings'      => $id1,
        'section'       => 'new_section',
        'options'       => $opts,
    ) ) );

    $id2 = 'new_textarea';
    $wp_customize->add_setting( $id2 );
    $wp_customize->add_control( new Voce_Customize_Textarea_Control( $wp_customize, $id2, array(
        'label'         => 'My New Textarea',
        'settings'      => $id2,
        'section'       => 'new_section',
    ) ) );
} );
?>

Options

Image Control: output_format - specifies whether to save the src (default) or the id of the image, (*4)

Dropdown Control: options - an array with which to populate the dropdown, (*5)

1.2.1
Added a validate_file() check around included controls., (*6)

1.2
Better autoload handling to allow for unit testing and analysis of code coverage of theme that uses plugin as a dependency., (*7)

1.1.1
Fixing save issue when multiple Post Selection UI controls are used., (*8)

1.1
Adding Post Selection UI control., (*9)

1.0
Initial version., (*10)

The Versions

18/11 2015

dev-master

9999999-dev

Adds several Theme Customizer controls

  Sources   Download

GPLv2+

The Requires

 

by Jeff Stieler
by Gary Smirny
by Curtis Loisel
by Kevin Langley

wordpress media customizer

18/11 2015

1.2.1

1.2.1.0

Adds several Theme Customizer controls

  Sources   Download

GPLv2+

The Requires

 

by Jeff Stieler
by Gary Smirny
by Curtis Loisel
by Kevin Langley

wordpress media customizer

10/09 2015

1.2.0

1.2.0.0

Adds several Theme Customizer controls

  Sources   Download

GPLv2+

The Requires

 

by Jeff Stieler
by Gary Smirny
by Curtis Loisel
by Kevin Langley

wordpress media customizer

10/09 2015

dev-better_autoload

dev-better_autoload

Adds several Theme Customizer controls

  Sources   Download

GPLv2+

The Requires

 

by Jeff Stieler
by Gary Smirny
by Curtis Loisel
by Kevin Langley

wordpress media customizer

21/08 2015

dev-fixing_multiple_psu_save_issue

dev-fixing_multiple_psu_save_issue

Adds several Theme Customizer controls

  Sources   Download

GPLv2+

The Requires

 

by Jeff Stieler
by Gary Smirny
by Curtis Loisel
by Kevin Langley

wordpress media customizer

21/08 2015

1.1.1

1.1.1.0

Adds several Theme Customizer controls

  Sources   Download

GPLv2+

The Requires

 

by Jeff Stieler
by Gary Smirny
by Curtis Loisel
by Kevin Langley

wordpress media customizer

20/08 2015

1.1.0

1.1.0.0

Adds several Theme Customizer controls

  Sources   Download

GPLv2+

The Requires

 

by Jeff Stieler
by Gary Smirny
by Curtis Loisel
by Kevin Langley

wordpress media customizer

22/01 2014

v1.0.7

1.0.7.0

Adds several Theme Customizer controls

  Sources   Download

GPLv2+

The Requires

 

by Jeff Stieler
by Gary Smirny
by Curtis Loisel

wordpress media customizer

22/01 2014

v1.0.6

1.0.6.0

Adds several Theme Customizer controls

  Sources   Download

GPLv2+

The Requires

 

by Jeff Stieler
by Gary Smirny
by Curtis Loisel

wordpress media customizer

20/12 2013

v1.0.5

1.0.5.0

Adds several Theme Customizer controls

  Sources   Download

GPLv2+

The Requires

 

by Gary Smirny

wordpress media customizer

20/12 2013

v1.0.0

1.0.0.0

Adds several Theme Customizer controls

  Sources   Download

GPLv2+

The Requires

 

by Gary Smirny

wordpress media customizer