invp_get_the_photo_url( $size = 'medium', int|null $post_ID = null )
invp_get_the_photo_url
Contents
Parameters Parameters
- $post_ID
-
(int|null) (Optional) The post ID of a vehicle. Must be passed when using this method outside the loop.
Default value: null
Return Return
(string) A URL that points to a photo
Source Source
File: includes/template-tags.php
$size = 'medium'; } if ( empty( $post_ID ) ) { $post_ID = get_the_ID(); } $thumbnail_id = get_post_thumbnail_id( $post_ID, $size ); if ( ! is_wp_error( $thumbnail_id ) && ! empty( $thumbnail_id ) ) { return wp_get_attachment_url( $thumbnail_id ); } return apply_filters( 'invp_no_photo_url', plugins_url( 'images/no-photo.svg', INVP_PLUGIN_FILE_PATH ), $post_ID ); } /**
Expand full source code Collapse full source code View on Github