'string',
'sanitize_callback' => 'esc_url_raw',
'default' => 'https://falahos.my/mobile',
] );
register_setting( 'falah_sc_options', 'falah_prayer_city', [
'type' => 'string',
'sanitize_callback' => 'sanitize_text_field',
'default' => 'Kuala Lumpur',
] );
register_setting( 'falah_sc_options', 'falah_prayer_country', [
'type' => 'string',
'sanitize_callback' => 'sanitize_text_field',
'default' => 'Malaysia',
] );
} );
function falah_sc_settings_page() {
?>
Falah Shortcodes Settings
admin_url( 'admin-ajax.php' ),
'mobileUrl' => esc_url( get_option( 'falah_mobile_url', 'https://falahos.my/mobile' ) ),
'prayerCity' => esc_js( get_option( 'falah_prayer_city', 'Kuala Lumpur' ) ),
'prayerCountry' => esc_js( get_option( 'falah_prayer_country', 'Malaysia' ) ),
'nonce' => wp_create_nonce( 'falah_sc_nonce' ),
] );
} );
function falah_sc_enqueue() {
wp_enqueue_style( 'falah-sc-styles' );
wp_enqueue_script( 'falah-sc-scripts' );
}
// ─── [prayer_times] ───────────────────────────────────────────────────────────
add_shortcode( 'prayer_times', function ( $atts ) {
falah_sc_enqueue();
$atts = shortcode_atts( [
'city' => get_option( 'falah_prayer_city', 'Kuala Lumpur' ),
'country' => get_option( 'falah_prayer_country', 'Malaysia' ),
], $atts );
$city = esc_attr( $atts['city'] );
$country = esc_attr( $atts['country'] );
ob_start();
?>
33,
'dhikr' => 'SubhanAllah',
], $atts );
$target = intval( $atts['target'] );
$dhikr = esc_html( $atts['dhikr'] );
$dhikr_list = [
[ 'text' => 'SubhanAllah', 'meaning' => 'Glory be to Allah', 'target' => 33 ],
[ 'text' => 'Alhamdulillah', 'meaning' => 'Praise be to Allah', 'target' => 33 ],
[ 'text' => 'Allahu Akbar', 'meaning' => 'Allah is the Greatest', 'target' => 34 ],
[ 'text' => 'La ilaha illallah', 'meaning' => 'There is no god but Allah', 'target' => 100 ],
[ 'text' => 'Astaghfirullah', 'meaning' => 'I seek forgiveness from Allah', 'target' => 100 ],
];
$list_json = json_encode( $dhikr_list );
ob_start();
?>
0, 'ayah' => 0 ], $atts );
// Deterministic daily verse: use day-of-year as seed (6236 ayahs total)
$day_seed = intval( date( 'z' ) ) + intval( date( 'Y' ) ) * 365;
$verse_num = ( $day_seed % 6236 ) + 1;
$cache_key = 'falah_verse_' . $verse_num;
$cached = get_transient( $cache_key );
if ( $cached !== false ) {
return $cached;
}
ob_start();
?>
📿
Daily Dhikr
0
counts today
post_name ?? '';
if ( $slug === 'dashboard' && trim( strip_tags( $content ) ) === '' ) {
return do_shortcode( '[falah_dashboard]' );
}
}
return $content;
} );