=== AA Condition Plugin ===
Contributors: aaextensions
Donate link: https://aaextensions.com
Tags: aaextensions, conditon, login, shortcode, aa-condition
Requires at least: 5.2
Tested up to: 6.8.1
Stable tag: 1.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

It is a simple condition based plugin, which is made with user logged and not logged in condition.

== Description ==

This plugin is specially made for people who wants to put some condition according to user logged or guest position , I mean not logged in position. I hope you can easily change aacondition.php file condition and can use the plugin with shortcode and here is the shortcode for you [aa_condition_button]. Very simple to use.


= Features =

<ol>
  <li><strong>Conditional Buttons via Shortcode</strong><br>
      Display customizable buttons based on user login status using <code>[aa_condition_button]</code>.</li>

  <li><strong>User Login-Aware Display</strong><br>
      Show different buttons and messages depending on whether the visitor is logged in or not.</li>

  <li><strong>Customizable Button Labels and URLs</strong><br>
      Easily configure button text and link URLs via shortcode attributes or admin panel.</li>

  <li><strong>Shortcode Generator in Admin Panel</strong><br>
      Lightweight, single-page admin interface to generate shortcode with your custom options — no coding required.</li>

  <li><strong>Multilingual &amp; Translation Ready</strong><br>
      Fully compatible with WordPress internationalization standards (<code>.pot</code> files included) for easy localization.</li>

  <li><strong>Open Links in Same or New Tab</strong><br>
      Choose whether buttons open links in the current window or a new tab.</li>

  <li><strong>Custom CSS Class for Buttons</strong><br>
      Add custom CSS classes to style buttons to fit your theme.</li>

  <li><strong>Login/Register Prompt for Guests</strong><br>
      Show customizable, styled login and registration links when users are not logged in.</li>

  <li><strong>Security: Nonce Protection on Admin Form</strong><br>
      Protects against cross-site request forgery (CSRF) on admin settings.</li>

  <li><strong>Premium Features (Coming Soon / Optional License Required):</strong>
    <ol type="a">
      <li>Enable/disable individual buttons easily.</li>
      <li>Customize login and registration URLs.</li>
      <li>Hide or show login prompts dynamically.</li>
      <li>Additional button styles and templates.</li>
      <li>Priority support and updates.</li>
    </ol>
  </li>

  <li><strong>Lightweight &amp; Fast</strong><br>
      No bloat—small codebase designed for speed and minimal performance impact.</li>
</ol>


= How to use it =

<ol>
  <li>Place the shortcode <code>[aa_condition_button]</code> in any post, page, or widget where you want the buttons to appear.</li>
  
  <li>Use shortcode attributes to customize buttons, for example:
    <pre><code>[aa_condition_button show_get_help="yes" get_help_url="https://yourhelpurl.com" get_help_label="Help Now" show_give_back="no"]</code></pre>
  </li>

  <li>Configure premium options (if enabled) in the plugin admin panel for more control over URLs and messages.</li>

  <li>Customize button styles via your theme or add custom CSS classes using shortcode attributes.</li>

  <li>Make sure your site supports translations for multilingual users, or provide translations for your language.</li>
</ol>

= Installation =
<ol>
  <li><strong>Download the Plugin:</strong> Download the latest version of the AA Condition plugin ZIP file from the official source or WordPress plugin repository.</li>
  
  <li><strong>Upload the Plugin:</strong>  
    <ol type="a">
      <li>Go to your WordPress Admin Dashboard.</li>
      <li>Navigate to <em>Plugins &gt; Add New</em>.</li>
      <li>Click on the <em>Upload Plugin</em> button at the top.</li>
      <li>Select the downloaded ZIP file and click <em>Install Now</em>.</li>
    </ol>
  </li>
  
  <li><strong>Activate the Plugin:</strong> Once installed, click the <em>Activate Plugin</em> button.</li>
  
  <li><strong>Configure Settings:</strong>  
    <ol type="a">
      <li>Go to <em>Settings &gt; AA Condition</em> in the WordPress dashboard.</li>
      <li>Set your preferred options, customize buttons, and generate shortcodes.</li>
    </ol>
  </li>
  
  <li><strong>Use the Shortcode:</strong> Add the shortcode <code>[aa_condition_button]</code> to any page, post, or widget to display the conditional buttons.</li>
</ol>

= Screenshots =

1. screenshot-1

= Changelog =

<ol>
  <li><strong>Version 1.0.1</strong> (2025-06-02)
    <ol type="a">
      <li>Added shortcode generator in admin panel with nonce security.</li>
      <li>Implemented premium feature toggles and disabled controls for free users.</li>
      <li>Improved multilingual support and translation readiness.</li>
      <li>Enhanced security with nonce verification on admin form submission.</li>
      <li>Fixed display logic to correctly handle logged-in and logged-out users.</li>
      <li>Added options for custom button labels, URLs, and CSS classes.</li>
    </ol>
  </li>

  <li><strong>Version 1.0.0</strong> (2025-05-30)
    <ol type="a">
      <li>Initial release with basic conditional buttons based on user login status.</li>
      <li>Basic shortcode support: [aa_condition_button].</li>
      <li>Default button labels and login/register prompt for guests.</li>
    </ol>
  </li>
</ol>

