Example #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);
    }
}
Example #2
0
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;
    }
}
Example #3
0
 static function list_pages_excludes($exclude)
 {
     if ($gateway = wpci_get_gateway()) {
         $exclude[] = $gateway->ID;
         return $exclude;
     } else {
         activate_gateway_missing_error();
     }
 }
Example #4
0
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;
}
Example #5
0
 function is_codeigniter()
 {
     global $post;
     $gateway = wpci_get_gateway();
     return $gateway && isset($post) && $gateway->post_name == $post->post_name;
 }
Example #6
0
 static function list_pages_excludes($exclude)
 {
     if ($gateway = wpci_get_gateway()) {
         $exclude[] = $gateway->ID;
         return $exclude;
     }
 }