Changeset 2925192
- Timestamp:
- 06/13/2023 10:01:05 AM (3 years ago)
- Location:
- notix-web-push-notifications
- Files:
-
- 40 added
- 7 edited
-
tags/1.1.9 (added)
-
tags/1.1.9/README.txt (added)
-
tags/1.1.9/admin (added)
-
tags/1.1.9/admin/class-notix-admin.php (added)
-
tags/1.1.9/admin/css (added)
-
tags/1.1.9/admin/css/notix-admin.css (added)
-
tags/1.1.9/admin/img (added)
-
tags/1.1.9/admin/img/menu-icon.png (added)
-
tags/1.1.9/admin/index.php (added)
-
tags/1.1.9/admin/js (added)
-
tags/1.1.9/admin/js/notix-admin.js (added)
-
tags/1.1.9/admin/partials (added)
-
tags/1.1.9/admin/partials/notix-admin-settings-display.php (added)
-
tags/1.1.9/admin/partials/notix-admin-settings-log-display.php (added)
-
tags/1.1.9/includes (added)
-
tags/1.1.9/includes/class-notix-activator.php (added)
-
tags/1.1.9/includes/class-notix-deactivator.php (added)
-
tags/1.1.9/includes/class-notix-i18n.php (added)
-
tags/1.1.9/includes/class-notix-loader.php (added)
-
tags/1.1.9/includes/class-notix-utils.php (added)
-
tags/1.1.9/includes/class-notix.php (added)
-
tags/1.1.9/includes/index.php (added)
-
tags/1.1.9/index.php (added)
-
tags/1.1.9/languages (added)
-
tags/1.1.9/languages/notix.pot (added)
-
tags/1.1.9/notix.php (added)
-
tags/1.1.9/public (added)
-
tags/1.1.9/public/class-notix-public.php (added)
-
tags/1.1.9/public/css (added)
-
tags/1.1.9/public/css/notix-public.css (added)
-
tags/1.1.9/public/index.php (added)
-
tags/1.1.9/public/js (added)
-
tags/1.1.9/public/js/notix-public.js (added)
-
tags/1.1.9/public/partials (added)
-
tags/1.1.9/public/partials/notix-public-display-notify-tag-subscribers-popup.php (added)
-
tags/1.1.9/public/partials/notix-public-display-notify-tag-subscribers.php (added)
-
tags/1.1.9/public/partials/notix-public-display-tag.php (added)
-
tags/1.1.9/public/partials/notix-public-display.php (added)
-
tags/1.1.9/public/sw.enot.js (added)
-
tags/1.1.9/uninstall.php (added)
-
trunk/README.txt (modified) (2 diffs)
-
trunk/admin/class-notix-admin.php (modified) (3 diffs)
-
trunk/admin/css/notix-admin.css (modified) (1 diff)
-
trunk/admin/partials/notix-admin-settings-display.php (modified) (4 diffs)
-
trunk/includes/class-notix.php (modified) (2 diffs)
-
trunk/notix.php (modified) (3 diffs)
-
trunk/public/partials/notix-public-display-tag.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
notix-web-push-notifications/trunk/README.txt
r2894245 r2925192 5 5 Requires at least: 4.9.4 6 6 Tested up to: 6.2.0 7 Stable tag: 1.1. 87 Stable tag: 1.1.9 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 83 83 == Changelog == 84 84 85 = 1.1.9 = 86 - Added service worker in site root feature 87 - Fix resetting status for edit scheduled post 88 85 89 = 1.1.8 = 86 90 - Handling scheduled posts feature -
notix-web-push-notifications/trunk/admin/class-notix-admin.php
r2894245 r2925192 90 90 $this->utils->register_setting(Notix::$NOTIX_API_TOKEN_SETTINGS_KEY, 'Notix API Token'); 91 91 $this->utils->register_setting(Notix::$NOTIX_AUTO_SEND_FEATURE_ENABLED, 'Notix Auto Send feature'); 92 $this->utils->register_setting(Notix::$NOTIX_ROOT_SW_FETURE_ENABLED, 'Notix service worker uploaded in site root directory feature'); 92 93 $this->utils->register_setting('notix_error_notices', 'Notix API Token'); 93 94 } … … 141 142 $isSended = isset($postStatusSend) && is_array($postStatusSend) && count($postStatusSend) > 0 && $postStatusSend[0] == "true"; 142 143 143 $isAutoSendEnabledCheckboxStatus = esc_attr(get_option(Notix::$NOTIX_AUTO_SEND_FEATURE_ENABLED)) == "on" ? 'checked': ""; 144 $isAutoSendEnabledCheckboxStatus = esc_attr(get_option(Notix::$NOTIX_AUTO_SEND_FEATURE_ENABLED)) == "on"; 145 146 $postSendPushChecked = get_post_meta($post->ID, 'notix_send_checkbox'); 147 $isChecked = isset($postSendPushChecked) && is_array($postSendPushChecked) && count($postSendPushChecked) > 0 && $postSendPushChecked[0] == "on"; 148 149 $postIsFuture = get_post_status($post) && get_post_status($post) == 'future'; 150 151 $currentCheckboxStatus = ($isAutoSendEnabledCheckboxStatus || ($isChecked && $postIsFuture)) ? 'checked': ""; 144 152 145 153 if ($isSended) { … … 151 159 <input type="button" style="<?php if (!$postPublished) echo 'display: none;' ?>" name="notix_send_button" id="notix_send_button" value="<?php echo $sendButtonText; ?>" /> 152 160 <label for="notix_send_button" id="notix_send_button_label" style="<?php if (!$postPublished) { echo 'display: none;'; } else {echo 'display: block;'; } ?>"><?php echo $sendButtonLabel; ?></label> 153 154 <input type="checkbox" id="notix_send_checkbox" style="<?php if ($postPublished) echo 'display: none;' ?>" <?php echo $isAutoSendEnabledCheckboxStatus?> name="notix_send_checkbox"/> 161 <input type="checkbox" id="notix_send_checkbox" style="<?php if ($postPublished) echo 'display: none;' ?>" <?php echo $currentCheckboxStatus?> name="notix_send_checkbox"/> 155 162 <label for="notix_send_checkbox" id="notix_send_checkbox_label" style="<?php if ($postPublished) echo 'display: none;' ?>">Send push</label> 156 163 -
notix-web-push-notifications/trunk/admin/css/notix-admin.css
r2601847 r2925192 121 121 } 122 122 123 .notix-tooltip { 124 position: relative; 125 display: inline-block; 126 } 127 128 .notix-tooltip .notix-tooltiptext { 129 visibility: hidden; 130 131 width: 200px; 132 background-color: rgba(0,0,0,0.7); 133 color: #fff; 134 text-align: center; 135 padding: 5px; 136 border-radius: 6px; 137 138 bottom: 100%; 139 left: 50%; 140 margin-left: -60px; 141 font-size: 14px; 142 position: absolute; 143 z-index: 1; 144 } 145 146 .notix-tooltip:hover .notix-tooltiptext { 147 visibility: visible; 148 } -
notix-web-push-notifications/trunk/admin/partials/notix-admin-settings-display.php
r2875338 r2925192 12 12 } 13 13 14 function view_setting($key, $name, $type = 'text') { 14 function drawTooltip($tooltip = '') { 15 if ($tooltip != '') { 16 echo "<div class='notix-tooltip'> 17 <svg xmlns='http://www.w3.org/2000/svg' height='1em' viewBox='0 0 512 512'><path d='M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM169.8 165.3c7.9-22.3 29.1-37.3 52.8-37.3h58.3c34.9 0 63.1 28.3 63.1 63.1c0 22.6-12.1 43.5-31.7 54.8L280 264.4c-.2 13-10.9 23.6-24 23.6c-13.3 0-24-10.7-24-24V250.5c0-8.6 4.6-16.5 12.1-20.8l44.3-25.4c4.7-2.7 7.6-7.7 7.6-13.1c0-8.4-6.8-15.1-15.1-15.1H222.6c-3.4 0-6.4 2.1-7.5 5.3l-.4 1.2c-4.4 12.5-18.2 19-30.6 14.6s-19-18.2-14.6-30.6l.4-1.2zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z'/></svg> 18 <span class='notix-tooltiptext'>" . $tooltip . "</span> 19 </div>"; 20 } 21 } 22 23 function view_setting($key, $name, $type = 'text', $tooltip = '') { 15 24 $option = get_option($key); 16 25 echo '<div class="notix-options-block">'; … … 22 31 echo "<label for='" . esc_attr($key) . "' class='notix-plugin-label'>" . $name . "</label>"; 23 32 } 33 drawTooltip($tooltip); 24 34 echo "<input class='notix-options-block-input' id=" . esc_attr($key) . "' size='54' name='" . esc_attr($key) . "' type='text' value='" . sanitize_text_field($option) . "' />"; 25 35 echo '</div>'; … … 30 40 31 41 echo "<label for='" . esc_attr($key) . "' class='notix-plugin-label'>" . $name . "</label>"; 42 drawTooltip($tooltip); 32 43 echo "<input class='notix-options-block-input' id=" . esc_attr($key) . "' name='" . esc_attr($key) . "' type='checkbox' " . $checked . "/>"; 33 44 … … 199 210 view_setting(Notix::$NOTIX_AUTO_SEND_FEATURE_ENABLED, 'Automatic push sending for new posts', 'checkbox'); 200 211 ?> 212 213 <?php 214 view_setting(Notix::$NOTIX_ROOT_SW_FETURE_ENABLED, 'Service worker uploaded in site root directory', 'checkbox', 'I downloaded sw.enot.js file from my dashboard and uploaded to the root directory'); 215 ?> 201 216 </div> 202 217 -
notix-web-push-notifications/trunk/includes/class-notix.php
r2894245 r2925192 8 8 public static $NOTIX_TAGS_NOTIFY_FEATURE_SUBSCRIBE_ELEMENT_SELECTOR = 'notix_tag_notify_feature_subscribe_element_selector'; 9 9 public static $NOTIX_AUTO_SEND_FEATURE_ENABLED = 'notix_auto_send_feature_enabled_setting'; 10 public static $NOTIX_ROOT_SW_FETURE_ENABLED = 'notix_root_sw_feature_enabled_setting'; 10 11 11 12 protected $loader; … … 19 20 $this->version = NOTIX_VERSION; 20 21 } else { 21 $this->version = '1.1. 8';22 $this->version = '1.1.9'; 22 23 } 23 24 $this->notix = 'notix'; -
notix-web-push-notifications/trunk/notix.php
r2894245 r2925192 4 4 * 5 5 * @link https://notix.co/ 6 * @since 1.1. 86 * @since 1.1.9 7 7 * @package Notix 8 8 * … … 10 10 * Plugin Name: Notix Push Notifications 11 11 * Description: Bring more repeat traffic to your WordPress site with Notix. Best engine for web push subscribers collection and notifications delivery. 12 * Version: 1.1. 812 * Version: 1.1.9 13 13 * Author: Notix 14 14 * Author URI: https://notix.co/ … … 23 23 } 24 24 25 define( 'NOTIX_VERSION', '1.1. 1' );25 define( 'NOTIX_VERSION', '1.1.9' ); 26 26 27 27 function activate_notix() { -
notix-web-push-notifications/trunk/public/partials/notix-public-display-tag.php
r2549580 r2925192 4 4 s.onload = (sdk) => { 5 5 sdk.startInstall({ 6 sw: { 7 url: "<?php echo plugins_url( 'sw.enot.js', __DIR__) ?>" 6 <?php 7 if (esc_attr(get_option(Notix::$NOTIX_ROOT_SW_FETURE_ENABLED)) != "on") { ?> 8 sw: { 9 url: "<?php echo plugins_url( 'sw.enot.js', __DIR__) ?>" 8 10 }, 9 appId: "<?php echo esc_attr(get_option(Notix::$NOTIX_APP_ID_SETTINGS_KEY))?>", 11 <?php 12 } 13 ?> 14 appId: "<?php echo esc_attr(get_option(Notix::$NOTIX_APP_ID_SETTINGS_KEY))?>", 10 15 loadSettings: true 11 16 })
Note: See TracChangeset
for help on using the changeset viewer.