Skip to content

Instantly share code, notes, and snippets.

@wp-kitten
Created June 24, 2015 15:26
Show Gist options
  • Select an option

  • Save wp-kitten/f0fd79990e2c83435086 to your computer and use it in GitHub Desktop.

Select an option

Save wp-kitten/f0fd79990e2c83435086 to your computer and use it in GitHub Desktop.
NEW PB Dependency
<?php
$options = array(
'has_tabs' => true,
'css_selector' => '.',
'general' => array(
'title' => 'General options',
'options' => array(
array(
'id' => 'use_custom_style',
'name' => 'Map custom style',
'description' => 'Use a custom map style. You can get custom styles from <a href="'. $mapstyleurl .'" target="_blank">'. $mapstyleurl .'</a>.',
'type' => 'toggle2',
'std' => '',
'value' => 'yes'
),
// depends on the above option: 'id' => 'use_custom_style',
array(
'id' => 'custom_style',
'name' => 'Normal map style',
'description' => 'Paste your custom style here (Javascript style array). You can get custom styles from <a href="'. $mapstyleurl .'" target="_blank">'. $mapstyleurl .'</a>.',
'type' => 'textarea',
'std' => '',
'dependency' => array( 'element' => 'use_custom_style' , 'value'=> array('yes') ),
),
// depends on the above option: 'id' => 'use_custom_style',
array(
'id' => 'custom_style_active',
'name' => 'Active map style (when a popup is visible)',
'description' => 'Paste your custom style here (Javascript style array). You can get custom styles from <a href="'. $mapstyleurl .'" target="_blank">'. $mapstyleurl .'</a>.',
'type' => 'textarea',
'std' => '',
'dependency' => array( 'element' => 'use_custom_style' , 'value'=> array('yes') ),
),
)
)
)
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment