Plugin Directory

Changeset 1061089


Ignore:
Timestamp:
01/06/2015 08:25:06 AM (11 years ago)
Author:
dansod
Message:

New version 1.2.0

Location:
subscribe-to-category
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • subscribe-to-category/trunk/classes/class-settings.php

    r1032176 r1061089  
    122122            settings_fields( 'stc_option_group' );   
    123123            do_settings_sections( 'stc-subscribe-settings' );
     124            do_settings_sections( 'stc-resend-settings' );
    124125            do_settings_sections( 'stc-style-settings' );
    125126            do_settings_sections( 'stc-deactivation-settings' );
     
    207208            'setting_email_id' // Section           
    208209        );
     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        );       
    209227
    210228
     
    290308        }
    291309
     310        if( isset( $input['resend_option'] ) ){
     311          $output['resend_option'] = $input['resend_option'];
     312        }       
     313
    292314        if( isset( $input['exclude_css'] ) ){
    293315          $output['exclude_css'] = $input['exclude_css'];
     
    337359        <?php
    338360    }
     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    }   
    339380
    340381    /**
  • subscribe-to-category/trunk/classes/class-subscribe.php

    r1032176 r1061089  
    2525    private $post_type = 'stc';
    2626    private $sleep_flag = 25;
     27    private $show_all_categories = true;
    2728
    2829    /**
     
    5556     * @since  1.0.0
    5657     *
    57      * @return [type] [description]
    5858     */
    5959    private function init(){
     60      // save settings to array
     61      $this->settings = get_option( 'stc_settings' );
    6062
    6163      add_action( 'init', array( $this, 'register_post_type'), 99 );
     
    7072
    7173        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' ) );
    7375
    7476      add_action( 'stc_schedule_email', array( $this, 'stc_send_email' ) );
    7577
    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' ) );
    7881
    7982    }
     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
    80111
    81112    /**
     
    199230
    200231    /**
    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 ) )
    213242        return false;
    214243
    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
    220272    }
    221273
     
    543595     * @todo add some filter
    544596     */
    545     public function stc_subscribe_render(){
     597    public function stc_subscribe_render( $atts ){
    546598
    547599      //start buffering
    548600        ob_start();
    549         $this->html_render();
     601        $this->html_render( $atts );
    550602        $form = ob_get_contents();
    551603        ob_get_clean();
     
    600652    }
    601653
     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
    602716    /**
    603717     * Html for subscribe form
     
    607721     * @return [type] [description]
    608722     */
    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 ));
    610729
    611730      // add hook when we have a request to render html
    612731        add_action('wp_footer', array( $this, 'add_script_to_footer' ), 20);
    613        
    614      
     732             
    615733      // getting all categories
    616734      $args = array( 'hide_empty' => 0 );
    617735        $cats = get_categories( $args );
    618736
     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      }
    619742
    620743      // if error store email address in field value so user dont need to add it again
     
    660783          <div class="stc-categories"<?php echo $post_stc_unsubscribe == 1 ? ' style="display:none;"' : NULL; ?>>
    661784            <h3><?php _e('Categories', STC_TEXTDOMAIN ); ?></h3>
     785            <?php if( $this->show_all_categories === true ) : ?>
    662786            <div class="checkbox">
    663787              <label>
     
    666790              </label>
    667791            </div>
     792            <?php endif; ?>
    668793            <div class="stc-categories-checkboxes">
     794            <?php if(! empty( $cats ) ) : ?>
    669795                    <?php foreach ($cats as $cat ) : ?>
    670796            <div class="checkbox">
     
    675801            </div>
    676802                  <?php endforeach; ?>
     803          <?php endif; ?>
    677804          </div><!-- .stc-categories-checkboxes -->
    678805          </div><!-- .stc-categories -->
     
    803930          $email_subject = $email['post']->post_title;
    804931
     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
    805936        $subject = '=?UTF-8?B?'.base64_encode( $email_subject ).'?=';
    806937
     
    820951      foreach ($outbox as $post ) {
    821952        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') ) );
    823954      }
    824955       
     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
    825976    }
    826977
  • subscribe-to-category/trunk/css/admin-style.css

    r1032177 r1061089  
    1111    float: left;
    1212}
     13
     14.stc-section span:before {
     15    content: "\f307";
     16    top: -1px;
     17}
  • subscribe-to-category/trunk/js/admin-script.js

    r1032177 r1061089  
    22
    33    $(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    });
    414
    515        $('button#stc-force-run').live('click', function(){
  • subscribe-to-category/trunk/languages/stc_textdomain-sv_SE.po

    r1028927 r1061089  
    11msgid ""
    22msgstr ""
    3 "Project-Id-Version: Subscribe to Category v1.0.0\n"
     3"Project-Id-Version: Subscribe to Category v1.2.0\n"
    44"Report-Msgid-Bugs-To: \n"
    55"POT-Creation-Date: \n"
    6 "PO-Revision-Date: 2014-11-19 04:56:59+0000\n"
     6"PO-Revision-Date: 2015-01-06 08:04:38+0000\n"
    77"Last-Translator: adminccsuser <[email protected]>\n"
    88"Language-Team: \n"
     
    2121"X-Textdomain-Support: yes"
    2222
    23 #: classes/class-subscribe.php:775
     23#: classes/class-subscribe.php:992
    2424#@ stc_textdomain
    2525msgid "Click here to read full story"
    2626msgstr "Klicka här för att läsa hela artikeln"
    2727
    28 #: classes/class-subscribe.php:610
    29 #: classes/class-subscribe.php:776
     28#: classes/class-subscribe.php:781
     29#: classes/class-subscribe.php:993
    3030#@ stc_textdomain
    3131msgid "Unsubscribe me"
    3232msgstr "Avanmäl mig"
    3333
    34 #: classes/class-subscribe.php:142
     34#: classes/class-subscribe.php:188
    3535#@ stc_textdomain
    3636msgid "Thanks for your subscription!"
    3737msgstr "Tack för din anmälan!"
    3838
    39 #: classes/class-subscribe.php:143
     39#: classes/class-subscribe.php:189
    4040#@ stc_textdomain
    4141msgid "If you want to unsubscribe there is a link for unsubscription attached in the email."
    4242msgstr "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."
    4343
    44 #: classes/class-subscribe.php:177
     44#: classes/class-subscribe.php:225
    4545#, php-format
    4646#@ stc_textdomain
     
    4848msgstr "Vi har tagit bort din e-postadress %s från vår databas."
    4949
    50 #: classes/class-subscribe.php:232
    51 #: classes/class-subscribe.php:255
     50#: classes/class-subscribe.php:309
     51#: classes/class-subscribe.php:335
    5252#, php-format
    5353#@ stc_textdomain
     
    5555msgstr "Avanmäl mig från %s"
    5656
    57 #: classes/class-subscribe.php:256
     57#: classes/class-subscribe.php:336
    5858#@ stc_textdomain
    5959msgid "Follow this link to confirm your unsubscription"
    6060msgstr "Följ denna länk för att fullfölja din avanmälan"
    6161
    62 #: classes/class-subscribe.php:278
    63 #: classes/class-subscribe.php:311
    64 #: classes/class-subscribe.php:439
     62#: classes/class-subscribe.php:360
     63#: classes/class-subscribe.php:393
     64#: classes/class-subscribe.php:529
    6565#@ stc_textdomain
    6666msgid "You need to enter a valid email address"
    6767msgstr "Du behöver ange en giltig e-postadress"
    6868
    69 #: classes/class-subscribe.php:295
     69#: classes/class-subscribe.php:377
    7070#@ stc_textdomain
    7171msgid "We have received your request to unsubscribe from our newsfeed. Please check your email and confirm your unsubscription."
    7272msgstr "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."
    7373
    74 #: classes/class-subscribe.php:323
     74#: classes/class-subscribe.php:405
    7575#@ stc_textdomain
    7676msgid "You need to select some categories"
    7777msgstr "Du behöver välja en eller flera kategorier"
    7878
    79 #: classes/class-subscribe.php:603
     79#: classes/class-subscribe.php:774
    8080#@ stc_textdomain
    8181msgid "E-mail Address: "
    8282msgstr "E-postadress:"
    8383
    84 #: classes/class-subscribe.php:615
     84#: classes/class-subscribe.php:786
    8585#@ stc_textdomain
    8686msgid "Categories"
    8787msgstr "Kategorier"
    8888
    89 #: classes/class-subscribe.php:636
     89#: classes/class-subscribe.php:811
    9090#@ stc_textdomain
    9191msgid "Subscribe me"
    9292msgstr "Prenumerera"
    9393
    94 #: classes/class-subscribe.php:637
     94#: classes/class-subscribe.php:812
    9595#@ stc_textdomain
    9696msgid "Unsubscribe"
    9797msgstr "Avanmäl"
    9898
    99 #: classes/class-settings.php:133
     99#: classes/class-settings.php:79
    100100#@ stc_textdomain
    101101msgid "Subscribe to Category"
    102102msgstr "Prenumerera på en kategori"
    103103
    104 #: classes/class-settings.php:134
    105 #: classes/class-subscribe.php:844
     104#: classes/class-settings.php:80
     105#: classes/class-subscribe.php:1069
    106106#@ stc_textdomain
    107107msgid "Subscribe"
    108108msgstr "Prenumerera"
    109109
    110 #: classes/class-settings.php:154
     110#: classes/class-settings.php:103
    111111#@ stc_textdomain
    112112msgid "Settings for subscribe to category"
    113113msgstr "Inställningar för Subscribe to Category"
    114114
    115 #: classes/class-settings.php:232
     115#: classes/class-settings.php:190
    116116#@ stc_textdomain
    117117msgid "E-mail settings"
    118118msgstr "E-postinställningar"
    119119
    120 #: classes/class-settings.php:239
     120#: classes/class-settings.php:197
    121121#@ stc_textdomain
    122122msgid "E-mail from: "
    123123msgstr "E-postadress från:"
    124124
    125 #: classes/class-settings.php:340
     125#: classes/class-settings.php:332
    126126#@ stc_textdomain
    127127msgid "Add your E-mail settings"
    128128msgstr "Lägg till e-postinställningar"
    129129
    130 #: classes/class-subscribe.php:287
     130#: classes/class-subscribe.php:369
    131131#@ stc_textdomain
    132132msgid "Email address not found in database"
    133133msgstr "E-postadressen kunde ej hittas i vår databas"
    134134
    135 #: classes/class-subscribe.php:619
     135#: classes/class-subscribe.php:791
    136136#@ stc_textdomain
    137137msgid "All categories"
    138138msgstr "Alla kategorier"
    139139
    140 #: classes/class-subscribe.php:845
    141 #: classes/class-subscribe.php:846
     140#: classes/class-subscribe.php:1070
     141#: classes/class-subscribe.php:1071
    142142#@ stc_textdomain
    143143msgid "Add new subscriber"
    144144msgstr "Lägg till ny prenumerant"
    145145
    146 #: classes/class-subscribe.php:847
     146#: classes/class-subscribe.php:1072
    147147#@ stc_textdomain
    148148msgid "Edit subscriber"
    149149msgstr "Ändra prenumerant"
    150150
    151 #: classes/class-subscribe.php:848
     151#: classes/class-subscribe.php:1073
    152152#@ stc_textdomain
    153153msgid "New subscriber"
    154154msgstr "Ny prenumerant"
    155155
    156 #: classes/class-subscribe.php:849
     156#: classes/class-subscribe.php:1074
    157157#@ stc_textdomain
    158158msgid "Show subscriber"
    159159msgstr "Visa prenumeranter"
    160160
    161 #: classes/class-subscribe.php:850
     161#: classes/class-subscribe.php:1075
    162162#@ stc_textdomain
    163163msgid "Search subscribers"
    164164msgstr "Sök prenumeranter"
    165165
    166 #: classes/class-subscribe.php:851
     166#: classes/class-subscribe.php:1076
    167167#@ stc_textdomain
    168168msgid "Not found"
    169169msgstr "Kunde ej hittas"
    170170
    171 #: classes/class-subscribe.php:852
     171#: classes/class-subscribe.php:1077
    172172#@ stc_textdomain
    173173msgid "Nothing found in trash"
    174174msgstr "Papperskorgen är tom"
    175175
    176 #: classes/class-subscribe.php:843
    177 #: classes/class-subscribe.php:853
     176#: classes/class-subscribe.php:1068
     177#: classes/class-subscribe.php:1078
    178178#@ stc_textdomain
    179179msgid "Subscribers"
    180180msgstr "Prenumeranter"
    181181
    182 #: classes/class-settings.php:257
     182#: classes/class-settings.php:232
    183183#@ stc_textdomain
    184184msgid "Stylesheet (CSS) settings"
    185185msgstr "Inställning för CSS"
    186186
    187 #: classes/class-settings.php:264
     187#: classes/class-settings.php:239
    188188#@ stc_textdomain
    189189msgid "Custom CSS: "
    190190msgstr "STC stylesheet:"
    191191
    192 #: classes/class-settings.php:316
     192#: classes/class-settings.php:301
    193193#@ stc_textdomain
    194194msgid "You have entered an invalid email."
    195195msgstr "Du har engett en felaktig e-postadress."
    196196
    197 #: classes/class-settings.php:350
     197#: classes/class-settings.php:345
    198198#, php-format
    199199#@ stc_textdomain
     
    201201msgstr "Ange den e-postadress som ska användas som avsändare, som standard används administratörens e-post %s."
    202202
    203 #: classes/class-settings.php:374
     203#: classes/class-settings.php:394
    204204#@ stc_textdomain
    205205msgid "Exclude custom CSS"
    206206msgstr "Exkludera STC CSS"
    207207
    208 #: classes/class-settings.php:375
     208#: classes/class-settings.php:395
    209209#@ stc_textdomain
    210210msgid "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."
    211211msgstr "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."
    212212
    213 #: classes/class-subscribe.php:114
     213#: classes/class-subscribe.php:159
    214214#@ stc_textdomain
    215215msgid "Take me to start page"
    216216msgstr "Till startsidan"
    217217
    218 #: classes/class-subscribe.php:169
     218#: classes/class-subscribe.php:217
    219219#@ default
    220220msgid "We are sorry but something went wrong with your unsubscription."
    221221msgstr ""
    222222
    223 #: classes/class-subscribe.php:446
     223#: classes/class-subscribe.php:536
    224224#@ stc_textdomain
    225225msgid "E-mail address already exists"
    226226msgstr "E-postadressen finns redan registrerad"
    227227
    228 #: classes/class-subscribe.php:450
     228#: classes/class-subscribe.php:540
    229229#@ stc_textdomain
    230230msgid "No categories are selected"
    231231msgstr "Inga kategorier valda"
    232232
    233 #: classes/class-subscribe.php:490
     233#: classes/class-subscribe.php:582
    234234#@ stc_textdomain
    235235msgid " - this post is set to draft"
    236236msgstr "- inläggets status är ändrat till utkast."
    237237
    238 #: classes/class-settings.php:400
     238#: classes/class-settings.php:426
    239239#@ stc_textdomain
    240240msgid "Export to excel"
    241241msgstr "Exportera till excel"
    242242
    243 #: classes/class-settings.php:405
     243#: classes/class-settings.php:431
    244244#@ stc_textdomain
    245245msgid "Filter by categories"
    246246msgstr "Välj och filtrera på kategorier"
    247247
    248 #: classes/class-settings.php:412
     248#: classes/class-settings.php:438
    249249#@ stc_textdomain
    250250msgid "There are no categories to list yet"
    251251msgstr "Det finns ännu inga kategorier inlagda"
    252252
    253 #: classes/class-settings.php:480
     253#: classes/class-settings.php:509
    254254#@ stc_textdomain
    255255msgid "Filtered by: "
    256256msgstr "Filtrering på:"
    257257
    258 #: classes/class-settings.php:247
     258#: classes/class-settings.php:205
    259259#@ stc_textdomain
    260260msgid "Email subject: "
    261261msgstr "E-post titel:"
    262262
    263 #: classes/class-settings.php:360
     263#: classes/class-settings.php:358
    264264#@ stc_textdomain
    265265msgid "Enter e-mail subject for the e-mail notification, leave empty if you wish to use post title as email subject."
    266266msgstr "Som standard används inläggets rubrik som titel på e-postmeddelandet. Ange en egen titel om du önskar ändra standardtitel."
    267267
    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
    274269#@ stc_textdomain
    275270msgid "Scheduled event successfully executed"
    276271msgstr "Schemalagt event utfört"
    277272
    278 #: classes/class-settings.php:160
     273#: classes/class-settings.php:109
    279274#@ stc_textdomain
    280275msgid "Schedule: "
    281276msgstr "Schemaläggning:"
    282277
    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
    289279#@ stc_textdomain
    290280msgid "E-mail is scheduled to be sent once every hour."
    291281msgstr "E-postmeddelanden är schemalagt att skickas varje timme."
    292282
    293 #: classes/class-settings.php:162
     283#: classes/class-settings.php:111
    294284#@ stc_textdomain
    295285msgid "Click here to run this action right now"
    296286msgstr "Skicka e-postmeddelanden nu"
    297287
    298 #: classes/class-settings.php:165
     288#: classes/class-settings.php:114
    299289#, php-format
    300290#@ stc_textdomain
     
    302292msgstr "Nästa körning är <strong>%s</strong> och avser %s inlägg."
    303293
    304 #: classes/class-settings.php:274
     294#: classes/class-settings.php:249
    305295#@ stc_textdomain
    306296msgid "On plugin deactivation"
    307297msgstr "Vid avaktivering av denna plugin"
    308298
    309 #: classes/class-settings.php:281
     299#: classes/class-settings.php:256
    310300#@ stc_textdomain
    311301msgid "Subscribers: "
    312302msgstr "Prenumeranter:"
    313303
    314 #: classes/class-settings.php:298
     304#: classes/class-settings.php:280
    315305#@ stc_textdomain
    316306msgid "The plugin will remove all data in database created by this plugin but there is an option regarding subscribers"
    317307msgstr "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."
    318308
    319 #: classes/class-settings.php:390
     309#: classes/class-settings.php:413
    320310#@ stc_textdomain
    321311msgid "Delete all subscribers on deactivation"
    322312msgstr "Radera prenumeranter vid avaktivering av plugin"
    323313
     314#: classes/class-subscribe.php:105
     315#, php-format
     316#@ stc_textdomain
     317msgid "This post update will be re-sent to subscribers %s"
     318msgstr "Inlägget kommer att skickas igen till prenumeranter %s"
     319
     320#: classes/class-settings.php:215
     321#@ stc_textdomain
     322msgid "Resend post on update"
     323msgstr "Skicka e-post när ett inlägg uppdateras"
     324
     325#: classes/class-settings.php:222
     326#@ stc_textdomain
     327msgid "Resend:"
     328msgstr "Skicka vid uppdatering"
     329
     330#: classes/class-settings.php:376
     331#@ stc_textdomain
     332msgid "Enable resend post option"
     333msgstr "Aktivera möjligheten att skicka vid uppdatering av inlägg"
     334
     335#: classes/class-settings.php:377
     336#@ stc_textdomain
     337msgid "Gives an option on edit post (in the publish panel) to resend a post on update."
     338msgstr "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
     342msgid "Resend post to subscribers"
     343msgstr "Skicka inlägg till prenumeranter"
     344
     345#: classes/class-subscribe.php:936
     346#@ stc_textdomain
     347msgid "Update | "
     348msgstr "Uppdatering | "
     349
  • subscribe-to-category/trunk/readme.txt

    r1050720 r1061089  
    44Requires at least: 3.9
    55Tested up to: 4.1
    6 Stable tag: 1.1.0
     6Stable tag: 1.2.0
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    2727*   Theres a note when next scheduled event for sending e-mails to subscribers is running.
    2828*   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.
    2931
    3032
     
    44464. Create a page and add shortcode [stc-subscribe] to display stc form subscription.
    4547
     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
     52For both attributes you can use a comma sign to separate multiple categories, like [stc-subscribe category_in="news, article"].
     53
    4654= Optionally but recommended =
    4755As 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.
     
    53612. With Bootstrap framework.
    54623. Without Bootstrap framework, override and add your own css.
    55 
     634. When resend post is enabled in settings there is a new option available when editing a post.
    5664
    5765== 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
    5872
    5973= 1.1.0 =
  • subscribe-to-category/trunk/subscribe-to-category.php

    r1032176 r1061089  
    44  Plugin URI: http://dcweb.nu
    55  Description: Lets your visitor subscribe to posts for one or several categories.
    6   Version: 1.1.0
     6  Version: 1.2.0
    77  Author: Daniel Söderström
    88  Author URI: http://dcweb.nu/
Note: See TracChangeset for help on using the changeset viewer.