Changeset 3249999
- Timestamp:
- 03/04/2025 02:21:29 AM (10 months ago)
- Location:
- muslim-prayer-time-bd/trunk
- Files:
-
- 18 edited
-
actions/mptbd-functions.php (modified) (6 diffs)
-
actions/mptbd-shortcode.php (modified) (1 diff)
-
actions/mptbd-widget.php (modified) (1 diff)
-
assets/css/mptbd-admin.css (modified) (1 diff)
-
assets/css/mptbd-style.css (modified) (1 diff)
-
assets/js/mptbd-admin.js (modified) (1 diff)
-
assets/js/mptbd-script.js (modified) (1 diff)
-
inc/init-mptbd.php (modified) (1 diff)
-
inc/mptbd-enqueue.php (modified) (2 diffs)
-
inc/mptbd-help.php (modified) (1 diff)
-
inc/mptbd-perpetual_calendar.php (modified) (1 diff)
-
inc/mptbd-sidebar.php (modified) (2 diffs)
-
muslim-prayer-time-bd.php (modified) (1 diff)
-
process/render-prayer-time.php (modified) (4 diffs)
-
process/render-sehri-card.php (modified) (3 diffs)
-
readme.txt (modified) (2 diffs)
-
settings/mptbd-class.settings-api.php (modified) (1 diff)
-
settings/mptbd-settings.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
muslim-prayer-time-bd/trunk/actions/mptbd-functions.php
r3243224 r3249999 8 8 * The class supports both Bengali and English outputs for better localization. 9 9 * 10 * @package Muslim Prayer Time BD - v3.0. 1 - 18 February, 202510 * @package Muslim Prayer Time BD - v3.0.2 - 4 March, 2025 11 11 * @link https://www.realwebcare.com/ 12 12 */ … … 31 31 32 32 // 12-hour or 24-hour format 33 $this->time_format = isset( $timecon_options['time_format'] ) ? absint( $timecon_options['time_format'] ) : 12;33 $this->time_format = isset( $timecon_options['time_format'] ) ? intval( $timecon_options['time_format'] ) : 12; 34 34 35 35 // AM/PM in the prayer times … … 278 278 } 279 279 280 return ' ';280 return '0 minutes'; // Default for districts 57-64 281 281 } 282 282 … … 301 301 * The time is optionally converted to Bangla if the prayer language setting is enabled. 302 302 * 303 * @param string $prayer_ name The name of the prayer (e.g., 'fajr', 'duhr').303 * @param string $prayer_time The name of the prayer (e.g., 'fajr', 'duhr'). 304 304 * @param string $mod_time Optional modification to be added to the base time. 305 305 * @param string $type The type of adjustment ('sehri' or 'prayer'). … … 307 307 * @return string The formatted prayer time, or an error message if the time is invalid. 308 308 */ 309 public function mptbd_prayer_district_time( $prayer_ name, $mod_time = '', $type = '' ) {309 public function mptbd_prayer_district_time( $prayer_time, $mod_time = '' ) { 310 310 // Set the Bangladesh timezone 311 311 $bangladesh_timezone = new DateTimeZone('Asia/Dhaka'); 312 312 313 313 // Create a DateTime object for the prayer time in Bangladesh timezone 314 $base_time = DateTime::createFromFormat('H:i', $prayer_ name, $bangladesh_timezone);314 $base_time = DateTime::createFromFormat('H:i', $prayer_time, $bangladesh_timezone); 315 315 316 316 if ( ! $base_time ) { … … 320 320 // Apply modification if provided 321 321 if ( ! empty( $mod_time ) ) { 322 $mod_interval = DateInterval::createFromDateString($mod_time); 322 $mod_interval = DateInterval::createFromDateString( $mod_time ); 323 323 324 if ( ! $mod_interval ) { 324 325 return "Invalid Modified Time"; 325 326 } 326 $base_time->add($mod_interval); 327 } 328 329 // Determine adjustment based on type 330 $adjust_key = $type === 'sehri' ? 'adj_sehri_time' : 'adj_prayer_time'; 331 $section = $type === 'sehri' ? 'mptbd_ramadan' : 'mptbd_timecon'; 332 $options = get_option( $section ); 333 $adjust = isset( $options[$adjust_key] ) ? absint( $options[$adjust_key] ) . ' minutes' : '0 minutes'; 334 335 // Apply adjustment 336 $adjust_interval = DateInterval::createFromDateString($adjust); 337 if ( ! $adjust_interval ) { 338 return "Invalid Adjusted Time"; 339 } 340 $base_time->add($adjust_interval); 327 328 $base_time->add( $mod_interval ); 329 } 341 330 342 331 // Format the time using WordPress's timezone functions -
muslim-prayer-time-bd/trunk/actions/mptbd-shortcode.php
r3243224 r3249999 8 8 * and dynamic adjustments to prayer times based on user-selected settings. 9 9 * 10 * @package Muslim Prayer Time BD - v3.0. 1 - 18 February, 202510 * @package Muslim Prayer Time BD - v3.0.2 - 4 March, 2025 11 11 * @link https://www.realwebcare.com/ 12 12 */ -
muslim-prayer-time-bd/trunk/actions/mptbd-widget.php
r3243224 r3249999 8 8 * updating widget settings. 9 9 * 10 * @package Muslim Prayer Time BD - v3.0. 1 - 18 February, 202510 * @package Muslim Prayer Time BD - v3.0.2 - 4 March, 2025 11 11 * @link https://www.realwebcare.com/ 12 12 */ -
muslim-prayer-time-bd/trunk/assets/css/mptbd-admin.css
r3243224 r3249999 1 1 /*! 2 * @package Muslim Prayer Time BD - v3.0. 1 - 18 February, 20252 * @package Muslim Prayer Time BD - v3.0.2 - 4 March, 2025 3 3 * @link https://www.realwebcare.com/ 4 4 */ -
muslim-prayer-time-bd/trunk/assets/css/mptbd-style.css
r3243224 r3249999 1 1 /*! 2 * @package Muslim Prayer Time BD - v3.0. 1 - 18 February, 20252 * @package Muslim Prayer Time BD - v3.0.2 - 4 March, 2025 3 3 * @link https://www.realwebcare.com/ 4 4 */ -
muslim-prayer-time-bd/trunk/assets/js/mptbd-admin.js
r3243224 r3249999 1 1 /*! 2 * @package Muslim Prayer Time BD - v3.0. 1 - 18 February, 20252 * @package Muslim Prayer Time BD - v3.0.2 - 4 March, 2025 3 3 * @link https://www.realwebcare.com/ 4 4 */ -
muslim-prayer-time-bd/trunk/assets/js/mptbd-script.js
r3243224 r3249999 4 4 * This script provides interactive behavior for the frontend of the Muslim Prayer Time BD plugin. 5 5 * 6 * @package Muslim Prayer Time BD - v3.0. 1 - 18 February, 20256 * @package Muslim Prayer Time BD - v3.0.2 - 4 March, 2025 7 7 * @link https://www.realwebcare.com/ 8 8 */ -
muslim-prayer-time-bd/trunk/inc/init-mptbd.php
r3243224 r3249999 10 10 * within the WordPress ecosystem and provides an optimal user experience. 11 11 * 12 * @package Muslim Prayer Time BD - v3.0. 1 - 18 February, 202512 * @package Muslim Prayer Time BD - v3.0.2 - 4 March, 2025 13 13 * @link https://www.realwebcare.com/ 14 14 */ -
muslim-prayer-time-bd/trunk/inc/mptbd-enqueue.php
r3243224 r3249999 11 11 * improving performance and maintaining a clean and optimized page. 12 12 * 13 * @package Muslim Prayer Time BD - v3.0. 1 - 18 February, 202513 * @package Muslim Prayer Time BD - v3.0.2 - 4 March, 2025 14 14 * @link https://www.realwebcare.com/ 15 15 */ … … 52 52 */ 53 53 public function mptbd_enqueue_scripts() { 54 wp_enqueue_script( 'mptbd-script', MPTBD_PLUGIN_URL . 'assets/js/mptbd-script.js', array('jquery', 'wp-util'), ' 2.5', true );55 56 wp_enqueue_style( 'mptbd-style', MPTBD_PLUGIN_URL . 'assets/css/mptbd-style.css', '', ' 2.5' );54 wp_enqueue_script( 'mptbd-script', MPTBD_PLUGIN_URL . 'assets/js/mptbd-script.js', array('jquery', 'wp-util'), '3.0.2', true ); 55 56 wp_enqueue_style( 'mptbd-style', MPTBD_PLUGIN_URL . 'assets/css/mptbd-style.css', '', '3.0.2' ); 57 57 58 58 wp_localize_script( 'mptbd-script', 'mptbdAjax', array( -
muslim-prayer-time-bd/trunk/inc/mptbd-help.php
r3243224 r3249999 9 9 * on how to use shortcodes, widget integration, and customizations with attributes for prayer time display. 10 10 * 11 * @package Muslim Prayer Time BD - v3.0. 1 - 18 February, 202511 * @package Muslim Prayer Time BD - v3.0.2 - 4 March, 2025 12 12 * @link https://www.realwebcare.com/ 13 13 */ -
muslim-prayer-time-bd/trunk/inc/mptbd-perpetual_calendar.php
r3243224 r3249999 9 9 * regardless of the geographic location. 10 10 * 11 * @package Muslim Prayer Time BD - v3.0. 1 - 18 February, 202511 * @package Muslim Prayer Time BD - v3.0.2 - 4 March, 2025 12 12 * @link https://www.realwebcare.com/ 13 13 */ -
muslim-prayer-time-bd/trunk/inc/mptbd-sidebar.php
r3243224 r3249999 10 10 * and allows for custom CSS class inclusion for styling. 11 11 * 12 * @package Muslim Prayer Time BD - v3.0. 1 - 18 February, 202512 * @package Muslim Prayer Time BD - v3.0.2 - 4 March, 2025 13 13 * @link https://www.realwebcare.com/ 14 14 */ … … 125 125 <ul class="mptbdusage-list"> 126 126 <li>Muslim Prayer Time BD</li> 127 <li>Version: 3.0. 1</li>127 <li>Version: 3.0.2</li> 128 128 <li>Scripts: PHP + CSS + JS</li> 129 129 <li>Requires: Wordpress 5.4+</li> 130 130 <li>First release: 23 January, 2014</li> 131 <li>Last Update: 19 February, 2025</li>131 <li>Last Update: 4 March, 2025</li> 132 132 <li>By: <a href="%1$s" target="_blank">Realwebcare</a></li> 133 133 <li>Facebook Page: <a href="%2$s" target="_blank">Realwebcare</a></li> -
muslim-prayer-time-bd/trunk/muslim-prayer-time-bd.php
r3243224 r3249999 4 4 * Plugin URI: http://wordpress.org/plugins/muslim-prayer-time-bd/ 5 5 * Description: Muslim Prayer Time BD plugin displays prayer (salah) times for Muslims in Bangladesh with a beautifully designed widget. 6 * Version: 3.0. 16 * Version: 3.0.2 7 7 * Requires at least: 5.2 8 8 * Requires PHP: 7.4 -
muslim-prayer-time-bd/trunk/process/render-prayer-time.php
r3243224 r3249999 11 11 * taking into account any time modifications. 12 12 * 13 * @package Muslim Prayer Time BD - v3.0. 1 - 18 February, 202513 * @package Muslim Prayer Time BD - v3.0.2 - 4 March, 2025 14 14 * @link https://www.realwebcare.com/ 15 15 */ … … 62 62 63 63 $default_city = absint( mptbd_get_option( 'default_city', 'mptbd_general', 58 ) ); 64 65 $prayer_adjust = absint( mptbd_get_option( 'adj_prayer_time', 'mptbd_timecon', 0 ) ) . ' minutes';64 65 $prayer_adjust = intval( mptbd_get_option( 'adj_prayer_time', 'mptbd_timecon', 0 ) ) . ' minutes'; 66 66 67 67 $default_prayers = $prayer_ln == 'en_US' ? 'Fajr, Duhr, Asr, Maghrib, Isha, Sunrise' : 'ফজর, যোহর, আছর, মাগরিব, এশা, সূর্যোদয়'; … … 103 103 <div class="prayer_name"> 104 104 <ul><?php 105 foreach ($prayer_names as $prayer) {106 echo '<li class="time_table">'.esc_html( $prayer).'</li>';105 foreach ( $prayer_names as $prayer ) { 106 echo '<li class="time_table">'.esc_html( $prayer ).'</li>'; 107 107 } ?> 108 108 </ul> … … 110 110 <div class="prayer_time"> 111 111 <ul><?php 112 for($mptbd = 1; $mptbd < 7; $mptbd++) { 113 if($city_id != '') { 114 if( $city_id > 0 && $city_id < 6 ) { 115 foreach($period_times as $key => $period) { 116 if($mptbd == $key + 1) { ?><li class="time_table"><?php if($period != '') { echo esc_html($period).' ' ; } echo esc_html( $this->get_functions->mptbd_prayer_district_time($time_schedule[$pr_names[$key]], '-1 minutes') ); ?></li><?php } 112 if ( ! empty( $city_id ) && $city_id < 57 ) { 113 $prayers_adjust = $this->get_functions->mptbd_time_adjustment( $city_id ); 114 $prayers_adjust = $prayers_adjust . " " . $prayer_adjust; 115 } else { 116 $prayers_adjust = !empty( $adjust_time ) && $adjust_time !== '0 minutes' ? $adjust_time : $prayer_adjust; 117 } 118 119 for ( $mptbd = 1; $mptbd < 7; $mptbd++ ) { 120 foreach ( $period_times as $key => $period ) { 121 if ( $mptbd == $key + 1 ) { 122 echo '<li class="time_table">'; 123 if ( !empty( $period ) ) { 124 echo esc_html( $period ) . ' '; 117 125 } 118 } elseif( $city_id == 6 ) { 119 foreach($period_times as $key => $period) { 120 if($mptbd == $key + 1) { ?><li class="time_table"><?php if($period != '') { echo esc_html($period).' ' ; } echo esc_html( $this->get_functions->mptbd_prayer_district_time($time_schedule[$pr_names[$key]], '-2 minutes') ); ?></li><?php } 121 } 122 } elseif( $city_id > 6 && $city_id < 10 ) { 123 foreach($period_times as $key => $period) { 124 if($mptbd == $key + 1) { ?><li class="time_table"><?php if($period != '') { echo esc_html($period).' ' ; } echo esc_html( $this->get_functions->mptbd_prayer_district_time($time_schedule[$pr_names[$key]], '-3 minutes') ); ?></li><?php } 125 } 126 } elseif( $city_id > 9 && $city_id < 13 ) { 127 foreach($period_times as $key => $period) { 128 if($mptbd == $key + 1) { ?><li class="time_table"><?php if($period != '') { echo esc_html($period).' ' ; } echo esc_html( $this->get_functions->mptbd_prayer_district_time($time_schedule[$pr_names[$key]], '-4 minutes') ); ?></li><?php } 129 } 130 } elseif( $city_id > 12 && $city_id < 15 ) { 131 foreach($period_times as $key => $period) { 132 if($mptbd == $key + 1) { ?><li class="time_table"><?php if($period != '') { echo esc_html($period).' ' ; } echo esc_html( $this->get_functions->mptbd_prayer_district_time($time_schedule[$pr_names[$key]], '-5 minutes') ); ?></li><?php } 133 } 134 } elseif( $city_id > 14 && $city_id < 18 ) { 135 foreach($period_times as $key => $period) { 136 if($mptbd == $key + 1) { ?><li class="time_table"><?php if($period != '') { echo esc_html($period).' ' ; } echo esc_html( $this->get_functions->mptbd_prayer_district_time($time_schedule[$pr_names[$key]], '-6 minutes') ); ?></li><?php } 137 } 138 } elseif( $city_id > 17 && $city_id < 20 ) { 139 foreach($period_times as $key => $period) { 140 if($mptbd == $key + 1) { ?><li class="time_table"><?php if($period != '') { echo esc_html($period).' ' ; } echo esc_html( $this->get_functions->mptbd_prayer_district_time($time_schedule[$pr_names[$key]], '-7 minutes') ); ?></li><?php } 141 } 142 } elseif( $city_id > 19 && $city_id < 23 ) { 143 foreach($period_times as $key => $period) { 144 if($mptbd == $key + 1) { ?><li class="time_table"><?php if($period != '') { echo esc_html($period).' ' ; } echo esc_html( $this->get_functions->mptbd_prayer_district_time($time_schedule[$pr_names[$key]], '+1 minutes') ); ?></li><?php } 145 } 146 } elseif( $city_id > 22 && $city_id < 30 ) { 147 foreach($period_times as $key => $period) { 148 if($mptbd == $key + 1) { ?><li class="time_table"><?php if($period != '') { echo esc_html($period).' ' ; } echo esc_html( $this->get_functions->mptbd_prayer_district_time($time_schedule[$pr_names[$key]], '+2 minutes') ); ?></li><?php } 149 } 150 } elseif( $city_id > 29 && $city_id < 34 ) { 151 foreach($period_times as $key => $period) { 152 if($mptbd == $key + 1) { ?><li class="time_table"><?php if($period != '') { echo esc_html($period).' ' ; } echo esc_html( $this->get_functions->mptbd_prayer_district_time($time_schedule[$pr_names[$key]], '+3 minutes') ); ?></li><?php } 153 } 154 } elseif( $city_id > 33 && $city_id < 40 ) { 155 foreach($period_times as $key => $period) { 156 if($mptbd == $key + 1) { ?><li class="time_table"><?php if($period != '') { echo esc_html($period).' ' ; } echo esc_html( $this->get_functions->mptbd_prayer_district_time($time_schedule[$pr_names[$key]], '+4 minutes') ); ?></li><?php } 157 } 158 } elseif( $city_id > 39 && $city_id < 46 ) { 159 foreach($period_times as $key => $period) { 160 if($mptbd == $key + 1) { ?><li class="time_table"><?php if($period != '') { echo esc_html($period).' ' ; } echo esc_html( $this->get_functions->mptbd_prayer_district_time($time_schedule[$pr_names[$key]], '+5 minutes') ); ?></li><?php } 161 } 162 } elseif( $city_id > 45 && $city_id < 51 ) { 163 foreach($period_times as $key => $period) { 164 if($mptbd == $key + 1) { ?><li class="time_table"><?php if($period != '') { echo esc_html($period).' ' ; } echo esc_html( $this->get_functions->mptbd_prayer_district_time($time_schedule[$pr_names[$key]], '+6 minutes') ); ?></li><?php } 165 } 166 } elseif( $city_id > 50 && $city_id < 55 ) { 167 foreach($period_times as $key => $period) { 168 if($mptbd == $key + 1) { ?><li class="time_table"><?php if($period != '') { echo esc_html($period).' ' ; } echo esc_html( $this->get_functions->mptbd_prayer_district_time($time_schedule[$pr_names[$key]], '+7 minutes') ); ?></li><?php } 169 } 170 } elseif( $city_id > 54 && $city_id < 57 ) { 171 foreach($period_times as $key => $period) { 172 if($mptbd == $key + 1) { ?><li class="time_table"><?php if($period != '') { echo esc_html($period).' ' ; } echo esc_html( $this->get_functions->mptbd_prayer_district_time($time_schedule[$pr_names[$key]], '+8 minutes') ); ?></li><?php } 173 } 174 } else { 175 foreach($period_times as $key => $period) { 176 if($mptbd == $key + 1) { ?><li class="time_table"><?php if($period != '') { echo esc_html($period).' ' ; } echo esc_html( $this->get_functions->mptbd_prayer_district_time($time_schedule[$pr_names[$key]], $prayer_adjust) ); ?></li><?php } 177 } 178 } 179 } else { 180 if($adjust_time != '') { 181 foreach($period_times as $key => $period) { 182 if($mptbd == $key + 1) { ?><li class="time_table"><?php if($period != '') { echo esc_html($period).' ' ; } echo esc_html( $this->get_functions->mptbd_prayer_district_time($time_schedule[$pr_names[$key]], $adjust_time) ); ?></li><?php } 183 } 184 } 185 else { 186 foreach($period_times as $key => $period) { 187 if($mptbd == $key + 1) { ?><li class="time_table"><?php if($period != '') { echo esc_html($period).' ' ; } echo esc_html( $this->get_functions->mptbd_prayer_district_time($time_schedule[$pr_names[$key]], $prayer_adjust) ); ?></li><?php } 188 } 126 echo esc_html( $this->get_functions->mptbd_prayer_district_time( $time_schedule[$pr_names[$key]], $prayers_adjust ) ); 127 echo '</li>'; 189 128 } 190 129 } -
muslim-prayer-time-bd/trunk/process/render-sehri-card.php
r3243224 r3249999 10 10 * such as time adjustments for Sehri and Iftar. 11 11 * 12 * @package Muslim Prayer Time BD - v3.0. 1 - 18 February, 202512 * @package Muslim Prayer Time BD - v3.0.2 - 4 March, 2025 13 13 * @link https://www.realwebcare.com/ 14 14 */ … … 59 59 $default_city = absint( mptbd_get_option( 'default_city', 'mptbd_general', 58 ) ); 60 60 61 $prayer_adjust = absint( mptbd_get_option( 'adj_prayer_time', 'mptbd_timecon', 0 ) ) . ' minutes';61 $prayer_adjust = intval( mptbd_get_option( 'adj_prayer_time', 'mptbd_timecon', 0 ) ) . ' minutes'; 62 62 63 $sehri_adjust = absint( mptbd_get_option( 'adj_sehri_time', 'mptbd_ramadan', 0 ) ) . ' minutes';63 $sehri_adjust = intval( mptbd_get_option( 'adj_sehri_time', 'mptbd_ramadan', 0 ) ) . ' minutes'; 64 64 65 65 $default_sehri_title = $prayer_ln == 'en_US' ? 'Last Time of Sehri:' : 'সেহরির শেষ সময় - ভোর:'; … … 80 80 81 81 <div class="sehri_time"><?php 82 if( $city_id != '' ) { 83 if( $city_id > 0 && $city_id < 6 ) { 84 echo esc_html($sehri_title) . ' ' . esc_html( $this->get_functions->mptbd_prayer_district_time($time_schedule['sehri'], '-1 minutes', 'sehri') ); 85 } elseif( $city_id == 6 ) { 86 echo esc_html($sehri_title) . ' ' . esc_html( $this->get_functions->mptbd_prayer_district_time($time_schedule['sehri'], '-2 minutes', 'sehri') ); 87 } elseif( $city_id > 6 && $city_id < 10 ) { 88 echo esc_html($sehri_title) . ' ' . esc_html( $this->get_functions->mptbd_prayer_district_time($time_schedule['sehri'], '-3 minutes', 'sehri') ); 89 } elseif( $city_id > 9 && $city_id < 13 ) { 90 echo esc_html($sehri_title) . ' ' . esc_html( $this->get_functions->mptbd_prayer_district_time($time_schedule['sehri'], '-4 minutes', 'sehri') ); 91 } elseif( $city_id > 12 && $city_id < 15 ) { 92 echo esc_html($sehri_title) . ' ' . esc_html( $this->get_functions->mptbd_prayer_district_time($time_schedule['sehri'], '-5 minutes', 'sehri') ); 93 } elseif( $city_id > 14 && $city_id < 18 ) { 94 echo esc_html($sehri_title) . ' ' . esc_html( $this->get_functions->mptbd_prayer_district_time($time_schedule['sehri'], '-6 minutes', 'sehri') ); 95 } elseif( $city_id > 17 && $city_id < 20 ) { 96 echo esc_html($sehri_title) . ' ' . esc_html( $this->get_functions->mptbd_prayer_district_time($time_schedule['sehri'], '-7 minutes', 'sehri') ); 97 } elseif( $city_id > 19 && $city_id < 23 ) { 98 echo esc_html($sehri_title) . ' ' . esc_html( $this->get_functions->mptbd_prayer_district_time($time_schedule['sehri'], '+1 minutes', 'sehri') ); 99 } elseif( $city_id > 22 && $city_id < 30 ) { 100 echo esc_html($sehri_title) . ' ' . esc_html( $this->get_functions->mptbd_prayer_district_time($time_schedule['sehri'], '+2 minutes', 'sehri') ); 101 } elseif( $city_id > 29 && $city_id < 34 ) { 102 echo esc_html($sehri_title) . ' ' . esc_html( $this->get_functions->mptbd_prayer_district_time($time_schedule['sehri'], '+3 minutes', 'sehri') ); 103 } elseif( $city_id > 33 && $city_id < 40 ) { 104 echo esc_html($sehri_title) . ' ' . esc_html( $this->get_functions->mptbd_prayer_district_time($time_schedule['sehri'], '+4 minutes', 'sehri') ); 105 } elseif( $city_id > 39 && $city_id < 46 ) { 106 echo esc_html($sehri_title) . ' ' . esc_html( $this->get_functions->mptbd_prayer_district_time($time_schedule['sehri'], '+5 minutes', 'sehri') ); 107 } elseif( $city_id > 45 && $city_id < 51 ) { 108 echo esc_html($sehri_title) . ' ' . esc_html( $this->get_functions->mptbd_prayer_district_time($time_schedule['sehri'], '+6 minutes', 'sehri') ); 109 } elseif( $city_id > 50 && $city_id < 55 ) { 110 echo esc_html($sehri_title) . ' ' . esc_html( $this->get_functions->mptbd_prayer_district_time($time_schedule['sehri'], '+7 minutes', 'sehri') ); 111 } elseif( $city_id > 54 && $city_id < 57 ) { 112 echo esc_html($sehri_title) . ' ' . esc_html( $this->get_functions->mptbd_prayer_district_time($time_schedule['sehri'], '+8 minutes', 'sehri') ); 113 } else { 114 echo esc_html($sehri_title) . ' ' . esc_html( $this->get_functions->mptbd_prayer_district_time($time_schedule['sehri'], $sehri_adjust) ); 115 } 82 if ( ! empty( $city_id ) && $city_id < 57 ) { 83 $prayers_adjust = $this->get_functions->mptbd_time_adjustment( $city_id ); 84 $prayers_adjust = $prayers_adjust . ' ' . $prayer_adjust; 116 85 } else { 117 if( $adjust_time != '' ) { 118 echo esc_html($sehri_title) . ' ' . esc_html( $this->get_functions->mptbd_prayer_district_time($time_schedule['sehri'], $adjust_time, 'sehri') ); 119 } else { 120 echo esc_html($sehri_title) . ' ' . esc_html( $this->get_functions->mptbd_prayer_district_time($time_schedule['sehri'], $sehri_adjust) ); 121 } 122 } ?> 86 $prayers_adjust = !empty( $adjust_time ) && $adjust_time !== '0 minutes' ? $adjust_time : $sehri_adjust; 87 } 88 89 echo esc_html( $sehri_title ) . ' ' . esc_html( $this->get_functions->mptbd_prayer_district_time( $time_schedule['sehri'], $prayers_adjust ) ); ?> 123 90 </div> 124 91 <div class="iftar_time"><?php 125 if($city_id != '') { 126 if( $city_id > 0 && $city_id < 6 ) { 127 echo esc_html($iftar_title) . ' ' . esc_html( $this->get_functions->mptbd_prayer_district_time($time_schedule['maghrib'], '-1 minutes') ); 128 } elseif( $city_id == 6 ) { 129 echo esc_html($iftar_title) . ' ' . esc_html( $this->get_functions->mptbd_prayer_district_time($time_schedule['maghrib'], '-2 minutes') ); 130 } elseif( $city_id > 6 && $city_id < 10 ) { 131 echo esc_html($iftar_title) . ' ' . esc_html( $this->get_functions->mptbd_prayer_district_time($time_schedule['maghrib'], '-3 minutes') ); 132 } elseif( $city_id > 9 && $city_id < 13 ) { 133 echo esc_html($iftar_title) . ' ' . esc_html( $this->get_functions->mptbd_prayer_district_time($time_schedule['maghrib'], '-4 minutes') ); 134 } elseif( $city_id > 12 && $city_id < 15 ) { 135 echo esc_html($iftar_title) . ' ' . esc_html( $this->get_functions->mptbd_prayer_district_time($time_schedule['maghrib'], '-5 minutes') ); 136 } elseif( $city_id > 14 && $city_id < 18 ) { 137 echo esc_html($iftar_title) . ' ' . esc_html( $this->get_functions->mptbd_prayer_district_time($time_schedule['maghrib'], '-6 minutes') ); 138 } elseif( $city_id > 17 && $city_id < 20 ) { 139 echo esc_html($iftar_title) . ' ' . esc_html( $this->get_functions->mptbd_prayer_district_time($time_schedule['maghrib'], '-7 minutes') ); 140 } elseif( $city_id > 19 && $city_id < 23 ) { 141 echo esc_html($iftar_title) . ' ' . esc_html( $this->get_functions->mptbd_prayer_district_time($time_schedule['maghrib'], '+1 minutes') ); 142 } elseif( $city_id > 22 && $city_id < 30 ) { 143 echo esc_html($iftar_title) . ' ' . esc_html( $this->get_functions->mptbd_prayer_district_time($time_schedule['maghrib'], '+2 minutes') ); 144 } elseif( $city_id > 29 && $city_id < 34 ) { 145 echo esc_html($iftar_title) . ' ' . esc_html( $this->get_functions->mptbd_prayer_district_time($time_schedule['maghrib'], '+3 minutes') ); 146 } elseif( $city_id > 33 && $city_id < 40 ) { 147 echo esc_html($iftar_title) . ' ' . esc_html( $this->get_functions->mptbd_prayer_district_time($time_schedule['maghrib'], '+4 minutes') ); 148 } elseif( $city_id > 39 && $city_id < 46 ) { 149 echo esc_html($iftar_title) . ' ' . esc_html( $this->get_functions->mptbd_prayer_district_time($time_schedule['maghrib'], '+5 minutes') ); 150 } elseif( $city_id > 45 && $city_id < 51 ) { 151 echo esc_html($iftar_title) . ' ' . esc_html( $this->get_functions->mptbd_prayer_district_time($time_schedule['maghrib'], '+6 minutes') ); 152 } elseif( $city_id > 50 && $city_id < 55 ) { 153 echo esc_html($iftar_title) . ' ' . esc_html( $this->get_functions->mptbd_prayer_district_time($time_schedule['maghrib'], '+7 minutes') ); 154 } elseif( $city_id > 54 && $city_id < 57 ) { 155 echo esc_html($iftar_title) . ' ' . esc_html( $this->get_functions->mptbd_prayer_district_time($time_schedule['maghrib'], '+8 minutes') ); 156 } else { 157 echo esc_html($iftar_title) . ' ' . esc_html( $this->get_functions->mptbd_prayer_district_time($time_schedule['maghrib'], $prayer_adjust) ); 158 } 92 if ( ! empty( $city_id ) && $city_id < 57 ) { 93 $prayers_adjust = $this->get_functions->mptbd_time_adjustment( $city_id ); 94 $prayers_adjust = $prayers_adjust . ' ' . $prayer_adjust; 159 95 } else { 160 if( $adjust_time != '' ) { 161 echo esc_html($iftar_title) . ' ' . esc_html( $this->get_functions->mptbd_prayer_district_time($time_schedule['maghrib'], $adjust_time) ); 162 } else { 163 echo esc_html($iftar_title) . ' ' . esc_html( $this->get_functions->mptbd_prayer_district_time($time_schedule['maghrib'], $prayer_adjust) ); 164 } 165 } ?> 96 $prayers_adjust = !empty( $adjust_time ) && $adjust_time !== '0 minutes' ? $adjust_time : $prayer_adjust; 97 } 98 99 echo esc_html( $iftar_title ) . ' ' . esc_html( $this->get_functions->mptbd_prayer_district_time( $time_schedule['maghrib'], $prayers_adjust ) ); ?> 166 100 </div><?php 167 101 } -
muslim-prayer-time-bd/trunk/readme.txt
r3243226 r3249999 127 127 == Upgrade Notice == 128 128 129 = 3.0.2 = 130 – This update fixes incorrect calculations for prayer time and Sehri time adjustments with ± minutes. Upgrade to ensure accurate time adjustments based on user input. 131 129 132 = 3.0.1 = 130 133 – Updated widget to set default city and display Islamic quotes. … … 140 143 141 144 == Changelog == 145 146 = 3.0.2 (4 March 2025) = 147 * Fixed: Incorrect calculation of prayer time and Sehri time adjustments with ± minutes. 148 * Improved: More accurate time adjustments based on user input. 142 149 143 150 = 3.0.1 (19 February 2025) = -
muslim-prayer-time-bd/trunk/settings/mptbd-class.settings-api.php
r3243224 r3249999 12 12 * @example example/oop-example.php How to use the class 13 13 * 14 * @package Muslim Prayer Time BD - v3.0. 1 - 18 February, 202514 * @package Muslim Prayer Time BD - v3.0.2 - 4 March, 2025 15 15 * @link https://www.realwebcare.com/ 16 16 */ -
muslim-prayer-time-bd/trunk/settings/mptbd-settings.php
r3243224 r3249999 7 7 * It also includes functionality for displaying a help page, adding menu items, and retrieving pages. 8 8 * 9 * @package Muslim Prayer Time BD - v3.0. 1 - 18 February, 20259 * @package Muslim Prayer Time BD - v3.0.2 - 4 March, 2025 10 10 * @link https://www.realwebcare.com/ 11 11 */
Note: See TracChangeset
for help on using the changeset viewer.