Changeset 3282755
- Timestamp:
- 04/27/2025 01:33:22 PM (10 months ago)
- Location:
- contentpen
- Files:
-
- 6 edited
- 1 copied
-
tags/1.0.3 (copied) (copied from contentpen/trunk)
-
tags/1.0.3/README.txt (modified) (1 diff)
-
tags/1.0.3/contentpen-plugin.php (modified) (2 diffs)
-
tags/1.0.3/includes/class-contentpen-api.php (modified) (3 diffs)
-
trunk/README.txt (modified) (1 diff)
-
trunk/contentpen-plugin.php (modified) (2 diffs)
-
trunk/includes/class-contentpen-api.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
contentpen/tags/1.0.3/README.txt
r3282645 r3282755 4 4 Requires at least: 5.8 5 5 Tested up to: 6.7 6 Stable tag: 1.0. 26 Stable tag: 1.0.3 7 7 Requires PHP: 7.4 8 8 License: GPLv2 or later -
contentpen/tags/1.0.3/contentpen-plugin.php
r3282645 r3282755 5 5 * Plugin URI: https://contentpen.ai 6 6 * Description: Contentpen is an AI-powered content writing assistant designed to help businesses create, optimize, and publish SEO-friendly blog posts at scale. By combining deep research with your brand's unique voice, Contentpen crafts high-impact articles that outperform your competition. 7 * Version: 1.0. 27 * Version: 1.0.3 8 8 * Requires at least: 5.8 9 9 * Requires PHP: 7.4 … … 20 20 } 21 21 22 define('CONTENTPEN_VERSION', '1.0. 2');22 define('CONTENTPEN_VERSION', '1.0.3'); 23 23 define('CONTENTPEN_PLUGIN_DIR', plugin_dir_path(__FILE__)); 24 24 define('CONTENTPEN_PLUGIN_URL', plugin_dir_url(__FILE__)); -
contentpen/tags/1.0.3/includes/class-contentpen-api.php
r3282645 r3282755 125 125 } 126 126 } 127 if (!$request) {127 if (!$request) { 128 128 return $formatted_authors; 129 129 } … … 151 151 } 152 152 153 if (!$request) {153 if (!$request) { 154 154 return $formatted_categories; 155 155 } … … 593 593 } 594 594 595 // Get parameters from the request and add them to post_data if they exist 596 $params = $request->get_params(); 597 598 // Process categories 599 $categories = array(); 600 if (!empty($params['categories'])) { 601 $categories = array_map('intval', explode(',', sanitize_text_field($params['categories']))); 602 } 603 604 // Process tags 605 $tags = array(); 606 if (!empty($params['tags'])) { 607 $tags = array_map('sanitize_text_field', explode(',', $params['tags'])); 608 } 609 610 // Remove content filters for raw HTML support 611 $this->kses_remove_filters(); 612 613 // Prepare post data 595 614 $post_data = array( 596 615 'ID' => $post_id, 597 ); 598 599 // Get parameters from the request and add them to post_data if they exist 600 $params = $request->get_params(); 601 616 'post_author' => isset($params['author']) ? (int)$params['author'] : get_current_user_id(), 617 'post_category' => $categories, 618 'tags_input' => $tags, 619 'post_type' => 'post' 620 ); 621 622 // Check for required fields 602 623 if (isset($params['title'])) { 603 624 $post_data['post_title'] = sanitize_text_field($params['title']); -
contentpen/trunk/README.txt
r3282645 r3282755 4 4 Requires at least: 5.8 5 5 Tested up to: 6.7 6 Stable tag: 1.0. 26 Stable tag: 1.0.3 7 7 Requires PHP: 7.4 8 8 License: GPLv2 or later -
contentpen/trunk/contentpen-plugin.php
r3282645 r3282755 5 5 * Plugin URI: https://contentpen.ai 6 6 * Description: Contentpen is an AI-powered content writing assistant designed to help businesses create, optimize, and publish SEO-friendly blog posts at scale. By combining deep research with your brand's unique voice, Contentpen crafts high-impact articles that outperform your competition. 7 * Version: 1.0. 27 * Version: 1.0.3 8 8 * Requires at least: 5.8 9 9 * Requires PHP: 7.4 … … 20 20 } 21 21 22 define('CONTENTPEN_VERSION', '1.0. 2');22 define('CONTENTPEN_VERSION', '1.0.3'); 23 23 define('CONTENTPEN_PLUGIN_DIR', plugin_dir_path(__FILE__)); 24 24 define('CONTENTPEN_PLUGIN_URL', plugin_dir_url(__FILE__)); -
contentpen/trunk/includes/class-contentpen-api.php
r3282645 r3282755 125 125 } 126 126 } 127 if (!$request) {127 if (!$request) { 128 128 return $formatted_authors; 129 129 } … … 151 151 } 152 152 153 if (!$request) {153 if (!$request) { 154 154 return $formatted_categories; 155 155 } … … 593 593 } 594 594 595 // Get parameters from the request and add them to post_data if they exist 596 $params = $request->get_params(); 597 598 // Process categories 599 $categories = array(); 600 if (!empty($params['categories'])) { 601 $categories = array_map('intval', explode(',', sanitize_text_field($params['categories']))); 602 } 603 604 // Process tags 605 $tags = array(); 606 if (!empty($params['tags'])) { 607 $tags = array_map('sanitize_text_field', explode(',', $params['tags'])); 608 } 609 610 // Remove content filters for raw HTML support 611 $this->kses_remove_filters(); 612 613 // Prepare post data 595 614 $post_data = array( 596 615 'ID' => $post_id, 597 ); 598 599 // Get parameters from the request and add them to post_data if they exist 600 $params = $request->get_params(); 601 616 'post_author' => isset($params['author']) ? (int)$params['author'] : get_current_user_id(), 617 'post_category' => $categories, 618 'tags_input' => $tags, 619 'post_type' => 'post' 620 ); 621 622 // Check for required fields 602 623 if (isset($params['title'])) { 603 624 $post_data['post_title'] = sanitize_text_field($params['title']);
Note: See TracChangeset
for help on using the changeset viewer.