Plugin Directory

Changeset 2701468


Ignore:
Timestamp:
03/29/2022 06:51:02 PM (4 years ago)
Author:
wordable
Message:

8.0.3

Location:
wordable
Files:
3 added
15 edited
4 copied

Legend:

Unmodified
Added
Removed
  • wordable/tags/8.0.3/includes/action_params.php

    r2681619 r2701468  
    4141    }
    4242
    43     $this->parse_and_validate_post_author($this->params['post']);
    44     $this->parse_and_validate_post_categories($this->params['post']);
    45     $this->parse_and_validate_post_type($this->params['post']);
     43    $this->parse_and_validate_post_author();
     44    $this->parse_and_validate_post_categories();
     45    $this->parse_and_validate_post_type();
    4646
    4747    // wp_insert_post is pretty sanitized itself
     
    5353  }
    5454
    55   function parse_and_validate_post_author($post_attributes) {
    56     if($post_attributes['author_id']) {
    57       $author_id = intval($post_attributes['author_id']);
     55  function parse_and_validate_post_author() {
     56    if($this->params['post']['author_id']) {
     57      $author_id = intval($this->params['post']['author_id']);
    5858
    5959      if(!$this->user_exists($author_id)) {
    60         $post_attributes['author_id'] = null;
     60        $this->params['post']['author_id'] = null;
    6161      } else {
    62         $post_attributes['author_id'] = $author_id;
     62        $this->params['post']['author_id'] = $author_id;
    6363      }
    6464    }
    6565  }
    6666
    67   function parse_and_validate_post_categories($post_attributes) {
    68     if(!empty($post_attributes['categories'])) {
    69       $category_ids = array_map('intval', explode(',', $post_attributes['categories']));
    70       $post_attributes['categories'] = $this->filter_unexisting_categories($category_ids);
     67  function parse_and_validate_post_categories() {
     68    if(!empty($this->params['post']['categories'])) {
     69      $this->params['post']['categories'] = $this->filter_unexisting_categories($this->params['post']['categories']);
    7170    }
     71    $this->params['post']['test'] = true;
    7272  }
    7373
    74   function parse_and_validate_post_type($post_attributes) {
    75     if(!empty($post_attributes['type'])) {
    76       if(!in_array($post_attributes['type'], get_post_types())) {
    77         $post_attributes['type'] = 'post';
     74  function parse_and_validate_post_type() {
     75    if(!empty($this->params['post']['type'])) {
     76      if(!in_array($this->params['post']['type'], get_post_types())) {
     77        $this->params['post']['type'] = 'post';
    7878      }
    7979    }
     
    9292
    9393  function filter_unexisting_categories($categories_ids) {
    94     $existing_categories_ids = array_map(function($category) { return $category->ID; }, $this->wordable_plugin_actions->categories());
     94    $existing_categories_ids = array_map(function($category) { return $category->term_id; }, $this->wordable_plugin_actions->categories());
    9595    return array_intersect($existing_categories_ids, $categories_ids);
    9696  }
  • wordable/tags/8.0.3/includes/actions.php

    r2681615 r2701468  
    4848    if($params['post'] && $params['post']['author_id']) {
    4949      wp_set_current_user($params['post']['author_id']);
    50     } else if (count($this->users() > 0)) {
     50    } else if (count($this->users()) > 0) {
    5151      wp_set_current_user(array_values($this->users())[0]->ID);
    5252    }
  • wordable/tags/8.0.3/includes/connector.php

    r2680974 r2701468  
    1414      'destination[admin_url]=' . urlencode(admin_url()),
    1515      'plugin_version=' . WORDABLE_VERSION,
    16       'wordpress_version=' . get_bloginfo('version'),
    17       'authors=' . $this->serialized_users(),
    18       'categories=' . $this->serialized_categories(),
    19       'post_types=' . $this->serialized_post_types()
     16      'wordpress_version=' . get_bloginfo('version')
    2017    );
    2118
     
    2926      'authors' => $this->serialized_users(),
    3027      'categories' => $this->serialized_categories(),
     28      'categories_tree' => $this->serialized_categories_tree(),
    3129      'post_types' => $this->serialized_post_types(),
    3230      'admin_url' => urlencode(admin_url())
     
    5149    $serialized_categories = array();
    5250
    53     foreach ($this->wordable_plugin->categories(array('hide_empty' => false)) as $category) {
     51    foreach ($this->wordable_plugin->categories() as $category) {
    5452      array_push($serialized_categories, "$category->term_id:$category->name");
    5553    }
    5654
    5755    return implode(',', $serialized_categories);
     56  }
     57
     58  function serialized_categories_tree() {
     59    return json_encode($this->wordable_plugin->build_categories_tree());
    5860  }
    5961
  • wordable/tags/8.0.3/includes/wordable_plugin.php

    r2682639 r2701468  
    7373  function categories() {
    7474    if(!$this->categories_cache) {
    75       $this->categories_cache = get_categories(array( 'parent' => 0, 'hide_empty' => 0 ));
     75      $this->categories_cache = get_categories(array( 'hide_empty' => 0 ));
    7676    }
    7777
    7878    return $this->categories_cache;
     79  }
     80
     81  function build_categories_tree($parent_category_id = 0) {
     82    $categories = get_categories('hide_empty=0&orderby=name&order=ASC&parent=' . $parent_category_id);
     83    $tree_node = array();
     84
     85    if($categories) {
     86      foreach($categories as $category) {
     87        array_push(
     88          $tree_node,
     89          array(
     90            "id" => $category->term_id,
     91            "name" => $category->name,
     92            "children" => $this->build_categories_tree($category->term_id)
     93          )
     94        );
     95      }
     96    }
     97
     98    return $tree_node;
    7999  }
    80100
  • wordable/tags/8.0.3/readme.txt

    r2701467 r2701468  
    33Tags: posts, pages
    44Requires at least: 5.0.0
    5 Tested up to: 5.9.0
     5Tested up to: 5.9.2
    66Requires PHP: 5.2.4
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
    9 Stable Tag: 8.0.2
     9Stable Tag: 8.0.3
    1010
    1111This plugin allows you to instantly export Google Docs to WordPress posts or pages.
     
    1313== Description ==
    1414
    15 Save 90%+ of publishing costs by streamlining your team's workflow, exporting in bulk, and automating recurring tasks with Wordable. Wordable allows instant exports of Google Doc files to a WordPress, HubSpot, or Medium post or page. Wordable allows you to write in your favorite app and export it to your CMS as is, without spending hours reformatting in clunky editors. Learn more at https://wordable.io.
     15Wordable automatically exports, formats, and optimizes content in seconds. You can export Google Docs to WordPress in 1-click. You can also customize the post title, slug or permalink, byline, category, post types and even publish as pages. Wordable will also help optimize content for both web accessibility and SEO, as well as compressing images and improving links to help you get more readers and turn them into more happy customers.
    1616
    1717Here is our privacy policy https://www.wordable.io/privacy/
     
    1919== Installation ==
    2020
    21 1. Upload `wordable.php` to the `/wp-content/plugins/` directory
     211. Upload `wordable.zip` to the `/wp-content/plugins/` directory
    22222. Activate the plugin through the 'Plugins' menu in WordPress
    23233. Go to plugin settings to connect to Wordable.io
     
    2525== Frequently Asked Questions ==
    2626
    27 None
     27= What is Wordable? =
     28Wordable is a tool that instantly exports Google Doc files to a WordPress, HubSpot, or Medium post or page. We transform document elements into clean, fast HTML. We import, compress, and optimize images. We even work with tables and other special formatting. Wordable allows you to write in your favorite app and export it to your CMS as-is, without spending hours reformatting in clunky editors.
    2829
    29 == Screenshots ==
     30= Why was Wordable created? =
     31Wordable was created out of personal frustration spending hours copy & pasting from Google Docs into WordPress and manually uploading all those images, cleaning HTML, and more. We also believed there was a better way to export, format, and optimize content than spending thousands of dollars each month on people (read: manual labor) to do these tedious, soul-sucking, and recurring tasks.
    3032
    31 NA
     33= Do you have a Free Trial? =
     34Yes, you can connect a WordPress, HubSpot, or Medium site and export 5 documents in 7 days to see the magic of Wordable.
     35Where can I go to find out more, talk to someone or get a reference?
     36Please email us at support@wordable.io and we'll be happy to set up a call with us and/or arrange to talk to one of our customers. You can also check out our 50+, 5 star reviews on Capterra.
     37
     38= Who is Wordable for? =
     39We're honest. Wordable isn't for everyone. If you only publish 1-2 articles per month, you probably don't need us. If you publish more than 5 pieces per month, or publish across multiple sites, or work with a team of writers, then Wordable will save you hundreds of hours and thousands of dollars.
     40
     41= How does Wordable save me time and money? =
     42Wordable will save you roughly ~30-60 minutes per article. (Assuming you're properly cleaning HTML, optimizing and compressing images, and optimizing content like we do.) Wordable is also automating work that you or hired employees will need to do. So take the number of articles you're publishing, times the number of hours saved, times the effective hourly rate, and you'll quickly see a GIANT ROI. Here's how to calculate your own ROI.
     43
     44= How do I connect Wordable to my site? =
     45WordPress websites will use our plugin to connect, while HubSpot and Medium only require a few simple clicks! If you run into any troubles, our team is standing by and ready to jump in to help get you connected ASAP.
     46
     47= How many sites can I connect to? =
     48There's no limit! Srsly. Our larger plans can accommodate hundreds (if not thousands) of sites. If you fall into this category, reach out to us via support@wordable.io and we can set up a call to discuss your unique needs.
     49
     50= Do you work with Google Team Drives? =
     51Yes! You can connect team members, import documents from each other's Drives, and collaborate across departments.
     52
     53= Can I transfer my account to another email address? =
     54Yes, no problem. Please email support@wordable.io and we'll transfer it over for you.
    3255
    3356== Changelog ==
     57
     58= 8.0.3 =
     59* Updated description and FAQ
     60* Multi category hierarchy picker
     61* Payloadless Connect
     62* Bug fixes
    3463
    3564= 8.0.2 =
  • wordable/tags/8.0.3/settings/css/wordable.css

    r2680974 r2701468  
    362362}
    363363
     364.category-tree-name {
     365  padding-top: 18px;
     366  padding-left: 4px;
     367  font-family: Cerebrisans, sans-serif;
     368  font-size: 16px;
     369  font-weight: 700;
     370}
     371
    364372.list {
    365373  margin-top: 10px;
  • wordable/tags/8.0.3/settings/index.php

    r2682639 r2701468  
    1919  }
    2020
    21   function render($path) {
     21  function render($path, $locals = array()) {
    2222    ob_start();
     23    extract($locals);
    2324    include $this->asset_path('settings/views/' . $path . '.php');
    2425    echo ob_get_clean();
  • wordable/tags/8.0.3/settings/views/categories.php

    r2681615 r2701468  
    1 <?php $categories = $this->categories(); ?>
     1<?php $categories_tree = $this->build_categories_tree(); ?>
    22
    3 <h1 class="heading-4">Categories (<?php echo count($categories) ?>)</h1>
    4 <ul role="list" class="list w-list-unstyled">
    5   <?php foreach ($categories as $category) { ?>
    6     <li class='list-item-3-copy'>
    7       <div class='text-block-5'><?php echo esc_html($category->name) ?></div>
    8     </li>
    9   <?php } ?>
    10 </ul>
     3<h1 class="heading-4">Categories</h1>
     4<div style="max-height: 50vh; overflow-y: auto">
     5  <?php echo $this->render('_category_tree_node', array("categories_tree" => $categories_tree, "depth" => 0)); ?>
     6</div>
  • wordable/trunk/includes/action_params.php

    r2681619 r2701468  
    4141    }
    4242
    43     $this->parse_and_validate_post_author($this->params['post']);
    44     $this->parse_and_validate_post_categories($this->params['post']);
    45     $this->parse_and_validate_post_type($this->params['post']);
     43    $this->parse_and_validate_post_author();
     44    $this->parse_and_validate_post_categories();
     45    $this->parse_and_validate_post_type();
    4646
    4747    // wp_insert_post is pretty sanitized itself
     
    5353  }
    5454
    55   function parse_and_validate_post_author($post_attributes) {
    56     if($post_attributes['author_id']) {
    57       $author_id = intval($post_attributes['author_id']);
     55  function parse_and_validate_post_author() {
     56    if($this->params['post']['author_id']) {
     57      $author_id = intval($this->params['post']['author_id']);
    5858
    5959      if(!$this->user_exists($author_id)) {
    60         $post_attributes['author_id'] = null;
     60        $this->params['post']['author_id'] = null;
    6161      } else {
    62         $post_attributes['author_id'] = $author_id;
     62        $this->params['post']['author_id'] = $author_id;
    6363      }
    6464    }
    6565  }
    6666
    67   function parse_and_validate_post_categories($post_attributes) {
    68     if(!empty($post_attributes['categories'])) {
    69       $category_ids = array_map('intval', explode(',', $post_attributes['categories']));
    70       $post_attributes['categories'] = $this->filter_unexisting_categories($category_ids);
     67  function parse_and_validate_post_categories() {
     68    if(!empty($this->params['post']['categories'])) {
     69      $this->params['post']['categories'] = $this->filter_unexisting_categories($this->params['post']['categories']);
    7170    }
     71    $this->params['post']['test'] = true;
    7272  }
    7373
    74   function parse_and_validate_post_type($post_attributes) {
    75     if(!empty($post_attributes['type'])) {
    76       if(!in_array($post_attributes['type'], get_post_types())) {
    77         $post_attributes['type'] = 'post';
     74  function parse_and_validate_post_type() {
     75    if(!empty($this->params['post']['type'])) {
     76      if(!in_array($this->params['post']['type'], get_post_types())) {
     77        $this->params['post']['type'] = 'post';
    7878      }
    7979    }
     
    9292
    9393  function filter_unexisting_categories($categories_ids) {
    94     $existing_categories_ids = array_map(function($category) { return $category->ID; }, $this->wordable_plugin_actions->categories());
     94    $existing_categories_ids = array_map(function($category) { return $category->term_id; }, $this->wordable_plugin_actions->categories());
    9595    return array_intersect($existing_categories_ids, $categories_ids);
    9696  }
  • wordable/trunk/includes/actions.php

    r2681615 r2701468  
    4848    if($params['post'] && $params['post']['author_id']) {
    4949      wp_set_current_user($params['post']['author_id']);
    50     } else if (count($this->users() > 0)) {
     50    } else if (count($this->users()) > 0) {
    5151      wp_set_current_user(array_values($this->users())[0]->ID);
    5252    }
  • wordable/trunk/includes/connector.php

    r2680974 r2701468  
    1414      'destination[admin_url]=' . urlencode(admin_url()),
    1515      'plugin_version=' . WORDABLE_VERSION,
    16       'wordpress_version=' . get_bloginfo('version'),
    17       'authors=' . $this->serialized_users(),
    18       'categories=' . $this->serialized_categories(),
    19       'post_types=' . $this->serialized_post_types()
     16      'wordpress_version=' . get_bloginfo('version')
    2017    );
    2118
     
    2926      'authors' => $this->serialized_users(),
    3027      'categories' => $this->serialized_categories(),
     28      'categories_tree' => $this->serialized_categories_tree(),
    3129      'post_types' => $this->serialized_post_types(),
    3230      'admin_url' => urlencode(admin_url())
     
    5149    $serialized_categories = array();
    5250
    53     foreach ($this->wordable_plugin->categories(array('hide_empty' => false)) as $category) {
     51    foreach ($this->wordable_plugin->categories() as $category) {
    5452      array_push($serialized_categories, "$category->term_id:$category->name");
    5553    }
    5654
    5755    return implode(',', $serialized_categories);
     56  }
     57
     58  function serialized_categories_tree() {
     59    return json_encode($this->wordable_plugin->build_categories_tree());
    5860  }
    5961
  • wordable/trunk/includes/wordable_plugin.php

    r2682639 r2701468  
    7373  function categories() {
    7474    if(!$this->categories_cache) {
    75       $this->categories_cache = get_categories(array( 'parent' => 0, 'hide_empty' => 0 ));
     75      $this->categories_cache = get_categories(array( 'hide_empty' => 0 ));
    7676    }
    7777
    7878    return $this->categories_cache;
     79  }
     80
     81  function build_categories_tree($parent_category_id = 0) {
     82    $categories = get_categories('hide_empty=0&orderby=name&order=ASC&parent=' . $parent_category_id);
     83    $tree_node = array();
     84
     85    if($categories) {
     86      foreach($categories as $category) {
     87        array_push(
     88          $tree_node,
     89          array(
     90            "id" => $category->term_id,
     91            "name" => $category->name,
     92            "children" => $this->build_categories_tree($category->term_id)
     93          )
     94        );
     95      }
     96    }
     97
     98    return $tree_node;
    7999  }
    80100
  • wordable/trunk/readme.txt

    r2691053 r2701468  
    33Tags: posts, pages
    44Requires at least: 5.0.0
    5 Tested up to: 5.9.0
     5Tested up to: 5.9.2
    66Requires PHP: 5.2.4
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
    9 Stable Tag: 8.0.2
     9Stable Tag: 8.0.3
    1010
    1111This plugin allows you to instantly export Google Docs to WordPress posts or pages.
     
    1313== Description ==
    1414
    15 Save 90%+ of publishing costs by streamlining your team's workflow, exporting in bulk, and automating recurring tasks with Wordable. Wordable allows instant exports of Google Doc files to a WordPress, HubSpot, or Medium post or page. Wordable allows you to write in your favorite app and export it to your CMS as is, without spending hours reformatting in clunky editors. Learn more at https://wordable.io.
     15Wordable automatically exports, formats, and optimizes content in seconds. You can export Google Docs to WordPress in 1-click. You can also customize the post title, slug or permalink, byline, category, post types and even publish as pages. Wordable will also help optimize content for both web accessibility and SEO, as well as compressing images and improving links to help you get more readers and turn them into more happy customers.
    1616
    1717Here is our privacy policy https://www.wordable.io/privacy/
     
    1919== Installation ==
    2020
    21 1. Upload `wordable.php` to the `/wp-content/plugins/` directory
     211. Upload `wordable.zip` to the `/wp-content/plugins/` directory
    22222. Activate the plugin through the 'Plugins' menu in WordPress
    23233. Go to plugin settings to connect to Wordable.io
     
    2525== Frequently Asked Questions ==
    2626
    27 None
     27= What is Wordable? =
     28Wordable is a tool that instantly exports Google Doc files to a WordPress, HubSpot, or Medium post or page. We transform document elements into clean, fast HTML. We import, compress, and optimize images. We even work with tables and other special formatting. Wordable allows you to write in your favorite app and export it to your CMS as-is, without spending hours reformatting in clunky editors.
    2829
    29 == Screenshots ==
     30= Why was Wordable created? =
     31Wordable was created out of personal frustration spending hours copy & pasting from Google Docs into WordPress and manually uploading all those images, cleaning HTML, and more. We also believed there was a better way to export, format, and optimize content than spending thousands of dollars each month on people (read: manual labor) to do these tedious, soul-sucking, and recurring tasks.
    3032
    31 NA
     33= Do you have a Free Trial? =
     34Yes, you can connect a WordPress, HubSpot, or Medium site and export 5 documents in 7 days to see the magic of Wordable.
     35Where can I go to find out more, talk to someone or get a reference?
     36Please email us at support@wordable.io and we'll be happy to set up a call with us and/or arrange to talk to one of our customers. You can also check out our 50+, 5 star reviews on Capterra.
     37
     38= Who is Wordable for? =
     39We're honest. Wordable isn't for everyone. If you only publish 1-2 articles per month, you probably don't need us. If you publish more than 5 pieces per month, or publish across multiple sites, or work with a team of writers, then Wordable will save you hundreds of hours and thousands of dollars.
     40
     41= How does Wordable save me time and money? =
     42Wordable will save you roughly ~30-60 minutes per article. (Assuming you're properly cleaning HTML, optimizing and compressing images, and optimizing content like we do.) Wordable is also automating work that you or hired employees will need to do. So take the number of articles you're publishing, times the number of hours saved, times the effective hourly rate, and you'll quickly see a GIANT ROI. Here's how to calculate your own ROI.
     43
     44= How do I connect Wordable to my site? =
     45WordPress websites will use our plugin to connect, while HubSpot and Medium only require a few simple clicks! If you run into any troubles, our team is standing by and ready to jump in to help get you connected ASAP.
     46
     47= How many sites can I connect to? =
     48There's no limit! Srsly. Our larger plans can accommodate hundreds (if not thousands) of sites. If you fall into this category, reach out to us via support@wordable.io and we can set up a call to discuss your unique needs.
     49
     50= Do you work with Google Team Drives? =
     51Yes! You can connect team members, import documents from each other's Drives, and collaborate across departments.
     52
     53= Can I transfer my account to another email address? =
     54Yes, no problem. Please email support@wordable.io and we'll transfer it over for you.
    3255
    3356== Changelog ==
     57
     58= 8.0.3 =
     59* Updated description and FAQ
     60* Multi category hierarchy picker
     61* Payloadless Connect
     62* Bug fixes
    3463
    3564= 8.0.2 =
  • wordable/trunk/settings/css/wordable.css

    r2680974 r2701468  
    362362}
    363363
     364.category-tree-name {
     365  padding-top: 18px;
     366  padding-left: 4px;
     367  font-family: Cerebrisans, sans-serif;
     368  font-size: 16px;
     369  font-weight: 700;
     370}
     371
    364372.list {
    365373  margin-top: 10px;
  • wordable/trunk/settings/index.php

    r2682639 r2701468  
    1919  }
    2020
    21   function render($path) {
     21  function render($path, $locals = array()) {
    2222    ob_start();
     23    extract($locals);
    2324    include $this->asset_path('settings/views/' . $path . '.php');
    2425    echo ob_get_clean();
  • wordable/trunk/settings/views/categories.php

    r2681615 r2701468  
    1 <?php $categories = $this->categories(); ?>
     1<?php $categories_tree = $this->build_categories_tree(); ?>
    22
    3 <h1 class="heading-4">Categories (<?php echo count($categories) ?>)</h1>
    4 <ul role="list" class="list w-list-unstyled">
    5   <?php foreach ($categories as $category) { ?>
    6     <li class='list-item-3-copy'>
    7       <div class='text-block-5'><?php echo esc_html($category->name) ?></div>
    8     </li>
    9   <?php } ?>
    10 </ul>
     3<h1 class="heading-4">Categories</h1>
     4<div style="max-height: 50vh; overflow-y: auto">
     5  <?php echo $this->render('_category_tree_node', array("categories_tree" => $categories_tree, "depth" => 0)); ?>
     6</div>
Note: See TracChangeset for help on using the changeset viewer.