/** * Sync Link Menu Item * @since 1.1.4 */ private function syncLinkItem($menu_parent) { $menu = wp_update_nav_menu_item($this->id, 0, array('menu-item-title' => $this->post['nav_title'], 'menu-item-url' => NP_Helpers::check_url(get_the_content($this->post['ID'])), 'menu-item-attr-title' => $this->post['title_attribute'], 'menu-item-status' => 'publish', 'menu-item-classes' => $this->post['css_classes'], 'menu-item-type' => 'custom', 'menu-item-object' => 'page', 'menu-item-object-id' => $this->post['ID'], 'menu-item-parent-id' => $menu_parent, 'menu-item-target' => $this->post['link_target'])); }
/** * Format the new link for AJAX response */ private function formatLink() { $this->data['np_link_content'] = NP_Helpers::check_url($this->data['np_link_content']); }
<a href="#" class="np-btn np-quick-edit-redirect" data-id="<?php echo get_the_id(); ?> " data-parentid="<?php echo $this->post_data['parent_id']; ?> " data-title="<?php the_title(); ?> " data-url="<?php echo NP_Helpers::check_url(get_the_content()); ?> " data-status="<?php echo get_post_status(); ?> " data-np-status="<?php echo $this->post_data['np_status']; ?> " data-navstatus="<?php echo $this->post_data['nav_status']; ?> " data-navtitleattr="<?php