Skip to content

Commit 329fa52

Browse files
committed
removed all toggle checkbox code
1 parent d25c836 commit 329fa52

File tree

1 file changed

+0
-36
lines changed

1 file changed

+0
-36
lines changed

archive-pages-taxonomy.php

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,6 @@ function archive_pages_settings_init() {
8888
//each taxonomy gets a section
8989
add_settings_section($section_name, $section_heading, '', 'archive-pages');
9090

91-
//checkbox to show/hide this section
92-
//this setting should hide the term pulldowns, AND it should disable term_links filter for this taxonomy even if individual fields are set in
93-
94-
archive_pages_taxonomy_toggle( $taxonomy, $section_name );
9591

9692
//display this if checkbox is checked
9793
archive_pages_settings_fields( $terms, 'name', $section_name);
@@ -127,39 +123,7 @@ function archive_pages_filter_archive_titles($args) {
127123
));
128124
}
129125

130-
/**
131-
* create toggle checkbox for each taxonomy
132-
*
133-
* */
134-
function archive_pages_taxonomy_toggle( $taxonomy, $section_name ){
135-
136-
register_setting('archive_pages_settings', 'archive_page_toggle_' . $taxonomy);
137-
138-
add_settings_field(
139-
'archive_page_toggle_'.$taxonomy, //slug-name to identify field
140-
'Set archive pages for '.$taxonomy, //title or label of field
141-
'archive_pages_taxonomy_toggle_callback', //callback
142-
'archive-pages', //settings page
143-
$section_name, //section of settings page
144-
array( )
145-
);
146-
147-
}
148-
149-
/**
150-
* render checkbox for each taxonomy
151-
* @link https://code.tutsplus.com/the-wordpress-settings-api-part-8-validation-sanitisation-and-input-i--wp-25361t
152-
* */
153-
function archive_pages_taxonomy_toggle_callback( ) {
154-
$options = get_option( 'archive-pages' );
155-
156-
$html = '<input type="checkbox" id="checkbox_example" name="sandbox_theme_input_examples[checkbox_example]" />';
157-
158126

159-
$html .= '<label for="checkbox_example">This is an example of a checkbox</label>';
160-
161-
echo $html;
162-
}
163127

164128
/**
165129
* Loop through list of archives and output nice label

0 commit comments

Comments
 (0)