Avoiding stripping of HTML in Custom Taxonomy Meta Field

you can use esc_attr function save_taxonomy_custom_meta_bandcamp_embed_music( $term_id ) { if ( isset( $_POST[‘term_meta’] ) ) { $t_id = $term_id; $term_meta = get_option( “taxonomy_$t_id” ); $cat_keys = array_keys( $_POST[‘term_meta’] ); foreach ( $cat_keys as $key ) { if ( isset ( $_POST[‘term_meta’][$key] ) ) { $term_meta[$key] = esc_attr( $_POST[‘term_meta’][$key] ); // encoded text with HTML entities … Read more

Auto disable comments with custom field

Editing your code to use a custom field is fairly trivial… function close_comments( $posts ) { if ( !is_single() ) { return $posts; } $cmeta = get_post_meta($posts[0]->ID,’your_field_name’,true); if ( $posts[0]->post_date_gmt < $cmeta ) { $posts[0]->comment_status=”closed”; $posts[0]->ping_status=”closed”; } return $posts; } add_filter( ‘the_posts’, ‘close_comments’ ); I am not sure that that approach is the right one … Read more

Shortcut to widget/sidebar editing on the admin menu?

I think that using standard WP featurs there’s no shortcut. But you can workaround using a custom widget. As example create a very simple widget, something like: class MyPageWidget extends WP_Widget { function __construct() { parent::__construct( ‘MyPageWidget’, ‘My Page Widget’ ); } function widget( $args ) { $page = get_page_by_path(‘sidebar-page’); if ( ! empty($page) ) … Read more