Plugin Directory

Changeset 1140385


Ignore:
Timestamp:
04/21/2015 09:38:01 AM (11 years ago)
Author:
zakirdaq
Message:

Initial bug fix and update readme.txt

Location:
wp-bongabdo-date/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • wp-bongabdo-date/trunk/readme.txt

    r1140253 r1140385  
    33Donate link: http://facebook.com/ZakirDakua
    44Tags: Bangla, Bengali, Bangla Date, Bongabdo, Bongabdo Date
    5 Requires at least: 3.0.1
    6 Tested up to: 4.2
    7 Stable tag: 4.3
     5Requires at least: 3.1.1
     6Tested up to: 4.1.1
     7Stable tag: 13.0
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
  • wp-bongabdo-date/trunk/wp-bongabdo-date-functions.php

    r1140253 r1140385  
    11<?php
    2 function wp_bongabdo_date_post($the_date, $d, $post) {
     2function wp_bongabdo_date_post($d) {
     3    global $post;
    34    $wp_bongabdo = wp_bongabdo(strtotime( $post->post_date ));
    45    return $wp_bongabdo[0] . ' ' . $wp_bongabdo[1] . ' ' . $wp_bongabdo[2];
     
    8384    return ($matches[0]);
    8485}
    85 ?>
  • wp-bongabdo-date/trunk/wp-bongabdo-date-settings.php

    r1140253 r1140385  
    1 <?php
     1<?php
    22function wpbd_options_page() {
    33    ?>
     
    4949add_action('admin_menu', 'wpbd_admin');
    5050add_action('admin_init', 'register_wpbd_settings');
    51 ?>
  • wp-bongabdo-date/trunk/wp-bongabdo-date.php

    r1140268 r1140385  
    1 <?php
    2     /*
    3     Plugin Name: WP Bongabdo Date
    4     Plugin URI: http://webnitpark.com/
    5     Description: Converts post/page and comments date from Gregorian Date to Bongabdo Date. It is based on Dr. Muhammed Shahidullah's Bangla calendar approved by People's Republic of Bangladesh. Once you activate the plugin, automatically date and time will be changed to Bongabdo date for all posts and comments. You can show it in both English and Bangla language.
    6     Author: Zakir Hossain
    7     Version: 13.0
    8     Author URI: http://facebook.com/ZakirDakua
    9     */
     1<?php
     2/*
     3Plugin Name: WP Bongabdo Date
     4Plugin URI: http://webnitpark.com/
     5Description: Converts Date to Bongabdo Date. Once you activate the plugin, automatically date and time will be changed to Bongabdo date for all posts and comments. You can show it in both english and bangla language.
     6Author: Zakir Hossain
     7Version: 13.0
     8Author URI: http://facebook.com/ZakirDakua
     9*/
    1010
    11     include "wp-bongabdo-date-functions.php";
     11include 'wp-bongabdo-date-functions.php';
    1212
    13     $wpbd_options = get_option("wpbd_options");
    14     if (!is_array($wpbd_options)) {
    15         $wpbd_options = array(
    16             'months_in_bangla' => '0',
    17             'digits_in_bangla' => '0'
    18         );
    19     }
    20      
    21     add_filter('get_comment_date', 'wp_bongabdo_date_comment',0,2);
    22     add_filter('get_the_date', 'wp_bongabdo_date_post',0,4);
     13$wpbd_options = get_option("wpbd_options");
     14if (!is_array($wpbd_options)) {
     15    $wpbd_options = array(
     16        'months_in_bangla' => '0',
     17        'digits_in_bangla' => '0'
     18    );
     19}
     20 
     21add_filter('get_comment_date', 'wp_bongabdo_date_comment',0,2);
     22add_filter('get_the_date', 'wp_bongabdo_date_post',0,4);
     23
     24if($wpbd_options['months_in_bangla'] == "1") {
     25    add_filter('date_i18n', 'months_to_bn');
     26    add_filter('get_the_date', 'months_to_bn');
     27    add_filter('get_comment_date', 'months_to_bn');
     28    add_filter('number_format_i18n', 'months_to_bn');
     29}
     30
     31if($wpbd_options['digits_in_bangla'] == "1") {
     32    add_filter('date_i18n', 'digits_to_bn');
     33    add_filter('get_the_date', 'digits_to_bn');
     34    add_filter('get_the_time', 'digits_to_bn');
     35    add_filter('get_comment_date', 'digits_to_bn');
     36    add_filter('get_comment_time', 'digits_to_bn');
     37    add_filter('number_format_i18n', 'digits_to_bn');
     38    add_filter('comments_number', 'digits_to_bn');
     39    add_filter('get_comment_count', 'digits_to_bn');
     40    add_filter('get_archives_link', 'digits_to_bn');
     41    add_filter('wp_list_categories', 'digits_to_bn');
     42}
     43
     44if(is_admin())
     45    include 'wp-bongabdo-date-settings.php';
    2346   
    24     if($wpbd_options['months_in_bangla'] == "1") {
    25         add_filter('date_i18n', 'months_to_bn');
    26         add_filter('get_the_date', 'months_to_bn');
    27         add_filter('get_comment_date', 'months_to_bn');
    28         add_filter('number_format_i18n', 'months_to_bn');
    29     }
    30    
    31     if($wpbd_options['digits_in_bangla'] == "1") {
    32         add_filter('date_i18n', 'digits_to_bn');
    33         add_filter('get_the_date', 'digits_to_bn');
    34         add_filter('get_the_time', 'digits_to_bn');
    35         add_filter('get_comment_date', 'digits_to_bn');
    36         add_filter('get_comment_time', 'digits_to_bn');
    37         add_filter('number_format_i18n', 'digits_to_bn');
    38         add_filter('comments_number', 'digits_to_bn');
    39         add_filter('get_comment_count', 'digits_to_bn');
    40         add_filter('get_archives_link', 'digits_to_bn');
    41         add_filter('wp_list_categories', 'digits_to_bn');
    42     }
    43    
    44     if(is_admin())
    45         include 'wp-bongabdo-date-settings.php';
    46        
    47     function wpbd_settings_links($links) {
    48         $links[] = '<a href="' . get_admin_url(null, 'options-general.php?page=wp-bongabdo-date') . '">Settings</a>';
    49         return $links;
    50     }
     47function wpbd_settings_links($links) {
     48    $links[] = '<a href="' . get_admin_url(null, 'options-general.php?page=wp-bongabdo-date') . '">Settings</a>';
     49    return $links;
     50}
    5151
    52     add_filter('plugin_action_links_' . plugin_basename(__FILE__), 'wpbd_settings_links');
    53 ?>
     52add_filter('plugin_action_links_' . plugin_basename(__FILE__), 'wpbd_settings_links');
Note: See TracChangeset for help on using the changeset viewer.