Plugin Directory

Changeset 3426962


Ignore:
Timestamp:
12/24/2025 04:25:14 PM (3 months ago)
Author:
adatosystems
Message:

tested to wp 6.9; nusach updates, added yomtov, modified zman_date

Location:
zmanim-wp
Files:
1222 added
3 edited

Legend:

Unmodified
Added
Removed
  • zmanim-wp/trunk/README.txt

    r3423715 r3426962  
    11=== Zmanim WP ===
    2 Contributors: AdatoSystems, freemius
     2Contributors: AdatoSystems
    33Donate link: https://adatosystems.com
    44Tags: #time #zmanim #jewish
    5 Tested up to: 6.8
    6 Stable tag: 2.1.1
     5Tested up to: 6.9
     6Stable tag: 2.2.0
    77License: GPLv2 or later
    88License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    3131
    3232The admin page options and shortcodes are described in detail below.
    33 
    34 == A note about free vs paid ==
    35 Zmanim WP is a "freemium" product. As such, the core features are available without any charge, but certain advanced options are only available in the paid version. Paid items are noted with an asterisk (\*) below.
    36 
    37 To download the free version, [click here]().
    38 
    39 To download/upgrade to the paid version with extra features, [click here](https://checkout.freemius.com/plugin/16788/plan/28011/).
    4033
    4134== Usage – the Admin Panel ==
     
    225218
    226219**Advanced and Special Zmanim**
    227 The following shortcodes are only available in the paid version of the Zmanim WP plugin. To download/upgrade to the paid version with extra features, [click here](https://checkout.freemius.com/plugin/16788/plan/28011/).
    228 
    229220 – zman_earlyshkia -Displays the earliest shkia time for the week (Sunday – Thursday) in which the provided date occurs.
    230221Example 1: show earliest shkia for this week:
     
    264255
    265256== Changelog ==
     257= 2.2.0 =
     258* Tested up to WordPress version 6.9
     259* Nusach checkbox now also controls month names and holiday/yomtov names
     260* added [zman_yomtov] - indicates if it's a special chag coming up.
     261* [zman_date] now takes lang= options "english", "hebrew", and "transliterated" to output separate styles of date
     262
    266263= 2.1.1 =
    267264* fixed multiple versioning issues because I'm an idiot when it comes to SVN.
    268265
    269266= 2.1.0 =
    270 * Added zman_mevorchim for more accurate molad and chodesh
     267* Added zman_mevorchim for more accurate molad and chodesh. Takes additional parameter "get=" with options "molad", "chodesh", or "both".
    271268
    272269= 2.0.0 =
  • zmanim-wp/trunk/zmanim-wp-functions.php

    r3422443 r3426962  
    390390        if ( strtolower( $atts['lang'] ) == 'hebrew' ) {
    391391            $format->setHebrewFormat( true );
    392         }
    393         $zmandate = json_decode( '"' . $format->format( $jewishCalendar ) . '"' );
    394         $engdate = gmdate( 'd M Y', strtotime( "{$theyear}-{$themonth}-{$theday}" ) );
    395         $output = "{$engdate} / {$zmandate}";
     392            $zmandate = json_decode( '"' . $format->format( $jewishCalendar ) . '"' );
     393        } elseif (strtolower( $atts['lang'] ) == 'transliterated' || strtolower( $atts['lang'] ) == 'translit'  || strtolower( $atts['lang'] ) == 'trans' )  {
     394            $zmandate = json_decode( '"' . $format->format( $jewishCalendar ) . '"' );
     395        } else {
     396            $zmandate = gmdate( 'd M Y', strtotime( "{$theyear}-{$themonth}-{$theday}" ) );   
     397        }
     398
     399        $output = $zmandate;
    396400        return $output;
    397401    } // end zmandate_handler
     
    452456        $ismevorchim = $mevorchimdate->isShabbosMevorchim();
    453457
    454 // echo "\n\natts before: ";
    455 // print_r($atts);
    456 
    457458        if ($ismevorchim == true)
    458459        {
    459460            $thedate = gmdate( 'Y-m-d', strtotime($thedate));
    460461            $atts['date'] = $thedate;
    461 
    462 // echo "\n\natts after: ";
    463 // print_r($atts);
    464 // echo "\n\n";
    465 
    466             $molad = molad_handler($atts);
    467             $chodesh = chodesh_handler($atts);
    468 
    469             if ($atts['get'] == "molad") {
     462            $attsget = $atts['get'];
     463            if ($attsget == "molad") {
     464                $molad = molad_handler($atts);
    470465                return $molad;
    471             } elseif ($atts['get'] == "chodesh") {
     466            } elseif ($attsget == "chodesh") {
     467                $chodesh = chodesh_handler($atts);
    472468                return $chodesh;
    473             } elseif ($atts['get'] == "both" || $atts['get'] == "")  {
     469            } elseif ($attsget == "both" || $atts['get'] == "")  {
     470                $molad = molad_handler($atts);
     471                $chodesh = chodesh_handler($atts);
    474472                return $molad."<br><br>".$chodesh;
    475473            } else { return ""; }
    476474        } else {return "";}
     475
    477476
    478477    }  // end mevorchim_handler
     
    552551
    553552    // uncomment for testing
    554     //echo "zmanimwp_fakedate: $zmanimwp_fakedate, thedate: $thedate, today year-month-day: $chodeshyear-$todayhebmonth-$todayhebday, chodesh: $chodeshdateeng, molad: $moladdate\n";
     553    #echo "zmanimwp_fakedate: $zmanimwp_fakedate, thedate: $thedate, today year-month-day: $chodeshyear-$todayhebmonth-$todayhebday, chodesh: $chodeshdateeng, molad: $moladdate\n";
    555554
    556555        $moladhours = $molad->getMoladHours();
    557556        $moladminutes = $molad->getMoladMinutes();
    558         $moladhoursformatted = gmdate( $dateformat, strtotime( "{$moladhours}:{$moladminutes}" ) );
     557        $moladhoursformatted = gmdate('g a', strtotime( "{$moladhours}:{$moladminutes}" ) );
    559558        $moladchalakim = $molad->getMoladChalakim();
    560559        if ($moladchalakim == 0) {
     
    585584        }
    586585        return $moladstring;
     586
     587$file = fopen("./gfg.txt", "a");
     588$msg = "\n\nmoladstring: $moladstring\n";
     589fwrite($file, $msg);
     590fclose($file);
     591
    587592    } // end molad_handler
    588593
     
    612617        $dateformat = $atts['dateformat'];
    613618        $lang = $atts['lang'];
    614         $rhtitle = get_option( 'wpkz_chodesh' ) . "<br>";
     619        $rhtitle = get_option( 'wpkz_chodesh' )  . "<br>";
     620#echo "title: $rhtitle";
     621        #$rhtitle = get_option( 'wpkz_chodesh' ) . "<br>";
    615622        # figure out when they want this (today, next week, or a date)
    616623        # and get either THIS sunday, the FOLLOWING sunday, or leave it alone
     
    10611068        $format = Zmanim::format();
    10621069
    1063         if ( $nusach == 1 ) {
    1064             list($transliteratedParshaMap,$transliteratedMonths,$transliteratedHolidays) = nusach_handler();
    1065             $format->setTransliteratedHolidayList($transliteratedHolidays);
    1066         }
     1070        if ($format->formatYomTov($jewishCalendar) != "") {
     1071            if ( $nusach == 1 ) {
     1072                list($transliteratedParshaMap,$transliteratedMonths,$transliteratedHolidays) = nusach_handler();
     1073                $format->setTransliteratedMonthList($transliteratedMonths);
     1074                $output = $format->formatYomTov($jewishCalendar);
     1075                $output = "Shabbat $output<BR>";
     1076            }
    10671077        if ( strtolower( $atts['lang'] ) == 'hebrew' ) {
    1068             $format->setHebrewFormat( true );
    1069         }
    1070 
    1071         $output = $format->formatYomTov($jewishCalendar);
     1078                $format->setHebrewFormat( true );
     1079                $output = $format->formatYomTov($jewishCalendar);
     1080                $output = "שַׁבָּת $output<BR>";
     1081            }
     1082        }
     1083       
    10721084        return $output;
    10731085    } #end yomtov_handler
  • zmanim-wp/trunk/zmanim-wp.php

    r3423715 r3426962  
    1111 * Plugin URI:        https://www.adatosystems.com/zmanim-wp/
    1212 * Description:       Choose from a variety of shitot (opinions), use shortcodes (with options) to display those times in posts, pages, and widgets. With gratitude to Eliyahu Hershfeld, Zachary Weixelbaum, and Elyahu Jacobi.
    13  * Version:           2.1.1
     13 * Version:           2.2.0
    1414 * Author:            Leon Adato
    1515 * Author URI:        https://adatosystems.com/
     
    285285      </td></tr>
    286286      <tr><td>Molad Text: </td>
    287         <td>Give the text that will appear in front of the molad calculation. HTML styling is permitted.: <input name="wpkz_molad" value="<?php
     287        <td>Give the text that will appear in front of the molad calculation. HTML tags are permitted.: <input name="wpkz_molad" value="<?php
    288288    echo esc_html( get_option( 'wpkz_molad' ) );
    289289    ?>"/>
    290290      </td></tr>
    291291      <tr><td>Rosh Chodesh Text: </td>
    292         <td>Give the text that will appear in front of the Rosh Chodesh calculation. HTML styling is permitted.: <input name="wpkz_chodesh" value="<?php
     292        <td>Give the text that will appear in front of the Rosh Chodesh calculation. HTML tags are permitted.: <input name="wpkz_chodesh" value="<?php
    293293    echo esc_html( get_option( 'wpkz_chodesh' ) );
    294294    ?>"/>
Note: See TracChangeset for help on using the changeset viewer.