Changeset 1761045
- Timestamp:
- 11/08/2017 09:37:23 PM (8 years ago)
- Location:
- stackcommerce-connect/trunk
- Files:
-
- 4 edited
-
includes/class-stackcommerce-wp-article.php (modified) (4 diffs)
-
index.php (modified) (2 diffs)
-
readme.txt (modified) (1 diff)
-
version.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
stackcommerce-connect/trunk/includes/class-stackcommerce-wp-article.php
r1756975 r1761045 209 209 * Prepare fields on a $post array 210 210 * 211 * @since 1.6. 0211 * @since 1.6.1 212 212 */ 213 213 protected function prepare_fields( $fields ) { … … 226 226 227 227 if ( isset( $fields['post_status'] ) ) { 228 $valid_post_statuses = [ 'draft', 'pending', 'future' ]; 229 $post_status = $fields['post_status']; 230 231 if ( is_int( $fields['post_status'] ) && $valid_post_statuses[ $post_status ] ) { 232 $post_status = $this->generate_post_status( $fields['post_status'] ); 233 } else { 234 $post['post_status'] = $post_status; 235 } 228 $post['post_status'] = $this->generate_post_status( $fields['post_status'] ); 236 229 } 237 230 … … 250 243 * Check post fields before creation 251 244 * 252 * @since 1. 2.0245 * @since 1.6.1 253 246 */ 254 247 protected function check_fields( $fields ) { … … 256 249 $stackcommerce_wp_media = new StackCommerce_WP_Media(); 257 250 258 $post['post_content'] = $stackcommerce_wp_media->process_body_images( $post['post_content'] );259 260 251 $post = $this->prepare_fields( $fields ); 261 252 262 253 $this->check_duplicate( $fields ); 254 255 $post['post_content'] = $stackcommerce_wp_media->process_body_images( $fields['post_content'] ); 263 256 264 257 $featured_image_options = $this->get_admin_fields( 'featured_image' ); -
stackcommerce-connect/trunk/index.php
r1756975 r1761045 5 5 * Plugin URI: https://wordpress.org/plugins/stackcommerce-connect/ 6 6 * Description: The Connect plugin by StackCommerce connects your WordPress CMS to the StackCommerce Articles repository. 7 * Version: 1.6. 07 * Version: 1.6.1 8 8 * Author: StackCommerce, Inc 9 9 * Author URI: https://www.stackcommerce.com … … 19 19 define( 'SCWP_REQUIRED_WP_VERSION', '4.4' ); 20 20 define( 'SCWP_API_VERSION', '1' ); 21 define( 'SCWP_PLUGIN_VERSION', '1.6. 0' );21 define( 'SCWP_PLUGIN_VERSION', '1.6.1' ); 22 22 define( 'CMS_API_ENDPOINT', 'https://hive.stackcommerce.net' ); 23 23 -
stackcommerce-connect/trunk/readme.txt
r1756975 r1761045 53 53 == Changelog == 54 54 55 = 1.6.1 = 56 * Fix bug that caused post status to be ignored. 57 * Fix bug that caused images not to be uploaded to Media Library. 58 55 59 = 1.6.0 = 56 60 * Add support for per article tags and categories. -
stackcommerce-connect/trunk/version.txt
r1756975 r1761045 1 1.6. 01 1.6.1
Note: See TracChangeset
for help on using the changeset viewer.