Make WordPress Core

Ticket #34455: 34455.diff

File 34455.diff, 1.7 KB (added by kraftbj, 9 years ago)

Minor coding standard update of the OP and fixed a minor typo.

  • src/wp-admin/includes/class-wp-press-this.php

     
    9191                        }
    9292                }
    9393
    94                 // Edxpected slashed
     94                // Expected slashed
    9595                return wp_slash( $content );
    9696        }
    9797
     
    133133
    134134                $post['post_content'] = $this->side_load_images( $post_id, $post['post_content'] );
    135135
     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
    136147                $updated = wp_update_post( $post, true );
    137148
    138149                if ( is_wp_error( $updated ) ) {
     
    293304                        )
    294305                );
    295306
     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
    296316                $source_content = wp_remote_retrieve_body( $remote_url );
    297317                $source_content = wp_kses( $source_content, $useful_html_elements );
    298318
     
    11931213                        }
    11941214                }
    11951215
     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
    11961225                return $content;
    11971226        }
    11981227