function setUp() { parent::setUp(); update_option('show_on_front', 'page'); update_option('page_for_posts', self::factory()->post->create(array('post_title' => 'blog-page', 'post_type' => 'page'))); update_option('page_on_front', self::factory()->post->create(array('post_title' => 'front-page', 'post_type' => 'page'))); }
function setUp() { parent::setUp(); $this->set_permalink_structure('/%year%/%monthnum%/%day%/%postname%/'); create_initial_taxonomies(); $this->http = set_url_scheme(home_url('sample-page/'), 'http'); $this->https = set_url_scheme(home_url('sample-page/'), 'https'); }
public function setUp() { global $wp_rewrite; parent::setUp(); $wp_rewrite->init(); $wp_rewrite->set_permalink_structure(''); $wp_rewrite->flush_rules(); }
function setUp() { parent::setUp(); global $wp_rewrite; update_option( 'show_on_front', 'page' ); update_option( 'page_for_posts', $this->factory->post->create( array( 'post_title' => 'blog-page', 'post_type' => 'page' ) ) ); update_option( 'page_on_front', $this->factory->post->create( array( 'post_title' => 'front-page', 'post_type' => 'page' ) ) ); $wp_rewrite->init(); $wp_rewrite->flush_rules(); }
function setUp() { parent::setUp(); global $wp_rewrite; // Add a custom Rewrite rule to test category redirections. $wp_rewrite->add_rule('ccr/(.+?)/sort/(asc|desc)', 'index.php?category_name=$matches[1]&order=$matches[2]', 'top'); // ccr = Custom_Cat_Rule $wp_rewrite->flush_rules(); }
public function setUp() { parent::setUp(); wp_set_current_user(self::$author_id); }