This file contains hidden or 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('ApproveFromPreview')){ | |
class ApproveFromPreview { | |
function __construct() { | |
add_filter('the_content',array($this,'add_approve_button')); | |
add_filter('the_content',array($this,'show_approved')); | |
add_action('wp',array($this,'approve_post')); | |
} |
This file contains hidden or 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 remove_p_on_images($content){ | |
//画像のみpタグで囲わない | |
return preg_replace('/<p>(\s*)(<img .* \/>)(\s*)<\/p>/iU', '\2', $content); | |
} | |
add_filter('the_content', 'remove_p_on_images'); | |
?> |
This file contains hidden or 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 title_text_input( $title ){ | |
return $title = 'ここに記事の題名を書きます'; | |
} | |
add_filter( 'enter_title_here', 'title_text_input'); | |
?> |
This file contains hidden or 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 title_text_input( $title ){ | |
return $title = 'ここに記事の題名を書きます'; | |
} | |
add_filter( 'enter_title_here', 'title_text_input'); | |
?> |
This file contains hidden or 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 | |
add_filter('the_content', 'ads_more_tag'); | |
function ads_more_tag($text) { | |
if( is_single() ) : | |
$ads_text = '<span> | |
//アドセンスのコード | |
</span>'; | |
$pos1 = strpos($text, '<span id="more-'); | |
$pos2 = strpos($text, '</span>', $pos1); | |
$text1 = substr($text, 0, $pos2); |
This file contains hidden or 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 | |
add_filter('the_content', 'ads_more_tag'); | |
function ads_more_tag($text) { | |
if( is_single() ) : | |
$ads_text = '<span> | |
//アドセンスのコード | |
</span>'; | |
$pos1 = strpos($text, '<span id="more-'); | |
$pos2 = strpos($text, '</span>', $pos1); | |
$text1 = substr($text, 0, $pos2); |
This file contains hidden or 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 | |
add_action('init', 'foo_custom_init'); | |
function foo_custom_init() | |
{ | |
$args = array( | |
'exclude_from_search' => true, // ここでtrueを指定する | |
'public' => true, | |
'publicly_queryable' => true, | |
'show_ui' => true, |
This file contains hidden or 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 exclude_thumbnail_from_gallery($null, $attr) | |
{ | |
if (!$thumbnail_ID = get_post_thumbnail_id()) | |
return $null; | |
remove_filter('post_gallery', 'exclude_thumbnail_from_gallery'); | |
if (!isset($attr['exclude']) || empty($attr['exclude'])) | |
$attr['exclude'] = array($thumbnail_ID); |
This file contains hidden or 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
body{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAgAElEQVR4Xn3dh47k1hWE4Rll6f3fxDm9j7Ml2d6kMN7/oj+illi4gUVPs8kbTqiqc8iZff7uL798+fLLL59+/PHH8+/5+fn8++STT54+//zzp59//vnp3bt35/NPP/309NVXXz31evv27dMXX3xxjv/www/XtY3Vd72c2/dd+/Ly8vT111+f8Xs136effvr05s2bc7xzOtaYvfr82WefnZ9bR/8a8/Xr10/N07iN1bid23o6pzH6vrFfvXp17alzjdfP5jdX57fX5ui7xswGxum9uVofOzmnPbOR/XVtrz6zCZtad+thg757/u8/fvvSgV4ZxgBtyED93EYzQAvq890Rfe4fwzWmhfXetU3eRnv1fQtovI51HcN0fsZ1fZvp2s7tvH7OEBwngHo3/57PyF3jHE60Zutt3r7rms4XKI0nOAVW5whixm8P5rPnxu7nru/n5uycfu76xjP+8+t//f44xGQ81kkMIQo6xmEm6PM333xzZZEIdG7R3CZFu0wRBC2sl6hrYwVG1/RqvMYoahmR0Tm0z64XKBzaOkW2QLAGDuYEjuid4bq+uVtTY3Ncx3s51xwCrrW1t4LXuOeCRzA2Z/vqZW/Htm++/cMLT64DZEHHGlx6986bGxUiHPTtNYxvc723OfAkIESSzRXNGU9ANIefZZM1iNR1SOeas32AZtnVeGBO5rQ3hgSNO3/G7V/jFoiNK5PAYGuTDfbSZ9c1h3W1XsdPBschoKTNdRAPSHEedCHYMBivc2ifG0t2wPU2zxl9LxAWGvEVOOIshl4H2PgaoDWbfw0kmkVmxnTuBkbzZw+wwmGtQ2YxJs7DpXgVn3RN/7KD64NA30MAwXTev//rrw5kiUaba5IuRF6gbKPGApfIG6vPMNg4Jx3fRzxSA01SWoR2XdfA1oKhYyCA2Gg853BWYwUtoh |
This file contains hidden or 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
body { | |
background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAgAElEQVR4Xm3dCXLcxhKEYdLyqvsfzItsyzqIvJuPf7/5ECmEGKEAB9Porq4lK6sakp5/+umnl3///ffpzZs3T998883Tn3/++fTVV1899fPHH388PT8/P33xxRdPjenn22+/fXp5eTnj+77PPfP111+fz999993T77//fj33zz//PH355Zfnmf/+++/M1ZzmaM6+76exf/3115mzubrfM8nTM33XZ7L2uXk8nxw92zyN77nGtKb1u9rf33//fcY1Z1frtdfGNNbe2585krVn/Om5nmlMMvS55/q9a3/sz9h03R67tp/mOvJkEIJ0ow01uY0yCgEp1ab63E/PJlDPUkAC9dN9grR4SrLp7vdsf96+fXvGE641misDJw/nsEFye6bvm6efNto81unaHw5lXGMocuel0L7r94zcT3P0DMPbP8PaZ8/YE4fn7PbU/jhcY3v2+eeff35ZZfMuns2DM0zCpcyiwORd23zjU1qCNoZ3UiSv6XNjM0w/vLr5u8eDGbW5ut+m1gCNo3TR1JrkzojJ2fMismdWHnJyxLth7YsHi2qO1nocsXs5VOumA4ZKHgaxNifdsSLp+Ycffng5mnn9YfW+XO9ihCa3YcoTQW26P93nqc3XorwG9Bi7IU05zc+oyZQsPb8OwhlsEGSKvmRPma2TfKK6eT9+/Hgcq3ucL8OZv7k4QOs3Rz+tBbbds4/WyjCcrfn73DztuTnJ2jPWB/vt0ZrPv/766+vY/8MBI/RAP3JCwsLu9dz1hL5PcRmAcdsABfe7PHBC82G8xhNcTmgNkNg9kLJwKqoppzVFHnkZcqP1ruTWZvSMxcsbBzLTD6ODMkYknzy5OuNQySMHiebNV2Q/Bn7//v0L7ISPNraGMYbibVbS45UJuEn8nsjznDwKjoITawnvZLBm32U4ipX0U4rE26 |