.. _placeholders: ************ Placeholders ************ Static placeholders ~~~~~~~~~~~~~~~~~~~ This is a list of all placeholders that are supported for **subject** and **text** of notification rules. .. note :: Remember that you can manipulate the contents of all placeholder by using the **placeholders filters**! (see :ref:`placeholders_filters`) =================================== =========== Placeholder Description =================================== =========== [author_ID] User ID of the author [author_description] The author's description [author_display_name] The author's display name [author_email] The author's email [author_firstname] The author's firstname [author_lastname] The author's lastname [author_login] The author's login name [author_nickname] The author's nickname [author_registered] The registration date and time of the author [author_url] The author's homepage URL [blog_admin_email] The email of the blog admin as defined in Settings / General [blog_description] The blog description as defined in Settings / General [blog_name] The blog name as defined in Settings / General [blog_url] The blog URL as defined in Settings / General [blog_version] The WordPress version [blog_wpurl] The blog URL as defined in Settings / General [current_user_ID] The ID of the current user (the user who changed the status) [current_user_description] The description of the current user (the user who changed the status) [current_user_display_name] The display name of the current user (the user who changed the status) [current_user_email] The email of the current user (the user who changed the status) [current_user_firstname] The firstname of the current user (the user who changed the status) [current_user_lastname] The lastname of the current user (the user who changed the status) [current_user_login] The login name of the current user (the user who changed the status) [current_user_nicename] The nicename of the current user (the user who changed the status) [current_user_nickname] The nickname of the current user (the user who changed the status) [current_user_registered] The registration date and time of the current user (the user who changed the status) [current_user_status] The status of the current user (the user who changed the status) [current_user_url] The homepage URL of the current user (the user who changed the status) [post_ID] The ID of the post [post_author] User ID of the author [post_categories] A comma separated string of category names attached to the post [post_categories_array] Contains an array of category names attached to the post for use with filters array functions [post_categories_slugs] A comma separated string of category slugs attached to the post [post_categories_slugs_array] A list of category slugs attached to the post [post_comment_count] Total number of comments of the post [post_comment_status] The comment status of the post (like "open") [post_content] The content of the post [post_content_filtered] The filtered content of the post [post_content_strip_tags] The content of the post without HTML tags and shortcodes [post_custom_fields] A comma separated list of all custom fields attached to the post [post_custom_fields_array] Contains an array of custom fields attached to the post for use with filters array functions [post_custom_fields_and_values] A list of of all custom fields attached to the post including their values [post_date] The date of the post [post_date_gmt] The GMT date of the post [post_diff_title] Contains the changes of the post title. Formatted as HTML table for use in HTML emails. (see :ref:`content_diffs`) [post_diff_content] Contains the changes of the post content. Formatted as HTML table for use in HTML emails. (see :ref:`content_diffs`) [post_editlink] The backend edit URL [post_excerpt] The post's excerpt [post_featured_image_url] If a post has a featured image, this placeholders contains its URL [post_featured_image_width] The featured image width [post_featured_image_height] The featured image height [post_filter] The post filter (like "raw") [post_format] The post's format [post_guid] The post's internal URL (like http://your-wp.com/?p=193) [post_menu_order] The post's menu order (integer) [post_mime_type] The mime type of the post (like "image", "audio", "video") [post_modified] The modification date of the post [post_modified_gmt] The modification GMT date of the post [post_name] The post's slug name [post_parent] The ID of the parent post [post_password] The post's password [post_permalink] The post's permalink [post_ping_status] The post's ping status [post_pinged] [post_preview_25] Contains the first 25 words of the post content [post_preview_50] Contains the first 50 words of the post content [post_preview_75] Contains the first 75 words of the post content [post_preview_100] Contains the first 100 words of the post content [post_status] The post status (like "publish", "pending" etc.) [post_status_after] The post status after the transition [post_status_before] The post status before the transition [post_tags] A comma separated string of tag names attached to the post [post_tags_array] Contains an array of tag names attached to the post for use with filters array functions [post_tags_slugs] A comma separated string of tag slugs attached to the post [post_tags_slugs_array] A list of tag slugs attached to the post [post_title] The post title [post_to_ping] [post_type] The type of the post (like "post", "page" etc.) [recipient_first_name] Only works in :ref:`one_email_per_to` mode. The firstname of the recipient if it is available in the user profile. [recipient_last_name] Only works in :ref:`one_email_per_to` mode. The firstname of the recipient if it is available in the user profile. [recipient_ID] Only works in :ref:`one_email_per_to` mode. The user ID of the recipient if it is a user with an account (since 1.8.7). [recipient_email] Only works in :ref:`one_email_per_to` mode. The email address of the recipient if it is a user with an account (since 1.8.7) =================================== =========== Dynamic placeholders ~~~~~~~~~~~~~~~~~~~~ .. image:: _static/help_placeholders_dynamic.jpg :height: 366px :width: 992px :scale: 100% :alt: Help dynamic placeholders PSN offers dynamic placeholders depending on your unique WordPress installation. For every custom category or tag taxonomy (e.g. registered by other plugins) there will be a unique placeholder. For example, if you have installed "WP Job Manager" plugin, it will use the custom taxonomy "job_listing_type" which works as a category. In this case PSN offers you a placeholder called **[post_category-job_listing_type]**. If you have a custom taxonomy **"actors"** for tags, PSN will provide a placeholder called **[post_tag-actors]**. Please check the help "List of placeholders" in the rule creation / editing form in the plugin's backend. It will show you all your dynamic placeholders. .. note :: Even the contents of dynamic placeholders can be manipulated by using the **placeholders filters** (see :ref:`placeholders_filters`) or **conditional templates** (see :ref:`conditional_templates`). Custom fields ~~~~~~~~~~~~~ To retrieve the contents of custom post fields attached to a post use this placeholder syntax: .. code:: php [post_custom_field-*] Instead of the * put in the name of the custom field. If you have a custom post field "actors" the placeholder is **[post_custom_field-actors]**