PHP
â³ï¸ Goals WordPress ã§ä½ã£ããµã¤ãã®ç®¡çç»é¢ã«ãã°ã¤ã³ãã¦ãæãã¨ã®ãµã¤ãã ã£ãï¼ã£ã¦ãªããªãããã«ç®¡çç»é¢ã® favicon 㨠ãã¼ã«ãã¼ã® home ã¢ã¤ã³ã³ããã´ã«å¤æ´ããã (ç´åãããµã¤ãã®å ´åãããããã¡ãã£ã¨ããé¨åã§è©ä¾¡é«ããªãã¾ãã) Versâ¦
WordPress 6.6.2 â³ï¸ Goals 管çè 以å¤ãæ稿ã管çãããéç¨ãªã®ã§ãç´ãã«ãã°ã¢ã¦ãã§ããããã«ç®¡çç»é¢ã®åºå®ãã¼ã®å³ç«¯ã«ãã°ã¢ã¦ããã¿ã³ãè¨ç½®ããã $wp_admin_bar->add_menu ã§ã¡ãã¥ã¼ã追å ã»parent ã使ã追å ããå ´æãæå®ãã top-secondaryâ¦
category.php, taxonomy-{tax_slug}.php ã®æè¬ãã«ãã´ãªã¼ã»ã¿ã¯ã½ããã®ä¸è¦§ãã¼ã¸ã§é¸æããã¦ããã«ãã´ãªã¼åã»ã¿ã¯ã½ããã¼åãåå¾ããã WordPress v6.6.1 ð get_the_terms ã使ãããã°ãçºçããã name ?? ''; } ä¸è¨ã®ãã㪠get_the_terms ãâ¦
WordPress ã®ã«ã¹ã¿ã ãã¼ã㧠web ãµã¤ããä½ã£ã¦ããã¡ããã¡ããçºçãããã¤ã æçµçã« get_permalink($postID) 㧠URL ãåå¾ããã®ã ããç¹å®ã®ãã¼ã¸ã® post id ãåå¾ããæ¹æ³ãå¿ããã®ã§ã¡ã¢ 1. ãã¼ã¸ã®ã¿ã¤ãã«ããåå¾ãã get_page_by_title â¦
3åå¹´ã¶ãã«å¤ã® WordPress 製ã®ãµã¤ããæ´æ°ããå¿ è¦ããããPHP ã®ãã³ãã¬ã¼ã㧠CSS ã®ã¯ã©ã¹åãåçã«ä½æããå¿ è¦ããã£ã JavaScript ã§è¨ãã¨ããã® classnames ã®ãããªæåããããã CSS ã®ã¯ã©ã¹ class="foo bar mofu" ã®ãããªå½¢ ã¹ãã¼ã¹åºåâ¦
WordPress v6.1.1 rest_authentication_errors ãã£ã«ã¿ã¼ã使ã apply_filters( 'rest_authentication_errors', WP_Error|null|true $errors ) This is used to pass a WP_Error from an authentication method back to the API. Authentication methods shâ¦
"Hello, xxxx!": "ããã«ã¡ã¯ãxxxxããï¼" ã¿ãã㪠key-value ã§ç¿»è¨³ããã¹ããåºããæ©è½ãä½ã£ã¦ã㦠PHP ã§æ¢å®ã®æååã«å¤æ°ãåãè¾¼ãæ¹æ³ãä½ãã¿ã¼ã³ããã£ã¦ã¿ãã®ã§ã¡ã¢ sprintf ã» vsprintf æè¬æååã®ãã©ã¼ãããã«ä½¿ãã¡ã½ãããå©ç¨ããâ¦
PHP ã®æååä¸å¤æ°å±éãå¥å¦ã ã£ãã®ã§ã¡ã¢ ç°å¢ PHP v8.2 å¤æ°å±é " (ããã«ã³ã¼ãã¼ã·ã§ã³)ä¸ã« {$å¤æ°} ã§å¤æ°å±éãåºæ¥ã "Hello, Ichigo!" å®æ°ã¯å±éã§ããªã "Hello, {ICHIGO}!" å®æ°ã¯ãã®ã¾ã¾åºåããã é¢æ°ãå±éã§ããªã
PHP v7.3 以éãªã json_decode ã®ç¬¬ï¼å¼æ°ã« JSON_THROW_ON_ERROR ã渡ããã¨ã§ãã³ã¼ã失ææã« JsonException ãã¹ãã¼ãããããã«ãªã
è¦ä»¶ JSON ãã¡ã¤ã«ã®ãã¼ã. ç¹ããã«ããæååã渡ããã ãã¼ã辿ã£ã¦æå¾ã®å¤ãè¿ã ãã¼ã辿ã£ã¦å¤ã«ãã©ãçããªãã£ãå ´åã¯æå¾ã®ãã¼ãè¿ã æ¹é 渡ãããæååã explode ã§åå²ãã¦é åã«ãã åå²ããé åã reduce ã㦠JSON ã®ãã¼ã辿ã£ã¦â¦
namespace ã使ã£ã¦ããã¯ã©ã¹å ã§ã¯ `\` ã§å§ã¾ããªãã¯ã©ã¹ã¯åã namespace ã®ã¯ã©ã¹ã ã¨è§£éããããã°ãã¼ãã«ãªã¯ã©ã¹ã¯ `\` å§ã¾ãã§å¼ã³åºãå¿ è¦ããã
Class ããããã£ã¯å®£è¨æã«åæå¤ãè¨å®ãããã¨ãã§ãã¾ããã åæå¤ã¯ å®æ° å¤ã§ãªããã°ãªãã¾ããã ï¾ï¾ï½ºï¾
`true` / `false` ã®å㯠`boolean` ã§ã¯ãªã `bool`
get_posts ã使ãå ´å㯠`'suppress_filters' => false` ãã©ã¡ã¼ã¿ã¼ã使ãã¨ç¾å¨ã® locale ã®æ稿ã®ã¿ãåå¾ã§ãã
WordPress ã®ãã¼ãã§ãã³ãã¬ã¼ããåå²ãã¦åå²ãããã³ãã¬ã¼ãã«å¼ã³åºãå ããå¤æ°ã渡ãããå ´åã¯å ¬å¼ã® get_template_part ã使ãã®ããã¹ã®åé¡ãç¡ãæå³ããªãå¤æ°ã®ä¸æ¸ãããªãã®ã§è¯ãããã§ãï¼
PHP 7.4 ããã¢ãã¼é¢æ° (Arrow Function) ã使ããããã«ãªã£ã¦ããã®ã§è§¦ã£ã¦è¦ãã¡ã¢ Arrow Function æ¸å¼ fn(argument) => expr JavaScript ã®ã¢ãã¼é¢æ°ã¨ã®éã fn ãã¼ã¯ã¼ããå¿ è¦ å¦çé¨å㯠{ } ã§å²ã£ããããã¯ã使ããªã ææ«ã® ; ã¯å¿ é $x +â¦
PHP ã® ksort ã array_filter ã使ã£ã¦ãã¦æ´æ°ãã¼ãä¸ããé åãã«ã¼ããããéã®ã¤ã³ããã¯ã¹ã§å°ãæ¸æã£ãã®ã§ã¡ã¢ ç°å¢ PHP v8.2.0 tehplayground.com ç°å¢ã§ãã¹ã PHP ã®é åã®ãã¼ã¨ã¤ã³ããã¯ã¹ã¯åãæ´æ°ã§ãå¥ç© é å key ã¯ãæ´æ° ã¾ã㯠æåâ¦
PHP ã§é çªãã©ã³ãã ã§æ¸¡ãããé åããç¹å®ã®è¦ç´ ãç¹å®ã®é çªã«ç§»åãããé åãä½æããã ç°å¢ PHP 8.2.0 è¦ä»¶ é çªãã©ã³ãã ã«ãªã ['Mizuki', 'Mikuru', 'Aoi', 'Ichigo', 'Otome', 'Yurika', 'Ran', 'Kaede'] ã¨ããé åããããå é ãåºå®ã㦠['Iâ¦
JavaScript ã 㨠map ãªã©ã®ã³ã¼ã«ããã¯é¢æ°ã®å¤ã«ããå¤æ°ã«ã¢ã¯ã»ã¹ããã®ã¯è¨èªä»æ§ä¸åé¡ããªãããPHP ã§ã¯ã¹ã³ã¼ãå¤ã¨ãªã£ã¦ãã¾ã£ã JavaScript const val = 'â'; const array = ['ãã', 'ã·ãªãª', 'ã«ãª', 'ãã¼ã']; const result = array.map((â¦
PHP ã®é åæä½ã§ array_map ã使ãæã« index ã使ãæ¹æ³ array_map ã®ã³ã¼ã«ããã¯å¤æ°ã« index ã®é åã渡ã array_map(?callable $callback, array $array, array ...$arrays): array array_map() returns an array containing the results of applying â¦
åå PHP ã®å宣è¨ãæé»ã®åå¤æããã¦ãã¾ã£ã¦ãããªãã®ãã¼ã¨æã£ã¦ããã®ã§ãããå³å¯ã«ãããªãã·ã§ã³ãæããã¨ãæãã¦ããã£ãã®ã§è¨é²ã«æ®ãã¦ããã¾ãã ç°å¢ PHP v.8.1.2 (onlinephp.io ã§å®è¡) declare(strict_types=1); 宣è¨ãè¡ãã¨å³å¯ãªæ¹â¦
ãªãã·ã§ãã«ãªå¼æ°ã®åæå¤ãè¨å®ããé¢æ°ã®ä½æã¯ãé¢æ°ã®ä»®å¼æ°ã« åå®£è¨ + ããã©ã«ãå¼æ°ã« `null` ãè¨å®ãã¦ãnull åä½æ¼ç®åã使ã£ã¦ããã©ã«ãå¤ãä¸ããã®ãè¯ããã
WordPress 㧠OGP ã®æ å ±ãåºåããã«ã¯ All in One SEO ãªã©ã®ãã©ã°ã¤ã³ã使ãã°å®ç¾ã§ããã®ã§ãããWordPress ãããã°ããé¢ãã¦ãããã¨ããã WordPress ç¬ç¹ã®ãã©ã°ã¤ã³ã GitHub ã«ãªãå ´åãå¤ãã¹ã¿ã¼æ°ãã©ããç¾æ®µéã§ã®ãã¹ããã©ã¯ãã£ã¹ãªâ¦
wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), $size ); ã§ç»åã® URL ãåå¾ããã®ãè¯ããã
Contact Form 7 ã® DOM ãã«ã¹ã¿ãã¤ãºããæ㯠wpcf7_form_elements ãã£ã«ã¿ã¼ã使ãã°OK
ãã¡ãã® Laravel ã®ç°å¢ãã¤ããåå¼·ä¼ã«åå ãã¦ãã¾ãããlocalã§ä½ã£ãç°å¢ã ãããã®ã¬ã³ã¿ã«ãµã¼ãã¼ ã«ã¢ããããã¨ãããã®ã ã£ãã®ã§ãssh ã§ãµã¼ãã¼ã«å ¥ã£ã¦ç´æ¥ç°å¢ãä½ããªãã試ãã¦è¦ãã¡ã¢ ssh ã§ãããã®ã¬ã³ã¿ã«ãµã¼ãã¼ã«æ¥ç¶ããæ¹æ³ã¯â¦
æ§æ /-- docker-compose.yaml |- /docker | |- /php | |- /nginx | |- /mysql | |- /data # MySQLã®ãã¼ã¿ã®æ°¸ç¶å |- /laravel # Laravel ã¢ããªãã¤ã³ã¹ãã¼ã«ããããã£ã¬ã¯ã㪠使ãæ¹ https://github.com/KiKiKi-KiKi/docker-laravel ããã³ã¼ããDLãâ¦
ããã³ãã React ããã¯ã¨ã³ãã PHP ã§ä½æãã¦ãã¦ããã¡ã¤ã«ã®ã¢ãããã¼ãã試ãã¦ã¿ãã®ã§ã¡ã¢ File ãæ±ãã³ã³ãã¼ãã³ã React ã§ã¯ã<input type="file" /> ã¯å¤ãã¦ã¼ã¶ã ããè¨å®ã§ãããã®ã§ããããã°ã©ã ã§ã¯æä½ã§ããªãããã常ã«éå¶å¾¡ã³ã³ãã¼ãã³ãã§ãã cf. â¦
PHP ã§å¤æ°ã®ããã©ã«ãå¤ãè¨å®ãããæ false ã®å ´åããã©ã«ãå¤ã使ã 'default' $var = false ?: 'default'; // => 'default' $var = 0 ?: 'default'; // => 'default' $var = '' ?: 'deâ¦
Docker ä¸å¹´çãªã®ã§ãé°å²æ°ã§ä½ã£ã¦ãã¾ãã æ§æ /-- docker-compose.yml |- /web | |- /html ⦠web root |- /mysql | |- Dockerfile | |- my.conf | |- /init | |- 1_dd.sql ⦠DB åæå |- /nginx | |- nginx.conf | |- /log | |- access.log | |- erroâ¦