writing_plugins_options.ppt

Size: px
Start display at page:

Download "writing_plugins_options.ppt"

Transcription

1

2

3

4

5 check_admin_referer(), wp_nonce_field()

6 function my_plugin_menu() { add_options_page( ('My Plugin Options','my_plugin'), ('My Plugin','my_plugin'), 'manage_options', FILE, 'my_plugin_options'); } add_action('admin_menu', 'my_plugin_menu'); 3. function my_plugin_options() {?><div class="wrap"> <?php /* */?> </div><?php }

7 $My_Plugin_Options = new My_Plugin_Options; class My_Plugin_Options { public function construct() { add_action('admin_menu', array($this,'add_menu')); } public function add_menu() { add_options_page( ('My Plugin Options','my_plugin'), ('My Plugin','my_plugin'), 'manage_options', FILE, array($this, 'options_page')); } public function options_page () { /* */ } /* End of class */ }

8 add_options_page( $page_title, /* */ $menu_title, /* */ $access_level, /* 8 */ $file, /* FILE */ $function /* */ )

9 public function options_page () { if (isset($_post['update_option'])) { check_admin_referer('my_plugin-options'); $this->upate_options();?> <div class="updated fade"><p><strong><?php _e('options saved.');?></strong></p></div> <?php } $font_color = get_option('my_plugin_font_color');?> <div class="wrap"> <h2><?php _e('my Plugin Options', 'my_plugin');?></h2> <form name="form" method="post" action=""> <input type="hidden" name="action" value="update" /> <?php wp_nonce_field('my_plugin-options');?> <!-- -->

10 wp_nonce_field check_admin_referer wp_nonce_field('field_name'); check_admin_referer('field_name');

11 <table class="form-table"><tbody><tr> <th><label for="my_plugin_font_color"><?php _e('font Color', 'my_plugin');?></label></th> <td><input type="text" name="my_plugin_font_color" id="my_plugin_font_color" value="<?php echo attribute_escape($font_color);?>" /></td> </tr></tbody></table> <p class="submit"> <input type="submit" name="update_option" class="buttonprimary" value="<?php _e('save Changes');?>" /> </p> </form></div>

12 private function update_option() { } if (isset($_post['my_plugin_font_color'])) { } $font_color = stripslashes( $_POST['my_plugin_font_color'] ); if (preg_match('/^#[0-9a-fa-f]+$/', $font_color)) { } update_option('my_plugin_font_color', $font_color); $_POST addslashes() stripslashes()

13 <tr> <th><?php _e('bold Style', 'my_plugin');?></th> <td><label> <input type="checkbox" name="my_plugin_use_bold" id="my_plugin_use_bold"<?php checked($use_bold);?> /> <?php _e('use bold style for link', 'my_plugin');?> </label></td> </tr>

14 checked($checked, $current) $checked $current checked('post', $post_or_page) checked($checked) $checked == true

15 <tr><th><?php _e('emphasis Style', 'my_plugin');?></th> <td> <label><input type="radio" name="my_plugin_emphasis" id="my_plugin_emphasis-strong" value="strong" <?php checked('strong', $emphasis_sytle);?>/> <?php _e('strong', 'my_plugin');?></label> <br /> <label><input type="radio" name="my_plugin_emphasis" id="my_plugin_emphasis-em" value="em" <?php checked('em', $emphasis_sytle);?>/> <?php _e('em', 'my_plugin');?></label> </td> </tr>

16 $intervals = array(0, 2, 5, 10, 15, 30, 60);?> <tr> <th><label for="my_plugin_interval"><?php _e('retieval Interval', 'my_plugin');?></label></th> <td> <select name="my_plugin_interval" id="my_plugin_interval"> <?php foreach ($intervals as $i) {?> <option value="<?php echo intval($i);?>" <?php selected($i, $interval);?> /> <?php _e($i. ' min', 'my_plugin');?></option> <?php }?> </select> </td> </tr>

17 selected($selected, $current) $selcted $current selected(15, $interval) selected($selected) $selected == true

18 wp_specialchars($string) attribute_escape($attribute) <input type="input" value="<?php echo attribute_escape($opt_value);?>".. etc_html(), esc_attr() clean_url($url) esc_url()

19 <form method="post" action=""> action="<?php echo str_replace('%7e','~', $_SERVER['REQUEST_URI']);?>"

20

21

コンピュータサイエンス 4. ウェブプログラミング

コンピュータサイエンス 4. ウェブプログラミング 4. Chris Plaintail 2014 1 / 43 1 HTML CSS 2 JavaScript DOM jquery 3 4 PHP SQL PHP SQL 2 / 43 HTML HTML CSS HTML Ajax (Asynchronous JavaScript + XML) PHP SQL 3 / 43 HTML, CSS http, https CSS HTML CSS.html

More information

コンピュータサイエンス 1. ウェブの基本

コンピュータサイエンス 1. ウェブの基本 1. Chris Plaintail May 18, 2016 1 / 27 1 2 HTML HTML 3 CSS style 2 / 27 HTML HTML HTML HTML CSS HTML CSS 3 / 27 4 / 27 HTML HTML, CSS HTML, CSS http, https file CSS HTML CSS.html PC file:// PC.html 5 /

More information

PowerPoint プレゼンテーション

PowerPoint プレゼンテーション HTMLガイダンス 1 HTMLを 用 いたUI 設 定 2 色 々な 見 え 方 で 画 面 に 表 示 されるWebページ 全 て 文 字 /キャラクタで 表 現 されたデータの 集 まり HTML(Hyper Text Markup Language) パソコン 等 のインターネット 端 末 のブラウザソフトで 文 書 情 報 を 表 示 するときに 用 いられるプログラム 言 語 の 一 種

More information

WordPress Ktai Style Ktai Entry 18 Mac 18

WordPress Ktai Style Ktai Entry 18 Mac 18 WORDPRESS 2011 8 27 (8 31 ) WordBeach Nagoya WordBench WordPress Ktai Style Ktai Entry 18 Mac 18 http://www.yuriko.net/ @lilyfanjp PHP WordPress ( ) WordPress function the_content($more_link_text=null,$stripteaser=0,

More information

... 3... 3... 3... 3... 4... 7... 10... 10... 11... 12... 12... 13... 14... 15... 18... 19... 20... 22... 22... 23 2

... 3... 3... 3... 3... 4... 7... 10... 10... 11... 12... 12... 13... 14... 15... 18... 19... 20... 22... 22... 23 2 1 ... 3... 3... 3... 3... 4... 7... 10... 10... 11... 12... 12... 13... 14... 15... 18... 19... 20... 22... 22... 23 2 3 4 5 6 7 8 9 Excel2007 10 Excel2007 11 12 13 - 14 15 16 17 18 19 20 21 22 Excel2007

More information

講 義 内 容 前 回 の 提 出 課 題 の 解 答 例 復 習 データを 送 信 するための HTML (フォーム) PHPによるフォームデータの 処 理 2

講 義 内 容 前 回 の 提 出 課 題 の 解 答 例 復 習 データを 送 信 するための HTML (フォーム) PHPによるフォームデータの 処 理 2 2015 年 度 Webシステムプログラミング a PHPの 基 礎 (2) 講 義 内 容 前 回 の 提 出 課 題 の 解 答 例 復 習 データを 送 信 するための HTML (フォーム) PHPによるフォームデータの 処 理 2 ( 前 回 ) 提 出 課 題 課 題 1: 1から100までの 乱 数 で 作 成 した2つの 整 数 の 足 し 算 を 表 示 するWebページを 作 成

More information

JavaScriptプログラミング入門

JavaScriptプログラミング入門 JavaScript 2015 8 15 1 2 1.1 JavaScript.................................. 2 1.2..................................... 3 1.3 if................................... 4 2 6 2.1.....................

More information

http://banso.cocolog-nifty.com/ 100 100 250 5 1 1 http://www.banso.com/ 2009 5 2 10 http://www.banso.com/ 2009 5 2 http://www.banso.com/ 2009 5 2 http://www.banso.com/ < /> < /> / http://www.banso.com/

More information

n=360 28.6% 34.4% 36.9% n=360 2.5% 17.8% 19.2% n=64 0.8% 0.3% n=69 1.7% 3.6% 0.6% 1.4% 1.9% < > n=218 1.4% 5.6% 3.1% 60.6% 0.6% 6.9% 10.8% 6.4% 10.3% 33.1% 1.4% 3.6% 1.1% 0.0% 3.1% n=360 0% 50%

More information

項 目

項 目 1 1 2 3 11 4 6 5 7,000 2 120 1.3 4,000 04 450 < > 5 3 6 7 8 9 4 10 11 5 12 45 6 13 E. 7 B. C. 14 15 16 17 18 19 20 21 22 23 8 24 25 9 27 2 26 6 27 3 1 3 3 28 29 30 9 31 32 33 500 1 4000 0 2~3 10 10 34

More information

●70974_100_AC009160_KAPヘ<3099>ーシス自動車約款(11.10).indb

●70974_100_AC009160_KAPヘ<3099>ーシス自動車約款(11.10).indb " # $ % & ' ( ) * +, -. / 0 1 2 3 4 5 6 7 8 9 : ; < = >? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y " # $ % & ' ( ) * + , -. / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B

More information

to-r

to-r to-r We re targeting a 1.0 release within the next few weeks. 1.0 IE6 jquery Mobile Sample

More information

untitled

untitled 280 200 5 7,800 6 8,600 28 1 1 18 7 8 2 ( 31 ) 7 42 2 / / / / / / / / / / 1 3 (1) 4 5 3 1 1 1 A B C D 6 (1) -----) (2) -- ()) (3) ----(). ()() () ( )( )( )( ) ( ) ( )( )( )( ) () (). () ()() 7 () ( ) 1

