/**
  * Return the content to display inside the widget. 
  *
  * @return  void
  * @access  public
  * @static
  * @since   1.2.0
  */
 public static function get_content()
 {
     charitable_admin_view('dashboard-widgets/donations-widget');
     die;
 }
 /**
  * Render field. This is the default callback used for all fields, unless an alternative callback has been specified. 
  *
  * @param   array       $args
  * @return  void
  * @access  public
  * @since   1.0.0
  */
 public function render_field($args)
 {
     $field_type = isset($args['type']) ? $args['type'] : 'text';
     charitable_admin_view('settings/' . $field_type, $args);
 }
 /**
  * Add a new benefactor block with AJAX.
  *
  * @return  void
  * @access  public
  * @since   1.2.0
  */
 public function add_benefactor_form()
 {
     $idx = isset($_POST['idx']) ? $_POST['idx'] : 0;
     if (!isset($_POST['extension'])) {
         wp_die('-1');
     }
     ob_start();
     charitable_admin_view('metaboxes/campaign-benefactors/form', array('benefactor' => null, 'extension' => $_POST['extension'], 'index' => "_{$idx}"));
     echo ob_get_clean();
     wp_die();
 }
 /**
  * Display table with available payment gateways.  
  *
  * @return  void
  * @access  public
  * @since   1.0.0
  */
 public function render_gateways_table($args)
 {
     charitable_admin_view('settings/gateways', $args);
 }
 /**
  * Display the fields to show inside a metabox.
  *
  * The fields parameter should contain an array of fields, 
  * all of which are arrays with a 'priority' key and a 'view' 
  * key.
  *
  * @param 	array $fields
  * @return 	void
  * @access 	public
  * @since 	1.0.0
  */
 public function display_fields(array $fields)
 {
     /**
      * Sort the fields by priority.
      */
     usort($fields, "charitable_priority_sort");
     /**
      * Loop over the fields and display each one using the view provided.
      */
     foreach ($fields as $field) {
         charitable_admin_view($field['view'], $field);
     }
 }
 /**
  * Render the page.
  *
  * @return  void
  * @access  public
  * @since   1.3.0
  */
 public function render_page()
 {
     charitable_admin_view('upgrades-page/page', array('page' => $this));
 }
 /**
  * Display advanced campaign fields. 
  *
  * @param   WP_Post         $post
  * @return  void
  * @access  public
  * @since   1.0.0
  */
 public function advanced_campaign_settings($post)
 {
     charitable_admin_view('metaboxes/campaign-advanced-settings', array('meta_boxes' => $this->get_advanced_meta_boxes()));
 }
 /**
  * Display table with emails.  
  *
  * @return  void
  * @access  public
  * @since   1.0.0
  */
 public function render_emails_table($args)
 {
     charitable_admin_view('settings/emails', $args);
 }
 /**
  * Add modal template to footer
  *
  * @param   string $which
  * @return 	void
  * @access 	public
  * @since   1.4.0
  */
 public function modal_forms()
 {
     global $typenow;
     /* Add the modal form. */
     if (in_array($typenow, array(Charitable::DONATION_POST_TYPE))) {
         charitable_admin_view('donations-page/export-form');
         charitable_admin_view('donations-page/filter-form');
     }
 }
 /**
  * Render the licenses table. 
  *
  * @param   mixed[] $args
  * @return  void
  * @access  public
  * @since   1.0.0
  */
 public function render_licenses_table($args)
 {
     charitable_admin_view('settings/licenses', $args);
 }
        if ($benefactor_object->is_active()) {
            $active_class = 'charitable-benefactor-active';
        } elseif ($benefactor_object->is_expired()) {
            $active_class = 'charitable-benefactor-expired';
        } else {
            $active_class = 'charitable-benefactor-inactive';
        }
        ?>
            <div class="charitable-metabox-block charitable-benefactor <?php 
        echo $active_class;
        ?>
">
                <?php 
        do_action('charitable_campaign_benefactor_meta_box', $benefactor_object, $extension);
        ?>
            </div>
            <?php 
    }
}
charitable_admin_view('metaboxes/campaign-benefactors/form', array('benefactor' => null, 'extension' => $extension));
if (!$ended) {
    ?>
        <p><a href="#" class="button" data-charitable-toggle="campaign_benefactor__0"><?php 
    _e('+ Add New Contribution Rule', 'charitable');
    ?>
</a></p> 
    <?php 
}
?>
    
</div>
示例#12
0
    ?>
                    <a href="<?php 
    echo admin_url('admin.php?page=charitable-donations-table');
    ?>
" class="charitable-clear-filters button-secondary"><?php 
    _e('Clear Filter', 'charitable');
    ?>
</a>
                <?php 
}
?>
            </span>
            <a href="#charitable-donations-export-modal" class="charitable-donations-export button-secondary" data-trigger-modal><?php 
_e('Export', 'charitable');
?>
</a>
            <?php 
charitable_admin_view('donations-page/search', array('table' => $donations_table));
?>
            
        </div>
        
        <?php 
$donations_table->display();
?>
        
    </form>
    <?php 
charitable_admin_view('donations-page/export', array('table' => $donations_table));
?>
</div>
 /**
  * Display the PayPal sandbox testing tool at the end of the PayPal gateway settings page.
  *
  * @param   string $group
  * @return  void
  * @access  public
  * @since   1.4.3
  */
 public function render_paypal_sandbox_test($group)
 {
     if ('gateways_paypal' != $group) {
         return;
     }
     charitable_admin_view('settings/paypal-sandbox-test', array());
 }
 /**
  * Display the Charitable welcome page.
  *
  * @return  void
  * @access  public
  * @since   1.0.0
  */
 public function render_welcome_page()
 {
     charitable_admin_view('welcome-page/page');
 }
 /**
  * Display the Charitable donations page. 
  *
  * @return  void
  * @access  public
  * @since   1.0.0
  */
 public function render_donations_page()
 {
     charitable_admin_view('donations-page');
 }