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