function wpi_get_pathway() { if (!class_exists('wpiPathway')) { Wpi::getFile('pathway', wpiTheme::LIB_TYPE_CLASS); } $pt = new wpiPathway(); return $pt->build(); }
public function __construct() { global $wp_query; add_filter('query_vars', array($this, 'registerPublicVar')); $this->action('template_redirect', 'processVar'); $this->action('init', 'flushWPRewriteRules'); $this->action('generate_rewrite_rules', 'rewriteRules'); $this->action('init', 'registerWidgets'); if (wpi_option('text_dir') != 'ltr' && !is_admin()) { add_filter('language_attributes', array($this, 'textDirection')); } if (wpi_option('relative_links')) { add_filter('wpi_links_home', 'rel'); add_filter('wpi_links_single', 'rel'); add_filter(wpiFilter::FILTER_LINKS, 'rel'); } // http header $this->action('send_headers', 'httpHeader'); if (wpi_option('banner')) { $this->action(wpiFilter::ACTION_SECTION_PREFIX . 'pathway_after', 'banner'); $this->action(wpiFilter::ACTION_INTERNAL_CSS, 'bannerIntenalCSS'); } // dtd $this->action(wpiFilter::ACTION_DOCUMENT_DTD, 'dtd', 1); if (!wpi_option('meta_rsd')) { remove_filter('wp_head', 'rsd_link', 10, 1); } if (!wpi_option('meta_livewriter')) { remove_filter('wp_head', 'wlwmanifest_link', 10, 1); } if (!wpi_option('meta_wp_generator')) { remove_filter('wp_head', 'wp_generator', 10, 1); } // head $this->action(wpiFilter::ACTION_META_HTTP_EQUIV, 'metaHTTP'); $this->action(wpiFilter::ACTION_META, 'meta'); $this->action(wpiFilter::ACTION_META_LINK, 'metaLink'); $this->action('wp_head', 'registerMetaActionFilters', 2); if (wpi_option('meta_title')) { $this->action('wp_head', 'headTitle', 1); } // custom content $this->action('wp_head', 'headCustomContent', wpiTheme::LAST_PRIORITY); $this->action('wp_footer', 'footerCustomContent', wpiTheme::LAST_PRIORITY); /** * Content */ // header $this->action(wpiFilter::ACTION_TPL_HEADER, 'htmlBlogContentHeader'); // content if (wpi_option('relative_date')) { if (!wpi_user_func_exists('time_since')) { Wpi::getFile('timesince', wpiTheme::LIB_TYPE_IMPORT); } wpi_foreach_hook_filter(array(wpiFilter::FILTER_POST_DATE, wpiFilter::FILTER_COM_DATE), 'wpi_get_relative_date'); } add_action(wpiFilter::ACTION_SECTION_PREFIX . 'meta-title_content', 'wpi_content_meta_title_filter'); $this->action(wpiFilter::ACTION_SECTION_PREFIX . 'content-end_content', 'navLink'); if (!wpi_is_plugin_active('wp-pagenavi/wp-pagenavi.php')) { add_action(wpiFilter::ACTION_POST_PAGINATION, 'wpi_post_link'); } add_filter(wpiFilter::FILTER_COMMENTS_SELECTOR, 'wpi_post_author_selector_filter'); add_filter('get_comment_text', 'wpi_get_comment_text_filter'); // footer $this->action('wp_footer', 'footerCopyright', 1); $this->action(wpiFilter::ACTION_COPYRIGHT_STATEMENTS, 'validationServices'); add_action('wp_footer', 'wpi_register_widgets'); }