More information

Microsoft PowerPoint - 051105-2.ppt

Microsoft PowerPoint - 051105-2.ppt 1.Webアプリケーション 1-1 Web 1989Tim Berners-Lee 1993 1999iWindows98 2005: http://www.w3.org/people/berners-lee/ 1-2 ( ) 汎 用 機 オフコン データベース アプリケーション 言 語 (COBOLなど) 文 字 端 末 タイプライター 端 末 http://research.microsoft.com/~gbell/digital/timeline/dechistory.htm

More information

3 3.1 SSedit ua012345% ssedit SuperSQL config.ssql log.txt( logs.txt) SSedit SSedit 3.2 ssql Putty SSedit ua012345% ssql HTML /public html/ssql.ssql 4

3 3.1 SSedit ua012345% ssedit SuperSQL config.ssql log.txt( logs.txt) SSedit SSedit 3.2 ssql Putty SSedit ua012345% ssql HTML /public html/ssql.ssql 4 SuperSQL SuperSQL 2016 6 30 1 SuperSQL ITC 2 SuperSQL 2.1 public html/ssql 2.2 SSedit SSedit (3.1 ) postgresql (ua123456 ) 131.113.101.124 /public html/ssql SuperSQL HTML /public html/ssql http://user.keio.ac.jp/

