array( 'date' => true, 'time' => true ), 'date_format' => 'd m y, l', 'custom_date_format' => '' ); $default_opts = apply_filters( 'npd_modify_default_opts', $default_opts ); $opts = get_option( 'npd_opts', $default_opts ); $post_date = ( !empty( $post_date ) ) ? strtotime( $post_date ) : time(); if ( $opts['custom_date_format'] ) { $format = $opts['custom_date_format']; } else { $format = $opts['date_format']; } if ( $opts['active']['time'] ) { $converted_date = $f_date->get_converted_nepali_date( $post_date, $format, true ); } else { $converted_date = $f_date->get_converted_nepali_date( $post_date, $format ); } return $converted_date; } } if( ! function_exists( 'get_nepali_today_date' ) ) { function get_nepali_today_date() { $f_date = new Nepali_Post_Date_Frontend(); $default_opts = array( 'date_format' => 'd m y, l', 'today_date_format' => '' ); $default_opts = apply_filters( 'npd_modify_default_opts', $default_opts ); $opts = get_option( 'npd_opts', $default_opts ); if ( $opts['today_date_format'] ) { $format = $opts['today_date_format']; } else { $format = $opts['date_format']; } return $f_date->get_converted_nepali_date( time(), $format ); } } if( ! function_exists( 'convert_into_nepali_number' ) ) { function convert_into_nepali_number( $str ) { $f_date = new Nepali_Post_Date_Frontend(); return $f_date->convert_into_nepali_number( $str ); } }