: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
<?php namespace flow\social;
if ( ! defined( 'WPINC' ) ) die;
* @author Looks Awesome <email@looks-awesome.com>
* @link http://looks-awesome.com
* @copyright 2014-2016 Looks Awesome
class FFVimeo extends FFHttpRequestFeed{
public function __construct() {
parent::__construct( 'vimeo' );
public function deferredInit( $feed ) {
$content = (string)$feed->content;
$type = (string)$feed->{'timeline-type'};
$this->url = "https://vimeo.com/api/v2/{$content}/{$type}.json";
$this->url = "http://vimeo.com/api/v2/{$type}/{$content}/videos.json";
protected function getUrl() {
protected function items( $request ) {
$pxml = json_decode($request);
protected function getId( $item ) {
protected function getHeader( $item ) {
protected function getScreenName( $item ) {
return $item->{'user_name'};
protected function getProfileImage( $item ) {
return $item->{'user_portrait_medium'};
protected function getSystemDate( $item ) {
$date = $item->{'upload_date'};
$date = str_replace(' ', 'T', $date);
protected function getContent( $item ) {
return strip_tags($item->title);
protected function getUserlink( $item ) {
return $item->{'user_url'};
protected function getPermalink( $item ) {
protected function showImage( $item ) {
protected function getImage( $item ) {
return $this->createImage($item->{'thumbnail_large'}, $item->width, $item->height);
protected function getMedia( $item ) {
return $this->createMedia('http://player.vimeo.com/video/'.$item->id, 600, FFFeedUtils::getScaleHeight(600, $item->width, $item->height), 'vimeo');
protected function getAdditionalInfo( $item ) {
$additional = parent::getAdditionalInfo( $item );
$additional['likes'] = (string)@$item->stats_number_of_likes;
$additional['comments'] = (string)$item->stats_number_of_comments;
$additional['views'] = (string)$item->stats_number_of_plays;