'no', __('Enabled', RPT_TXTDM ) => 'yes' ); return $options; } /* Defines currency select options. */ function dmb_rpts_is_currency_options() { $options = array ( __('Show', RPT_TXTDM ) => 'no', __('Hide', RPT_TXTDM ) => 'yes' ); return $options; } /* Hooks the metabox. */ add_action('admin_init', 'dmb_rpts_add_plan', 1); function dmb_rpts_add_plan() { add_meta_box( 'rpt_pricing_table', __('Manage your pricing table', RPT_TXTDM ), 'dmb_rpts_plan_display', // Below 'rpt_pricing_table', 'normal', 'high' ); } /* Displays the metabox. */ function dmb_rpts_plan_display() { global $post; /* Gets plan data. */ $pricing_table = get_post_meta( $post->ID, '_rpt_plan_group', true ); $fields_to_process = array( '_rpt_title', '_rpt_subtitle', '_rpt_recurrence', '_rpt_price', '_rpt_description', '_rpt_icon', '_rpt_recommended', '_rpt_free', '_rpt_features', '_rpt_btn_text', '_rpt_btn_link', '_rpt_btn_custom_btn', '_rpt_custom_classes', '_rpt_color' ); /* Retrieves select options. */ $is_highlight_plan_options = dmb_rpts_is_highlight_plan_options(); $is_currency_plan_options = dmb_rpts_is_currency_options(); wp_nonce_field( 'dmb_rpts_meta_box_nonce', 'dmb_rpts_meta_box_nonce' ); ?>