More Related Content
Similar to Githubの草を表示するウィジェットプラグイン (16)
Githubの草を表示するウィジェットプラグイン
- 5. そもそも Githubとは︖そもそも Githubとは︖
Github: ソースコードのホスティングサービス
バージョン管理
Git使⽤
SNS機能
フォロー、お気に⼊り、コミュニケーショ
ン
開発プラットフォーム
差分表⽰、イシュー(課題)管理、wiki
- 23. <?php function kayanohime_settings_page() { ?>
<div class="wrap">
<h2>カヤノヒメ 設定</h2>
<form method="post" action="options.php">
<?php settings_fields( 'kayanohime-settings' ); ?>
<?php do_settings_sections( 'kayanohime-settings' ); ?>
<table class="form-table">
<tr>
<th>Github アカウント</th>
<td><input type="text" name="kayanohime_github_acc
</tr>
</table>
<?php submit_button( '変更を保存', 'primary large', 'submit', true, array
</form>
</div>
<?php } ?>
- 27. class Kayanohime_Widget extends WP_Widget {
//ウィジェット(フロント)
public function widget( $args, $instance ) {
//略
}
//ウィジェット管理画面のフォーム項目
public function form( $instance ) {
//略
}
//更新時処理
function update( $new_instance, $old_instance ) {
//略
return $instance;
}
}
//登録
add_action( 'widgets_init', function () {
register_widget( 'Kayanohime_Widget' );
} );