Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1070565
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T20:34:56+00:00 2026-05-16T20:34:56+00:00

My wordpress theme accepts skin files. These skin files all install into my main

  • 0

My wordpress theme accepts skin files. These skin files all install into my main theme folder via a zip uploader that’s part of my theme.

Each skin has a set of custom color codes (4 in all) that are stored in the wordpress options table like so…

Assume the skin name is “halloween”…These are the values in my options.php for one of my skin values…

halloween_color1 = 000000
halloween_color2 = ff0000
halloween_color3 = 777777
halloween_color4 = 333333

So I just need a means to store these values inside of each new skin’s folder (the one that I send to people who use my theme) so that when they install the skin (via a simple zip extractor upload) I can place code into my zip extractor to write the skin’s custom color values to the database.

I’m assuming a simple, colors.txt or colors.xml file will suffice.

How should I store the data in the text file in order to easily parse it and write it to the database? Name/value pairs or XML?

<skin>
<color name="halloween_color1" value="000000" />
<color name="halloween_color2" value="000000" />
<color name="halloween_color3" value="000000" />
<color name="halloween_color1" value="000000" />
</skin>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T20:34:57+00:00Added an answer on May 16, 2026 at 8:34 pm

    There are several options. Two that PHP can read natively are ini and CSV.

    INI example:

    [skin]
    halloween_color1 = 000000
    halloween_color2 = ff0000
    halloween_color3 = 777777
    halloween_color4 = 333333
    

    CSV example:

    halloween_color1;000000
    halloween_color2;ff0000
    halloween_color3;777777
    halloween_color4;333333
    

    For me personally, YAML has become the favourite format for human-readable configuration files.

    YAML example:

    skin:
     halloween_colors:
       - 000000
       - ff0000
       - 777777
       - 333333
    

    its advantages in my view are:

    • Parsing is very strict; it will exit immediately and throw an error if it doesn’t like the file’s structure

    • It supports nested data structures, the building of associative arrays, typing, and lists (Useful e.g. if you want to add a fifth halloween colour)

    But, it needs a third party library. Whether that is justified, you have to decide.
    See a list of PHP parser libraries here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm attempting to place some embed code into a Premium WordPress Theme. NOTE: I'm
I have a WordPress theme and I'm using a few jQuery plugins within it.
I'm doing a WordPress theme and I have Share your story page, where everybody
I'm creating a WordPress theme, and I'm wondering why I should even use a
I am a Wordpress Theme Developer (Freelancer) and I make somewhere between 1-2 Themes
I'm a WordPress theme developer and on a theme I'm working on, I've turned
I'm building a Wordpress theme, and I would like it to work without having
Any one provide me best IDE for wordpress theme and plugin editing in windows.
I want to split my WordPress theme (I'm working from The Buffet Framework )
I'd like to make the background of a Gtk+ window transparent so that only

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.