Example #1
0
 /**
  * Show custom markup after the markup of the field.
  *
  * @param array $field
  * @since  1.0.0
  * @return string
  */
 static function after_field_simple($field)
 {
     $field_class = Pretty_Metabox::get_class_name($field);
     $output .= '</div></div>';
     return $output;
 }
 /**
  * Enqueue common styles
  *
  * @return void
  */
 public function admin_enqueue_scripts()
 {
     $screen = get_current_screen();
     if ($screen->base == 'profile' || $screen->base == 'user-edit') {
         $fields = Pretty_Metabox::get_fields($this->fields);
         foreach ($fields as $field) {
             // Enqueue scripts and styles for fields
             call_user_func(array(Pretty_Metabox::get_class_name($field), 'admin_enqueue_scripts'));
         }
     }
 }
Example #3
0
 /**
  * Enqueue common styles
  *
  * @return void
  */
 function admin_enqueue_scripts()
 {
     $screen = get_current_screen();
     // Enqueue scripts and styles for registered pages (post types) only
     if (!in_array($screen->taxonomy, $this->_meta_box['taxonomy'])) {
         return;
     }
     $fields = Pretty_Metabox::get_fields($this->fields);
     foreach ($fields as $field) {
         // Enqueue scripts and styles for fields
         call_user_func(array(Pretty_Metabox::get_class_name($field), 'admin_enqueue_scripts'));
     }
 }