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 | |
/** | |
* get_second_directory | |
*/ | |
function get_second_directory() { | |
if ( $_SERVER['REQUEST_URI'] ) { | |
$home_url = home_url(); | |
$home_url = explode( '/', $home_url ); | |
$REQUEST_URI = $_SERVER['REQUEST_URI']; | |
$REQUEST_URI = preg_replace( '/^(.*)?\?.*$/', '$1', $REQUEST_URI ); |
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 Hoge { | |
/** | |
* get_the_post_thumbnail | |
* @param string $size | |
* @param array $attributes | |
* @return string | |
*/ | |
public static function get_the_post_thumbnail( $size = 'post-thumbnail', array $attributes = array() ) { | |
if ( has_post_thumbnail() ) { |
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
$( '<img />' ).one( 'load', function() { | |
// do something | |
} ).attr( 'src', $( 'img#hoge' ).attr( 'src' ) ); |
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
<section class="jumbotron section-image section-fixed" style="background-image: url( hoge.jpg )"> | |
<div class="containter text-center"> | |
<div class="row"> | |
<div class="col-md-8 col-md-offset-2"> | |
<h1>Habakiri</h1> | |
This section has classes, jumbotron, section-image and section-fixed. If you attach the .btn-default, displaying beautiful. | |
<div class="col-md-8 col-md-offset-2"> | |
<a class="btn btn-default btn-block">CONTACT</a> |
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 habakiri_child_theme_setup() { | |
class Habakiri extends Habakiri_Base_Functions { | |
public function __construct() { | |
parent::__construct(); | |
// habakiri_before_entry_content フックにフックさせる場合 | |
add_action( 'habakiri_before_entry_content', array( $this, 'habakiri_before_entry_content' ) ); | |
} |
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 habakiri_child_theme_setup() { | |
class Habakiri extends Habakiri_Base_Functions { | |
public function __construct() { | |
parent::__construct(); | |
add_action( 'habakiri_theme_mods_defaults', array( $this, 'habakiri_theme_mods_defaults' ) ); | |
} | |
/** |
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 habakiri_child_theme_setup() { | |
class Habakiri extends Habakiri_Base_Functions { | |
public function __construct() { | |
parent::__construct(); | |
add_action( 'init', array( $this, 'register_post_types' ) ); | |
} | |
/** | |
* カスタム投稿タイプを定義 |
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 Smart_Custom_Fields_Test_Sample extends WP_UnitTestCase { | |
/** | |
* @var int | |
*/ | |
protected $post_id; | |
/** | |
* setUp |
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 TemplatePart { | |
protected $template; | |
protected $slug; | |
protected $vars = array(); | |
protected $WP_Query; | |
public function __construct( $template, $slug = '' ) { | |
global $wp_query; |
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 | |
$Customizer_Framework = new Customizer_Framework\Customizer_Framework(); | |
$Panel = $Customizer_Framework->Panel( 'panel-name2', [ | |
'title' => 'panel-name2', | |
] ); | |
$Section = $Customizer_Framework->Section( 'section-name', [ | |
'title' => 'section-name', | |
] ); |
OlderNewer