Skip to content

Instantly share code, notes, and snippets.

@plugin-republic
Last active November 22, 2018 08:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save plugin-republic/647d22574d574b4a0ba307d7b59d4b48 to your computer and use it in GitHub Desktop.
Save plugin-republic/647d22574d574b4a0ba307d7b59d4b48 to your computer and use it in GitHub Desktop.
<?php
function my_spaced_filter_amenities_icons( $icons ) {
$icons['spaced_cctv'] = array(
'id' => 'spaced_cctv',
'icon' => 'icon-cctv',
'label' => __( 'CCTV', 'spaced' )
);
return $icons;
}
add_filter( 'spaced_filter_amenities_icons', 'my_spaced_filter_amenities_icons' );
function my_spaced_filter_posts_metaboxes( $metaboxes ) {
$metaboxes['2']['fields'][] = array(
'ID' => 'spaced_cctv',
'name' => 'spaced_cctv',
'title' => 'CCTV',
'type' => 'checkbox',
'icon' => 'icon-cctv',
'class' => 'htp-metafield-third'
);
return $metaboxes;
}
add_filter( 'spaced_filter_posts_metaboxes', 'my_spaced_filter_posts_metaboxes' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment