=== SRA Nieuwsbank ===
Contributors: infonics
Tags: nieuwsbank, api, nieuws, import, sra
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 8.0
Stable tag: 1.1.10
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Import articles from the SRA News API into WordPress and display them with filtering and layout options.

== Description ==

SRA Nieuwsbank allows you to import and display articles from the SRA News API directly within WordPress.

Key features:
* Import articles from an external API
* Filter content by themes, target audiences, branches, and types
* Manual and scheduled synchronization
* Customizable layout settings
* Support for custom CSS
* Ability to edit imported articles within WordPress

This plugin is designed for organizations that want to integrate SRA News content into their WordPress website.

== Installation ==

1. Upload the plugin to the `/wp-content/plugins/` directory.
2. Activate the plugin through the 'Plugins' menu in WordPress.
3. Go to the SRA Nieuwsbank settings page.
4. Configure your API settings.
5. Save the settings and run a manual import if needed.

== Frequently Asked Questions ==

= Do I need API access? =

Yes, you need access to the SRA API to use this plugin.

= Can I manually trigger an import? =

Yes, the plugin provides an option to manually start synchronization.

= Can I customize the layout? =

Yes, you can adjust layout settings and add custom CSS.

== External services ==

This plugin connects to the SRA Nieuwsbank API (https://www.sra.nl) to retrieve news articles and filter options.

= SRA Nieuwsbank API =

**What the service is and what it is used for:**
The SRA Nieuwsbank API is a news feed provided by SRA (Samenwerkende Registeraccountants en Accountants-Administratieconsulenten). This plugin uses it to import and display SRA news articles on your WordPress site.

**What data is sent and when:**
* Your API key (provided in the plugin settings) is sent with every request to authenticate.
* Filter preferences (themes, target audiences, branches, types) and pagination parameters are sent when fetching articles or filter options.
* Requests are made when: saving plugin settings (to verify the API key), during scheduled automatic synchronization (three times daily at 10:00, 13:00 and 17:00 server time), and when a manual import is triggered by an administrator.

**No personal data of website visitors is sent to the SRA API.**

Service provider: SRA (https://www.sra.nl)
Terms of service: https://www.sra.nl/disclaimer
Privacy policy: https://www.sra.nl/privacyverklaring

== Screenshots ==

1. Plugin settings page
2. Filter configuration
3. Frontend article display

== Changelog ==

= 1.1.10 =
* Code quality improvements: Fixed all WordPress coding standards violations
* Security enhancement: Added escaping to wp_customize_url() output
* Performance optimization: Refactored slow meta_key queries using WordPress API instead of direct database queries
* Code standards: Prefixed all template variables with srani_ prefix to comply with WordPress naming conventions
* Code documentation: Added phpcs:ignore comments with explanations for necessary database queries and security exemptions
* Improved overall code compliance with WPCS standards

= 1.1.7 =
* Bug fixes and performance improvements

= 1.1.8 =
* Removed LinkedIn integration (no longer used)
* Fixed: inline CSS now uses wp_add_inline_style() instead of raw echo
* Added nonce verification and capability checks to all admin action handlers
* Renamed option key from api_importer_options to srani_options (with automatic migration)
* Renamed API_Post_Importer_Sync class to SRANI_Sync for proper prefixing
* Changed admin menu position from 20 to 80 (below core WordPress items)
* Removed dead/duplicate settings registration code
* Updated readme.txt with External Services documentation

= 1.1.9 =
* Enhanced security: Fixed nonce mismatch in delete actions and added API key sanitization
* Improved performance: Added transient caching for API filter responses
* Code quality: Consolidated duplicate canonical URL logic and removed unused code
* Localization: Translated all hardcoded strings in post types, taxonomies, and menus
* Removed CSS customizer
* Updated version and changelog

= 1.1.10 =
* Code quality improvements: Fixed all WordPress coding standards violations
* Security enhancement: Added escaping to wp_customize_url() output
* Performance optimization: Refactored slow meta_key queries using WordPress API instead of direct database queries
* Code standards: Prefixed all template variables with srani_ prefix to comply with WordPress naming conventions
* Code documentation: Added phpcs:ignore comments with explanations for necessary database queries and security exemptions
* Improved overall code compliance with WPCS standards

== Upgrade Notice ==

= 1.1.10 =
This release improves code quality and compliance with WordPress coding standards, including security enhancements and performance optimizations.
