Note: This plugin uses Zemanim API (https://wyrezmanim.herokuapp.com/api/zmanim), for more information see https://wyrezmanim.herokuapp.
Author: | Shabbos Commerce (profile at wordpress.org) |
WordPress version required: | 4.3.0 |
WordPress version tested: | 4.9.8 |
Plugin version: | 1.9 |
Added to WordPress repository: | 10-10-2018 |
Last updated: | 30-11-2018
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
|
Rating, %: | 0 |
Rated by: | 0 |
Plugin URI: | |
Total downloads: | 875 |
Active installs: | 10+ |
Click to start download
|
FAQ
Can I use this plugin to close my entire site on Shobbos?
This plugin was not created for this intent but rather to close the checkout counter. WP-Shabbat was created for this.
However you can still do this using this plugin by editing your theme or by adding a function to your site’s plugin. Remember this plugin will on your time zone and location that you set not of the user of you site.
In both examples a cookie is set on weekdays so it will not have to check on every page if it is Shabbos or Yom Tov, only once in 10 minutes.
Note: If you have a commercial theme do not edit your theme files because it would be deleted when you update your theme, rather make a child theme or do this in a plugin).
In your theme, it should look something like this:
$atts = array ();
if (!$_COOKIE['weekday'] == 'true'){
if (!$shabbosMessage = Shabbos_and_YomTov($atts, FALSE)){
//Set a weekday cookie
setcookie ('weekday', 'true', time() + 600, '/');
}
}
if ($shabbosMessage){
echo $shabbosMessage;
} else {
the_post();
// all post info ...
}
In a plugin:
Note: The following plugin will only hide the content of the post.
function check_if_shabbos($content){
if ($_COOKIE['weekday'] == 'true'){
return $content;
}
// Here you can set attributes if it is different then set at 'Settings>Shabbos and Yom Tov'.
$atts = array ();
if ($shabbosMessage = Shabbos_and_YomTov($atts, FALSE)){
return $shabbosMessage;
} else {
//Set a weekday cookie
setcookie ('weekday', 'true', time() + 600, '/');
return $content;
}
}
add_filter( 'the_content', 'check_if_shabbos');
Ask a question
Send your question to shabboscommerce@gmail.com.
ChangeLog
1.9
- Timezone validation upgraded.
- Timezones dropdown on admin page.
1.8
- Time zones are validated.
- Can now use time zone abbreviations.
1.7
- The Shabbos or Yom-Tov Message can contain shortcodes when the message is saved in “Settings>Shabbos and Yom Tov”.
1.6