Changeset 2837014
- Timestamp:
- 12/21/2022 03:07:54 AM (3 years ago)
- Location:
- lbk-faqs-schema/trunk
- Files:
-
- 3 edited
-
faq-schema.php (modified) (previous)
-
includes/class.admin.php (modified) (2 diffs)
-
readme.txt (modified) (previous)
Legend:
- Unmodified
- Added
- Removed
-
lbk-faqs-schema/trunk/includes/class.admin.php
r2742089 r2837014 64 64 65 65 $custom_faqs = get_post_meta( $post_id, '_lbk_custom_faqs', true ); 66 $faqs_in_footer = get_post_meta( $post_id, '__lbk_faqs_in_footer_post', true ); 66 67 if (!$custom_faqs) $custom_faqs = array(); 68 if (!$faqs_in_footer) $faqs_in_footer = ''; 67 69 68 70 wp_nonce_field( 'lbk_custom_faqs_nonce'.$post_id, 'lbk_custom_faqs_nonce' ); 69 71 ?> 70 72 <label for="enable_faqs_footer_post"> 73 <input type="checkbox" name="lbk_faqs_in_footer_post" id="enable_faqs_footer_post" <?php echo ($faqs_in_footer) ? 'checked' : ''; ?>> 74 Hiển thị FAQs ở cuối bài 75 </label> 71 76 <div class="lbk_list_faqs" id="lbk_list_faqs"> 72 77 <a href="#" class="button" id="add_new_faqs_button" style="margin: 5px auto;">Add New</a> … … 125 130 delete_post_meta($post_id, '_lbk_custom_faqs'); 126 131 } 132 133 if ( isset( $_POST['lbk_faqs_in_footer_post'] ) ) { 134 update_post_meta($post_id, '__lbk_faqs_in_footer_post', lbk_sanitize_faqs_field( $_POST['lbk_faqs_in_footer_post'] )); 135 } 136 else { 137 delete_post_meta($post_id, '__lbk_faqs_in_footer_post'); 138 } 127 139 } 128 140
Note: See TracChangeset
for help on using the changeset viewer.