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
// Puppeteerのインストール | |
// npm install puppeteer | |
// Mochaのインストール | |
// npm install mocha | |
// chaiのインストール | |
// npm install chai | |
const puppeteer = require('puppeteer'); |
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
(function () { | |
"use strict"; | |
kintone.events.on([ | |
'app.record.edit.submit' | |
], function (event) { | |
return new kintone.Promise(function(resolve){ | |
RelatedRecordsFieldManager.prototype.getFieldProperties().then(function(){ | |
(new RelatedRecordsFieldManager('取得履歴')).getRecords(event.record).then(function(records){ | |
event.record.totalAmount2.value = records.reduce(function (sum, record) { |
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
// Puppeteerのインストール | |
// npm i puppeteer | |
// Mochaのインストール | |
// npm install mocha | |
// chaiのインストール | |
// npm install chai | |
const puppeteer = require('puppeteer'); |
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
(function ($) { | |
$(function () { | |
$('.wpsm_panel-body').each(function (index, element) { | |
// replace newline code to br tag | |
let replacedWpsmPanelBodyHtml = $(element).html().replace(/\r?\n/g, '<br>'); | |
$(element).html(replacedWpsmPanelBodyHtml); | |
// remove <br> of first |
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
<!-- Begin MailChimp Signup Form --> | |
<style type="text/css"> | |
#mc_embed_signup{background:#fff; clear:left; font:14px Helvetica,Arial,sans-serif; width:100%;}<br /> /* Add your own MailChimp form style overrides in your site stylesheet or in this style block.<br /> We recommend moving this block and the preceding CSS link to the HEAD of your HTML file. */<br /></style> | |
<div id="mc_embed_signup"><form id="mc-embedded-subscribe-form" class="validate" action="https://coderdojo.us17.list-manage.com/subscribe/post?u=39a5824e42ab56ec44bb4e84e&id=097dfa6a14" method="post" name="mc-embedded-subscribe-form" novalidate="" target="_blank"> | |
<div id="mc_embed_signup_scroll"> | |
<input id="mce-EMAIL" class="email" name="EMAIL" required="" type="email" value="" placeholder="メールアドレス" /> | |
<!-- real people should not fill this in and expect good things - do not remove this or risk form bot signups--> | |
<div style="position: absolute; left: -5000px;" aria-hidden="true"><input tabindex="-1" name="b_39a5824e42ab56ec44bb4e84e_0 |
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 | |
public function plugins_loaded(){ | |
add_action ( 'edited_term',array($this,'save_extra_category_fileds')); // 編集画面の保存 | |
add_action ( 'created_term',array($this,'save_extra_category_fileds')); // 新規追加の保存 | |
} | |
public function init(){ | |
$args=array('public' => true,'_builtin' => false ); // builtin=false(WordPressが設定してるものは省く) | |
$output = 'names'; // or objects |
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 | |
// functions.php に追記 | |
function terms($a, $b){ | |
if ( intval($a->term_order) == intval($b->term_order)) { | |
return 0; | |
} | |
return (intval($a->term_order) < intval($b->term_order)) ? -1 : 1; | |
} |
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 add_nav_menu_custom_class( $menu_items ) { | |
$lists = array( | |
'post_type1' => 'page_slug1', | |
'post_type2' => 'page_slug2', | |
'post_type3' => 'page_slug3', | |
'post_type4' => 'page_slug4', | |
'post_type5' => 'page_slug5', | |
'post_type6' => 'page_slug6', |
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
if(is_admin() && isset( $_GET['post'] )){ | |
if($_GET['post']==get_option( 'page_on_front' )){ | |
if ( locate_template( array( 'editor-style-front.css' ) ) ) { | |
add_editor_style('editor-style-front.css'); | |
}else{ | |
add_editor_style(); | |
} | |
}else{ | |
if ( locate_template( array( sprintf('editor-style-%s.css' , get_page($_GET['post'])->post_name ) ) ) ) { | |
add_editor_style(sprintf('editor-style-%s.css' , get_page($_GET['post'])->post_name )); |
NewerOlder