AppShare allows you to use a native share sheet in your app, that allows sharing via Twitter, Facebook, Email, SMS, and a variety of other platforms.
Important: The AppShare extension only works on WordPress pages, not custom pages or API lists
Installing the AppShare extension.
- Upload the plugin .zip file to your WordPress site under Plugins => Add New => Upload.
- You will now find a new "AppShare" tab in your AppPresser settings. Please visit there to configure the available extension settings.
The AppShare extension offers a handful of settings to help you configure its behavior. Below we will discuss each in greater detail.
- AppShare License Key
- Add your license key to receive critical updates
- Add Share Button after post content?
- Enabling this setting will add a "Share this" html button at the end of all of your posts and allow your users to share with a list of available social networks. Important: this only applies to WordPress pages, not custom pages or API lists.
- Add Share Button after post excerpt?
- This acts just like the setting for "Add Share Button after post content" except this is for adding the button after the shorter "excerpt" version of post content. Important: this only applies to WordPress pages, not custom pages or API lists.
- Button Text. (Default text: Share This)
- Text to use as the text for the generated button. *This text does not show on phones, only on larger screens.
- Button class for custom styles
- custom html class attributes to be added to the output for css purposes.
Once you are happy with the settings, click the "Save Settings" button.
If you want to add the sharing button in custom places within your theme, you can use the
appshareButton() php function. It has one argument, which is a string that needs to be constructed the same you would the shortcode in your post editor, and takes all of the same parameters. See the shortcode attribute reference below. The string gets passed into a complete shortcode that is used with do_shortcode
appshareButton( 'class="custom_class" button_text="Share me!"' );
Scripts and styles
|Handle||file path (relative)||dependencies||Output Location|
[appshare] shortcodeExample:[appshare button_text="Share me!"]
|class||string||Specifies what class or classes to add to the html button|| as many space-separated words as you need.
|message||string||What to use as the message text|| Whatever you want
Default: the post title
|link||string||What link to use with the message|| Whatever you want
Default: the post shortlink
|button_text||string||What the html button should say|| Whatever you want
Default: "Share This"
Type: Filter | File: appshare.php | Since: 1.0.0
Allows you to intercept get_option( 'active_plugins' ) before our extension determines if the required plugins are presently active.
get_option( 'active_plugins' ) //Saved value from your WP install. Not specific to AppPresser
Type: Filter | File: inc/filters.php | Since: 1.2.1
Allows you to obtain or intercept the preferences of the admin settings for dispaying the share button.
// Don't output the share button add_filter( 'appshare_btn', '__return_false', 999 );