wp-content/plugins/fakerpress/providers/image/500px.php
/**
	 * Fetches a random photo from 500px based on a given search param
	 *
	 * @since  0.2.2
	 *
	 * @param  array  $args The request params for 500px search of photos
	 *
	 * @return string       The Image url from 500px (external URL)
	 */
Fetches a random photo from 500px based on a given search param
@since  0.2.2

@param  array  $args The request params for 500px search of photos

@return string       The Image url from 500px (external URL)
Fetches a random photo from 500px based on a given search param @since 0 . 2 . 2 @param array $args The request params for 500px search of photos @return string The Image url from 500px ( external URL )
public function image_500px( $args = array() ) {
		$categories = array(
			'Abstract',
			'Aerial',
			'Animals',
			'City and Architecture',
			'Food',
			'Landscapes',
			'Macro',
			'Nature',
			'Urban Exploration',
			'Wedding',
		);
		$defaults = array(
			'feature' => 'editors',
			'sort' => 'created_at',
			'image_size' => 1080,
			'rpp' => 100,
			'exclude_nude' => 1,
			'only' => urlencode( implode( ',', $categories ) ),
		);
		$args = wp_parse_args( $args, $defaults );
		$args = apply_filters( 'fakerpress.provider.image.500px.args', $args, $this );
		$response = $this->request( 'photos', $args );
		if ( ! $response ){
			return false;
		}
		$photo = $this->generator->randomElement( $response->photos );
		return $photo->image_url;
	}
public function image_500px ( $ args = array ( ) ) { $ categories = array ( 'Abstract' , 'Aerial' , 'Animals' , 'City and Architecture' , 'Food' , 'Landscapes' , 'Macro' , 'Nature' , 'Urban Exploration' , 'Wedding' , ) ; $ defaults = array ( 'feature' => 'editors' , 'sort' => 'created_at' , 'image_size' => 1080 , 'rpp' => 100 , 'exclude_nude' => 1 , 'only' => urlencode ( implode ( ',' , $ categories ) ) , ) ; $ args = wp_parse_args ( $ args , $ defaults ) ; $ args = apply_filters ( 'fakerpress.provider.image.500px.args' , $ args , $ this ) ; $ response = $ this -> request ( 'photos' , $ args ) ; if ( ! $ response ) { return false ; } $ photo = $ this -> generator -> randomElement ( $ response -> photos ) ; return $ photo -> image_url ; }
Fetches a random photo from 500px based on a given search param
 @since  0.2.2
Fetches a random photo from 500px based on a given search param @since 0 . 2 . 2
/**
		 * Allow third party developers to modify params for 500px requests
		 *
		 * @since  0.4.9
		 *
		 * @param  array $args      Arguments for the Request to 500px
		 * @param  self  $provider  Instance of the Current class
		 */