# Juicer WordPress Plugin

## Embed, curate & aggregate social media feeds into your website using JUICER

This is the git backup repository of the official [juicer.io WordPress plugin](https://wordpress.org/plugins/juicer/)

See [trunk/readme.txt](trunk/readme.txt) for details about the plugin.

## Updating the WordPress Plugin

[Wordpress Guide](https://developer.wordpress.org/plugins/wordpress-org/how-to-use-subversion/)

### Cloning the Plugin Repository

    svn co https://plugins.svn.wordpress.org/juicer juicer-wordpress-plugin

### Assets

> The `assets` folder in your plugin is where you can store images (like plugin headers, icons, and screenshots) used on
> your plugin’s display page.
>
> All files should be placed into the assets directory of your SVN directory and will work for all versions of your
> plugin. This is a top level directory, just like trunk. You would not place the screenshots into trunk/assets or
> tags/1.0/assets.
>
> Source: https://developer.wordpress.org/plugins/wordpress-org/plugin-assets/

Update the files without bumping the plugin version.

### Modifying Files & Tagging new Releases

1. `cd juicer-wordpress-plugin/`
2. `svn update` pull latest changes from the server 
3. Edit files in `trunk` directory
4. Update `Stable Tag` in `trunk/readme.txt` with NEW_VERSION
5. Update `Version` in `trunk/juicer.php` with NEW_VERSION
6. If you see it fit, update the data-origin version in `trunk/juicer.php`
7. Create new Tag: `cp -rf trunk tags/NEW_VERSION` (replace NEW_VERSION with, e.g. `1.9.X`)   
8. Add and delete files form SVN
9. Commit changes `svn ci -m 'A Message' --username juicerio --password svn-password`. See 1Password creadentials with `team@juicer.io`.
10. Help page is updated https://help.juicer.io/hc/en-us/articles/360039990112-Installing-Juicer-on-a-WordPress-site, ask Mario.

If you need to update only readme without bumping the version do following:

1. `cd juicer-wordpress-plugin/`
2. `svn update` pull latest changes from the server 
3. Edit `trunk/readme.txt`
4. Copy the file to `tags/<stable-release>/readme.txt`

   Based on "If you try to change the description of the plugin in
   /trunk/readme.txt then your changes won’t do anything on your plugin page.
   Everything comes from the readme.txt in the file being pointed to by the
   Stable Tag."
   from https://developer.wordpress.org/plugins/wordpress-org/how-your-readme-txt-works/#how-the-readme-is-parsed.

5. Commit the changes, see above.

## Setting up WordPress for Testing

### A. Local Setup (preferred)

* [https://github.com/juicer-io/juicer-wp-plugin-test](https://github.com/juicer-io/juicer-wp-plugin-test)

### B. AWS Lightsail Cloud Setup (alternative)

Moritz used AWS Lightsail, a "simple" version of AWS to get a running WordPress instance.
The [Getting Started](https://lightsail.aws.amazon.com/ls/docs/en/articles/getting-started-with-amazon-lightsail)
explains how to get a running WordPress instance,
and [this](https://lightsail.aws.amazon.com/ls/docs/en/articles/getting-started-with-wordpress-and-lightsail) explains
how to login to the WordPress instance.

After logging in, the sidebar will show an `Update Available` button to upgrade to WordPress 5.0 (note that Amazon might
have updated their image, so it might already be up-to-date).

To install the Juicer plugin, head to `Plugins -> Add New`. A search for `Juicer` should turn up the plugin. Installing
it should work fine too.

To test it, edit the sample post and add the shortcode `[juicer name='juicer']`. Viewing the post will now show the
Juicer feed.

