Ticket #34455: 34455.diff
File 34455.diff, 1.7 KB (added by , 9 years ago) |
---|
-
src/wp-admin/includes/class-wp-press-this.php
91 91 } 92 92 } 93 93 94 // E dxpected slashed94 // Expected slashed 95 95 return wp_slash( $content ); 96 96 } 97 97 … … 133 133 134 134 $post['post_content'] = $this->side_load_images( $post_id, $post['post_content'] ); 135 135 136 /** 137 * Filter the post_content of a Press This post before saving/updating, after 138 * side_load_images action had run. 139 * 140 * @since 141 * 142 * @param string $content Content after side_load_images process. 143 * @param int $post_id Post ID. 144 */ 145 $post['post_content'] = apply_filters( 'press_this_save_post_content', $post['post_content'], $post_id ); 146 136 147 $updated = wp_update_post( $post, true ); 137 148 138 149 if ( is_wp_error( $updated ) ) { … … 293 304 ) 294 305 ); 295 306 307 /** 308 * Filter 'useful' HTML elements list for fetch source step. 309 * 310 * @since 311 * 312 * @param array $elements Default list of useful elements. 313 */ 314 $useful_html_elements = apply_filter( 'press_this_useful_html_elements', $useful_html_elements ); 315 296 316 $source_content = wp_remote_retrieve_body( $remote_url ); 297 317 $source_content = wp_kses( $source_content, $useful_html_elements ); 298 318 … … 1193 1213 } 1194 1214 } 1195 1215 1216 /** 1217 * Filter the assembled HTML for the Press This editor. 1218 * 1219 * @since 1220 * 1221 * @param string $content Assembled end output of suggested content for the Press This editor. 1222 */ 1223 $content = apply_filters( 'press_this_suggested_content', $content ); 1224 1196 1225 return $content; 1197 1226 } 1198 1227