Code Monkey home page Code Monkey logo

amazon-auto-links-example-templates's Introduction

Auto Amazon Links Example Templates

This package runs as a WordPress plugin and includes a few example templates for Auto Amazon Links, a WordPress plugin that generates Amazon links, to help developers start building their own templates.

Getting started

To build your own template

  1. Clone this repository to your working directory.
  2. Rename the root directory, amazon-auto-links-example-tempaltes, to something you like such as auto-amazon-links-your-templates.
  3. Modify the plugin header comment in the plugin main file, amazon-auto-links-example-templates.php
/**
 *	Plugin Name: Auto Amazon Links - Example Templates
 *	Description: Example Auto Amazon Links templates.
 *	Author:      Michael Uno (miunosoft)
 *	Version:     2.0.0
 */

to your desired one. It should look like

/**
 *	Plugin Name: Auto Amazon Links - Your Templates
 *	Description: Does something your want.
 *	Author:      Your Name
 *	Version:     1.0.0
 */
  1. Rename the main plugin file name, amazon-auto-links-example-templates.php, to something you like such as auto-amazon-links-your-templates.php.
  2. Rename the namespace defined in PHP files by replacing AutoAmazonLinks\Templates\Examples with something you like such as AutoAmazonLinks\Templates\YourTemplates.
  3. Rename the existing templates directories such as, lightslider, minimal to your desired names such as your-slider, your-simplicity or something.
  4. Start modifying style.css in the template directory.
  5. After finishing modifying the stylesheet, take a screenshot of your template and replace screenshot.jpg with yours.

To load resource files

In functions.php, use the wp_enqueue_scripts and enqueue_embed_scripts action hooks to call your functions that enqueue resources.

See how the lightslider template loads JavaScript scripts with the ResourceLoader class.

To define a default Item Format unit option

In functions.php, use the aal_filter_template_default_item_format_{template id} filter hooks to call your functions that enqueue resources. See how the lighslider template defines the default Item Format unit option with the OutputFormats class.

Notes

Be careful not to infringe the Amazon Associates policy

According to the Amazon Associates policy, you should keep the proportions of product thumbnails while resizing them is okay.

(a) You will not add to, delete from, or otherwise alter any Program Content in any way, including by adding additional information, except that you may resize Program Content consisting of a graphic image in a manner that maintains the original proportions of the image or truncate Program Content consisting of text in a manner that does not materially alter the meaning of the text or cause the text to become factually incorrect, or misleading.

Truncating text that does not lead to misleading its original meaning seems to be allowed. When you are uncertain, ask them to be safe.

Submitting your template plugin on wordpress.org plugin directory

  1. Prepare your plugin readme.txt
  2. Create a zip file of your plugin files. You can use the export script (tool/export/export.sh)
  3. Have an account on wordpress.org by singing up if you don't have one yet.
  4. After logging in, submit a request on wordpress.org from this page.

License

GPL 2 or later

amazon-auto-links-example-templates's People

Contributors

michaeluno avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

prince105524

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.