Ejemplo n.º 1
0
 /**
  * Renders the field.
  *
  * This function will show the input field(s) in the WordPress admin.
  *
  * @since 0.5.0
  */
 public function render()
 {
     $parent_section = $this->get_parent();
     $parent_tab = $parent_section->get_parent();
     /**
      * This action can be used to display additional content on top of this field.
      *
      * @since 0.5.0
      * @param string the slug of the current field
      * @param array the arguments array for the current field
      * @param string the slug of the current section
      * @param string the slug of the current tab
      */
     do_action('wpod_field_before', $this->slug, $this->args, $parent_section->slug, $parent_tab->slug);
     $option = wpod_get_option($parent_tab->slug, $this->slug);
     $this->_field->display($option);
     if (!empty($this->args['description'])) {
         echo '<br/><span class="description">' . $this->args['description'] . '</span>';
     }
     /**
      * This action can be used to display additional content at the bottom of this field.
      *
      * @since 0.5.0
      * @param string the slug of the current field
      * @param array the arguments array for the current field
      * @param string the slug of the current section
      * @param string the slug of the current tab
      */
     do_action('wpod_field_after', $this->slug, $this->args, $parent_section->slug, $parent_tab->slug);
 }
 public function get_meta($field = '')
 {
     if ($field) {
         if (function_exists('wpod_get_option')) {
             return wpod_get_option('easy_customer_invoices_vendor', $field);
         }
         $options = get_option('easy_customer_invoices_vendor', array());
         if (isset($options[$field])) {
             return $options[$field];
         }
         return null;
     } else {
         if (function_exists('wpod_get_options')) {
             return wpod_get_options('easy_customer_invoices_vendor');
         }
         return get_option('easy_customer_invoices_vendor', array());
     }
 }
 public static function get_pdf_fill_color()
 {
     return wpod_get_option('easy_customer_invoices_data', 'fill_color');
 }