Advertisement
Guest User

Untitled

a guest
Jul 15th, 2016
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.51 KB | None | 0 0
  1.    /**
  2.     * @param $movie_details
  3.     *
  4.     * @return array
  5.     */
  6.    function imdb_connector_fix_poster_url($movie_details) {
  7.       if(function_exists("imdb_connector_get_movie")) {
  8.          if(isset($movie_details["poster"]) && !strstr(home_url(), "www")) {
  9.             $movie_details["poster"] = str_replace("http://", "http://www.", $movie_details["poster"]);
  10.          }
  11.       }
  12.  
  13.       return (array)$movie_details;
  14.    }
  15.  
  16.    add_filter("imdb_connector_movie_details", "imdb_connector_fix_poster_url");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement