Ejemplo n.º 1
0
 /**
  * displays a vertical list of optional icons, for use inside panels
  * 
  * the icons can be setup by passing values to this function or add the values to the help array (class-help.php)
  * 
  * @param string $form_name required to create id
  * @param boolean $trash reset the form, usually found on large forms
  * @param string $youtube pass the video id and nothing else
  * @param integer $information pass the array key for ['help'] in the menu array for the feature icon is for
  */
 public function metabox_icons($form_id, $trash_icon = false)
 {
     // do not show metabox icons on dashboard
     if (CSV2POST::is_dashboard()) {
         return false;
     }
     global $c2pm, $c2p_page_name, $c2p_tab_number;
     // load help array
     $CSV2POST_Help = CSV2POST::load_class('C2P_Help', 'class-help.php', 'classes');
     $help_array = $CSV2POST_Help->get_help_array();
     $total_icons = 0;
     $page_name = self::get_admin_page_name();
     // display video icon with link to a YouTube video
     if (isset($help_array[$page_name][WTG_CSV2POST_VIEWNAME]['forms'][$form_id]['formvideoid'])) {
         self::panel_video_icon($help_array[$page_name][WTG_CSV2POST_VIEWNAME]['forms'][$form_id]['formvideoid']);
         ++$total_icons;
     }
     // do we have all required values to build help content and display form_information_icon()
     if (isset($help_array[$page_name][WTG_CSV2POST_VIEWNAME]['forms'][$form_id]['formtitle']) && isset($help_array[$page_name][WTG_CSV2POST_VIEWNAME]['forms'][$form_id]['formabout'])) {
         // display the icon that will show information about the box when clicked
         self::box_information_icon($page_name, WTG_CSV2POST_VIEWNAME, $form_id);
     }
     // display a trash icon which allows box to be quickly hidden
     if ($trash_icon) {
         $this->panel_trash_icon($form_id);
         ++$total_icons;
     }
 }