=== Nabd ===
Contributors: nabd
Tags: arabic, rtl, match center, adsense, ai writer, seo, related posts
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.1
Stable tag: 0.9.27
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Match center, reserved ad slots, an AI writing sidebar and SEO basics for Arabic and RTL WordPress sites. Works with any theme.

== Description ==

Nabd brings the features of the Nabd Blogger theme to WordPress as one plugin that works with the theme you already have:

* **Match center** — yesterday / today / tomorrow fixtures with Arabic team names and logos, live scores, your leagues in your order. A block and a shortcode `[nabd_matches]`.
* **Ad slots with reserved space** — a block and a shortcode `[nabd_ad slot="in_post"]` that hold their height before the ad loads, so the page never jumps (zero layout shift). AdSense library loaded once, lazily. Optional automatic slot after paragraph N.
* **AI writer** — a sidebar in the block editor that writes outlines, introductions, FAQ sections and conclusions, edits your selection (improve, shorten, expand, proofread, translate…) and suggests titles, meta descriptions and keywords. Uses your own API key (OpenRouter, Anthropic, OpenAI or Gemini); the key stays on your server.
* **SEO basics** — meta description and focus keyword per post, Open Graph and Twitter cards, JSON-LD (WebSite, Organization, Article, BreadcrumbList) and a “Read also” list after posts. Steps aside automatically when Yoast, Rank Math, AIOSEO or SEOPress is active.

* **Nabd themes** — the five Nabd designs (news, sports, tech, blog, wiki) with their ready-made looks, compiled for WordPress from the same source as the Blogger themes: hero layouts, home blocks, section colors, dark mode, sticky sidebars, related posts and the match center, all driven by one settings JSON.

Every feature is a module you can switch off on its own.

**License.** The plugin is GPL. Updates, the match-center data service and the AI writer need a Nabd license: a free trial starts when you install the plugin, and a purchase code from https://nabd.gply.top activates the site. Your site talks to `nabd.gply.top` (license status, updates, match data). No personal data of your visitors is sent.

== Installation ==

1. Upload the `nabd` folder to `/wp-content/plugins/` (or upload the zip from Plugins → Add New → Upload).
2. Activate the plugin.
3. Open **Nabd** in the admin menu: the trial starts automatically; paste a purchase code when you have one.
4. Switch on the features you need and set them up (leagues, ad codes, AI provider key).

== Frequently Asked Questions ==

= Does it work with my theme? =
Yes. Nabd adds blocks, shortcodes and head tags; it does not replace templates. Match center and ad slots go wherever you place the block (post content, widget areas, the site editor).

= Where does the AI key live? =
In your WordPress database only, on your server. The editor never receives it; requests go from your server to the provider you chose.

= What happens when the license expires? =
The plugin keeps working with the features that do not need the service (ad slots, SEO basics). Updates, the match center and the AI writer pause until the license is renewed.

== Changelog ==

= 0.9.27 =
* New “Codes & tracking” tab: Google Analytics 4, Tag Manager, Microsoft Clarity, Hotjar, Meta and TikTok pixels by ID (or paste the full snippet), loaded without slowing the site and never twice (works alongside Site Kit).
* Custom HTML boxes for the head, the top and the end of every page, plus Facebook and Ahrefs verification.

= 0.9.26 =
* Category colors: Arabic category names and their post counts display in the right order in the English panel.

= 0.9.25 =
* License tab: no stray “null” line, the plan name is translated (Lifetime/Paid/Trial), and the code field shows the real code format (NABD-XXXXX-XXXXX).
* The License, WordPress and module texts are fully in English for English-language admins.

= 0.9.24 =
* The control panel is fully in English for English-language admins (Apply/Open site buttons, side tabs, preview bar, match center, license and module texts).

= 0.9.23 =
* A warning under the primary/accent color when it is too light to read on a light background.
* Theme: titles stay readable when a section, header or footer uses another template’s design.

= 0.9.22 =
* Edit right on the page: double-click a section title or a theme word in the preview to type over it (Enter saves, Esc cancels).
* Drag home sections to reorder them in the preview, and add a new section exactly where you want it with “+ Section here”.

= 0.9.21 =
* Full preview: a “Full preview” button in the panel’s preview bar shows your site with all current settings — even the hero, sections, a header from another theme and the menu — before “Apply”. Only you see it, inside the preview; visitors keep seeing the active theme.
* The preview copy lives outside wp-content/themes, so WordPress never lists or activates it, and it is removed after “Apply” or when the plugin is deleted.

= 0.9.20 =
* Post options: six per-post switches in the “Nabd layout” panel (and the classic editor box) — no sidebar, no featured image at the top, no author box, no “Read also”, no share buttons, no comments. They win over page and section layouts.
* Fix: “Full width” on a single post was overwritten by the general sidebar setting.
* A hidden featured image is no longer preloaded.

