This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Mu_Set_Front { | |
public function __construct() { | |
add_action( 'wpmu_new_blog', array(&$this, 'create_front_page'), 10 ,2 ); | |
} | |
public function create_front_page( $blog_id, $user_id ) { | |
switch_to_blog( $blog_id ); | |
if( !get_page_by_path('front-page') ) { | |
update_option( 'show_on_front', 'page' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$child_blog = new Child_Blog(); | |
$child_blog->count= 5;//5サイトずつ持って来る。デフォルトは3つ。 | |
$blogs = $child_blog->get_blog_ids(get_query_var('paged')); | |
foreach ($blogs as $key => $blog) { | |
if($blog->blog_id != 1) { | |
switch_to_blog( $blog->blog_id ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function extend_date_archives_add_rewrite_rules() { | |
add_rewrite_rule( 'category/([^/]+)/date/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/feed/(feed|rdf|rss|rss2|atom)/?$', 'index.php?category_name=$matches[1]&year=$matches[2]&monthnum=$matches[3]&day=$matches[4]&feed=$matches[4]', 'top' ); | |
add_rewrite_rule( 'category/([^/]+)/date/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/?$', 'index.php?category_name=$matches[1]&year=$matches[2]&monthnum=$matches[3]&day=$matches[4]', 'top' ); | |
add_rewrite_rule( 'category/([^/]+)/date/([0-9]{4})/([0-9]{1,2})/?$', 'index.php?category_name=$matches[1]&year=$matches[2]&monthnum=$matches[3]', 'top' ); | |
add_rewrite_rule( 'category/([^/]+)/date/([0-9]{4})/?$', 'index.php?category_name=$matches[1]&year=$matches[2]', 'top' ); | |
} | |
add_action('wp_loaded', 'extend_date_archives_add_rewrite_rules'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Batch Term Import | |
Version: 1.1 | |
Description: Batch Term Import forked by Batch categories Import cerated by Guy Maliar.(http://www.egstudio.biz/) | |
*/ | |
if(!class_exists("CategoryImport")) { | |
class CategoryImport{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Plugin Name: Advanced Custom Fields - Location Field add-on | |
* Plugin URI: https://github.com/julienbechade/acf-location-field | |
* Description: This plugin is an add-on for Advanced Custom Fields. It allows you to find coordinates and/or address of a location with Google Maps. | |
* Author: Julien Bechade | |
* Author URI: http://julienbechade.com/ | |
* Version: 1.0 | |
* Text Domain: acf-location-field | |
* Domain Path: /lang/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: MU Blog Util | |
Description: マルチサイト用のユーティリティ | |
Author: Toro-Unit | |
*/ | |
class MU_Blog_Util { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Class WP_JSON_API { | |
public function __construct() { | |
add_action( "init", array( &$this, "add_query_var" ),10); | |
add_action( "init", array( &$this, "json_actions" ),11); | |
} | |
public function add_query_var() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function current_hierarchical() { | |
global $post; | |
$post_type_object = get_post_type_object( get_post_type() ); | |
if ( $post_type_object->hierarchical ) { | |
if ( $post->post_parent ) { // is child page | |
$ancestors = get_post_ancestors( $post->ID ); | |
$root_ID = array_pop( $ancestors ); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Ms_Body_Class { | |
public function __construct() { | |
add_filter( "body_class", array( $this, "body_class" )); | |
} | |
public function get_blog_path() { | |
$blog_details = get_blog_details($GLOBALS['blog_id']); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ( ! class_exists( 'PM_Schedule_Post' ) ) { | |
class PM_Schedule_Post { | |
protected $from = ''; | |
protected $to = ''; | |
protected $label = ''; | |
public function __construct( $from, $to, $label = 'expired' ) { | |
$this->from = $from; | |
$this->to = $to; |
OlderNewer