This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

Get transparent textures

  • Creator
    Topic
  • #5842
    royeyal
    Participant

    Hey there
    I saw that there’s a themeblvd_get_textures() function on helpers.php.
    How do I add it as a select box with the options framework? It returns an array, but I can’t figure out how to insert it as an option.
    (Yes, I’m THAT good with PHP ¯\(°_o)/¯ )

Viewing 4 replies - 1 through 4 (of 4 total)
  • Author
    Replies
  • #5858
    Jason Bobich
    Keymaster

    Here’s an example:

    $texture_options = array( 'none' => __( 'None', 'themeblvd' ) );
    $textures = themeblvd_get_textures();
    foreach( $textures as $id => $atts )
    	$texture_options[$id] = $atts['name'];

    Then this $texture_options could be used as the ‘option’ value for your ‘select’ option type.

    #6042
    royeyal
    Participant

    Works like a charm. Thanks!

    BTW, one of the textures is names “Light Carbon Diagonol”.

    #6053
    Jason Bobich
    Keymaster

    Thanks, I’ll make the edit. — I just had to google what you wrote to see that diagonal is spelt wrong.

    #6054
    royeyal
    Participant

    Lol 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.