function mtCheckExclude() { global $mt_options, $post; $mt_options = mt_get_plugin_options(true); $is_skip = false; $curUrl = mt_curPageURL(); if (is_page() || is_single()) { $currID = $post->ID; } else { if (is_home()) { $blog_id = get_option('page_for_posts'); if ($blog_id) { $currID = $blog_id; } } if (is_front_page()) { $front_page_id = get_option('show_on_front'); if ($front_page_id) { $currID = $front_page_id; } } } if (isset($mt_options['exclude_pages']) && !empty($mt_options['exclude_pages'])) { $exlude_objs = $mt_options['exclude_pages']; foreach ($exlude_objs as $objs_id) { foreach ($objs_id as $obj_id) { if ($currID == $obj_id) { $is_skip = true; break; } } } } return $is_skip; }
function mtCheckExclude() { global $mt_options; $mt_options = mt_get_plugin_options(true); $is_skip = false; $curUrl = mt_curPageURL(); if (isset($mt_options['exclude_pages']) && !empty($mt_options['exclude_pages'])) { $exlude_objs = $mt_options['exclude_pages']; foreach ($exlude_objs as $objs_id) { foreach ($objs_id as $obj_id) { if ($curUrl == get_the_permalink($obj_id)) { $is_skip = true; break; } } } } return $is_skip; }