= 0.9.19 =
* Page layouts: sidebar per page type (posts, static pages, section and search pages) and hide the featured image at the top of posts — the image stays on cards and shares, and the first image in the post stays.
* Posts of a specific section: choose the sidebar and featured image for one category’s posts, straight from the part card when you click a post in the preview.
* Fixes: a post’s “kicker” no longer hides its real category from section colors and layouts; category names with & or quotes match correctly.

= 0.9.18 =
* Theme texts: 122 visitor texts can now be edited (was 59) — the wiki welcome line and search box, match-center tabs and statuses, app-store labels, follow buttons, “Other topics”, font-size buttons and more.
* Click-to-edit understands texts with punctuation, arrows or a number next to them (“Share:”, “Back to top ↑”, “4 Comments”, “© · All rights reserved”), the site name and tagline, and explains when a text comes from your own content or a widget.
* New clickable parts: the section page header and the wiki info card. The page bottom is no longer hidden under the editing bar.
* Panel: hint and status colors are easier to read in light mode.

= 0.9.17 =
* Click-to-edit: a clicked text now shows once — the setting that really controls it (for example the wiki “Latest entries” box title), not every template text with the same wording.
* Theme texts: each one says where it appears (two texts with the same word are no longer confused).
* Title settings (wiki box titles, match center title, follow/recent-comments titles, site name and tagline) now change instantly in the preview.

= 0.9.16 =
* Click-to-edit: clicking the title of any home block opens a “Block title” field right in its card (empty = the category name), with the change shown instantly in the preview.

= 0.9.15 =
* Click-to-edit: clicking a heading or label in the preview (for example “Featured article”) now opens that exact text for editing at the top of its card.
* Control panel: dropdowns and text fields are readable in dark mode (WordPress admin colors no longer override them).

= 0.9.14 =
* New: click-to-edit. Click any part of the live preview (header, a home block, the post title, the footer…) and its own settings open in the panel, with a path to the parts around it.
* New: “Look of each part” — colors, sizes, line spacing and hide-on-mobile/desktop per part and per home block, in ready steps that fit the theme.
* New: “Theme texts” — change any fixed wording visitors see (“Read more”, “Comments”, “Back to top”…), per site language.
* New: undo/redo (Ctrl+Z / Ctrl+Y), a simple mode with the key settings only, and search that understands common words (logo, menu, font…).
* Block order, removal, width and style now show instantly in the preview; settings that need “Apply” are marked.

= 0.9.13 =
* New: “Section descriptions” (Look tab). Write a sentence or two per category; it shows under the category page title as real text (good for Google and visitors) in every template.

= 0.9.12 =
* Control panel on phones: one column (header, a scrollable row of named tabs, then the settings), header buttons in one row, tighter cards so fields use the full width, and “Preview” switches the whole screen to the live preview and back.

= 0.9.11 =
* Control panel: new switches show their correct default right after an update (the settings library refreshes when the server or the installed theme is newer, instead of waiting up to 6 hours).

= 0.9.10 =
* Cards: new “Date on cards” switch next to “Description (excerpt) on cards” (Design → Cards). It works on every template: home, section and search cards, sidebar lists and related posts. The post page date stays in the Post tab.

= 0.9.9 =
* Images: no more blurred fill. Each card frame takes its own image ratio (read from the file name before the image loads, so the page does not jump), and the site photo ratio is measured from your real attachments. On mobile the tech and sports lead card shows the image whole with the title below it.

= 0.9.8 =
* After “Apply”, the new design is fetched before the success message, and the theme fetches a changed design immediately — no more moment where a borrowed header/footer shows unstyled.

= 0.9.7 =
* Ads are now a list: start empty, click “Add an ad” and choose where it goes. Several ads in the same kind of spot (between paragraphs, sidebar, home blocks, label pages), each with its own position, device, size and optional own AdSense unit or other-network code. Existing ads carry over as they were.

= 0.9.6 =
* Fix: the “Page” and “Category” pickers (footer columns, menu, blocks) opened behind the full-screen panel, so they looked like they did nothing.

= 0.9.5 =
* Footer settings reorganised in the order of the footer itself (newsletter, site name & about, columns, bottom bar). Columns are collapsible cards in one draggable list; add a links column or a text/HTML column anywhere.

= 0.9.4 =
* Footer columns show what is actually on the site: the footer text card is prefilled with the current text, and the links column lists Home, your links and the site pages — remove, add or reorder any of them and see it in the preview immediately.

= 0.9.3 =
* A logo saved once is reused by team name too: manual matches (and teams the source has no logo for) pick up the logo of a team with the same name automatically.

= 0.9.2 =
* Team logos for yesterday/today/tomorrow are pre-downloaded every hour, so visitors see them at once.

