Add optional shortcode buttons

This commit is contained in:
Robin Cornett
2017-10-24 18:04:55 -04:00
parent c26d55b525
commit f8700975fa
14 changed files with 1055 additions and 42 deletions
@@ -134,14 +134,12 @@ class Display_Featured_Image_Genesis_Helper extends DisplayFeaturedImageGenesisG
* @param $args
*/
public function do_checkbox_array( $args ) {
$post_types = $this->get_content_types_built_in();
foreach ( $post_types as $post_type ) {
$object = get_post_type_object( $post_type );
foreach ( $args['options'] as $key => $value ) {
$type_args = array(
'setting' => "{$args['setting']}][{$post_type}",
'label' => $object->label,
'setting' => "{$args['setting']}][{$key}",
'label' => $value,
'setting_name' => $args['setting'],
'name' => $post_type,
'name' => $key,
);
$this->do_checkbox( $type_args );
}