Changeset 3243224
- Timestamp:
- 02/19/2025 12:23:13 PM (12 months ago)
- Location:
- muslim-prayer-time-bd/trunk
- Files:
-
- 2 added
- 19 edited
-
actions/mptbd-functions.php (modified) (3 diffs)
-
actions/mptbd-shortcode.php (modified) (2 diffs)
-
actions/mptbd-widget.php (modified) (6 diffs)
-
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) (1 diff)
-
inc/mptbd-help.php (modified) (1 diff)
-
inc/mptbd-perpetual_calendar.php (modified) (1 diff)
-
inc/mptbd-sidebar.php (modified) (3 diffs)
-
languages/muslim-prayer-time-bd.pot (modified) (11 diffs)
-
muslim-prayer-time-bd.php (modified) (1 diff)
-
process/render-prayer-time.php (modified) (4 diffs)
-
process/render-sehri-card.php (modified) (5 diffs)
-
readme.txt (modified) (7 diffs)
-
screenshot-6.png (added)
-
screenshot-7.png (added)
-
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
r3242321 r3243224 8 8 * The class supports both Bengali and English outputs for better localization. 9 9 * 10 * @package Muslim Prayer Time BD - v3.0 - 18 February, 202510 * @package Muslim Prayer Time BD - v3.0.1 - 18 February, 2025 11 11 * @link https://www.realwebcare.com/ 12 12 */ … … 308 308 */ 309 309 public function mptbd_prayer_district_time( $prayer_name, $mod_time = '', $type = '' ) { 310 // Parse base time 311 $base_time = strtotime($prayer_name); 312 if ( !$base_time ) { 310 // Set the Bangladesh timezone 311 $bangladesh_timezone = new DateTimeZone('Asia/Dhaka'); 312 313 // Create a DateTime object for the prayer time in Bangladesh timezone 314 $base_time = DateTime::createFromFormat('H:i', $prayer_name, $bangladesh_timezone); 315 316 if ( ! $base_time ) { 313 317 return "Invalid Time"; 314 318 } 315 316 // Apply modification 317 if (!empty($mod_time)) { 318 $base_time = strtotime($mod_time, $base_time); 319 if (!$base_time) { 320 return "Invalid Modified Time"; // Handle invalid modification 321 } 322 } 323 319 320 // Apply modification if provided 321 if ( ! empty( $mod_time ) ) { 322 $mod_interval = DateInterval::createFromDateString($mod_time); 323 if ( ! $mod_interval ) { 324 return "Invalid Modified Time"; 325 } 326 $base_time->add($mod_interval); 327 } 328 324 329 // Determine adjustment based on type 325 330 $adjust_key = $type === 'sehri' ? 'adj_sehri_time' : 'adj_prayer_time'; … … 327 332 $options = get_option( $section ); 328 333 $adjust = isset( $options[$adjust_key] ) ? absint( $options[$adjust_key] ) . ' minutes' : '0 minutes'; 329 334 330 335 // Apply adjustment 331 $ final_time = strtotime($adjust, $base_time);332 if ( !$final_time) {336 $adjust_interval = DateInterval::createFromDateString($adjust); 337 if ( ! $adjust_interval ) { 333 338 return "Invalid Adjusted Time"; 334 339 } 335 336 // Format time 337 $time_format_string = $this->time_format == '12' ? ($this->ampm_option ? "g:i A" : "g:i") : ($this->ampm_option ? "G:i A" : "G:i"); 338 $formatted_time = gmdate($time_format_string, $final_time + (get_option('gmt_offset') * HOUR_IN_SECONDS)); 339 340 $base_time->add($adjust_interval); 341 342 // Format the time using WordPress's timezone functions 343 $formatted_time = wp_date( 344 $this->time_format == '12' ? ($this->ampm_option ? "g:i A" : "g:i") : ($this->ampm_option ? "G:i A" : "G:i"), 345 $base_time->getTimestamp(), 346 $bangladesh_timezone 347 ); 348 340 349 // Convert to Bangla if necessary 341 if ( $this->prayer_ln == 'bn_BD') {350 if ( $this->prayer_ln == 'bn_BD' ) { 342 351 $formatted_time = $this->mptbd_prayer_time_eng_to_bang( $formatted_time ); 343 352 } 344 353 345 354 return $formatted_time; 346 }347 348 /**349 * Calculates the default prayer time for a given prayer name and applies any modifications.350 *351 * This function retrieves the default prayer time based on the prayer name (e.g., fajr, duhr), applies any352 * modification if provided, and formats the time according to user preferences. The time is optionally353 * converted to Bangla if the prayer language setting is enabled.354 *355 * @param string $prayer_name The name of the prayer (e.g., 'fajr', 'duhr').356 * @param string $mod_time Optional modification to be added to the base time.357 *358 * @return string The formatted prayer time, or an error message if the time is invalid.359 */360 public function mptbd_prayer_default_time( $prayer_name, $mod_time = '' ) {361 // Parse base time362 $base_time = strtotime($prayer_name);363 if ( !$base_time ) {364 return "Invalid Time"; // Handle invalid input gracefully365 }366 367 // Apply modification if provided368 if (!empty($mod_time)) {369 $base_time = strtotime($mod_time, $base_time);370 if (!$base_time) {371 return "Invalid Modified Time"; // Handle invalid modification372 }373 }374 375 // Determine the format string376 $time_format_string = $this->time_format == '12'377 ? ($this->ampm_option ? "g:i A" : "g:i")378 : ($this->ampm_option ? "G:i A" : "G:i");379 380 // Format the time381 $prayer_time = gmdate($time_format_string, $base_time + (get_option('gmt_offset') * HOUR_IN_SECONDS));382 383 // Convert to Bangla if necessary384 if ($this->prayer_ln == 'bn_BD') {385 $prayer_time = $this->mptbd_prayer_time_eng_to_bang($prayer_time);386 }387 388 return $prayer_time;389 355 } 390 356 } -
muslim-prayer-time-bd/trunk/actions/mptbd-shortcode.php
r3242321 r3243224 8 8 * and dynamic adjustments to prayer times based on user-selected settings. 9 9 * 10 * @package Muslim Prayer Time BD - v3.0 - 18 February, 202510 * @package Muslim Prayer Time BD - v3.0.1 - 18 February, 2025 11 11 * @link https://www.realwebcare.com/ 12 12 */ … … 218 218 <form id="city_time" action="" method="post" name="city_time"> 219 219 <select id="cityname" name="cityname" onChange="prayerOnChange('<?php echo esc_attr( $prayer_id ); ?>', '<?php echo esc_attr( $prayer_time ); ?>', '<?php echo esc_attr( $ramadan_card ); ?>', this.options[this.selectedIndex].value);"> 220 <option value=" "><?php echo esc_html( $city_name ); ?></option>220 <option value="<?php echo esc_attr( $city_id ); ?>"><?php echo esc_html( $city_name ); ?></option> 221 221 <?php foreach( $city_states as $key => $city ) { ?> 222 222 <option value="<?php echo esc_attr( $key ); ?>"<?php selected( $key, $city_id ); ?>><?php echo esc_html( $city ); ?></option> -
muslim-prayer-time-bd/trunk/actions/mptbd-widget.php
r3242325 r3243224 8 8 * updating widget settings. 9 9 * 10 * @package Muslim Prayer Time BD - v3.0 - 18 February, 202510 * @package Muslim Prayer Time BD - v3.0.1 - 18 February, 2025 11 11 * @link https://www.realwebcare.com/ 12 12 */ … … 22 22 public function __construct() { 23 23 parent::__construct( 24 'mptb ',24 'mptbd', 25 25 __('Muslim Prayer Time BD', 'muslim-prayer-time-bd'), 26 26 array( … … 54 54 * @return void Outputs the widget HTML. 55 55 */ 56 public function widget($args, $instance) { 57 extract($args); 58 56 public function widget( $args, $instance ) { 57 // Use array keys directly instead of extract() 58 $before_widget = isset( $args['before_widget'] ) ? $args['before_widget'] : ''; 59 $before_title = isset( $args['before_title'] ) ? $args['before_title'] : ''; 60 $after_title = isset( $args['after_title'] ) ? $args['after_title'] : ''; 61 $after_widget = isset( $args['after_widget'] ) ? $args['after_widget'] : ''; 62 $widget_id = isset( $args['widget_id'] ) ? $args['widget_id'] : ''; 63 59 64 // Use isset() or default values to prevent undefined array key warnings 60 $title = isset($instance['title']) ? apply_filters('widget_title', $instance['title']) : ''; 61 $prayer_time = isset($instance['prayer_time']) ? $instance['prayer_time'] : 'off'; // Default to 'off' if not set 62 $sehri_card = isset($instance['sehri_card']) ? $instance['sehri_card'] : 'off'; // Default to 'off' if not set 63 65 $title = !empty( $instance['title'] ) ? apply_filters('widget_title', $instance['title']) : ''; 66 $prayer_time = isset( $instance['prayer_time'] ) ? $instance['prayer_time'] : 'off'; 67 $sehri_card = isset( $instance['sehri_card'] ) ? $instance['sehri_card'] : 'off'; 68 $default_city = !empty( $instance['default_city'] ) ? $instance['default_city'] : 'Dhaka'; 69 $mptbd_quotes = !empty( $instance['mptbd_quotes'] ) ? $instance['mptbd_quotes'] : 'off'; 70 71 // Validation - Ensure only 'on' or 'off' values are allowed 72 $valid_values = ['on', 'off']; 73 $prayer_time = in_array( $prayer_time, $valid_values, true ) ? $prayer_time : 'off'; 74 $sehri_card = in_array( $sehri_card, $valid_values, true ) ? $sehri_card : 'off'; 75 64 76 echo wp_kses_post( $before_widget ); 65 77 66 if ( $title) {67 echo wp_kses_post( $before_title . $title .$after_title );78 if ( $title ) { 79 echo wp_kses_post( $before_title ) . esc_html($title) . wp_kses_post( $after_title ); 68 80 } 69 81 70 // Check for 'on' values for prayer_time and sehri_card 71 if ('on' == $prayer_time) : 72 if ('on' == $sehri_card) : 73 echo do_shortcode('[prayer_time pt="on" sc="on" id="' . $this->id . '"]'); 74 else : 75 echo do_shortcode('[prayer_time pt="on" sc="off" id="' . $this->id . '"]'); 76 endif; 77 else : 78 if ('on' == $sehri_card) : 79 echo do_shortcode('[prayer_time pt="off" sc="on" id="' . $this->id . '"]'); 80 else : 81 echo do_shortcode('[prayer_time pt="off" sc="off" id="' . $this->id . '"]'); 82 endif; 83 endif; 82 echo do_shortcode('[prayer_time id="' . $widget_id . '" pt="' . esc_html( $prayer_time ) . '" sc="' . esc_html( $sehri_card ) . '" ct="' . esc_html( $default_city ) . '" qt="' . wp_kses_post( $mptbd_quotes ) . '"]'); 84 83 85 84 echo wp_kses_post( $after_widget ); … … 98 97 * @return array The updated and sanitized widget settings. 99 98 */ 100 public function update( $new_instance, $old_instance) {99 public function update( $new_instance, $old_instance ) { 101 100 $instance = $old_instance; 101 102 102 // Ensure default values if the fields are missing 103 $instance['title'] = isset($new_instance['title']) ? wp_strip_all_tags($new_instance['title']) : ''; 104 $instance['prayer_time'] = isset($new_instance['prayer_time']) ? $new_instance['prayer_time'] : 'off'; // Default 'off' 105 $instance['sehri_card'] = isset($new_instance['sehri_card']) ? $new_instance['sehri_card'] : 'off'; // Default 'off' 103 $instance['title'] = !empty( $new_instance['title'] ) ? sanitize_text_field( $new_instance['title'] ) : ''; 104 105 // Validate checkbox values (should be 'on' or 'off' only) 106 $valid_values = ['on', 'off']; 107 $instance['prayer_time'] = isset( $new_instance['prayer_time'] ) && in_array( $new_instance['prayer_time'], $valid_values, true ) ? $new_instance['prayer_time'] : 'off'; 108 $instance['sehri_card'] = isset( $new_instance['sehri_card'] ) && in_array( $new_instance['sehri_card'], $valid_values, true ) ? $new_instance['sehri_card'] : 'off'; 109 110 // Ensure proper sanitization for city and quotes 111 $instance['default_city'] = !empty( $new_instance['default_city'] ) ? sanitize_text_field( $new_instance['default_city'] ) : 'Dhaka'; 112 $instance['mptbd_quotes'] = !empty( $new_instance['mptbd_quotes'] ) ? sanitize_textarea_field( $new_instance['mptbd_quotes'] ) : 'off'; 113 106 114 return $instance; 107 115 } … … 121 129 // Default values for form fields 122 130 $defaults = array( 123 'title' => __('Prayer Time Table', 'muslim-prayer-time-bd'), 124 'prayer_time' => 'on', 125 'sehri_card' => 'on' 131 'title' => __( 'Prayer Time Table', 'muslim-prayer-time-bd' ), 132 'prayer_time' => 'on', 133 'sehri_card' => 'off', 134 'default_city' => __( 'Dhaka', 'muslim-prayer-time-bd' ), 135 'mptbd_quotes' => __( 'off', 'muslim-prayer-time-bd' ), 126 136 ); 127 $instance = wp_parse_args((array) $instance, $defaults); 128 $title = isset($instance['title']) ? esc_attr($instance['title']) : ''; 137 138 $instance = wp_parse_args( (array) $instance, $defaults ); 139 140 $title = !empty( $instance['title'] ) ? esc_attr($instance['title']) : ''; 141 $default_city = !empty( $instance['default_city'] ) ? esc_attr( $instance['default_city'] ) : 'Dhaka'; 142 $mptbd_quotes = !empty( $instance['mptbd_quotes'] ) ? esc_attr( $instance['mptbd_quotes'] ) : 'off'; 143 144 // Validation - Ensure only 'on' or 'off' values are allowed 145 $valid_values = ['on', 'off']; 146 $prayer_time = in_array( $instance['prayer_time'], $valid_values, true ) ? $instance['prayer_time'] : 'off'; 147 $sehri_card = in_array( $instance['sehri_card'], $valid_values, true ) ? $instance['sehri_card'] : ''; 129 148 ?> 130 149 131 150 <p> 132 151 <label for="<?php echo esc_attr($this->get_field_id('title')); ?>"><?php esc_html_e('Prayer Title:', 'muslim-prayer-time-bd'); ?></label> … … 135 154 136 155 <p> 137 <input class="checkbox" type="checkbox" <?php checked($ instance['prayer_time'], 'on'); ?> id="<?php echo esc_attr($this->get_field_id('prayer_time')); ?>" name="<?php echo esc_attr($this->get_field_name('prayer_time')); ?>" />156 <input class="checkbox" type="checkbox" <?php checked($prayer_time, 'on'); ?> id="<?php echo esc_attr($this->get_field_id('prayer_time')); ?>" name="<?php echo esc_attr($this->get_field_name('prayer_time')); ?>" /> 138 157 <label for="<?php echo esc_attr($this->get_field_id('prayer_time')); ?>"><?php esc_html_e('Show Prayer Time', 'muslim-prayer-time-bd'); ?></label> 139 158 </p> 140 159 141 160 <p> 142 <input class="checkbox" type="checkbox" <?php checked($ instance['sehri_card'], 'on'); ?> id="<?php echo esc_attr($this->get_field_id('sehri_card')); ?>" name="<?php echo esc_attr($this->get_field_name('sehri_card')); ?>" />161 <input class="checkbox" type="checkbox" <?php checked($sehri_card, 'on'); ?> id="<?php echo esc_attr($this->get_field_id('sehri_card')); ?>" name="<?php echo esc_attr($this->get_field_name('sehri_card')); ?>" /> 143 162 <label for="<?php echo esc_attr($this->get_field_id('sehri_card')); ?>"><?php esc_html_e('Show Sehri Card', 'muslim-prayer-time-bd'); ?></label> 163 </p> 164 165 <p> 166 <label for="<?php echo esc_attr($this->get_field_id('default_city')); ?>"><?php esc_html_e('Default City:', 'muslim-prayer-time-bd'); ?></label> 167 <input class="widefat" type="text" id="<?php echo esc_attr($this->get_field_id('default_city')); ?>" name="<?php echo esc_attr($this->get_field_name('default_city')); ?>" value="<?php echo esc_attr($default_city); ?>" /> 168 </p> 169 170 <p> 171 <label for="<?php echo esc_attr($this->get_field_id('mptbd_quotes')); ?>"><?php esc_html_e('Quotes:', 'muslim-prayer-time-bd'); ?></label> 172 <textarea class="widefat" id="<?php echo esc_attr($this->get_field_id('mptbd_quotes')); ?>" name="<?php echo esc_attr($this->get_field_name('mptbd_quotes')); ?>" rows="4"><?php echo esc_textarea($mptbd_quotes); ?></textarea> 144 173 </p> 145 174 -
muslim-prayer-time-bd/trunk/assets/css/mptbd-admin.css
r3242321 r3243224 1 1 /*! 2 * @package Muslim Prayer Time BD - v3.0 - 18 February, 20252 * @package Muslim Prayer Time BD - v3.0.1 - 18 February, 2025 3 3 * @link https://www.realwebcare.com/ 4 4 */ -
muslim-prayer-time-bd/trunk/assets/css/mptbd-style.css
r3242321 r3243224 1 1 /*! 2 * @package Muslim Prayer Time BD - v3.0 - 18 February, 20252 * @package Muslim Prayer Time BD - v3.0.1 - 18 February, 2025 3 3 * @link https://www.realwebcare.com/ 4 4 */ -
muslim-prayer-time-bd/trunk/assets/js/mptbd-admin.js
r3242321 r3243224 1 1 /*! 2 * @package Muslim Prayer Time BD - v3.0 - 18 February, 20252 * @package Muslim Prayer Time BD - v3.0.1 - 18 February, 2025 3 3 * @link https://www.realwebcare.com/ 4 4 */ -
muslim-prayer-time-bd/trunk/assets/js/mptbd-script.js
r3242321 r3243224 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 - 18 February, 20256 * @package Muslim Prayer Time BD - v3.0.1 - 18 February, 2025 7 7 * @link https://www.realwebcare.com/ 8 8 */ -
muslim-prayer-time-bd/trunk/inc/init-mptbd.php
r3242321 r3243224 10 10 * within the WordPress ecosystem and provides an optimal user experience. 11 11 * 12 * @package Muslim Prayer Time BD - v3.0 - 18 February, 202512 * @package Muslim Prayer Time BD - v3.0.1 - 18 February, 2025 13 13 * @link https://www.realwebcare.com/ 14 14 */ -
muslim-prayer-time-bd/trunk/inc/mptbd-enqueue.php
r3242321 r3243224 11 11 * improving performance and maintaining a clean and optimized page. 12 12 * 13 * @package Muslim Prayer Time BD - v3.0 - 18 February, 202513 * @package Muslim Prayer Time BD - v3.0.1 - 18 February, 2025 14 14 * @link https://www.realwebcare.com/ 15 15 */ -
muslim-prayer-time-bd/trunk/inc/mptbd-help.php
r3242321 r3243224 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 - 18 February, 202511 * @package Muslim Prayer Time BD - v3.0.1 - 18 February, 2025 12 12 * @link https://www.realwebcare.com/ 13 13 */ -
muslim-prayer-time-bd/trunk/inc/mptbd-perpetual_calendar.php
r3242321 r3243224 9 9 * regardless of the geographic location. 10 10 * 11 * @package Muslim Prayer Time BD - v3.0 - 18 February, 202511 * @package Muslim Prayer Time BD - v3.0.1 - 18 February, 2025 12 12 * @link https://www.realwebcare.com/ 13 13 */ -
muslim-prayer-time-bd/trunk/inc/mptbd-sidebar.php
r3242321 r3243224 10 10 * and allows for custom CSS class inclusion for styling. 11 11 * 12 * @package Muslim Prayer Time BD - v3.0 - 18 February, 202512 * @package Muslim Prayer Time BD - v3.0.1 - 18 February, 2025 13 13 * @link https://www.realwebcare.com/ 14 14 */ … … 74 74 <h4>Using Block Widget (Gutenberg Editor)</h4> 75 75 <ul class="mptbdusage-list"> 76 <li> Log in to your WordPress account and go to the <b>Appearance >> Editor</b> (Full Site Editing) or edit a specific page/post using the Gutenberg editor.</li>76 <li>Navigate to the <b>Appearance >> Widgets</b> from WordPress dashboard menu.</li> 77 77 <li>In the editor, click the <b>+ (Add Block)</b> button and search for the <b>Muslim Prayer Time BD</b> block widget.</li> 78 78 <li>Once found, click on the block to add it to your desired widget area or page section.</li> … … 125 125 <ul class="mptbdusage-list"> 126 126 <li>Muslim Prayer Time BD</li> 127 <li>Version: 3.0 </li>127 <li>Version: 3.0.1</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: 1 8February, 2025</li>131 <li>Last Update: 19 February, 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/languages/muslim-prayer-time-bd.pot
r3242321 r3243224 4 4 "Project-Id-Version: Muslim Prayer Time BD - Prayer Reminder for Bangladesh\n" 5 5 "Report-Msgid-Bugs-To: \n" 6 "POT-Creation-Date: 2025-02-1 8 02:54+0000\n"6 "POT-Creation-Date: 2025-02-19 12:20+0000\n" 7 7 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 8 8 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 58 58 "</h4>\n" 59 59 " <ul class=\"mptbdusage-list\">\n" 60 " <li>Log in to your WordPress account and " 61 "go to the <b>Appearance >> Editor</b> (Full Site Editing) or edit a specific " 62 "page/post using the Gutenberg editor.</li>\n" 60 " <li>Navigate to the <b>Appearance >> " 61 "Widgets</b> from WordPress dashboard menu.</li>\n" 63 62 " <li>In the editor, click the <b>+ (Add " 64 63 "Block)</b> button and search for the <b>Muslim Prayer Time BD</b> block " … … 85 84 " <ul class=\"mptbdusage-list\">\n" 86 85 " <li>Muslim Prayer Time BD</li>\n" 87 " <li>Version: 3.0 </li>\n"86 " <li>Version: 3.0.1</li>\n" 88 87 " <li>Scripts: PHP + CSS + JS</li>\n" 89 88 " <li>Requires: Wordpress 5.4+</li>\n" 90 89 " <li>First release: 23 January, 2014</li>\n" 91 " <li>Last Update: 1 8February, 2025</li>\n"90 " <li>Last Update: 19 February, 2025</li>\n" 92 91 " <li>By: <a href=\"%1$s\" target=\"_blank\">" 93 92 "Realwebcare</a></li>\n" … … 353 352 msgstr "" 354 353 354 #: actions/mptbd-widget.php:166 355 msgid "Default City:" 356 msgstr "" 357 355 358 #: settings/mptbd-settings.php:206 356 359 msgid "" … … 365 368 #: inc/mptbd-help.php:174 366 369 msgid "Details Guide to Using the Shortcode" 370 msgstr "" 371 372 #: actions/mptbd-widget.php:134 373 msgid "Dhaka" 367 374 msgstr "" 368 375 … … 677 684 msgstr "" 678 685 686 #: actions/mptbd-widget.php:135 687 msgid "off" 688 msgstr "" 689 679 690 #. 1: Opening code tag, 2: Closing code tag 680 691 #: inc/mptbd-help.php:232 … … 729 740 msgstr "" 730 741 731 #: actions/mptbd-widget.php:1 23742 #: actions/mptbd-widget.php:131 732 743 msgid "Prayer Time Table" 733 744 msgstr "" … … 737 748 msgstr "" 738 749 739 #: actions/mptbd-widget.php:1 32750 #: actions/mptbd-widget.php:151 740 751 msgid "Prayer Title:" 741 752 msgstr "" … … 743 754 #: settings/mptbd-class.settings-api.php:417 744 755 msgid "Preview" 756 msgstr "" 757 758 #: actions/mptbd-widget.php:171 759 msgid "Quotes:" 745 760 msgstr "" 746 761 … … 863 878 msgstr "" 864 879 865 #: actions/mptbd-widget.php:1 38880 #: actions/mptbd-widget.php:157 866 881 msgid "Show Prayer Time" 867 882 msgstr "" … … 871 886 msgstr "" 872 887 873 #: actions/mptbd-widget.php:1 43888 #: actions/mptbd-widget.php:162 874 889 msgid "Show Sehri Card" 875 890 msgstr "" -
muslim-prayer-time-bd/trunk/muslim-prayer-time-bd.php
r3242321 r3243224 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 6 * Version: 3.0.1 7 7 * Requires at least: 5.2 8 8 * Requires PHP: 7.4 -
muslim-prayer-time-bd/trunk/process/render-prayer-time.php
r3242321 r3243224 11 11 * taking into account any time modifications. 12 12 * 13 * @package Muslim Prayer Time BD - v3.0 - 18 February, 202513 * @package Muslim Prayer Time BD - v3.0.1 - 18 February, 2025 14 14 * @link https://www.realwebcare.com/ 15 15 */ … … 96 96 97 97 $time_schedule = $this->get_calender->mptbd_perpetual_calendar(); 98 98 99 99 $pr_names = $this->get_functions->mptbd_period_of_time(); 100 100 101 $adjust_time = $this->get_functions->mptbd_time_adjustment( $default_city ); ?> 101 102 … … 173 174 } else { 174 175 foreach($period_times as $key => $period) { 175 if($mptbd == $key + 1) { ?><li class="time_table"><?php if($period != '') { echo esc_html($period).' ' ; } echo esc_html( $this->get_functions->mptbd_prayer_d efault_time($time_schedule[$pr_names[$key]], $prayer_adjust) ); ?></li><?php }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 } 176 177 } 177 178 } … … 184 185 else { 185 186 foreach($period_times as $key => $period) { 186 if($mptbd == $key + 1) { ?><li class="time_table"><?php if($period != '') { echo esc_html($period).' ' ; } echo esc_html( $this->get_functions->mptbd_prayer_d efault_time($time_schedule[$pr_names[$key]], $prayer_adjust) ); ?></li><?php }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 } 187 188 } 188 189 } -
muslim-prayer-time-bd/trunk/process/render-sehri-card.php
r3242321 r3243224 10 10 * such as time adjustments for Sehri and Iftar. 11 11 * 12 * @package Muslim Prayer Time BD - v3.0 - 18 February, 202512 * @package Muslim Prayer Time BD - v3.0.1 - 18 February, 2025 13 13 * @link https://www.realwebcare.com/ 14 14 */ … … 112 112 echo esc_html($sehri_title) . ' ' . esc_html( $this->get_functions->mptbd_prayer_district_time($time_schedule['sehri'], '+8 minutes', 'sehri') ); 113 113 } else { 114 echo esc_html($sehri_title) . ' ' . esc_html( $this->get_functions->mptbd_prayer_d efault_time($time_schedule['sehri'], $sehri_adjust) );114 echo esc_html($sehri_title) . ' ' . esc_html( $this->get_functions->mptbd_prayer_district_time($time_schedule['sehri'], $sehri_adjust) ); 115 115 } 116 116 } else { … … 118 118 echo esc_html($sehri_title) . ' ' . esc_html( $this->get_functions->mptbd_prayer_district_time($time_schedule['sehri'], $adjust_time, 'sehri') ); 119 119 } else { 120 echo esc_html($sehri_title) . ' ' . esc_html( $this->get_functions->mptbd_prayer_d efault_time($time_schedule['sehri'], $sehri_adjust) );120 echo esc_html($sehri_title) . ' ' . esc_html( $this->get_functions->mptbd_prayer_district_time($time_schedule['sehri'], $sehri_adjust) ); 121 121 } 122 122 } ?> … … 155 155 echo esc_html($iftar_title) . ' ' . esc_html( $this->get_functions->mptbd_prayer_district_time($time_schedule['maghrib'], '+8 minutes') ); 156 156 } else { 157 echo esc_html($iftar_title) . ' ' . esc_html( $this->get_functions->mptbd_prayer_d efault_time($time_schedule['maghrib'], $prayer_adjust) );157 echo esc_html($iftar_title) . ' ' . esc_html( $this->get_functions->mptbd_prayer_district_time($time_schedule['maghrib'], $prayer_adjust) ); 158 158 } 159 159 } else { … … 161 161 echo esc_html($iftar_title) . ' ' . esc_html( $this->get_functions->mptbd_prayer_district_time($time_schedule['maghrib'], $adjust_time) ); 162 162 } else { 163 echo esc_html($iftar_title) . ' ' . esc_html( $this->get_functions->mptbd_prayer_d efault_time($time_schedule['maghrib'], $prayer_adjust) );163 echo esc_html($iftar_title) . ' ' . esc_html( $this->get_functions->mptbd_prayer_district_time($time_schedule['maghrib'], $prayer_adjust) ); 164 164 } 165 165 } ?> -
muslim-prayer-time-bd/trunk/readme.txt
r3242337 r3243224 1 1 === Muslim Prayer Time BD – Prayer Reminder for Bangladesh === 2 2 Contributors: realwebcare 3 Tags: timetable, prayer schedule, time widget, reminder, time settings3 Tags: salat, salat time, prayer time, namaz, Islam 4 4 Requires at least: 5.2 5 5 Tested up to: 6.7 … … 21 21 With Muslim Prayer Time BD, you can effortlessly display the daily prayer timetable for your location. The plugin is **built on the official perpetual prayer calendar for Bangladesh**, ensuring that the times are always accurate and relevant. During Ramadan, you can activate the option to show **Sehri** and **Iftar** timings, allowing your visitors to stay informed about important meal times during the fasting period. 22 22 23 This plugin also provides the flexibility to display multiple widgets on your site. You can customize each widget to show only prayer times, only Sehri and Iftar times, or both. Simply enable or disable the options based on your preferences. For example, if you want to display just the Sehri and Iftar times, you can easily uncheck the **Show Prayer Time** option.23 This plugin also allows you to display multiple widgets on your site, each with customizable settings. You can choose to display only `prayer times`, `Sehri` and `Iftar` times, or both. Additionally, you can adjust the **Default City** and display **Islamic Quotes** for each widget. Simply adjust these options according to your preference. For instance, if you only want to display `Sehri` and `Iftar` times, you can uncheck the **Show Prayer Time** option. The flexibility to customize each widget ensures a personalized experience for your site visitors. 24 24 25 25 Additionally, the plugin allows you to personalize the display according to your style. You can modify the prayer names, choose between **12-hour or 24-hour time formats**, set custom names for the Sehri and Iftar cards, and adjust the widget's background color, font color, font weight, and text alignment to suit your site's theme. … … 35 35 36 36 37 = Usage = 38 * Install and activate the plugin. Go to your Dashboard, then navigate to **Appearance >> Widgets**. There you will find the **Muslim Prayer Time BD** widget. Just drag and drop the widget into your sidebar, enter a widget title, and save it. Visit your site, and you will see the Prayer Timetable in your sidebar. 39 * Additionally, you can display the Prayer Timetable anywhere on your site using the shortcode `[prayer_time]`. You can customize the output with optional attributes such as `ct` (for default city) and `qt` (for displaying quotes). Simply add the shortcode to any post, page, or widget where you'd like the prayer times to appear. 37 == Usage == 38 39 = Using Classic Widget = 40 1. Go to **Dashboard >> Appearance >> Widgets**. 41 2. Find the **Muslim Prayer Time BD** widget. 42 3. Drag and drop it into your sidebar, set a title, and save. 43 4. Visit your site to see the Prayer Timetable in your sidebar. 44 45 = Using Block Widget = 46 1. Go to **Dashboard >> Appearance >> Widgets**. 47 2. In the editor, click the + (Add Block) button and search for 'Muslim Prayer Time BD'. 48 3. Click to add the block to your desired area or page. 49 4. Customize settings to display Prayer time, Sehri time, or both. 50 51 = Using Shortcode = 52 Use the shortcode `[prayer_time]` to display the Prayer Timetable anywhere. Customize it with optional attributes: 53 – `ct` (default city) 54 – `qt` (display quotes) 55 Add the shortcode to any post, page, or widget. 40 56 41 57 42 58 = Features: = 43 –Auto generated prayer timetable.44 –Option to adjust prayer time and sehri time.45 –Option to display prayer timetable for any district of Bangladesh.46 –Option to display prayer timetable using shortcode in any post/page.47 –Option to select the default city using the `ct` shortcode attribute.48 –Option to display Islamic quotes using the `qt` shortcode attribute.49 –Option to show various Islamic Quotes below the prayer timetable.50 –Option to set font size, font weight, and font color for the Islamic Quotes.51 –Option to set background color for the Islamic Quotes.52 –Option to set time interval between Islamic Quotes.53 –Option to display Sehri last time.54 –Option to set Prayer names.55 –Option to set time format (12/24 hours and AM/PM).56 –Option to set Sehri and Iftar card name.57 –Unlimited background color for Prayer name and time.58 –Unlimited background color for Sehri and Iftar time.59 –Unlimited font color for Prayer name and time.60 –Unlimited font color for Sehri time.61 –Option to set font weight.62 –Option to set text align.63 –Option to set prayer image.64 –Option to remove plugin settings from the database on uninstallation.65 –Option to set the maximum width for prayer time display.66 –Modern and user-friendly admin interface.67 –Help page with plugin features and usage instructions.59 * Auto generated prayer timetable. 60 * Option to adjust prayer time and sehri time. 61 * Option to display prayer timetable for any district of Bangladesh. 62 * Option to display prayer timetable using shortcode in any post/page. 63 * Option to select the default city using the `ct` shortcode attribute. 64 * Option to display Islamic quotes using the `qt` shortcode attribute. 65 * Option to show various Islamic Quotes below the prayer timetable. 66 * Option to set font size, font weight, and font color for the Islamic Quotes. 67 * Option to set background color for the Islamic Quotes. 68 * Option to set time interval between Islamic Quotes. 69 * Option to display Sehri last time. 70 * Option to set Prayer names. 71 * Option to set time format (12/24 hours and AM/PM). 72 * Option to set Sehri and Iftar card name. 73 * Unlimited background color for Prayer name and time. 74 * Unlimited background color for Sehri and Iftar time. 75 * Unlimited font color for Prayer name and time. 76 * Unlimited font color for Sehri time. 77 * Option to set font weight. 78 * Option to set text align. 79 * Option to set prayer image. 80 * Option to remove plugin settings from the database on uninstallation. 81 * Option to set the maximum width for prayer time display. 82 * Modern and user-friendly admin interface. 83 * Help page with plugin features and usage instructions. 68 84 69 85 … … 71 87 72 88 = 1. How can I display the prayer time on my website? = 73 You can display the prayer time by using the widget in the **Appearance >> Widgets** section of your WordPress dashboard, or by using the provided shortcode in your posts or pages.89 You can display the prayer time by using the **Muslim Prayer Time BD** widget available in the **Appearance >> Widgets** section of your WordPress dashboard. Alternatively, you can use the provided shortcode in your posts or pages to display the prayer timetable anywhere on your website. 74 90 75 91 = 2. How can I adjust the prayer times for my location? = 76 You can adjust the prayer times by going to the plugin settings and modifying the prayer time for your specific location. You can also manually adjust the times as needed using the options available in the settings.92 You can adjust the prayer times by going to the plugin settings in the **Prayer Time BD** menu in the WordPress admin dashboard. The settings offer options to manually adjust the prayer times for your specific location. The plugin is built on the official perpetual prayer calendar for Bangladesh, ensuring accurate prayer times. 77 93 78 94 = 3. Can I show both prayer and sehri times on the same widget? = 79 Yes, you can display both prayer and sehritimes in the widget. You can choose to show both or display them individually by enabling or disabling the relevant options in the widget settings.95 Yes, the plugin allows you to display both prayer and sehri (and iftar) times in the widget. You can choose to show both or display them individually by enabling or disabling the relevant options in the widget settings. 80 96 81 97 = 4. How do I update the plugin? = 82 To update the plugin, go to your WordPress dashboard and navigate to Plugins. If there is an update available, you will see the option to update the Muslim Prayer Time BD plugin. Just click on the **Update Now** button.98 To update the plugin, go to your WordPress dashboard and navigate to **Plugins**. If a new version is available, you will see the option to update the **Muslim Prayer Time BD** plugin. Simply click the **Update Now** button to upgrade to the latest version. 83 99 84 100 = 5. What do I do if I encounter a security issue? = 85 If you encounter any security issues, please ensure you are using the latest version of the plugin. If a new security vulnerability is discovered, we will release an update and inform users accordingly. 101 If you encounter any security issues, make sure you are using the latest version of the plugin. We regularly release updates to address any security vulnerabilities, and you will be informed through update notifications. If an issue arises, please contact us immediately. 102 103 = 6. Can I customize the appearance of the prayer timetable? = 104 Yes, you can fully customize the appearance of the prayer timetable displayed on your site. The plugin allows you to adjust the font color, size, weight, and background color for both prayer names and times. You can also set the text alignment and choose between a 12-hour or 24-hour time format to match your site's theme. 105 106 = 7. Can I display Sehri and Iftar times during Ramadan? = 107 Yes, during Ramadan, the plugin gives you the option to display both Sehri and Iftar times. These times can be displayed alongside the regular prayer times or separately, depending on your settings. You can also set custom names for the Sehri and Iftar cards. 108 109 = 8. Can I use different default cities for different widgets? = 110 Yes, the plugin includes a new `ct` shortcode attribute, which allows you to set a different default city for each widget or shortcode instance. This feature is particularly useful if you are displaying prayer times for multiple locations on the same page. 111 112 = 9. How do I display Islamic Quotes with the prayer timetable? = 113 The plugin includes a `qt` shortcode attribute that lets you display Islamic quotes below the prayer timetable. You can enter custom quotes, and if set, they will override the plugin's default quote settings. Additionally, you can set the interval time and the background color for the quotes display. 114 115 = 10. What changes have been made in version 3.0? = 116 Version 3.0 includes major updates, including a complete transition to **Object-Oriented Programming (OOP)**. Key changes include the introduction of the `ct` and `qt` shortcode attributes, new customization options for font size, color, and weight for prayer times and Islamic quotes, and a redesigned admin interface. Please refer to the **Instructions after upgrading to version 3.0** section for details on settings changes. 117 118 = 11. What should I do after upgrading to version 3.0? = 119 After upgrading to version 3.0, please review the plugin's settings. Due to structural changes in the settings, some previous settings may have been lost or altered. While we’ve tried to migrate old options to the new ones, manual adjustments may be necessary. Also, the Prayer Settings menu has been moved to the **Prayer Time BD** section in the WordPress admin dashboard. 86 120 87 121 … … 93 127 == Upgrade Notice == 94 128 129 = 3.0.1 = 130 – Updated widget to set default city and display Islamic quotes. 131 – Fixed time calculation for accurate prayer times in Bangladesh (UTC+6), regardless of WordPress timezone. 132 95 133 = 3.0 = 96 This update introduces a major refactor with full implementation of Object-Oriented Programming (OOP). Key new features include the ability to remove plugin settings on uninstallation, customizable font options for prayer and Sehri/Iftar times, and options to display Islamic quotes with adjustable settings. We've added two new shortcode attributes: **ct** (for default city) and **qt** (for custom quotes). The Prayer Time settings have been moved to the new **Prayer Time BD** menu, and the admin interface has been enhanced for a more modern and user-friendly experience. Be sure to check out the new Help page for full plugin usage instructions. 134 – Major refactor with full OOP implementation. 135 – New options to display Islamic quotes with adjustable settings. 136 – Added two new shortcode attributes: **ct** (default city) & **qt** (custom quotes). 137 – Prayer Time settings moved to the new **Prayer Time BD** menu. 138 – Visit the new Help page for full usage instructions. 97 139 98 140 99 141 == Changelog == 142 143 = 3.0.1 (19 February 2025) = 144 * Widget has been updated by adding option to set default city and Islamic quotes. 145 * Fixed time calculation issues for prayer times to ensure accurate display in Bangladesh time (UTC+6) regardless of WordPress timezone settings. 100 146 101 147 = 3.0 (18 February 2025) = … … 178 224 179 225 == Installation == 180 181 1. Upload the whole plugin folder to your /wp-content/plugins/ folder. 182 2. Install and activate the plugin. 183 3. Go to: Appearance >> Widgets. 184 4. Drag and drop 'Muslim Prayer Time BD' widget in your sidebar. 185 5. To display Sehri last time go to Settings >> Prayer Settings and enable Sehri time. 226 `Muslim Prayer Time BD` can be installed in two convenient ways: manually or directly from the WordPress plugin directory. 227 228 **Manual Installation:** 229 1. Log in to your WordPress admin dashboard. 230 2. Navigate to "Plugins" in the left menu and click "Add New." 231 3. Click "Upload Plugin" and choose the muslim-prayer-time-bd.zip file. Click "Install Now." 232 4. Once installed, activate the plugin. 233 5. Configure the ticker settings under "Prayer Time BD" >> "Muslim Prayer Time." 234 235 **Installation from WordPress Plugin Directory:** 236 1. Log in to your WordPress admin dashboard. 237 2. In the left menu, click "Plugins," then select "Add New." 238 3. In the search field, type "Muslim Prayer Time BD" and press Enter. 239 4. Locate the plugin in the search results and click the "Install Now" button. 240 5. After installation, activate the plugin. 241 6. Configure the ticker settings under "Prayer Time BD" >> "Muslim Prayer Time." 186 242 187 243 … … 197 253 4. Multiple Prayer Timetables with Islamic Quotes. 198 254 5. Prayer Table General Options. 255 6. Search for `Muslim` and see the `Muslim Prayer Time BD` widget in the list. 256 7. `Muslim Prayer Time BD` widget with 4 input options. -
muslim-prayer-time-bd/trunk/settings/mptbd-class.settings-api.php
r3242321 r3243224 12 12 * @example example/oop-example.php How to use the class 13 13 * 14 * @package Muslim Prayer Time BD - v3.0 - 18 February, 202514 * @package Muslim Prayer Time BD - v3.0.1 - 18 February, 2025 15 15 * @link https://www.realwebcare.com/ 16 16 */ -
muslim-prayer-time-bd/trunk/settings/mptbd-settings.php
r3242321 r3243224 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 - 18 February, 20259 * @package Muslim Prayer Time BD - v3.0.1 - 18 February, 2025 10 10 * @link https://www.realwebcare.com/ 11 11 */
Note: See TracChangeset
for help on using the changeset viewer.