PluginProbe
StreamCast – bring live radio to your site with a sleek player / 2.2.3
StreamCast – bring live radio to your site with a sleek player v2.2.3
2.4.5 2.4.4 trunk 1.0 1.1 2.0.0 2.1.10 2.1.2 2.1.4 2.1.5 2.1.8 2.2.1 2.2.3 2.2.4 2.2.5 2.3.0 2.3.1 2.3.2 2.3.3 2.3.4 2.3.5 2.3.6 2.3.7 2.3.8 2.3.9 All 29 releases
streamcast / admin / codestar-framework / samples / taxonomy-options.php

taxonomy-options.php in StreamCast – bring live radio to your site with a sleek player 2.2.3, at admin/codestar-framework/samples/taxonomy-options.php

89 lines 1.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access directly.
2
3 //
4 // Set a unique slug-like ID
5 //
6 $prefix = '_prefix_taxonomy_options';
7
8 //
9 // Create taxonomy options
10 //
11 CSF::createTaxonomyOptions( $prefix, array(
12 'taxonomy' => 'category',
13 ) );
14
15 //
16 // Create a section
17 //
18 CSF::createSection( $prefix, array(
19 'fields' => array(
20
21 //
22 // A text field
23 //
24 array(
25 'id' => 'opt-text',
26 'type' => 'text',
27 'title' => 'Text',
28 ),
29
30 array(
31 'id' => 'opt-textarea',
32 'type' => 'textarea',
33 'title' => 'Textarea',
34 'help' => 'The help text of the field.',
35 ),
36
37 array(
38 'id' => 'opt-upload',
39 'type' => 'upload',
40 'title' => 'Upload',
41 ),
42
43 array(
44 'id' => 'opt-switcher',
45 'type' => 'switcher',
46 'title' => 'Switcher',
47 'label' => 'The label text of the switcher.',
48 ),
49
50 array(
51 'id' => 'opt-color',
52 'type' => 'color',
53 'title' => 'Color',
54 'default' => '#3498db',
55 ),
56
57 array(
58 'id' => 'opt-checkbox',
59 'type' => 'checkbox',
60 'title' => 'Checkbox',
61 'label' => 'The label text of the checkbox.',
62 ),
63
64 array(
65 'id' => 'opt-radio',
66 'type' => 'radio',
67 'title' => 'Radio',
68 'options' => array(
69 'yes' => 'Yes, Please.',
70 'no' => 'No, Thank you.',
71 ),
72 'default' => 'yes',
73 ),
74
75 array(
76 'id' => 'opt-select',
77 'type' => 'select',
78 'title' => 'Select',
79 'placeholder' => 'Select an option',
80 'options' => array(
81 'opt-1' => 'Option 1',
82 'opt-2' => 'Option 2',
83 'opt-3' => 'Option 3',
84 ),
85 ),
86
87 )
88 ) );
89