true ) );
$options = get_option( 'alertme_options', array() );
$title = apply_filters( 'alertme_meta_box_title', __( 'AlertMe', 'alert-me' ) );
foreach( $post_types as $post_type ) {
if (isset($options['display_alert_me_post_type'])):
if (array_key_exists($post_type , $options['display_alert_me_post_type'])) {
add_meta_box( 'alert_me_meta', $title, 'alert_me_meta_box_content', $post_type, 'side', 'default' );
}
endif;
}
}
function alert_me_meta_box_content( $post ) {
$post_type = get_post_type( $post );
$options = get_option( 'alertme_options', array() );
$alertme_enable_post_alertme = get_post_meta( get_the_ID(), 'alertme_enable_post_alertme', true );
?>
array(
'selected' => ( 'bottom' == $options['alert_me_position'] ) ? ' selected="selected"' : '',
'string' => __( 'bottom', 'alert-me' )
),
'top' => array(
'selected' => ( 'top' == $options['alert_me_position'] ) ? ' selected="selected"' : '',
'string' => __( 'top', 'alert-me' )
),
'both' => array(
'selected' => ( 'both' == $options['alert_me_position'] ) ? ' selected="selected"' : '',
'string' => __( 'top & bottom', 'alert-me' )
)
);
if ( $option_box ) {
$html .= '';
return $html;
} else {
$html = '';
$html .= $positions[$options['position']]['string'];
$html .= '';
return esc_html($html);
}
}
?>