.. _options: ####### Options ####### .. image:: _static/options_nav.png :height: 115px :width: 942px :scale: 100% :alt: Options In the options section you can adjust the behaviour of Post Status Notifier. *************** General options *************** .. image:: _static/options_general.png :height: 318px :width: 500px :scale: 100% :alt: Options Deactivate rule on copy ~~~~~~~~~~~~~~~~~~~~~~~ With this option you can decide whether a duplicated rule should be deactivated automatically. This is recommended to prevent that the new rule will trigger notifications before you have changed the copy. Late execution ~~~~~~~~~~~~~~~ If you are facing problems with empty custom field placeholders or custom field placeholders that get not replaced at all, activate this option. PSN will then try to execute notification rules on a very late point in WordPress execution workflow to wait until every other plugin has updated its custom fields. This option is especially useful if you are using third party plugins for managing custom fields, such as `Advanced Custom Fields `_ .. _option_one_email_per_to: TO loop timeout ~~~~~~~~~~~~~~~~~~~~~~ When using the **"One email per TO recipient"** feature (see :ref:`one_email_per_to`) you may want to adjust the PHP maximum execution time for the sending job. Here you can enter a **maximum execution time in seconds**. It will only be used inside this special feature and will not affect the global configuration. Ignore post status "inherit" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This option lets you decide if the post status "inherit" should be ignored by the plugin. This status is used by WordPress internally when revisions of posts get created automatically. Hide non-public post types ~~~~~~~~~~~~~~~~~~~~~~~~~~ If you do not want or need non-public post types in the rule form selection, you can activate this option. Then you will see the public post types in the rule form only. ********** Email ********** Default FROM ~~~~~~~~~~~~ Here you can set a default FROM email address. This will get used as sender for all notification emails processed by PSN if a notification rule does not have a custom sender defined. Leave it blank to use the blog email address as sender (configured under Settings / General). .. image:: _static/options_email.png :height: 164px :width: 694px :scale: 100% :alt: Email options .. _option_deferred_sending: ***************************** Mail Queue ***************************** The Mail Queue is PSN's feature for deferred email sending. .. note:: It is highly recommended to use the Mail Queue to handle **large amounts of emails**. For more details, check chapter :ref:`mailqueue`. .. image:: _static/options_mailqueue.png :height: 370px :width: 400px :scale: 100% :alt: Mail Queue Activate ~~~~~~~~ Activates the Mail Queue feature. Max amount ~~~~~~~~~~ Here you may configure how many emails should be processed on each mail queue run. Max tries ~~~~~~~~~ Here you may configure how often the mail queue should try to send an email in case of an error. Recurrence ~~~~~~~~~~ Setup the recurrence of a mail queue run. You can select one of WordPres's internal interval or "Manually". If you select "Manually" you can run the mail queue by hitting the button "Run mail queue now!" in the Mail queue section. To create custom intervals (like every 5 minutes) please use a Cronjob plugin like `WP Crontrol `_. Log sent emails ~~~~~~~~~~~~~~~ Activates the mail queue log. if activated, emails sent successfully by the mail queue get stored in the log. Otherwise they will just be deleted from the queue. Run after add ~~~~~~~~~~~~~ If activated, the mail queue will be run once immediately after emails got added. This will send the first bunch of the configured max amount directly without having to wait for the next scheduled cron run. ********** Conditions ********** .. image:: _static/options_conditions.jpg :height: 268px :width: 790px :scale: 100% :alt: Conditions .. _option_conditions_for_subject: Enable for subject ~~~~~~~~~~~~~~~~~~ If you want to use **conditions**, **loops** and **filters** in your subject texts, activate this option. Check the chapter :ref:`conditional_templates` to learn more. .. _option_conditions_for_body: Enable for body ~~~~~~~~~~~~~~~ If you want to use **conditions**, **loops** and **filters** in your body texts, activate this option. Check the chapter :ref:`conditional_templates` to learn more. Enable dynamic recipients ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This option activates the :ref:`dynamic_recipients` feature. Log errors ~~~~~~~~~~ Activate this option to receive errors regarding the **conditional template syntax** in your subject and body. ****************************** Block notifications feature ****************************** Disable it completely ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This option will completely disable the "Block notifications" option in the Post submit box. .. image:: _static/option_block_notifications.jpg :height: 101px :width: 302px :scale: 100% :alt: Block notifications For admins only ~~~~~~~~~~~~~~~ This option will enable the "Block notifications" option in the Post submit box for admins only. Selected by default ~~~~~~~~~~~~~~~~~~~ Use with caution! This will check the block feature by default meaning that **no notifications will be sent** unless you deselect the checkbox before saving or updating a post. *********** Limitations *********** The limitations feature allows you set a limit on how often a notification rule should trigger. For more details check chapter :ref:`limitations`. .. image:: _static/options_limitations.jpg :height: 333px :width: 595px :scale: 100% :alt: Limitations Activate ~~~~~~~~~~~~~~~~~~~ Activates the limitations feature. Global limitations ~~~~~~~~~~~~~~~~~~~ If you want to use the limitations feature globally on every rule, check "Global limitations". Type ~~~~~~~~~~~~~~~~~~~ There are two options available for limitations type: - By Rule + Post This setting will store a count for a rule and post combination. If the limit is set to 1, the rule will never be triggered again on that post no matter what status the post has. - By Rule + Post + Status After This setting will additionally store the post status after. That means, if the limit is set to 1 and the rule matches multiple statuses after, it will match once for every status after. Limit count ~~~~~~~~~~~~~~~~~~~ How often a post rule combination may trigger. If you leave it blank, the default is "1". ****** Logger ****** .. image:: _static/options2.jpg :height: 217px :width: 751px :scale: 100% :alt: Logger Options Log rule matches ~~~~~~~~~~~~~~~~ If this option is set, rule matches will be logged generally. Every time one of your rules gets executed, a log entry will be written. .. note:: This option is highly recommended for debugging your rules (see :ref:`debug_rule`). Array details ~~~~~~~~~~~~~ Show array contents in log entries instead of just "Array". Use only when you need it as this can litter up your log table e.g. in case of placeholder [recipient_all_users]. Disable widget ~~~~~~~~~~~~~~ This option disables the dashboard widget. Widget for admins only ~~~~~~~~~~~~~~~~~~~~~~ This options activates the dashboard widget for blog admin only. **** SMTP **** The SMTP options allow you to send the notification e-mails via a SMTP mail server. Especially when you need to send very much e-mails, this is recommended. Just enter your SMTP connection data and check **"Acticate SMTP"**. .. image:: _static/options4.jpg :height: 856px :width: 955px :scale: 100% :alt: SMTP Options ************ Placeholders ************ .. _placeholders_filters: Placeholders filters ~~~~~~~~~~~~~~~~~~~~ .. image:: _static/options3.jpg :height: 282px :width: 895px :scale: 100% :alt: Placeholders Options Placeholders filters is a very powerful feature. With it you can manipulate the contents of all the placeholders (see :ref:`placeholders`) PSN provides. It uses the filters of the popular PHP template engine Twig. Here you can find the detailed documentation of all available filters: https://twig.symfony.com/doc/filters/index.html The definition of one filter must be placed in one line of the textarea. You may not spread your filter definition over multiple lines. .. note:: One filter per line! Examples ======== date ---- If you want to change the output format of the post's date, you can use the **date** filter: .. code-block:: ruby [post_date]|date("m/d/Y") capitalize ---------- The placeholder gets capitalized. The first character will be uppercase, all others lowercase. .. code-block:: ruby [post_title]|capitalize split ----- This is an advanced usage. With the **split** filter you can split a string by a delimiter string. With Twig's for-loop (https://twig.symfony.com/doc/tags/for.html) we can loop through the list items, manipultate them and join them together to a new list. .. code-block:: ruby {% for key in [post_categories]|split(',') %}#{{ key|trim|replace({' ': ''}) }} {% endfor %} This example will change the content of the placeholder [post_categories] from .. code-block:: ruby Action, Drama, Horror, B Movie to .. code-block:: ruby #Action #Drama #Horror, #BMovie With this filter you can for example automatically push your new post to a Social Media service like `Buffer `_. ************ Advanced ************ .. image:: _static/options_advanced.jpg :height: 243px :width: 586px :scale: 100% :alt: Advanced options Activate Mandrill ~~~~~~~~~~~~~~~~~~~~ Activates support for Mandrill API. `Mandrill `_ is an email infrastructure service by the creators of MailChimp. If activated, all emails generated by PSN will be passed to your Mandrill account. Mandrill API key ~~~~~~~~~~~~~~~~~~~~ Your Mandrill API key. Must be set additionally to "Activate Mandrill" in order to use the Mandrill API. Mandrill log ~~~~~~~~~~~~~~~~~~~~ Activate to receive log entries whenever emails got passed to Mandrill or error messages from the Mandrill API.