More information

¥Í¥Ã¥È¥ï¡¼¥¯¥×¥í¥°¥é¥ß¥ó¥°ÆÃÏÀ

¥Í¥Ã¥È¥ï¡¼¥¯¥×¥í¥°¥é¥ß¥ó¥°ÆÃÏÀ HTTP/2 HTTP/1.1 (1999 ) 2015 5 RFC7540! Google SPDY ( ) 1 TCP TCP TLS HTTP Upgrade HTTP 1 HPACK 1 / 24 3 : HTTP : HTML4 2 / 24 testform.html: POST testform2.html: GET iedemo: IE default.css: CSS proxy.pac:

More information

Web±ÜÍ÷¤Î³Ú¤·¤µ¤ò¹â¤á¤ëWeb¥Ú¡¼¥¸²Äݲ½¥·¥¹¥Æ¥à

Web±ÜÍ÷¤Î³Ú¤·¤µ¤ò¹â¤á¤ëWeb¥Ú¡¼¥¸²Äݲ½¥·¥¹¥Æ¥à Web Web 2 3 1 PC, Web, Web. Web,., Web., Web HTML, HTML., Web, Web.,,., Web, Web., Web, Web., Web, Web. 2 1 6 1.1.................................................. 6 1.2.................................................

More information

Microsoft Word - class_specification_guide_v60.doc

