コード例 #1
0
ファイル: settings.php プロジェクト: kalushta/darom
 /**
  * Creates the tab for the page.
  */
 function init_tabs()
 {
     $this->tabs->add_after('general', 'escrow', __('Escrow', APP_TD));
     $this->tab_sections['escrow']['settings'] = array('title' => __('Settings', APP_TD), 'fields' => array(array('title' => __('Enable escrow', APP_TD), 'desc' => __('Yes', APP_TD), 'tip' => __('A premier/business account is required for allowing customers to process recurring payments via PayPal', APP_TD), 'type' => 'checkbox', 'name' => array('escrow', 'enabled')), array('title' => __('Retained Amount', APP_TD), 'tip' => __('The amount to retain on each escrow transaction.', APP_TD), 'type' => 'text', 'name' => array('escrow', 'retain_amount'), 'extra' => array('class' => 'small-text')), array('title' => __('Retain Type', APP_TD), 'tip' => __('Choose whether you want to receive a flat amount or a percentage based amount.', APP_TD), 'type' => 'select', 'name' => 'escrow_retain_type', 'name' => array('escrow', 'retain_type'), 'choices' => array('flat' => __('Flat', APP_TD), 'percent' => __('Percentage', APP_TD)))));
     $this->tab_sections['escrow']['gateways'] = array('title' => __('Installed Escrow Gateways', APP_TD), 'fields' => array());
     $gateways = APP_Gateway_Registry::get_escrow_gateways();
     foreach ($gateways as $gateway) {
         $this->tab_sections['escrow']['gateways']['fields'][] = $this->load_gateway_tabs($gateway);
     }
     add_action('admin_notices', array($this, 'disabled_gateway_warning'));
     add_action('admin_notices', array($this, 'invalid_account_type_warning'));
 }