function nprstory_push_post_type_callback() { $post_types = get_post_types(); nprstory_show_post_types_select('ds_npr_push_post_type', $post_types); echo '<div> If you change the Push Post Type setting remember to update the mappings for API Fields at <a href="' . admin_url('options-general.php?page=ds_npr_api_push_mapping') . '">NPR API Field Mapping </a> page.</div>'; }
function test_nprstory_show_post_types_select() { $field_name = 'test_field'; update_option($field_name, 'test_value'); $this->expectOutputRegex('/<div><select id\\=' . $field_name . '.*/'); nprstory_show_post_types_select($field_name, array()); }