function recipress_insert_cost($meta_fields) { $cost = array('cost' => array('label' => __('Cost', 'recipress'), 'desc' => __('What does it cost to make this recipe?', 'recipress'), 'place' => __('$0.00', 'recipress'), 'size' => 'medium', 'id' => 'cost', 'type' => 'text')); if (recipress_options('cost_field') == 'yes') { return recipress_array_insert($meta_fields, 'yield', $cost, true); } else { return $meta_fields; } }
function recipress_insert_thumbnails($recipress_options_fields) { $thumbnails = array('thumbnails' => array('label' => __('Use Featured Image', 'recipress'), 'id' => 'use_photo', 'type' => 'radio', 'options' => array('yes' => array('label' => __('Yes', 'recipress'), 'value' => 'yes', 'desc' => __('Recipe photo will be the same as the post’s featured image', 'recipress'), 'default' => true), 'no' => array('label' => __('No', 'recipress'), 'value' => 'no', 'desc' => __('Use a different image for the recipe', 'recipress'))))); if (current_theme_supports('post-thumbnails')) { return recipress_array_insert($recipress_options_fields, 'theme', $thumbnails); } else { return $recipress_options_fields; } }