View 1.php
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 | |
define( 'SGA4SS_GA_UA_ID', 'UA-XXXXXXXXX-X' ); | |
define( 'SGA4SS_GA_DIMENSION_NAME', 'dimensionX' ); | |
add_action( 'wp_footer', function () { | |
ob_start(); ?> | |
<script async src="https://www.googletagmanager.com/gtag/js?id=<?php echo esc_html(SGA4SS_GA_UA_ID) ?>"></script> | |
<script> | |
window.dataLayer = window.dataLayer || []; |
View functions.php
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_filter( 'upload_dir', function ( $dir ) { | |
global $pagenow; | |
if ( ! isset( $pagenow ) || 'update.php' !== $pagenow ) { | |
return $dir; | |
} | |
if ( ! isset( $_REQUEST['action'] ) || 'upload-theme' !== $_REQUEST['action'] ) { | |
return $dir; | |
} |
View bash.sh
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
#https://qiita.com/Gushi_maru/items/3efd3e5ac497f25f7606 | |
#http://satorumpen.blogspot.com/2014/03/vagrant.html | |
#https://qiita.com/RyujiAMANO/items/a904399b7c45d1f0b658 | |
#Local で | |
sudo dd if=/dev/zero of=zero bs=4k; \rm zero | |
#Mac から | |
$ cd /Users/kzuut/.docker/machine/machines/local-by-flywheel |
View wp-cli-on-xserver.sh
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
echo 'alias wp="/opt/php-7.4.4/bin/php /usr/bin/wp"' >> ~/.bashrc | |
source ~/.bashrc |
View funcitons.php
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_filter( 'auth0_create_user_data', 'my_auth0_create_user_data' , 10, 2 ); | |
function my_auth0_create_user_data( $user_data, $userinfo ) | |
{ | |
if ( ! is_null( $userinfo ) && is_object( $userinfo ) ) { | |
$identities = property_exists( $userinfo, 'identities' ) ? $userinfo->identities : []; | |
if ( is_array( $identities ) && ! empty( $identities ) ) { | |
$identitiy = $identities[0]; | |
if ( ! is_null( $identitiy ) && is_object( $identitiy ) ) { | |
$provider = property_exists( $identitiy, 'provider' ) ? $identitiy->provider : ''; |
View functions.php
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_filter( | |
'acf/load_field/key=field_xxxxxxxxxxxxx', | |
function ( $field ) { | |
$field[ 'readonly' ] = 1; | |
return $field; | |
} | |
); |
View plugin.php
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: MW WP Form Data 2 Post | |
* Description: MW WP Formから送信されたデータを投稿に複製する | |
* Author: mt8 | |
* Version: 1.0 | |
* License: GPL2 | |
* MW WP Form Data 2 Post is free software: you can redistribute it and/or modify | |
*/ | |
class MW_WP_Form_Data_2_Post { |
View .babelrc
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
Show hidden characters
{ | |
"presets": [ | |
"@babel/preset-env", | |
"@babel/preset-react" | |
] | |
} |
View base_items.php
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 ( ! defined( 'ABSPATH' ) ) exit; | |
global $base_items; | |
/* | |
* item | |
* item_id int | |
* title string | |
* detail string | |
* price int | |
* stock int |
View bash.sh
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
#!/bin/bash | |
if [ "$1" = "" ] | |
then | |
echo "please set sub dir name" | |
exit 1 | |
fi | |
echo "move your wp to $1!" |
NewerOlder