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 | |
namespace App\Service; | |
use Symfony\Component\HttpFoundation\File\Exception\FileException; | |
use Symfony\Component\HttpFoundation\File\UploadedFile; | |
/** | |
* Description of FileUploader | |
* |
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 | |
/* | |
* アイキャッチ画像を有効化 | |
*/ | |
add_theme_support('post-thumbnails'); | |
/* | |
* 画像サイズ登録 | |
* [width, height, [true|false|array]] |
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 | |
namespace App\Security; | |
use Symfony\Component\HttpFoundation\Request; | |
use Symfony\Component\HttpFoundation\Response; | |
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; | |
use Symfony\Component\Security\Core\Exception\AuthenticationException; | |
use Symfony\Component\Security\Core\User\UserInterface; | |
use Symfony\Component\Security\Core\User\UserProviderInterface; |
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 | |
require_once( dirname( __FILE__ ) . '/wp-load.php' ); | |
// APIエンドポイントのURL | |
$url = 'http://sample.com/wp-json/wp/v2/media'; | |
// ユーザー名(Application Passwordsプラグインでパスワードを発行したユーザーのもの) | |
$username = 'test'; | |
// パスワード(Application Passwordsプラグインで発行されたパスワード) |
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 | |
require_once( dirname( __FILE__ ) . '/wp-load.php' ); | |
// APIエンドポイントのURL | |
$url = 'http://sample.com/wp-json/wp/v2/posts'; | |
// ユーザー名(Application Passwordsプラグインでパスワードを発行したユーザーのもの) | |
$username = 'test'; | |
// パスワード(Application Passwordsプラグインで発行されたパスワード) |
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
<html> | |
<head> | |
<link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"> | |
<script src="https://code.jquery.com/jquery-1.12.4.js"></script> | |
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script> | |
<script> | |
$( function() { | |
var stocks = {"2018\/10\/11":13,"2018\/10\/12":10,"2018\/10\/13":10,"2018\/10\/14":10,"2018\/10\/15":10,"2018\/10\/16":11,"2018\/10\/17":11,"2018\/10\/18":11,"2018\/10\/19":12,"2018\/10\/20":12,"2018\/10\/21":12,"2018\/10\/22":12,"2018\/10\/23":15,"2018\/10\/24":16,"2018\/10\/25":15,"2018\/10\/26":15,"2018\/10\/27":15,"2018\/10\/28":17,"2018\/10\/29":17,"2018\/10\/30":17,"2018\/10\/31":17,"2018\/11\/1":17,"2018\/11\/2":17,"2018\/11\/3":17,"2018\/11\/4":17,"2018\/11\/5":17,"2018\/11\/6":18,"2018\/11\/7":18,"2018\/11\/8":19,"2018\/11\/9":19,"2018\/11\/10":19,"2018\/11\/11":19,"2018\/11\/12":19,"2018\/11\/13":19,"2018\/11\/14":20,"2018\/11\/15":"21","2018\/11\/16":"21","2018\/11\/17":"21","2018\/11\/18":"21","2018\/11\/19":"21","2018\/11 |
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
// カスタム投稿のスラッグはnewsとする | |
// カスタム投稿タイプのパーマリンクを/%news_category%/post-%post_id%/と設定 | |
// ニュースカテゴリ用に新しいルールを追加 | |
add_filter('rewrite_rules_array', function($rules){ | |
$newrules = array(); | |
$newrules['news/([^/]+)/?$'] = 'index.php?post_type=news&news_category=$matches[1]'; | |
$newrules['news/([^/]+)/page/([0-9]+)/?$'] = 'index.php?post_type=news&news_category=$matches[1]&paged=$matches[2]'; | |
return $newrules + $rules; | |
}); |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.