Plugin Directory

Changeset 2317298


Ignore:
Timestamp:
06/03/2020 11:41:22 AM (6 years ago)
Author:
edge226
Message:

add shortcode

Location:
audiate-me/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • audiate-me/trunk/audiate.php

    r2309548 r2317298  
    3939require_once AUDIATE_PLUGIN_DIR . 'includes/audiate-widget.php';
    4040
    41 if(class_exists('AudiateAdmin') ){
     41if(class_exists('AudiateWidget') ){
    4242    $audiateWidget = new AudiateWidget();
    4343}
     
    4848  return $links;
    4949}
     50
     51function getShortCode() {
     52
     53     global $audiateWidget;
     54
     55    return $audiateWidget->get_code();
     56}
    5057$plugin = plugin_basename(__FILE__);
    5158add_filter("plugin_action_links_$plugin", 'my_plugin_settings_link' );
  • audiate-me/trunk/includes/audiate-widget.php

    r2308766 r2317298  
    9090        if(isset($this->options['widget_id_0'])) {
    9191            add_filter('the_content', array($this, 'add_code_to_post_title'), 0 );
     92            add_shortcode('audiate-widget', 'getShortCode');
    9293        }
     94    }
     95
     96    public function get_code() {
     97        return '<div class="audiate-widget"><ins data-ea data-ea-id="'.$this->options['widget_id_0'].'"></ins>
     98<script async src=\'https://cdn.audiate.me/audio/widgets/Loader.js\'></script></div>';
    9399    }
    94100
     
    100106        if (get_post_type() === 'post' && is_single()) {
    101107
    102             $widget = '<div class="audiate-widget"><ins data-ea data-ea-id="'.$this->options['widget_id_0'].'"></ins>
    103 <script async src=\'https://cdn.audiate.me/audio/widgets/Loader.js\'></script></div>';
     108            $widget = $this->get_code();
    104109
    105110            if ($this->options['show_on_all_posts_1'] === 'yes') {
  • audiate-me/trunk/readme.txt

    r2308730 r2317298  
    66License URI: http://www.gnu.org/licenses/gpl-2.0.html
    77Tested up to: 5.4
     8Stable tag: 1.0.1
    89
    910Elevate Your Content with Audio. Transform your content into audio to reach a larger audience with our Text-to-Speech widget.
    1011
    1112== Description ==
    12 Audiate.Me plugin enables advanced audio widgets for WordPress publishers with seamless integration.
     13=AUDIATE.ME GIVES YOUR STORY A VOICE=
     14Our content extension tool helps online publishers automate the process of transforming existing text into audio content. Consumers are able to enjoy more accessible audio content without compromising quality.
     15Audiate.me enriches your content by adding the native Text-to-Speech widget in line within the content that the user is consuming, allowing for a seamless functionality.
    1316
    14 Audiate.Me helps publishers automate the process of transforming existing content into audio, making it more accessible to their users by utilizing advanced AI-based technology to engage, grow, and monetize their audience.
    15 The plugin will automatically place the text-to-speech widget on your WP pages. You can either upload the widget on all pages, or on select WP pages.
    1617
    17 **To start using Audiate.me:**
    18 1.  Create a free account at: <https://audiate.me/dashboard>
    19 2.  Edit your user profile and add your website’s URL.
    20 3.  Go to 'My Widgets' and create a new widget by clicking on the “+” symbol.
     18=WHY AUDIATE.ME?=
     19Nowadays, digital content consumers are multi-taskers, have short attention spans, and are easily distracted. Podcasts and audio content consumption are on the rise - and are often costly.
     20Digital content creators have archives full of valuable, and relevant content that’s not being accessed or utilized. Creating an audio version will refresh content, and increase your story’s distribution. Content creators are eager to adapt in order to meet the needs of their consumers, and to reach new audiences.
     21Audiate.me introduces a perfect solution. Extend your content with our technology, for FREE.
    2122
    22 **To use Audiate.me on your WordPress website:**
    23 1.  Install the Audiate.me plugin and activate it.
    24 2.  Go to [Audiate.me](https://Audiate.me) website, login, navigate to \’My Widgets\’ page and select a widget.
    25 3.  Copy the widget id from the URL and paste it in your WordPress at settings -> audiate
    26 4.  Choose whether to show the widget on all posts or only on selected ones.
     23=HOW DOES IT WORK?=
     241. Create a free account at: https://audiate.me
     252. Edit your user profile and add your site\'s URL.
     263. Create a new widget
    2727
    28 For support please contact us at: <support@audiate.me>
     28=AUDIATE.ME IN WORDPRESS=
     291. Install the Audiate.me plugin and activate it
     302. Go to https://Audiate.me website, login, navigate to \'My Widgets\' page and select a widget.
     313. Copy the widget id from the URL and paste it in your WordPress at settings -> audiate
     324. Choose whether to show the widget on all posts or only on selected ones.
    2933
     34=SHORT CODE=
     35Another way to display the widget in posts or pages is to ues Wordpress shortcode.
     36Simply paste [audiate-widget] in your text.
Note: See TracChangeset for help on using the changeset viewer.