Пример #1
0
 /**
  * We don't load wp posts data here because we do it in "load_multiple", 
  * so that we make only one "get_posts" and not several "get_post". 
  * 
  * @param integer $intern_id
  * @param string $type
  * @param integer $wp_id
  */
 public function add($apm_id, $type, $wp_id, $no_wp_data = false)
 {
     $new_node_data = new ApmNodeDataDisplay();
     $new_node_data->set_intern_data(new ApmNodeDataIntern(array('apm_id' => $apm_id, 'type' => $type, 'wp_id' => $wp_id)));
     if (!$no_wp_data) {
         $new_node_data->load_data_from_wp_entity();
     }
     $this->nodes_data[$apm_id] = $new_node_data;
 }