=== CodersNoyan Templates ===
Contributors: codersnoyan
Tags: elementor, templates, starter templates, demo import, website templates
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 0.9.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Import complete, ready-made websites built with Elementor in one click, from the CodersNoyan template library.

== Description ==

CodersNoyan Templates adds a template library to Appearance → CodersNoyan Templates.

1. Browse the templates from the CodersNoyan library. Search, filter by category, and preview each live demo.
2. Pro templates are bought on codersnoyan.com. Paste the licence key from your order email into the library screen; the templates it includes can then be imported on this site.
3. Open a template and install and activate the plugins it needs, one click each.
4. Click Import. The template is downloaded, checked, and every page, the header and footer, contact forms, popups, the main menu and the photos are set up, plus the sample products and categories of a store template. The template's homepage becomes your homepage.

Importing runs as a series of short steps, so it finishes on slow hosts too. Importing a template again updates the same pages instead of creating copies. A template .zip file can also be uploaded by hand.

== External services ==

= CodersNoyan template library =

The plugin lists and downloads templates from the CodersNoyan template library on codersnoyan.com.

* What is sent: an ordinary WordPress HTTP request. Like every request WordPress makes, it includes your site's address in the User-Agent header. When you activate, check or remove a licence key, or import a Pro template, the licence key and your site's address are sent too, so the library can tell which templates the key includes and on which sites it is active. No other personal data, account details or usage data are sent.
* When: when you open Appearance → CodersNoyan Templates (the list is kept for six hours, the licence answer for twelve), when you click Refresh library or Check again, when you activate or remove a key, and when you import or update a template that is not on your site yet.
* Template thumbnails on that screen load from codersnoyan.com.

Service: https://codersnoyan.com/templates/
Terms: https://codersnoyan.com/terms/
Privacy policy: https://codersnoyan.com/privacy-policy/

= WordPress.org =

When you click "Install & activate" next to a required plugin or theme (or "Install & activate all"), WordPress's own installer downloads it from WordPress.org, exactly as the Plugins → Add New screen does.

== Frequently Asked Questions ==

= Where do I find my licence key? =

In the order confirmation email from codersnoyan.com, on the order page after checkout, and under My Account → Orders. One key covers every template you buy there; Lifetime Access includes every template.

= Can I use the key on more than one site? =

Yes, unless your licence says otherwise. To move it, click Remove key on the site you no longer use.

= A template says "How to install" instead of Import. Why? =

Some templates are installed with Elementor's own Website Templates importer rather than with this plugin. Open the template: it lists what to install, and links to the step-by-step guide on codersnoyan.com. Its template kit is under My Account → Downloads on codersnoyan.com.

= Can I import a template on a site that already has content? =

Yes, but it is best on a new site. Pages with the same slug as the template's pages (for example "home" or "about") are updated, and the template's homepage becomes your homepage. Other pages and posts are left alone.

= What happens if the import stops half way? =

Click Try again. Finished steps are kept, and the import continues from the step that stopped.

= Where are templates stored? =

In wp-content/uploads/codersnoyan-templates/. The template's stylesheets are loaded from there, so keep a template on the site while your site uses it.

= Which form plugins do templates use? =

Contact Form 7 or WPForms, depending on the template. The template lists the one it needs, and its forms send messages to your site's admin email address.

= What does a store template add to WooCommerce? =

Its sample products and product categories (with their photos), Shop with the categories under it in the template's menu, and a few display settings: products per row and per page, and the product image sizes. WooCommerce's shop, cart, checkout and account pages are created only if your store does not have them. Your currency, taxes, shipping, payment methods and emails are never changed, and neither is WooCommerce's "Coming soon" mode: launching the store stays your decision. Importing again updates only the sample products nobody has edited; a product you changed is kept as it is.

= Can I use a staging copy of the library? =

Yes. Add `define( 'CNT_LIBRARY_URL', 'https://your-staging-site/wp-json/cnt-library/v1' );` to wp-config.php.

= Can I use WP-CLI? =

Yes: `wp codersnoyan-templates library`, `licence activate <key>`, `licence status`, `licence remove`, `install <id|zip>`, `list`, `import <id>` and `remove <id>`.

= How is the plugin updated? =

Like a plugin from WordPress.org: new versions come from the CodersNoyan library on codersnoyan.com and show in Dashboard → Updates, and automatic updates are on for this plugin (turn them off with "Disable auto-updates" on the Plugins screen). A template that needs a newer version shows an update button on its screen.

== Changelog ==

= 0.9.0 =
* Store templates: a template can bring WooCommerce products and product categories with their photos. They are found again by SKU and slug, so importing again updates them instead of adding copies. A product you edited after the import, and a category your store already had, are kept as they are.
* Shop, with the template's categories under it, is added to the template's menu. A menu that has your own items is left alone.
* WooCommerce's shop, cart, checkout and account pages are created when the store does not have them, and the template's terms page is used at checkout when none is set.
* A store template can set WooCommerce's products per row and per page and its product image sizes. A later import changes only the settings you have not changed since.
* After the import, a store still in "Coming soon" mode gets a reminder that visitors see a placeholder until it is launched.
* Reads template package format 6. Older versions of the plugin refuse store templates and ask for an update, rather than importing a store without its products.

