Changeset 1061089
- Timestamp:
- 01/06/2015 08:25:06 AM (11 years ago)
- Location:
- subscribe-to-category
- Files:
-
- 9 edited
-
assets/screenshot-1.png (modified) (previous)
-
trunk/classes/class-settings.php (modified) (4 diffs)
-
trunk/classes/class-subscribe.php (modified) (12 diffs)
-
trunk/css/admin-style.css (modified) (1 diff)
-
trunk/js/admin-script.js (modified) (1 diff)
-
trunk/languages/stc_textdomain-sv_SE.mo (modified) (previous)
-
trunk/languages/stc_textdomain-sv_SE.po (modified) (6 diffs)
-
trunk/readme.txt (modified) (4 diffs)
-
trunk/subscribe-to-category.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
subscribe-to-category/trunk/classes/class-settings.php
r1032176 r1061089 122 122 settings_fields( 'stc_option_group' ); 123 123 do_settings_sections( 'stc-subscribe-settings' ); 124 do_settings_sections( 'stc-resend-settings' ); 124 125 do_settings_sections( 'stc-style-settings' ); 125 126 do_settings_sections( 'stc-deactivation-settings' ); … … 207 208 'setting_email_id' // Section 208 209 ); 210 211 212 // Resend settings 213 add_settings_section( 214 'setting_resend_id', // ID 215 __( 'Resend post on update', STC_TEXTDOMAIN ), // Title 216 '', //array( $this, 'print_section_info' ), // Callback 217 'stc-resend-settings' // Page 218 ); 219 220 add_settings_field( 221 'stc_resend', 222 __( 'Resend:', STC_TEXTDOMAIN ), 223 array( $this, 'stc_resend_callback' ), // Callback 224 'stc-resend-settings', // Page 225 'setting_resend_id' // Section 226 ); 209 227 210 228 … … 290 308 } 291 309 310 if( isset( $input['resend_option'] ) ){ 311 $output['resend_option'] = $input['resend_option']; 312 } 313 292 314 if( isset( $input['exclude_css'] ) ){ 293 315 $output['exclude_css'] = $input['exclude_css']; … … 337 359 <?php 338 360 } 361 362 363 /** 364 * Get the settings option array and print one of its values 365 * 366 * @since 1.2.0 367 * 368 */ 369 public function stc_resend_callback() { 370 $options['resend_option'] = ''; 371 372 if( isset( $this->options['resend_option'] ) ) 373 $options['resend_option'] = $this->options['resend_option']; 374 ?> 375 376 <label for="resend_option"><input type="checkbox" value="1" id="resend_option" name="stc_settings[resend_option]" <?php checked( '1', $options['resend_option'] ); ?>><?php _e('Enable resend post option', STC_TEXTDOMAIN ); ?></label> 377 <p class="description"><?php _e('Gives an option on edit post (in the publish panel) to resend a post on update.', STC_TEXTDOMAIN ); ?></p> 378 <?php 379 } 339 380 340 381 /** -
subscribe-to-category/trunk/classes/class-subscribe.php
r1032176 r1061089 25 25 private $post_type = 'stc'; 26 26 private $sleep_flag = 25; 27 private $show_all_categories = true; 27 28 28 29 /** … … 55 56 * @since 1.0.0 56 57 * 57 * @return [type] [description]58 58 */ 59 59 private function init(){ 60 // save settings to array 61 $this->settings = get_option( 'stc_settings' ); 60 62 61 63 add_action( 'init', array( $this, 'register_post_type'), 99 ); … … 70 72 71 73 add_shortcode( 'stc-subscribe', array( $this, 'stc_subscribe_render' ) ); 72 add_action( ' transition_post_status', array( $this, 'new_post_submit' ), 10, 3);74 add_action( 'save_post', array( $this, 'save_post' ) ); 73 75 74 76 add_action( 'stc_schedule_email', array( $this, 'stc_send_email' ) ); 75 77 76 // save settings to array 77 $this->settings = get_option( 'stc_settings' ); 78 // adding checkbox to publish meta box if activated 79 if( $this->settings['resend_option'] == 1 ) 80 add_action( 'post_submitbox_misc_actions', array( $this, 'resend_post_option' ) ); 78 81 79 82 } 83 84 /** 85 * Adding checkbox to publish meta box with an option to resend a post 86 * 87 * @since 1.2.0 88 * 89 */ 90 public function resend_post_option(){ 91 global $post; 92 $stc_status = get_post_meta( $post->ID, '_stc_notifier_status', true ); 93 94 // We wont show resend option on a post that hasn´t been sent 95 if( $stc_status != 'sent' ) 96 return false; 97 98 $time_in_seconds_i18n = strtotime( date_i18n( 'Y-m-d H:i:s' ) ) + STC_Settings::get_next_cron_time( 'stc_schedule_email' ); 99 $next_run = gmdate( 'Y-m-d H:i:s', $time_in_seconds_i18n ); 100 101 ?> 102 <div class="misc-pub-section stc-section"> 103 <span class="dashicons dashicons-groups"></span> <label><?php _e('Resend post to subscribers', STC_TEXTDOMAIN ); ?> <input id="stc-resend" type="checkbox" name="stc_resend"></label> 104 <div id="stc-resend-info" style="display:none;"> 105 <p><i><?php printf( __( 'This post update will be re-sent to subscribers %s', STC_TEXTDOMAIN ), $next_run ); ?></i></p> 106 </div> 107 </div> 108 <?php 109 } 110 80 111 81 112 /** … … 199 230 200 231 /** 201 * Listen for every new post and update post meta if post type 'post' 202 * 203 * @since 1.0.0 204 * 205 * @param string $old_status 206 * @param string $new_status 207 * @param object $post 208 */ 209 public function new_post_submit( $old_status, $new_status, $post ){ 210 211 // bail if not the correct post type 212 if( $post->post_type != 'post' ) 232 * Save post hook to update post meta 233 * 234 * @since 1.2.0 235 * 236 * @param int $post_id Post ID 237 */ 238 public function save_post( $post_id ) { 239 240 // If this is just a revision, exit 241 if ( wp_is_post_revision( $post_id ) ) 213 242 return false; 214 243 215 // We wont send email notice if a post i updated 216 if( $new_status == 'new' ){ 217 update_post_meta( $post->ID, '_stc_notifier_status', 'outbox' ); // updating post meta 218 } 219 244 // exit for bulk actions and auto-drafts 245 if(empty( $_POST )) 246 return false; 247 248 // exit if not post type post 249 if( $_POST['post_type'] != 'post' ) 250 return false; 251 252 // exit if we're doing an auto save 253 if( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) 254 return false; 255 256 // if our current user can't edit this post, bail 257 if( !current_user_can( 'edit_post' ) ) 258 return false; 259 260 $stc_status = get_post_meta( $post_id, '_stc_notifier_status', true ); 261 262 if(empty( $stc_status )){ 263 update_post_meta( $post_id, '_stc_notifier_status', 'outbox' ); // updating post meta 264 }else{ 265 266 if( isset( $_POST['stc_resend'] ) && $_POST['stc_resend'] == 'on' ) { 267 update_post_meta( $post_id, '_stc_notifier_status', 'outbox' ); // updating post meta 268 } 269 270 } 271 220 272 } 221 273 … … 543 595 * @todo add some filter 544 596 */ 545 public function stc_subscribe_render( ){597 public function stc_subscribe_render( $atts ){ 546 598 547 599 //start buffering 548 600 ob_start(); 549 $this->html_render( );601 $this->html_render( $atts ); 550 602 $form = ob_get_contents(); 551 603 ob_get_clean(); … … 600 652 } 601 653 654 /** 655 * Filter to show categories by attribute 'category_in' in shortcode 656 * 657 * @param array $cats_all All categories 658 * @param string $cats_in Categories entered in shortcode 659 * 660 * @since 1.2.0 661 * 662 * @return array Array with categories to show 663 */ 664 private function filter_categories_in( $cats_all = '', $cats_in = '' ){ 665 666 if(empty( $cats_all )) 667 return false; 668 669 $cats_in = explode(',', str_replace(', ', ',', $cats_in ) ); 670 671 $filtered_cats = array(); 672 foreach( $cats_in as $cat_in ){ 673 foreach ($cats_all as $cat ) { 674 if( mb_strtolower( $cat_in ) == mb_strtolower( $cat->name ) ) 675 $filtered_cats[] = $cat; 676 } 677 } 678 679 return $filtered_cats; 680 681 682 } 683 684 /** 685 * Filter to exclude categories by attribute 'category_not_in' in shortcode 686 * 687 * @param array $cats_all All categories 688 * @param string $cats_not_in Categories entered in shortcode 689 * 690 * @since 1.2.0 691 * 692 * @return array Array with categories to show 693 */ 694 private function filter_categories_not_in( $cats_all = '', $cats_not_in = '' ){ 695 696 if(empty( $cats_all )) 697 return false; 698 699 $cats_not_in = explode(',', str_replace(', ', ',', $cats_not_in ) ); 700 701 $filtered_cats = $cats_all; 702 703 foreach ($cats_all as $key => $cat ) { 704 705 foreach( $cats_not_in as $cat_not_in ){ 706 if( mb_strtolower( $cat_not_in ) == mb_strtolower( $cat->name ) ) 707 unset($filtered_cats[$key]); 708 } 709 710 } 711 712 return $filtered_cats; 713 714 } 715 602 716 /** 603 717 * Html for subscribe form … … 607 721 * @return [type] [description] 608 722 */ 609 public function html_render(){ 723 public function html_render( $atts = false ){ 724 725 extract( shortcode_atts( array( 726 'category_in' => false, 727 'category_not_in' => false, 728 ), $atts )); 610 729 611 730 // add hook when we have a request to render html 612 731 add_action('wp_footer', array( $this, 'add_script_to_footer' ), 20); 613 614 732 615 733 // getting all categories 616 734 $args = array( 'hide_empty' => 0 ); 617 735 $cats = get_categories( $args ); 618 736 737 if( !empty( $category_in ) ){ 738 $cats = $this->filter_categories_in( $cats, $category_in ); 739 }elseif( !empty( $category_not_in ) ){ 740 $cats = $this->filter_categories_not_in( $cats, $category_not_in ); 741 } 619 742 620 743 // if error store email address in field value so user dont need to add it again … … 660 783 <div class="stc-categories"<?php echo $post_stc_unsubscribe == 1 ? ' style="display:none;"' : NULL; ?>> 661 784 <h3><?php _e('Categories', STC_TEXTDOMAIN ); ?></h3> 785 <?php if( $this->show_all_categories === true ) : ?> 662 786 <div class="checkbox"> 663 787 <label> … … 666 790 </label> 667 791 </div> 792 <?php endif; ?> 668 793 <div class="stc-categories-checkboxes"> 794 <?php if(! empty( $cats ) ) : ?> 669 795 <?php foreach ($cats as $cat ) : ?> 670 796 <div class="checkbox"> … … 675 801 </div> 676 802 <?php endforeach; ?> 803 <?php endif; ?> 677 804 </div><!-- .stc-categories-checkboxes --> 678 805 </div><!-- .stc-categories --> … … 803 930 $email_subject = $email['post']->post_title; 804 931 932 // add updated to title if its an update for post 933 if( $this->is_stc_resend( $email['post_id'] ) ) 934 $email_subject = __('Update | ', STC_TEXTDOMAIN ) . $email_subject; 935 805 936 $subject = '=?UTF-8?B?'.base64_encode( $email_subject ).'?='; 806 937 … … 820 951 foreach ($outbox as $post ) { 821 952 update_post_meta( $post->ID, '_stc_notifier_status', 'sent' ); 822 update_post_meta( $post->ID, '_stc_notifier_sent_time', mysql2date( 'Y-m-d H:i:s', time() ) );953 update_post_meta( $post->ID, '_stc_notifier_sent_time', date('Y-m-d H:i:s', current_time('timestamp') ) ); 823 954 } 824 955 956 } 957 958 /** 959 * Function to check if a post has been sent before 960 * 961 * @since 1.2.0 962 * 963 * @param int $post_id Post ID 964 * 965 * @return boolean True or false 966 */ 967 private function is_stc_resend( $post_id = '' ){ 968 969 $stc_status = get_post_meta( $post_id, '_stc_notifier_sent_time', true ); 970 971 if(!empty( $stc_status )) 972 return true; 973 974 return false; 975 825 976 } 826 977 -
subscribe-to-category/trunk/css/admin-style.css
r1032177 r1061089 11 11 float: left; 12 12 } 13 14 .stc-section span:before { 15 content: "\f307"; 16 top: -1px; 17 } -
subscribe-to-category/trunk/js/admin-script.js
r1032177 r1061089 2 2 3 3 $(document).ready(function() { 4 5 $('#stc-resend').change( function() { 6 7 if( $(this).is(':checked') ) { 8 $('#stc-resend-info').show(); 9 } else { 10 $('#stc-resend-info').hide(); 11 } 12 13 }); 4 14 5 15 $('button#stc-force-run').live('click', function(){ -
subscribe-to-category/trunk/languages/stc_textdomain-sv_SE.po
r1028927 r1061089 1 1 msgid "" 2 2 msgstr "" 3 "Project-Id-Version: Subscribe to Category v1. 0.0\n"3 "Project-Id-Version: Subscribe to Category v1.2.0\n" 4 4 "Report-Msgid-Bugs-To: \n" 5 5 "POT-Creation-Date: \n" 6 "PO-Revision-Date: 201 4-11-19 04:56:59+0000\n"6 "PO-Revision-Date: 2015-01-06 08:04:38+0000\n" 7 7 "Last-Translator: adminccsuser <[email protected]>\n" 8 8 "Language-Team: \n" … … 21 21 "X-Textdomain-Support: yes" 22 22 23 #: classes/class-subscribe.php: 77523 #: classes/class-subscribe.php:992 24 24 #@ stc_textdomain 25 25 msgid "Click here to read full story" 26 26 msgstr "Klicka här för att läsa hela artikeln" 27 27 28 #: classes/class-subscribe.php: 61029 #: classes/class-subscribe.php: 77628 #: classes/class-subscribe.php:781 29 #: classes/class-subscribe.php:993 30 30 #@ stc_textdomain 31 31 msgid "Unsubscribe me" 32 32 msgstr "Avanmäl mig" 33 33 34 #: classes/class-subscribe.php:1 4234 #: classes/class-subscribe.php:188 35 35 #@ stc_textdomain 36 36 msgid "Thanks for your subscription!" 37 37 msgstr "Tack för din anmälan!" 38 38 39 #: classes/class-subscribe.php:1 4339 #: classes/class-subscribe.php:189 40 40 #@ stc_textdomain 41 41 msgid "If you want to unsubscribe there is a link for unsubscription attached in the email." 42 42 msgstr "Om du vill avanmäla dig från prenumerationstjänsten finns det en länk bifogad i e-postmeddelandet du kommer att erhålla i samband med utskick." 43 43 44 #: classes/class-subscribe.php: 17744 #: classes/class-subscribe.php:225 45 45 #, php-format 46 46 #@ stc_textdomain … … 48 48 msgstr "Vi har tagit bort din e-postadress %s från vår databas." 49 49 50 #: classes/class-subscribe.php: 23251 #: classes/class-subscribe.php: 25550 #: classes/class-subscribe.php:309 51 #: classes/class-subscribe.php:335 52 52 #, php-format 53 53 #@ stc_textdomain … … 55 55 msgstr "Avanmäl mig från %s" 56 56 57 #: classes/class-subscribe.php: 25657 #: classes/class-subscribe.php:336 58 58 #@ stc_textdomain 59 59 msgid "Follow this link to confirm your unsubscription" 60 60 msgstr "Följ denna länk för att fullfölja din avanmälan" 61 61 62 #: classes/class-subscribe.php: 27863 #: classes/class-subscribe.php:3 1164 #: classes/class-subscribe.php: 43962 #: classes/class-subscribe.php:360 63 #: classes/class-subscribe.php:393 64 #: classes/class-subscribe.php:529 65 65 #@ stc_textdomain 66 66 msgid "You need to enter a valid email address" 67 67 msgstr "Du behöver ange en giltig e-postadress" 68 68 69 #: classes/class-subscribe.php: 29569 #: classes/class-subscribe.php:377 70 70 #@ stc_textdomain 71 71 msgid "We have received your request to unsubscribe from our newsfeed. Please check your email and confirm your unsubscription." 72 72 msgstr "Vi har mottagit din förfrågan om avanmälan från prenumerationstjänsten och skickat ett e-postmeddelande om hur du fullföljer din avanmälan." 73 73 74 #: classes/class-subscribe.php: 32374 #: classes/class-subscribe.php:405 75 75 #@ stc_textdomain 76 76 msgid "You need to select some categories" 77 77 msgstr "Du behöver välja en eller flera kategorier" 78 78 79 #: classes/class-subscribe.php: 60379 #: classes/class-subscribe.php:774 80 80 #@ stc_textdomain 81 81 msgid "E-mail Address: " 82 82 msgstr "E-postadress:" 83 83 84 #: classes/class-subscribe.php: 61584 #: classes/class-subscribe.php:786 85 85 #@ stc_textdomain 86 86 msgid "Categories" 87 87 msgstr "Kategorier" 88 88 89 #: classes/class-subscribe.php: 63689 #: classes/class-subscribe.php:811 90 90 #@ stc_textdomain 91 91 msgid "Subscribe me" 92 92 msgstr "Prenumerera" 93 93 94 #: classes/class-subscribe.php: 63794 #: classes/class-subscribe.php:812 95 95 #@ stc_textdomain 96 96 msgid "Unsubscribe" 97 97 msgstr "Avanmäl" 98 98 99 #: classes/class-settings.php: 13399 #: classes/class-settings.php:79 100 100 #@ stc_textdomain 101 101 msgid "Subscribe to Category" 102 102 msgstr "Prenumerera på en kategori" 103 103 104 #: classes/class-settings.php: 134105 #: classes/class-subscribe.php: 844104 #: classes/class-settings.php:80 105 #: classes/class-subscribe.php:1069 106 106 #@ stc_textdomain 107 107 msgid "Subscribe" 108 108 msgstr "Prenumerera" 109 109 110 #: classes/class-settings.php:1 54110 #: classes/class-settings.php:103 111 111 #@ stc_textdomain 112 112 msgid "Settings for subscribe to category" 113 113 msgstr "Inställningar för Subscribe to Category" 114 114 115 #: classes/class-settings.php: 232115 #: classes/class-settings.php:190 116 116 #@ stc_textdomain 117 117 msgid "E-mail settings" 118 118 msgstr "E-postinställningar" 119 119 120 #: classes/class-settings.php: 239120 #: classes/class-settings.php:197 121 121 #@ stc_textdomain 122 122 msgid "E-mail from: " 123 123 msgstr "E-postadress från:" 124 124 125 #: classes/class-settings.php:3 40125 #: classes/class-settings.php:332 126 126 #@ stc_textdomain 127 127 msgid "Add your E-mail settings" 128 128 msgstr "Lägg till e-postinställningar" 129 129 130 #: classes/class-subscribe.php: 287130 #: classes/class-subscribe.php:369 131 131 #@ stc_textdomain 132 132 msgid "Email address not found in database" 133 133 msgstr "E-postadressen kunde ej hittas i vår databas" 134 134 135 #: classes/class-subscribe.php: 619135 #: classes/class-subscribe.php:791 136 136 #@ stc_textdomain 137 137 msgid "All categories" 138 138 msgstr "Alla kategorier" 139 139 140 #: classes/class-subscribe.php: 845141 #: classes/class-subscribe.php: 846140 #: classes/class-subscribe.php:1070 141 #: classes/class-subscribe.php:1071 142 142 #@ stc_textdomain 143 143 msgid "Add new subscriber" 144 144 msgstr "Lägg till ny prenumerant" 145 145 146 #: classes/class-subscribe.php: 847146 #: classes/class-subscribe.php:1072 147 147 #@ stc_textdomain 148 148 msgid "Edit subscriber" 149 149 msgstr "Ändra prenumerant" 150 150 151 #: classes/class-subscribe.php: 848151 #: classes/class-subscribe.php:1073 152 152 #@ stc_textdomain 153 153 msgid "New subscriber" 154 154 msgstr "Ny prenumerant" 155 155 156 #: classes/class-subscribe.php: 849156 #: classes/class-subscribe.php:1074 157 157 #@ stc_textdomain 158 158 msgid "Show subscriber" 159 159 msgstr "Visa prenumeranter" 160 160 161 #: classes/class-subscribe.php: 850161 #: classes/class-subscribe.php:1075 162 162 #@ stc_textdomain 163 163 msgid "Search subscribers" 164 164 msgstr "Sök prenumeranter" 165 165 166 #: classes/class-subscribe.php: 851166 #: classes/class-subscribe.php:1076 167 167 #@ stc_textdomain 168 168 msgid "Not found" 169 169 msgstr "Kunde ej hittas" 170 170 171 #: classes/class-subscribe.php: 852171 #: classes/class-subscribe.php:1077 172 172 #@ stc_textdomain 173 173 msgid "Nothing found in trash" 174 174 msgstr "Papperskorgen är tom" 175 175 176 #: classes/class-subscribe.php: 843177 #: classes/class-subscribe.php: 853176 #: classes/class-subscribe.php:1068 177 #: classes/class-subscribe.php:1078 178 178 #@ stc_textdomain 179 179 msgid "Subscribers" 180 180 msgstr "Prenumeranter" 181 181 182 #: classes/class-settings.php:2 57182 #: classes/class-settings.php:232 183 183 #@ stc_textdomain 184 184 msgid "Stylesheet (CSS) settings" 185 185 msgstr "Inställning för CSS" 186 186 187 #: classes/class-settings.php:2 64187 #: classes/class-settings.php:239 188 188 #@ stc_textdomain 189 189 msgid "Custom CSS: " 190 190 msgstr "STC stylesheet:" 191 191 192 #: classes/class-settings.php:3 16192 #: classes/class-settings.php:301 193 193 #@ stc_textdomain 194 194 msgid "You have entered an invalid email." 195 195 msgstr "Du har engett en felaktig e-postadress." 196 196 197 #: classes/class-settings.php:3 50197 #: classes/class-settings.php:345 198 198 #, php-format 199 199 #@ stc_textdomain … … 201 201 msgstr "Ange den e-postadress som ska användas som avsändare, som standard används administratörens e-post %s." 202 202 203 #: classes/class-settings.php:3 74203 #: classes/class-settings.php:394 204 204 #@ stc_textdomain 205 205 msgid "Exclude custom CSS" 206 206 msgstr "Exkludera STC CSS" 207 207 208 #: classes/class-settings.php:3 75208 #: classes/class-settings.php:395 209 209 #@ stc_textdomain 210 210 msgid "Check this option if your theme supports Bootstrap framework or if you want to place your own CSS for Subscribe to Category in your theme." 211 211 msgstr "Använd detta alternativ om ditt tema använder Bootstrap ramverket eller om du vill använda egen css för Subscribe to Category i ditt tema." 212 212 213 #: classes/class-subscribe.php:1 14213 #: classes/class-subscribe.php:159 214 214 #@ stc_textdomain 215 215 msgid "Take me to start page" 216 216 msgstr "Till startsidan" 217 217 218 #: classes/class-subscribe.php: 169218 #: classes/class-subscribe.php:217 219 219 #@ default 220 220 msgid "We are sorry but something went wrong with your unsubscription." 221 221 msgstr "" 222 222 223 #: classes/class-subscribe.php: 446223 #: classes/class-subscribe.php:536 224 224 #@ stc_textdomain 225 225 msgid "E-mail address already exists" 226 226 msgstr "E-postadressen finns redan registrerad" 227 227 228 #: classes/class-subscribe.php: 450228 #: classes/class-subscribe.php:540 229 229 #@ stc_textdomain 230 230 msgid "No categories are selected" 231 231 msgstr "Inga kategorier valda" 232 232 233 #: classes/class-subscribe.php: 490233 #: classes/class-subscribe.php:582 234 234 #@ stc_textdomain 235 235 msgid " - this post is set to draft" 236 236 msgstr "- inläggets status är ändrat till utkast." 237 237 238 #: classes/class-settings.php:4 00238 #: classes/class-settings.php:426 239 239 #@ stc_textdomain 240 240 msgid "Export to excel" 241 241 msgstr "Exportera till excel" 242 242 243 #: classes/class-settings.php:4 05243 #: classes/class-settings.php:431 244 244 #@ stc_textdomain 245 245 msgid "Filter by categories" 246 246 msgstr "Välj och filtrera på kategorier" 247 247 248 #: classes/class-settings.php:4 12248 #: classes/class-settings.php:438 249 249 #@ stc_textdomain 250 250 msgid "There are no categories to list yet" 251 251 msgstr "Det finns ännu inga kategorier inlagda" 252 252 253 #: classes/class-settings.php: 480253 #: classes/class-settings.php:509 254 254 #@ stc_textdomain 255 255 msgid "Filtered by: " 256 256 msgstr "Filtrering på:" 257 257 258 #: classes/class-settings.php:2 47258 #: classes/class-settings.php:205 259 259 #@ stc_textdomain 260 260 msgid "Email subject: " 261 261 msgstr "E-post titel:" 262 262 263 #: classes/class-settings.php:3 60263 #: classes/class-settings.php:358 264 264 #@ stc_textdomain 265 265 msgid "Enter e-mail subject for the e-mail notification, leave empty if you wish to use post title as email subject." 266 266 msgstr "Som standard används inläggets rubrik som titel på e-postmeddelandet. Ange en egen titel om du önskar ändra standardtitel." 267 267 268 #: classes/class-settings.php:110 269 #@ stc_textdomain 270 msgid "Something went wrong when triggering scheduled event" 271 msgstr "Något gick fel med den manuella exekveringen." 272 273 #: classes/class-settings.php:111 268 #: classes/class-settings.php:55 274 269 #@ stc_textdomain 275 270 msgid "Scheduled event successfully executed" 276 271 msgstr "Schemalagt event utfört" 277 272 278 #: classes/class-settings.php:1 60273 #: classes/class-settings.php:109 279 274 #@ stc_textdomain 280 275 msgid "Schedule: " 281 276 msgstr "Schemaläggning:" 282 277 283 #: classes/class-settings.php:49 284 #@ stc_textdomain 285 msgid "You are not allowed to run this action." 286 msgstr "Du saknar behörighet för denna händelse." 287 288 #: classes/class-settings.php:160 278 #: classes/class-settings.php:109 289 279 #@ stc_textdomain 290 280 msgid "E-mail is scheduled to be sent once every hour." 291 281 msgstr "E-postmeddelanden är schemalagt att skickas varje timme." 292 282 293 #: classes/class-settings.php:1 62283 #: classes/class-settings.php:111 294 284 #@ stc_textdomain 295 285 msgid "Click here to run this action right now" 296 286 msgstr "Skicka e-postmeddelanden nu" 297 287 298 #: classes/class-settings.php:1 65288 #: classes/class-settings.php:114 299 289 #, php-format 300 290 #@ stc_textdomain … … 302 292 msgstr "Nästa körning är <strong>%s</strong> och avser %s inlägg." 303 293 304 #: classes/class-settings.php:2 74294 #: classes/class-settings.php:249 305 295 #@ stc_textdomain 306 296 msgid "On plugin deactivation" 307 297 msgstr "Vid avaktivering av denna plugin" 308 298 309 #: classes/class-settings.php:2 81299 #: classes/class-settings.php:256 310 300 #@ stc_textdomain 311 301 msgid "Subscribers: " 312 302 msgstr "Prenumeranter:" 313 303 314 #: classes/class-settings.php:2 98304 #: classes/class-settings.php:280 315 305 #@ stc_textdomain 316 306 msgid "The plugin will remove all data in database created by this plugin but there is an option regarding subscribers" 317 307 msgstr "Den data som pluginen skapat i databasen raderas vid avaktivering av pluginen förutom prenumeranter. För att även radera prenumeranter vid avaktivering behöver du göra ett aktivt val." 318 308 319 #: classes/class-settings.php: 390309 #: classes/class-settings.php:413 320 310 #@ stc_textdomain 321 311 msgid "Delete all subscribers on deactivation" 322 312 msgstr "Radera prenumeranter vid avaktivering av plugin" 323 313 314 #: classes/class-subscribe.php:105 315 #, php-format 316 #@ stc_textdomain 317 msgid "This post update will be re-sent to subscribers %s" 318 msgstr "Inlägget kommer att skickas igen till prenumeranter %s" 319 320 #: classes/class-settings.php:215 321 #@ stc_textdomain 322 msgid "Resend post on update" 323 msgstr "Skicka e-post när ett inlägg uppdateras" 324 325 #: classes/class-settings.php:222 326 #@ stc_textdomain 327 msgid "Resend:" 328 msgstr "Skicka vid uppdatering" 329 330 #: classes/class-settings.php:376 331 #@ stc_textdomain 332 msgid "Enable resend post option" 333 msgstr "Aktivera möjligheten att skicka vid uppdatering av inlägg" 334 335 #: classes/class-settings.php:377 336 #@ stc_textdomain 337 msgid "Gives an option on edit post (in the publish panel) to resend a post on update." 338 msgstr "Lägger till ett val i panelen \\\"Publicera\\\" gällande om inlägget ska skickas ut igen till prenumeranter." 339 340 #: classes/class-subscribe.php:103 341 #@ stc_textdomain 342 msgid "Resend post to subscribers" 343 msgstr "Skicka inlägg till prenumeranter" 344 345 #: classes/class-subscribe.php:936 346 #@ stc_textdomain 347 msgid "Update | " 348 msgstr "Uppdatering | " 349 -
subscribe-to-category/trunk/readme.txt
r1050720 r1061089 4 4 Requires at least: 3.9 5 5 Tested up to: 4.1 6 Stable tag: 1. 1.06 Stable tag: 1.2.0 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 27 27 * Theres a note when next scheduled event for sending e-mails to subscribers is running. 28 28 * Options for leave no trace - deletes post meta and subscribers created by this plugin. 29 * Option for re-send a post on update that has already been sent. 30 * Shortcode attributes for showing and hiding some categories from subscribe form. 29 31 30 32 … … 44 46 4. Create a page and add shortcode [stc-subscribe] to display stc form subscription. 45 47 48 = Shortcode Attributes = 49 'category_in' - Use this attribute if you only want one or several categories to be available for subscription. Value to be entered is the name of the category. 50 'category_not_in' - Use this attribute if you want to exclude categories to be available for subscription. Value to be entered is the name of the category. 51 52 For both attributes you can use a comma sign to separate multiple categories, like [stc-subscribe category_in="news, article"]. 53 46 54 = Optionally but recommended = 47 55 As Wordpress Cron is depending on that you have visits on your website you should set up a cron job on your server to hit http://yourdomain.com/wp-cron.php at a regular interval to make sure that WP Cron is running as expected. In current version of Subscribe to Category the WP Cron is running once every hour, that might be an option that is changeable in future versions. … … 53 61 2. With Bootstrap framework. 54 62 3. Without Bootstrap framework, override and add your own css. 55 63 4. When resend post is enabled in settings there is a new option available when editing a post. 56 64 57 65 == Changelog == 66 67 = 1.2.0 = 68 * Possibillity to re-send a post on update that has already been sent. This option needs to be activated in the settings for the plugin. 69 * Attribute 'category_in' added to shortcode to show only entered categories in the subscribe form. Multiple categories are separated by a comma sign. 70 * Attribute 'category_not_in' added to shortcode to exclude categories in the subscribe form. Multiple categories are separated by a comma sign. 71 58 72 59 73 = 1.1.0 = -
subscribe-to-category/trunk/subscribe-to-category.php
r1032176 r1061089 4 4 Plugin URI: http://dcweb.nu 5 5 Description: Lets your visitor subscribe to posts for one or several categories. 6 Version: 1. 1.06 Version: 1.2.0 7 7 Author: Daniel Söderström 8 8 Author URI: http://dcweb.nu/
Note: See TracChangeset
for help on using the changeset viewer.