Changeset 2701468
- Timestamp:
- 03/29/2022 06:51:02 PM (4 years ago)
- Location:
- wordable
- Files:
-
- 3 added
- 15 edited
- 4 copied
-
tags/8.0.3 (added)
-
tags/8.0.3/includes (copied) (copied from wordable/trunk/includes)
-
tags/8.0.3/includes/action_params.php (modified) (3 diffs)
-
tags/8.0.3/includes/actions.php (modified) (1 diff)
-
tags/8.0.3/includes/connector.php (modified) (3 diffs)
-
tags/8.0.3/includes/wordable_plugin.php (modified) (1 diff)
-
tags/8.0.3/readme.txt (copied) (copied from wordable/trunk/readme.txt) (4 diffs)
-
tags/8.0.3/settings (copied) (copied from wordable/trunk/settings)
-
tags/8.0.3/settings/css/wordable.css (modified) (1 diff)
-
tags/8.0.3/settings/index.php (modified) (1 diff)
-
tags/8.0.3/settings/views/_category_tree_node.php (added)
-
tags/8.0.3/settings/views/categories.php (modified) (1 diff)
-
tags/8.0.3/wordable.php (copied) (copied from wordable/trunk/wordable.php)
-
trunk/includes/action_params.php (modified) (3 diffs)
-
trunk/includes/actions.php (modified) (1 diff)
-
trunk/includes/connector.php (modified) (3 diffs)
-
trunk/includes/wordable_plugin.php (modified) (1 diff)
-
trunk/readme.txt (modified) (4 diffs)
-
trunk/settings/css/wordable.css (modified) (1 diff)
-
trunk/settings/index.php (modified) (1 diff)
-
trunk/settings/views/_category_tree_node.php (added)
-
trunk/settings/views/categories.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
wordable/tags/8.0.3/includes/action_params.php
r2681619 r2701468 41 41 } 42 42 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(); 46 46 47 47 // wp_insert_post is pretty sanitized itself … … 53 53 } 54 54 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']); 58 58 59 59 if(!$this->user_exists($author_id)) { 60 $ post_attributes['author_id'] = null;60 $this->params['post']['author_id'] = null; 61 61 } else { 62 $ post_attributes['author_id'] = $author_id;62 $this->params['post']['author_id'] = $author_id; 63 63 } 64 64 } 65 65 } 66 66 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']); 71 70 } 71 $this->params['post']['test'] = true; 72 72 } 73 73 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'; 78 78 } 79 79 } … … 92 92 93 93 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()); 95 95 return array_intersect($existing_categories_ids, $categories_ids); 96 96 } -
wordable/tags/8.0.3/includes/actions.php
r2681615 r2701468 48 48 if($params['post'] && $params['post']['author_id']) { 49 49 wp_set_current_user($params['post']['author_id']); 50 } else if (count($this->users() > 0)) {50 } else if (count($this->users()) > 0) { 51 51 wp_set_current_user(array_values($this->users())[0]->ID); 52 52 } -
wordable/tags/8.0.3/includes/connector.php
r2680974 r2701468 14 14 'destination[admin_url]=' . urlencode(admin_url()), 15 15 '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') 20 17 ); 21 18 … … 29 26 'authors' => $this->serialized_users(), 30 27 'categories' => $this->serialized_categories(), 28 'categories_tree' => $this->serialized_categories_tree(), 31 29 'post_types' => $this->serialized_post_types(), 32 30 'admin_url' => urlencode(admin_url()) … … 51 49 $serialized_categories = array(); 52 50 53 foreach ($this->wordable_plugin->categories( array('hide_empty' => false)) as $category) {51 foreach ($this->wordable_plugin->categories() as $category) { 54 52 array_push($serialized_categories, "$category->term_id:$category->name"); 55 53 } 56 54 57 55 return implode(',', $serialized_categories); 56 } 57 58 function serialized_categories_tree() { 59 return json_encode($this->wordable_plugin->build_categories_tree()); 58 60 } 59 61 -
wordable/tags/8.0.3/includes/wordable_plugin.php
r2682639 r2701468 73 73 function categories() { 74 74 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 )); 76 76 } 77 77 78 78 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; 79 99 } 80 100 -
wordable/tags/8.0.3/readme.txt
r2701467 r2701468 3 3 Tags: posts, pages 4 4 Requires at least: 5.0.0 5 Tested up to: 5.9. 05 Tested up to: 5.9.2 6 6 Requires PHP: 5.2.4 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html 9 Stable Tag: 8.0. 29 Stable Tag: 8.0.3 10 10 11 11 This plugin allows you to instantly export Google Docs to WordPress posts or pages. … … 13 13 == Description == 14 14 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.15 Wordable 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. 16 16 17 17 Here is our privacy policy https://www.wordable.io/privacy/ … … 19 19 == Installation == 20 20 21 1. Upload `wordable. php` to the `/wp-content/plugins/` directory21 1. Upload `wordable.zip` to the `/wp-content/plugins/` directory 22 22 2. Activate the plugin through the 'Plugins' menu in WordPress 23 23 3. Go to plugin settings to connect to Wordable.io … … 25 25 == Frequently Asked Questions == 26 26 27 None 27 = What is Wordable? = 28 Wordable 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. 28 29 29 == Screenshots == 30 = Why was Wordable created? = 31 Wordable 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. 30 32 31 NA 33 = Do you have a Free Trial? = 34 Yes, you can connect a WordPress, HubSpot, or Medium site and export 5 documents in 7 days to see the magic of Wordable. 35 Where can I go to find out more, talk to someone or get a reference? 36 Please 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? = 39 We'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? = 42 Wordable 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? = 45 WordPress 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? = 48 There'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? = 51 Yes! 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? = 54 Yes, no problem. Please email support@wordable.io and we'll transfer it over for you. 32 55 33 56 == Changelog == 57 58 = 8.0.3 = 59 * Updated description and FAQ 60 * Multi category hierarchy picker 61 * Payloadless Connect 62 * Bug fixes 34 63 35 64 = 8.0.2 = -
wordable/tags/8.0.3/settings/css/wordable.css
r2680974 r2701468 362 362 } 363 363 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 364 372 .list { 365 373 margin-top: 10px; -
wordable/tags/8.0.3/settings/index.php
r2682639 r2701468 19 19 } 20 20 21 function render($path ) {21 function render($path, $locals = array()) { 22 22 ob_start(); 23 extract($locals); 23 24 include $this->asset_path('settings/views/' . $path . '.php'); 24 25 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(); ?> 2 2 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 41 41 } 42 42 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(); 46 46 47 47 // wp_insert_post is pretty sanitized itself … … 53 53 } 54 54 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']); 58 58 59 59 if(!$this->user_exists($author_id)) { 60 $ post_attributes['author_id'] = null;60 $this->params['post']['author_id'] = null; 61 61 } else { 62 $ post_attributes['author_id'] = $author_id;62 $this->params['post']['author_id'] = $author_id; 63 63 } 64 64 } 65 65 } 66 66 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']); 71 70 } 71 $this->params['post']['test'] = true; 72 72 } 73 73 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'; 78 78 } 79 79 } … … 92 92 93 93 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()); 95 95 return array_intersect($existing_categories_ids, $categories_ids); 96 96 } -
wordable/trunk/includes/actions.php
r2681615 r2701468 48 48 if($params['post'] && $params['post']['author_id']) { 49 49 wp_set_current_user($params['post']['author_id']); 50 } else if (count($this->users() > 0)) {50 } else if (count($this->users()) > 0) { 51 51 wp_set_current_user(array_values($this->users())[0]->ID); 52 52 } -
wordable/trunk/includes/connector.php
r2680974 r2701468 14 14 'destination[admin_url]=' . urlencode(admin_url()), 15 15 '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') 20 17 ); 21 18 … … 29 26 'authors' => $this->serialized_users(), 30 27 'categories' => $this->serialized_categories(), 28 'categories_tree' => $this->serialized_categories_tree(), 31 29 'post_types' => $this->serialized_post_types(), 32 30 'admin_url' => urlencode(admin_url()) … … 51 49 $serialized_categories = array(); 52 50 53 foreach ($this->wordable_plugin->categories( array('hide_empty' => false)) as $category) {51 foreach ($this->wordable_plugin->categories() as $category) { 54 52 array_push($serialized_categories, "$category->term_id:$category->name"); 55 53 } 56 54 57 55 return implode(',', $serialized_categories); 56 } 57 58 function serialized_categories_tree() { 59 return json_encode($this->wordable_plugin->build_categories_tree()); 58 60 } 59 61 -
wordable/trunk/includes/wordable_plugin.php
r2682639 r2701468 73 73 function categories() { 74 74 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 )); 76 76 } 77 77 78 78 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; 79 99 } 80 100 -
wordable/trunk/readme.txt
r2691053 r2701468 3 3 Tags: posts, pages 4 4 Requires at least: 5.0.0 5 Tested up to: 5.9. 05 Tested up to: 5.9.2 6 6 Requires PHP: 5.2.4 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html 9 Stable Tag: 8.0. 29 Stable Tag: 8.0.3 10 10 11 11 This plugin allows you to instantly export Google Docs to WordPress posts or pages. … … 13 13 == Description == 14 14 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.15 Wordable 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. 16 16 17 17 Here is our privacy policy https://www.wordable.io/privacy/ … … 19 19 == Installation == 20 20 21 1. Upload `wordable. php` to the `/wp-content/plugins/` directory21 1. Upload `wordable.zip` to the `/wp-content/plugins/` directory 22 22 2. Activate the plugin through the 'Plugins' menu in WordPress 23 23 3. Go to plugin settings to connect to Wordable.io … … 25 25 == Frequently Asked Questions == 26 26 27 None 27 = What is Wordable? = 28 Wordable 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. 28 29 29 == Screenshots == 30 = Why was Wordable created? = 31 Wordable 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. 30 32 31 NA 33 = Do you have a Free Trial? = 34 Yes, you can connect a WordPress, HubSpot, or Medium site and export 5 documents in 7 days to see the magic of Wordable. 35 Where can I go to find out more, talk to someone or get a reference? 36 Please 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? = 39 We'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? = 42 Wordable 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? = 45 WordPress 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? = 48 There'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? = 51 Yes! 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? = 54 Yes, no problem. Please email support@wordable.io and we'll transfer it over for you. 32 55 33 56 == Changelog == 57 58 = 8.0.3 = 59 * Updated description and FAQ 60 * Multi category hierarchy picker 61 * Payloadless Connect 62 * Bug fixes 34 63 35 64 = 8.0.2 = -
wordable/trunk/settings/css/wordable.css
r2680974 r2701468 362 362 } 363 363 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 364 372 .list { 365 373 margin-top: 10px; -
wordable/trunk/settings/index.php
r2682639 r2701468 19 19 } 20 20 21 function render($path ) {21 function render($path, $locals = array()) { 22 22 ob_start(); 23 extract($locals); 23 24 include $this->asset_path('settings/views/' . $path . '.php'); 24 25 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(); ?> 2 2 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.