= 0.8.0 =
* The plugin updates itself from the CodersNoyan library, through WordPress's own updater: new versions show in Dashboard → Updates and on the Plugins screen, with "View details" and the changelog, and each download is checked against the library's checksum before it is installed.
* Automatic updates are switched on for this plugin once, when 0.8.0 first runs. "Disable auto-updates" on the Plugins screen turns them off for good.
* A template that needs a newer version of the plugin says so on its screen, with a button that updates the plugin right there. Before, the import stopped with an error after the download.

= 0.7.3 =
* Installing a template's plugins no longer leaves the template screen. Each plugin row turns Active in place and the Import button unlocks as soon as the required ones are active. Before, the page reloaded after every plugin, and a plugin with a welcome screen (Elementor Header & Footer Builder) took you to that screen instead.
* New "Install & activate all" button installs and activates every listed plugin and the theme one after the other, and stops at the first one that fails with the reason under it.
* The activation welcome screens of Elementor, Elementor Header & Footer Builder and WooCommerce are skipped when they are activated from a template screen. They stay available in those plugins' own menus.

= 0.7.2 =
* Importing a new version of a template now brings its changed colours, fonts and theme style into Site Settings. Before, a template whose colours and fonts were already on the site was skipped as "Already applied" even when the new version had changed them.
* Only what the template itself changed is applied: a colour or font you edited in Site Settings, and the template left alone, keeps your value. Importing the same version again changes nothing.
* Sites imported with 0.7.1 or older keep their current Site Settings on the next import, since their values cannot be told apart from your own edits. Changes are tracked from that import on.
* A template can ship its own "page not found" page. Addresses that do not exist show it, with a 404 status, instead of the theme's plain one; the page's own address is hidden from search engines.
* A template's privacy policy or terms page no longer replaces one your site already published. A page the template created is updated on a later import only while nobody has edited it, so policy text you wrote into it is kept.
* Reads template package format 5 (the two features above). Older versions of the plugin refuse those templates and ask for an update, rather than replacing your privacy policy.

= 0.7.1 =
* A site's own Contact Form 7 form can get the same spam protection (post meta _cnt_form set to "site:<name>"). Those forms also refuse messages that were not sent from a page showing the form.

= 0.7.0 =
* Spam protection for the Contact Form 7 forms that come with a template, with nothing to set up: a hidden trap field, a check for forms sent within seconds, messages full of links or link markup, and at most five messages per visitor every ten minutes. Blocked messages get Contact Form 7's "could not be sent" answer. The site's other forms are not changed. Developers can turn it off with the cnt_spam_protection filter.

= 0.6.1 =
* A site that already had a header or footer made with Elementor Header & Footer Builder (its own, or one from another template) no longer ends up with two: after the template's header and footer are imported, the others are set to draft, and the import says which ones. Nothing is deleted.

= 0.6.0 =
* Templates can set the theme's own page settings, such as Astra's full-width layout without a page title, so their pages look the same as on the demo. Reads template format 4.

= 0.5.0 =
* Templates can include blog posts: they are imported with their categories and featured image, and found again by slug, so importing twice updates them. Reads template format 3.
* A template that lists the latest posts moves WordPress's untouched "Hello world!" sample post to the trash, where it can be restored.
* Contact Form 7 forms get the template's own "message sent" text.
* Archive, search and 404 pages keep their title under Hello Elementor, which hid it when the first post listed had "Hide title" set.

= 0.4.2 =
* Before an import changes anything, the plugin checks that WordPress can save files. On a hosting account that has reached its disk space or file limit, the import stops with a message saying so, instead of leaving photos missing.
* A photo that could not be saved counts as failed. The empty Media Library item it leaves behind is removed, so importing again copies the real photo.
* Requests to the template library wait longer and are tried twice, so a slow connection no longer stops a download.
* Templates that are installed with Elementor instead of this plugin show how to install them, with a link to the step-by-step guide.
* Remove key says so when codersnoyan.com could not be told, since the site may then still count on the licence.

= 0.4.0 =
* Pro templates: enter the licence key from your codersnoyan.com order, and import the templates it includes. Downloads use short-lived links made for your key.
* The library shows Pro templates with their price and a Buy button, and marks the ones in your licence.
* WP-CLI: licence activate, status and remove.

= 0.3.0 =
* Templates can include WPForms forms. They are created on your site, send notifications to your admin email, and the template's pages, header and footer use them.
* Menus with sub-items, such as a Services menu with a page for each service.
* Reads template format 2, used by templates with the features above.

= 0.2.0 =
* Online library: free templates from codersnoyan.com with search, category filter, previews and update notices.
* Templates download on import and are checked against the library's checksum.
* WP-CLI: library, install by ID, remove; import downloads the template when needed.

= 0.1.0 =
* First release: template library, package upload, requirement checks with one-click install, step-by-step import for Elementor templates, WP-CLI commands.
