function save_default_urls($post_id, $post) { if ($post->post_status == 'auto-draft' || isset($_POST['autosave'])) { return; } if (!in_array($post->post_type, get_post_types(array('show_ui' => true)))) { return; } if (!post_type_supports($post->post_type, 'editor')) { return; } if (in_array($post->post_type, array('revision', 'attachment', 'nav_menu_item'))) { return; } $this->absolute_links_object->process_post($post_id); }
public static function _content_make_links_sticky($element_id, $element_type = 'post', $string_translation = true) { if (strpos($element_type, 'post') === 0) { // only need to do it if sticky links is not enabled. // create the object require_once ICL_PLUGIN_PATH . '/inc/absolute-links/absolute-links.class.php'; $icl_abs_links = new AbsoluteLinks(); $icl_abs_links->process_post($element_id); } elseif ($element_type == 'string') { require_once ICL_PLUGIN_PATH . '/inc/absolute-links/absolute-links.class.php'; $icl_abs_links = new AbsoluteLinks(); // call just for strings $icl_abs_links->process_string($element_id, $string_translation); } }
public static function _content_make_links_sticky($element_id, $element_type = 'post', $string_translation = true) { require_once ICL_PLUGIN_PATH . '/inc/absolute-links/absolute-links.class.php'; $icl_abs_links = new AbsoluteLinks(); if (strpos($element_type, 'post') === 0) { $icl_abs_links->process_post($element_id); } elseif ($element_type == 'string') { $icl_abs_links->process_string($element_id, $string_translation); } }