Title: Modifying an Array
Last modified: January 10, 2017

---

# Modifying an Array

 *  Resolved [mstarks01](https://wordpress.org/support/users/mstarks01/)
 * (@mstarks01)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/modifying-an-array/)
 * Hiya,
 * I’m trying to modify an array. In the following array in functions.php, I added
   a line to the end and created a snippet from this. I thought it would override
   the array in functions.php but I must be misunderstanding how it works. Any tips
   appreciated.
 * //* Add support for additional color style options
    add_theme_support( ‘genesis-
   style-selector’, array( ‘enterprise-pro-black’ => __( ‘Enterprise Pro Black’,‘
   enterprise’ ), ‘enterprise-pro-green’ => __( ‘Enterprise Pro Green’, ‘enterprise’),‘
   enterprise-pro-orange’ => __( ‘Enterprise Pro Orange’, ‘enterprise’ ), ‘enterprise-
   pro-red’ => __( ‘Enterprise Pro Red’, ‘enterprise’ ), ‘enterprise-pro-teal’ =
   > __( ‘Enterprise Pro Teal’, ‘enterprise’ ), ‘enterprise-pro-teal’ => __( ‘Enterprise
   Pro Teal’, ‘enterprise’ ), ‘custom-color’ => __( ‘ISSA Fort Worth’, ‘enterprise’),));

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Shea Bunge](https://wordpress.org/support/users/bungeshea/)
 * (@bungeshea)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/modifying-an-array/#post-8658347)
 * You’re on the right track, but you’ll need to wrap it in an action hook so the
   theme does not override it.
 *     ```
       add_action( 'after_setup_theme', function () {
   
       	add_theme_support( 'genesis-style-selector', array(
       		'enterprise-pro-black' => __( 'Enterprise Pro Black', 'enterprise' ),
       		'enterprise-pro-green' => __( 'Enterprise Pro Green', 'enterprise' ),
       		'enterprise-pro-orange' => __( 'Enterprise Pro Orange', 'enterprise' ),
       		'enterprise-pro-red' => __( 'Enterprise Pro Red', 'enterprise' ),
       		'enterprise-pro-teal' => __( 'Enterprise Pro Teal', 'enterprise' ),
       		'enterprise-pro-teal' => __( 'Enterprise Pro Teal', 'enterprise' ),
       		'custom-color' => __( 'ISSA Fort Worth', 'enterprise' ),
       	) );
   
       }, 999 );
       ```
   
 *  Thread Starter [mstarks01](https://wordpress.org/support/users/mstarks01/)
 * (@mstarks01)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/modifying-an-array/#post-8682225)
 * Thanks, Shea. Much appreciated.
 *  Plugin Author [Shea Bunge](https://wordpress.org/support/users/bungeshea/)
 * (@bungeshea)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/modifying-an-array/#post-8683644)
 * Glad you could get it working 🙂

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Modifying an Array’ is closed to new replies.

 * ![](https://ps.w.org/code-snippets/assets/icon.svg?rev=2148878)
 * [Code Snippets](https://wordpress.org/plugins/code-snippets/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/code-snippets/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/code-snippets/)
 * [Active Topics](https://wordpress.org/support/plugin/code-snippets/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/code-snippets/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/code-snippets/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Shea Bunge](https://wordpress.org/support/users/bungeshea/)
 * Last activity: [9 years, 3 months ago](https://wordpress.org/support/topic/modifying-an-array/#post-8683644)
 * Status: resolved