Beispiel #1
0
 /**
  * Loads Intern data, Worpdress Posts data and marked nodes data for each node given in $apm_ids.
  * Any $apm_id from $apm_ids that doesn't exist in WP database are filtered here.
  * BUT any page with status 'auto-draft', or 'trash' is still here (as they exist in WP database).
  */
 public function load_multiple($apm_ids, $no_wp_data = false, $no_marked_infos = false, $order_matters = false)
 {
     $this->nodes_data = array();
     //This filters any $apm_id that doesn't exist in WP tree :
     $intern_data_loaded = ApmNodeDataIntern::load_multiple($apm_ids, $order_matters);
     //Now we have
     $nodes_data = $intern_data_loaded['nodes_data'];
     if (empty($nodes_data)) {
         return;
     }
     $ids_wp = $intern_data_loaded['ids_wp']['page'];
     foreach ($nodes_data as $apm_id => $intern_data) {
         $display_data = new ApmNodeDataDisplay();
         $display_data->set_intern_data($intern_data);
         $this->nodes_data[$apm_id] = $display_data;
     }
     if (!$no_wp_data && !empty($ids_wp)) {
         $this->load_wp_data($ids_wp);
     }
     if (!$no_marked_infos) {
         $this->load_marked_infos();
     }
 }