= 0.9.1 =
* Footer columns builder (drag to reorder, show/hide, edit each column) now renders in the WordPress panel; order and visibility show instantly in the preview.

= 0.9.0 =
* Fixtures are fetched through your site and cached there (once per league and day; past days 12h, upcoming 1h, today 10 min, live 1 min) instead of every visitor hitting the source. “Clear cache and refetch” button on the Matches tab.

= 0.8.9 =
* Team logos: up to 24 logos are fetched within the first request (7-second budget) and the theme re-asks for the rest, so a full match list shows logos on the first visit.

= 0.8.8 =
* Matches tab order: yesterday/today/tomorrow editor comes before the leagues list.

= 0.8.7 =
* Match center controls in the panel (sports theme): edit team names in Arabic, replace a team logo from your media library, channel and commentator, article link opened by the card, pin, hide and swap; manual matches. The theme re-applies itself automatically when Nabd ships a newer build (toggle in the theme settings).

= 0.8.6 =
* Match center team logos are downloaded once to your own site (uploads/nabd-logos) and served from there — automatically, for the sports theme and the match-center block; visitors never load images from third-party sites.

= 0.8.5 =
* “Check for updates” button on the License tab: asks the Nabd server right away and refreshes the WordPress update notice; “Check again” on the Updates screen also bypasses the 12-hour cache.

= 0.8.4 =
* License check trusts the signed token (no false “needs a license” after a transient server error). The “Refresh status” button works again. Comment box redesigned; footer columns unified.

= 0.8.3 =
* Signing-key rotation without lockouts: the plugin accepts a list of Nabd public keys. Staging/development domains approved by Nabd are licensed alongside the live domain.

= 0.8.2 =
* The design is refreshed only when it changes (the license token now carries the design revision), so idle sites make no extra server requests.

= 0.8.1 =
* Theme design (CSS/JS) is now delivered by the Nabd server to the licensed domain and refreshed every 10 minutes; the theme package itself no longer contains it. Applying the theme warms the design up immediately.

= 0.8.0 =
* Signed licensing: the Nabd server issues an ECDSA-signed, domain-bound license token verified offline by the plugin and by the theme; theme packages and plugin updates are signature-checked before install. Every theme build carries a per-site fingerprint.

= 0.7.4 =
* Safer theme install: atomic swap with rollback, package validation, concurrency lock; update packages only from Nabd hosts over HTTPS; the license server URL must be HTTPS; settings without unfiltered_html no longer wipe stored ad codes; URL fields are sanitized; uninstall removes all Nabd data.

= 0.7.3 =
* Security: password-protected posts no longer expose their content in meta descriptions. The SEO panel uses the wp.editor API (wp.editPost is deprecated since WordPress 6.6). Tested up to WordPress 7.1.

= 0.7.2 =
* With a Nabd theme active the SEO module no longer prints a second description/Open Graph/JSON-LD or a second related-posts list (the theme owns them); the theme itself stays silent when Rank Math, Yoast, AIOSEO, SEOPress or The SEO Framework is active.

= 0.7.1 =
* The AI writer now works in the classic editor too (a side box next to the content) and shows a launcher in the block editor’s document settings; a Nabd SEO box (description, keyword, kicker, layout) for the classic editor; on/off switch for the writer in the panel.

= 0.7.0 =
* One admin page: the Nabd menu opens the control panel directly; license, feature switches, the AI writer and the SEO module are tabs inside it (the old settings page is gone). Ad block and match-center block read the AdSense id and leagues chosen in the panel.

= 0.6.0 =
* Per-post options (full width, hide the featured image, kicker), numbered pagination, import of the WordPress primary menu with sub-levels, theme screenshots, editor styles, theme update notice.

= 0.5.0 =
* Full theme control panel (Nabd → Theme): every setting of the theme with a live preview — design and ready-made looks, colors, fonts, hero, home blocks (drag and drop), post page, sidebar, header and footer, menu, ads, SEO, site identity, category colors, saved versions.

= 0.4.0 =
* Nabd themes: install any of the five designs (news, sports, tech, blog, wiki) with their ready-made looks from Nabd → Features → Nabd theme. Compiled from the same source as the Blogger themes.

= 0.3.0 =
* Write a full article in stages (keyword plan, introduction, sections with measured keyword use, FAQ, conclusion, meta description).
* Live keyword report in the Nabd SEO panel.
* Internal link suggestions from your own posts.

= 0.2.0 =
* AI writer sidebar in the block editor (your own provider key).
* SEO basics module: meta description, social cards, JSON-LD, related posts, editor panel.
* Arabic translation.
* Settings page: proper controls (selects, secrets, ad slot editors).

= 0.1.0 =
* First release: match center, reserved ad slots, license activation and updates.