Microsoft Word - class_specification_guide_v60.doc IM-FormatCreator クラス 指 定 手 順 書 Ver 6.0 IM-FormatCreator i 1 はじめに 1 1.1 目 的 1 2 プログラムの 作 成 2 2.1 ファンクション コンテナ(.JS)の 作 成 2 2.2 プレゼンテーションページ(.HTML)の 作 成 3 3 クラス 指 定 項 目 の 設 定 5 3.1 クラス 指 定 設 定 画 面 5 3.2 クラスパス

More information

プリント

プリント 1 2 3 4 End 1 2 End End 5 6 NEW PIN NEW PIN 1 1 PIN CONF 2 PIN 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53

More information

2.3 ssqltool (3.1 ) postgresql (ua123456 ) itc.db.ics.keio.ac.jp /public html/ssql SuperSQL HTML /public html/ssql http://user.keio.ac.jp/ /ssql/xxxx.

2.3 ssqltool (3.1 ) postgresql (ua123456 ) itc.db.ics.keio.ac.jp /public html/ssql SuperSQL HTML /public html/ssql http://user.keio.ac.jp/ /ssql/xxxx. SuperSQL SuperSQL 2014 6 26 1 SuperSQL ITC 2 SuperSQL 2.1 2.1.1 sh ( ) source /home/kyozai/toyama/bin/bash.sh 2.1.2 csh source /home/kyozai/toyama/bin/csh.sh 2.2 public html/ssql 1 2.3 ssqltool (3.1 )

More information

CodeIgniter Con 2011, Tokyo Japan, February

CodeIgniter Con 2011, Tokyo Japan, February CodeIgniter Con 2011, Tokyo Japan, February 19 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 http://www.iviking.org/fx.php/ 25 26 10 27 28 29 30 31

More information

方程式を解いてみよう! C++ から PHP + JavaScriptへ

方程式を解いてみよう! C++ から PHP + JavaScriptへ 方 程 式 を 解 いてみよう! C++ から PHP + HTML + JavaScriptへ 静 岡 理 工 科 大 学 総 合 情 報 学 部 コンピュータシステム 学 科 幸 谷 智 紀 (こうや とものり) http://na-inet.jp/ 今 日 のメニュー 1. コンピュータ 環 境 と 本 日 のゴールの 確 認 2. PHPプログラムを 実 行 してみる 3. HTMLで 自

More information

1 1.1 CGI CGI(Common Gateway Interface) CGI CGI CGI Perl Ruby CGI HTML Ruby 2 CGI ( ) HTTP(Hypertext Transfer Protocol) httpd UNIX OS Apache Apache Ap

1 1.1 CGI CGI(Common Gateway Interface) CGI CGI CGI Perl Ruby CGI HTML Ruby 2 CGI ( ) HTTP(Hypertext Transfer Protocol) httpd UNIX OS Apache Apache Ap 20 12 19 CGI CGI CGI 1 2 1.1 CGI............................................ 2 2 2 3 CGI 2 3.1.......................................... 2 3.2 CGI.......................................... 3 3.3........................................

More information

(1) <html>,,,,, <> ( ) (/ ) (2) <!DOCTYPE html> HTML5 (3) <html> HTML (4) <html lang= ja > html (ja) (5) JavaScript CSS (6) <meta charset= shift jis >

(1) <html>,,,,, <> ( ) (/ ) (2) <!DOCTYPE html> HTML5 (3) <html> HTML (4) <html lang= ja > html (ja) (5) JavaScript CSS (6) <meta charset= shift jis > HTML HTML HyperText Markup Language (Markup Language) (< > ) 1 sample0.html ( ) html sample0.html // JavaScript

More information

インターネットマガジン1999年2月号―INTERNET magazine No.49

インターネットマガジン1999年2月号―INTERNET magazine No.49 A MagnaviIp990Htmltips +CD-ROM 3.0 3.0 A N S W E R A N S W E R 74 INTERNET magazine 999/ click here! 3

More information

untitled

untitled 750 841 Webserver 1.0.0 ii General Copyright 2003 by WAGO Kontakttechnik GmbH All rights reserved. 136-0071 1-5-7 ND TEL 03-5627-2059 FAX 03-5627-2055 WAGO Kontakttechnik GmbH Hansastraße 27 D-32423 Minden

More information

2

