AppCamera Component

The AppCamera extension allows your app users to take photos that will be uploaded directly to your WordPress site.

Install the AppCamera extension.

  1. Install and activate the AppCamera plugin that you downloaded from your account billing page.
  2. You will now find a new "AppPresser Camera" tab in your AppPresser settings. Please visit there to configure the Camera extension settings.

Configure AppCamera

The AppCamera extension offers multiple settings to help you configure its behavior. Below we will discuss each in greater detail.

  1. Uploaded photos must be moderated?
    • Use this setting if you want to be able to review/approve/deny all uploaded photos before they get published live.
  2. Email new photos to the admin email
    • Use this setting if you want to be notified by email, using the WordPress-set admin email address, whenever a user uploads a new photo, regardless of moderation being required.
  3. Save Photos to Featured Image
    • When you enable this and have uploads set to create new posts, the uploaded image will also be set as the post's featured image.

Once you are happy with the settings, click the "Save Settings" button.

Add AppCamera component to Your App

The last thing you need to do is add your AppCamera component to your app.

Visit your app customizer and select "Custom Layout" and then choose "Blank" from the templates.

Add the app-camera component like this:

Customize AppCamera component

Attribute type Details Available parameters
action string Specifies where to post the photo to. "this" is the post or page the form is on, "new" is a new post or page, and "library" posts to the media library unattached to a specific post or page. this, new, library  
Default: this
post_type string Allows you to specify a post type to post the photo to. Note: this parameter can only be used when action is "new" any post types that are registered.  
Default: post  
Note: use the post type slug.
post_title boolean Sets whether to display a "title" field for the form. If set to true, the form will display a "Title" field that you can use to name the created post. false, true  
Default: false
post_id integer Specifies the post or page the image will be uploaded to. Note: this parameter can only be used when action is "this"

Examples:

<app-camera action="new" post_type="page" post_title="true"></app-camera>

Moderating Uploads.

You can choose to moderate images before they are displayed on your site. To moderate photos, go to the AppPresser settings page, Camera tab, and check "Uploaded photos must be moderated?" and save. 

If you have checked that uploads need to be moderated before being added, the section for this will not appear until there are actually any to moderate. Once moderation-pending photos are available, you will see a new "Moderate Photos" submenu item in the "AppPresser" menu. Next to it will be a notification of how many are pending to be approved. You will also be able to access this page from a "Photo Moderation Panel" link that will show up next to the "Save Settings" button in the AppCamera tab.

When viewing the moderation page, you will be presented with a list of pending photos that you can view, approve, and deny. A thumbnail preview, file name/type, uploader, post it was uploaded to and date will all also be available information. Checkboxes along the left allow you to approve or deny in bulk, and each has its own approve or deny links.

Once the queue is empty, the menu item and link will disappear until there is more to take care of.

AppCamera Hooks

appp_insert_photo_post

Places the uploaded image into the post content area, if the user has chosen not to have the image applied to the featured image

Default value:

$updatepost // array of post arguments for the post.

appp_upload_email_to

Allows you to intercept and modify the default email recipient who will get the email notifications for new uploads.

Default value:

get_settings('admin_email')

appp_upload_email_subject

Allows you to intercept and modify the default subject that gets set with the email notifications for new uploads.

Default value:

'A new photo was uploaded.'

appp_upload_email_message

Allows you to intercept and modify the default message that gets set with the email notifications for new uploads.

Default value:

An image tag with the newly uploaded image. Approve/Deny links if moderation is enabled.