{"id":95597,"date":"2018-12-18T21:17:21","date_gmt":"2018-12-18T21:17:21","guid":{"rendered":"https:\/\/de.wordpress.org\/plugins\/conditions-for-texts\/"},"modified":"2019-02-11T19:19:16","modified_gmt":"2019-02-11T19:19:16","slug":"conditions-for-texts","status":"publish","type":"plugin","link":"https:\/\/pcd.wordpress.org\/plugins\/conditions-for-texts\/","author":15713507,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.0.2","stable_tag":"trunk","tested":"5.0.25","requires":"4.0","requires_php":"5.6","requires_plugins":"","header_name":"Conditions for texts","header_author":"appfield.net, Frank Burian","header_description":"Use if statements with variables to display text blocks only under certain conditions. For example: Publish other text blocks or headlines at christmas time, than in the rest of the year.","assets_banners_color":"efefef","last_updated":"2019-02-11 19:19:16","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/appfield.net\/plug-ins\/conditions-for-texts\/","header_plugin_uri":"https:\/\/appfield.net\/plug-ins\/conditions-for-texts\/","header_author_uri":"https:\/\/www.appfield.net","rating":0,"author_block_rating":0,"active_installs":10,"downloads":1382,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","changelog"],"tags":[],"upgrade_notice":[],"ratings":[],"assets_icons":{"icon-256x256.jpg":{"filename":"icon-256x256.jpg","revision":"1997525","resolution":"256x256","location":"assets"}},"assets_banners":{"banner-1200x389.jpg":{"filename":"banner-1200x389.jpg","revision":"1997525","resolution":"1200x389","location":"assets"}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":[],"block_files":[],"assets_screenshots":{"screenshot-1.jpg":{"filename":"screenshot-1.jpg","revision":"1997525","resolution":"1","location":"assets"}},"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[5106,35786,165763,165762,128083],"plugin_category":[],"plugin_contributors":[165764],"plugin_business_model":[],"class_list":["post-95597","plugin","type-plugin","status-publish","hentry","plugin_tags-conditions","plugin_tags-if","plugin_tags-if-conditions","plugin_tags-if-statements","plugin_tags-text-blocks","plugin_contributors-afnet","plugin_committers-afnet"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/conditions-for-texts\/assets\/icon-256x256.jpg?rev=1997525","icon_2x":"https:\/\/ps.w.org\/conditions-for-texts\/assets\/icon-256x256.jpg?rev=1997525","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/conditions-for-texts\/assets\/screenshot-1.jpg?rev=1997525","caption":""}],"raw_content":"<!--section=description-->\n<p>The WordPress plug-in <strong>Conditions for Texts<\/strong> allows bloggers to use IF- &amp; IF-ELSE conditions in their posts and pages. With this amazing plug-in specific content and texts can be published in accordance with certain conditions, for example date or time.<\/p>\n\n<p><strong>The plug-in comes in a standard- and extended version - this is the standard version!<\/strong> Please read the <a href=\"https:\/\/appfield.net\/plug-ins\/conditions-for-texts\/english\/\">documentation<\/a> to get information about the differences between the two versions and how to get the extended version.<\/p>\n\n<p><strong>Do you have any ideas, or wishes for more variables in the plug-in included or did you find a bug - please <a href=\"https:\/\/appfield.net\/contact\/\">contact us<\/a>!<\/strong><\/p>\n\n<h3>How to use this plug-in:<\/h3>\n\n<pre><code>\/\/ In Standard Version:\n[IF $month == 12]It's christmas time[\/IF]\n[IF $month != 12]It's not christmas time[\/IF]\n[IF $hour &lt;= 12]Before lunch[\/IF][IF $hour &gt; 12]After lunch[\/IF]\n[IF $month == 12]It's christmas time[ELSE]It's not christmas time[\/IF]\n\n\/\/ In Extended Version:\n[IF $month == 12 AND $day==6]It's Saint Nicholas[ELSE]I's not Saint Nicholas[\/IF]\n<\/code><\/pre>\n\n<p><em>We recommend the use of the syntax in the plain text editing location.<\/em><\/p>\n\n<h3>The following comparison operators are supported:<\/h3>\n\n<p>!= , == , &gt;= , &lt;= ,  &lt; , &gt;<\/p>\n\n<h3>The following variables for the conditions are available:<\/h3>\n\n<h4>In Standard- &amp; Extended Version:<\/h4>\n\n<ul>\n<li><strong>$day<\/strong> \u2013 Day (1\u202631)<\/li>\n<li><strong>$month<\/strong> \u2013 Month (1..12)<\/li>\n<li><strong>$year<\/strong> \u2013 Year (2018)<\/li>\n<li><strong>$hour<\/strong> \u2013 Hour (1..24)<\/li>\n<li><strong>$minute<\/strong> \u2013 Minute (1..59)<\/li>\n<li><strong>$date<\/strong> \u2013 Date (2018-12-24)<\/li>\n<\/ul>\n\n<h4>Only included in the Extended Version:<\/h4>\n\n<ul>\n<li><strong>$remoteIP<\/strong> \u2013 IP-Address of the visitor (123.123.123.123)<\/li>\n<li><strong>$userAgent<\/strong> \u2013 User-Agent of the visitor (String)<\/li>\n<li><strong>$httpReferer<\/strong> \u2013 Referer-URL of the visitor (String)<\/li>\n<li><strong>$browserLanguage<\/strong> \u2013 Language of the Browser (e.g. de,en,...)<\/li>\n<li><strong>$permaLink<\/strong> \u2013 Permanent url of the current page or post (https:\/\/...\/category\/title)<\/li>\n<li><strong>$dayOfWeek<\/strong>\u2013 Day of the week (0=Sonntag, 6=Samstag)<\/li>\n<li><strong>$dayOfYear<\/strong> \u2013 Day of the year (1...365)<\/li>\n<li><strong>$leapYear<\/strong>  \u2013 Leap year (true, false)<\/li>\n<li><strong>$amORpm<\/strong> \u2013 Morning or Afternoon (am, pm)<\/li>\n<li><strong>$pageId<\/strong>\u2013 ID of the current page (int)<\/li>\n<li><strong>$postId<\/strong> \u2013 ID of the current post (int)<\/li>\n<li><strong>$categoryName<\/strong> \u2013 Name of the category (String)<\/li>\n<li><strong>$authorId<\/strong> \u2013 ID of the author (int)<\/li>\n<\/ul>\n\n<p><a href=\"https:\/\/appfield.net\/contact\/\">Do you have any ideas or wishes for more variables, please use our contact form!<\/a><\/p>\n\n<h3>Where can i use the condition statements and which third party plugins are supported?:<\/h3>\n\n<p><strong>You can use the conditions in the following sections:<\/strong><\/p>\n\n<ul>\n<li>Content text of a page or post (the_content)<\/li>\n<li>Title of a page or post (the_title, pre_get_document_title)<\/li>\n<li>Meta-Title and Meta-Description (wpseo_title, wpseo_metadesc)<\/li>\n<li>Text in the header  (wp_head)<\/li>\n<li>Text in the footer (wp_footer)<\/li>\n<li>Text in widgets (widget_text)<\/li>\n<\/ul>\n\n<p><strong>The following third party plugins are supported:<\/strong><\/p>\n\n<ul>\n<li>Shortcode-Plugins like <a href=\"https:\/\/wordpress.org\/plugins\/shortcoder\/\">Shortcoder<\/a> (Useful: Check if parameters in the shortcode content are set!)<\/li>\n<li><a href=\"https:\/\/wordpress.org\/plugins\/tablepress\/\">Tablepress<\/a><\/li>\n<\/ul>\n\n<p><a href=\"https:\/\/appfield.net\/contact\/\">If you want another plugin-support, please use our contact form!<\/a><\/p>\n\n<!--section=installation-->\n<p>You can install this plugin directly from your WordPress dashboard:<\/p>\n\n<p><strong>Standard-Version:<\/strong><\/p>\n\n<ol>\n<li>Go to the <em>Plugins<\/em> menu and click <em>Add New<\/em>.<\/li>\n<li>Search for <em>Conditions for Texts<\/em> or click on \"Upload plugin\" and choose the downloaded zip-file <em>conditions-for-texts-standard.zip<\/em><\/li>\n<li>Click <em>Install Now<\/em>.<\/li>\n<li>Activate the plug-in.<\/li>\n<li>Have fun!<\/li>\n<\/ol>\n\n<p><strong>Extended-Version:<\/strong><\/p>\n\n<ol>\n<li><a href=\"https:\/\/appfield.net\/plug-ins\/conditions-for-texts\/english\/\">Download the Extended Version from here<\/a><\/li>\n<li>Go to the <em>Plugins<\/em> menu and click <em>Add New<\/em>.<\/li>\n<li>Click on \"Upload plugin\" and choose the downloaded zip-file <em>conditions-for-texts-extended.zip<\/em><\/li>\n<li>Click <em>Install Now<\/em>.<\/li>\n<li>Activate the plug-in.<\/li>\n<li>Have fun!<\/li>\n<\/ol>\n\n<!--section=changelog-->\n<h4>1.0.2<\/h4>\n\n<ul>\n<li>Bug<\/li>\n<\/ul>\n\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>Add IF-ELSE support for standard version. <\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial release.\n<!--stackedit_data:\neyJoaXN0b3J5IjpbLTEwOTA4MjQ1MTFdfQ==\n--><\/li>\n<\/ul>","raw_excerpt":"MAKE YOUR CONTENT DYNAMIC! Use if statements with variables to display text blocks only under certain conditions. For example: Publish other text bloc &hellip;","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/95597","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=95597"}],"author":[{"embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/afnet"}],"wp:attachment":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=95597"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=95597"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=95597"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=95597"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=95597"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=95597"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}