2 1 2 119 119 5 500 1 30 102 1 113 3 4 120 2 3 113 5 230 1 1 3 4 5 6 7 8 1 [email protected] 2 9 3 ( ) 10 11 12 4 1. 2. 3. 4. 13 5 14 15 16 17 18 19 [ ] [ ] 20 [ ] [ ] [ ] 21 22 [ ] 23 < > < >

More information

/ 0/0/ : 実 結 果 HTMLファイルを 表 します 下 図 の 画 が 表 されます " 出 し"の 部 分 をクリックすると"コンテンツですよ "の 字 が 表 されます もう 度 " 出 し"をクリックすると"コンテンツですよ "の 字 が 非 表 になります 折 りたたみパネルの 基

/ 0/0/ : 実 結 果 HTMLファイルを 表 します 下 図 の 画 が 表 されます  出 しの 部 分 をクリックするとコンテンツですよ の 字 が 表 されます もう 度  出 しをクリックするとコンテンツですよ の 字 が 非 表 になります 折 りたたみパネルの 基 / 0/0/ : [CSS] 折 りたたみ 可 能 なパネルの 作 成 - CSSのみを 利 した 折 りたたみ 領 域 / アコー ディオンパネル このページのタグ:[CSS] [アコーディオンパネル] 新 着 記 事 覧 タグ 覧 トップページ ipentec.com CSSのみを 利 した 折 りたたみ 可 能 なパネル( 折 りたたみ 可 能 領 域 )を 実 現 するコードを 紹 介 します

More information

ULTINA On Demand Platform シェアードホスティング管理者マニュアル ソフトバンク

ULTINA On Demand Platform シェアードホスティング管理者マニュアル ソフトバンク ULTINA On Demand Platform シェアードホスティング 管 理 者 マニュアル * 本 マニュアルに 関 するお 問 合 せは 下 記 連 絡 先 へお 願 いします * 法 人 お 客 様 センター E-mail : [email protected] 年 中 無 休 24 時 間 受 付 0800-919-0041( 無 料 ) FAX : 0800-919-0047(

More information

1 1 2 65

1 1 2 65 3 3 2000 6 14 2 30 4 2 1 1 2 65 1!?? < > 3 2 2 100 19 19 100 100 100 < > 19 2 2 2 2 < > 2000 2000 50 1945 5 50 1945 5 45 20 20 4 1945 4 5 5 5 100 50 20 5 2 20 5 20 5 5 6 20 6 19 5 5 6 5 6 2 20 6 21

More information

サーバサイドスクリプトPHPを実感しよう

サーバサイドスクリプトPHPを実感しよう 第 3 講 サーバサイドスクリプト PHP を 実 感 しよう! クライアントサイドでは HTML に 埋 め 込 んだ(あるいは 別 ファイルから HTML に 読 み 込 まれた)JavaScript によって さまざまな 処 理 や 動 的 ページの 生 成 を 行 えることは すで に 第 3 講 までで 学 習 しました しかし HTML と JavaScript の 組 合 せではどうしても

More information

PowerPoint プレゼンテーション

PowerPoint プレゼンテーション ループ ループとは? ある条件を満たすまで 指定の命令を繰り返す Do... Loop For Next For Each Next While WEnd ループの種類 Do Loop Do While 条件 ステートメント Loop Do ステートメント Loop While 条件 Do Until 条件 ステートメント Loop Do ステートメント Until Loop 条件 Do Loop

More information

java_servlet2_見本

java_servlet2_見本 1 1 JavaServer Faces JavaWebJavaWeb JSP Web Web HTMLGUI JSPHTTP AWT Swing Java GUI Web WebGUI EnhydraBarracudaApache TapestryOracle UIXSun JATO 2001 JavaJava Community Process, JCP Web JavaServer Faces

More information

p { color: yellow } div#hoge { color: green; } div.fuga { color: red; } div { color: orange; } div[id=hoge] { color: blue; } div#hoge

More information

1 1 1............................ 1 2 jquery........................ 2 3................ 3 4................... 3 2 4 1..............................

1 1 1............................ 1 2 jquery........................ 2 3................ 3 4................... 3 2 4 1.............................. 1 1 1............................ 1 2 jquery........................ 2 3................ 3 4................... 3 2 4 1.............................. 4 2.............................. 6 3...........................

More information