Plugin Directory

Changeset 3463637


Ignore:
Timestamp:
02/17/2026 03:43:04 PM (6 weeks ago)
Author:
adatosystems
Message:

Added announcement option (shortcode zman_announcement)

Location:
zmanim-wp
Files:
1226 added
3 edited

Legend:

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

    r3452546 r3463637  
    44Tags: #time #zmanim #jewish
    55Tested up to: 6.9
    6 Stable tag: 2.2.3
     6Stable tag: 2.3.0
    77License: GPLv2 or later
    88License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    255255
    256256== Changelog ==
     257= 2.3.0 =
     258* Added announcement box (shortcode: zman_announcement)
     259
    257260= 2.2.3 =
    258261* fixed issue with yomtov spacing and title visibility
  • zmanim-wp/trunk/zmanim-wp-functions.php

    r3452546 r3463637  
    9090    if ( !$location ) {
    9191        $location = "BKCS Cleveland";
     92    }
     93    $announcement = get_option( 'wpkz_announcement' );
     94    if ( !$announcement ) {
     95        $location = "";
    9296    }
    9397    if ( !$dateinput ) {
     
    176180        return $location;
    177181    } // end location_handler
     182
     183    function announcement_handler() {
     184        $announcement = get_option( 'wpkz_announcement' );
     185        if ( !$announcement ) {
     186            $announcement = "";
     187        }
     188        return $announcement;
     189    } // end announcement_handler
    178190
    179191    function nusach_handler() {
     
    10791091        if ($specialParsha>0) {
    10801092            if ($nusach ==1 ) {
    1081                 $output = "Shabbat ";
     1093                $output = "Shabbat";
    10821094            } else {
    1083                 $output = "Shabbos ";
     1095                $output = "Shabbos";
    10841096            }
    10851097            if ( strtolower( $atts['lang'] ) == 'hebrew' ) {
     
    10891101        } elseif ($yomtovindex>-1) {
    10901102            if ($nusach ==1 ) {
    1091                 $output = "Shabbat ";
     1103                $output = "Shabbat";
    10921104            } else {
    1093                 $output = "Shabbos ";
     1105                $output = "Shabbos";
    10941106            }
    10951107            if ( strtolower( $atts['lang'] ) == 'hebrew' ) {
  • zmanim-wp/trunk/zmanim-wp.php

    r3452546 r3463637  
    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.2.3
     13 * Version:           2.3.0
    1414 * Author:            Leon Adato
    1515 * Author URI:        https://adatosystems.com/
     
    117117        ) );
    118118    }
    119 # special sanitize for molad and chodesh to allow html
     119# special sanitize for molad, chodesh, and announcements to allow html
    120120    register_setting( 'zmanim_wp-settings_general', 'wpkz_molad', array(
    121121        'type'              => 'string',
     
    124124
    125125    register_setting( 'zmanim_wp-settings_general', 'wpkz_chodesh', array(
     126        'type'              => 'string',
     127        'sanitize_callback' => 'wp_kses_post',
     128    ) );
     129
     130    register_setting( 'zmanim_wp-settings_general', 'wpkz_announcement', array(
    126131        'type'              => 'string',
    127132        'sanitize_callback' => 'wp_kses_post',
     
    290295      </td></tr>
    291296      <tr><td>Rosh Chodesh Text: </td>
    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
    293     echo esc_html( get_option( 'wpkz_chodesh' ) );
    294     ?>"/>
     297        <td>Give the text that will appear in front of the Rosh Chodesh calculation. HTML tags are permitted:
     298            <input name="wpkz_chodesh" value="<?php echo esc_html( get_option( 'wpkz_chodesh' ) ); ?>"/>
    295299      </td></tr>
     300      <tr><td>Announcement Text: </td>
     301        <td>This text will appear wherever you use the zman_announcement shortcode. HTML tags are permitted:
     302            <textarea name="wpkz_announcement" rows="10" cols="50" maxlength="5000"><?php echo esc_html(get_option('wpkz_announcement'));?></textarea>
     303      </td></tr>     
    296304    </table>
    297305  <?php
     
    14371445    'tzone',
    14381446    'location',
     1447    'announcement',
    14391448    'lat',
    14401449    'long',
Note: See TracChangeset for help on using the changeset viewer.