-
Notifications
You must be signed in to change notification settings - Fork 0
/
mits-imsakiyah.php
51 lines (43 loc) · 1.44 KB
/
mits-imsakiyah.php
1
2
3
4
5
6
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
<?php
/*
Plugin Name: Mits Imsakiyah
Plugin URI: http://adisucipto.net
Description: shortcode imsakiyah menggunakan prayertimes.js
Version: 0.0.1
Author: adi sucipto
Author URI: https://adisucipto.
*/
// First register resources with init
function mits_imsakiyah_resource() {
wp_register_script("mits-imsakiyah-lib", plugin_dir_url(__FILE__)."js/PrayTimes/PrayTimes.js");
wp_register_script("mits-imsakiyah-script", plugin_dir_url(__FILE__)."js/imsakiyah.js", array('jquery','mits-imsakiyah-lib'));
wp_register_style("mits-imsakiyah-style", plugin_dir_url(__FILE__)."css/style.css", array());
}
add_action( 'init', 'mits_imsakiyah_resource' );
add_shortcode( 'mits_imsakiyah', 'mits_imsakiyah' );
function mits_imsakiyah() {
//wp_enqueue_script( 'jquery' );
wp_enqueue_script("mits-imsakiyah-script");
wp_enqueue_style("mits-imsakiyah-style");
//tampilan imsakiyah
$imsakiyah = "";
$imsakiyah .='<div class="imsakiyah">';
//inner
$imsakiyah .=' <div class="imsakiyah-inner">';
//judul + pilih kota
//$imsakiyah .=' <div id="pilih-kota"></div>';
//tabel imsakiyah
$imsakiyah .='<table align="center">
<tr>
<td id="table-title" class="caption"></td>
<td id="pilih-kota"></td>
</tr>
</table>';
$imsakiyah .='<table id="timetable" class="timetable">';
$imsakiyah .='<tbody></tbody>';
$imsakiyah .='</table>';
$imsakiyah .=' </div>';
//end inner
$imsakiyah .='</div>';
return $imsakiyah;
}