Skip to content

Commit

Permalink
Fix the post content link
Browse files Browse the repository at this point in the history
  • Loading branch information
williamsba committed Aug 18, 2020
1 parent e46d3e2 commit d308c3d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ps-rest-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function ps_register_custom_post_type() {
'name' => 'Movies',
'singular_name' => 'Movie'
),
'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'comments', 'revisions', 'custom-fields', ),
'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'custom-fields' ),
'public' => true,
'has_archive' => true,
'rewrite' => array( 'slug' => 'movies' ),
Expand Down Expand Up @@ -82,7 +82,7 @@ function ps_movie_api_results() {
// Set values for our new movies post
$new_post = array(
'post_title' => esc_html( $movies->title ),
'post_content' => '<a href="https://www.imdb.com/title/' . esc_attr( $movies->imdbId ) . '">',
'post_content' => '<a href="https://www.imdb.com/title/' . esc_attr( $movies->imdbId ) . '">' .esc_html( $movies->title ). '</a>',
'post_status' => 'publish',
'post_author' => 1,
'post_type' => 'movie',
Expand Down

0 comments on commit d308c3d

Please sign in to comment.