'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

Falah Mobile URL

Base URL for Falah Mobile app (used by [nur_ai_chat], [falah_wallet], [souq_marketplace])

Default Prayer City
Default Prayer Country
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(); ?>
🕌

Prayer Times

,
Fetching prayer times…
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(); ?>
📿

Dhikr Counter

$d ) : ?>
سُبْحَانَ اللَّهِ
Glory be to Allah
0
/ 33
🧭

Qibla Compass

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(); ?>
📖

Verse of the Day

Welcome back 👋

🕌
Next Prayer
Loading…
📖
Today's Verse
Loading…
📿
Daily Dhikr
0
counts today
🗓️
Hijri Date
Loading…
post_name ?? ''; if ( $slug === 'dashboard' && trim( strip_tags( $content ) ) === '' ) { return do_shortcode( '[falah_dashboard]' ); } } return $content; } );