示例#1
0
function wpci_deactivate()
{
    WPCI::log('info', 'wpci_deactivate()');
    // remove our gateway page, otherwise it'll show up in page lists
    if ($page = wpci_get_gateway()) {
        wp_delete_post($page->ID);
    }
}
示例#2
0
文件: content.php 项目: asalce/wp-ci
function wpci_the_content($content)
{
    global $wp_query, $RTR, $OUT;
    $gateway = wpci_get_gateway();
    if ($wp_query->query_vars['pagename'] == $gateway->post_name) {
        ob_start();
        $OUT->_display();
        echo do_shortcode(ob_get_clean());
    } else {
        return $content;
    }
}
示例#3
0
文件: WPCI.php 项目: allviss/wp-ci
 static function list_pages_excludes($exclude)
 {
     if ($gateway = wpci_get_gateway()) {
         $exclude[] = $gateway->ID;
         return $exclude;
     } else {
         activate_gateway_missing_error();
     }
 }
示例#4
0
文件: rewrite.php 项目: asalce/wp-ci
function wpci_generate_rewrite_rules($wp_rewrite)
{
    $gateway = wpci_get_gateway();
    $wp_rewrite->rules = array('^' . wpci_get_slug() . '/.*' => 'index.php?pagename=' . $gateway->post_name) + $wp_rewrite->rules;
}
示例#5
0
 function is_codeigniter()
 {
     global $post;
     $gateway = wpci_get_gateway();
     return $gateway && isset($post) && $gateway->post_name == $post->post_name;
 }
示例#6
0
文件: WPCI.php 项目: asalce/wp-ci
 static function list_pages_excludes($exclude)
 {
     if ($gateway = wpci_get_gateway()) {
         $exclude[] = $gateway->ID;
         return $exclude;
     }
 }