Add placeholder hooks.

This commit is contained in:
Hoang Huu 2019-10-18 09:24:03 +07:00
parent cb959848b8
commit 18c41ca780
2 changed files with 15 additions and 6 deletions

View File

@ -513,8 +513,13 @@ function opalestate_get_image_placeholder( $size = '', $url = false ) {
return '<img src="' . esc_url( $src ) . '" alt="' . sprintf( esc_html__( 'Placeholder %s', 'opalestate-pro' ), $size ) . '" />'; return '<img src="' . esc_url( $src ) . '" alt="' . sprintf( esc_html__( 'Placeholder %s', 'opalestate-pro' ), $size ) . '" />';
} }
/**
* Get image placeholder src.
*
* @return string
*/
function opalestate_get_image_placeholder_src() { function opalestate_get_image_placeholder_src() {
return OPALESTATE_PLUGIN_URL . 'assets/images/placeholder.png'; return apply_filters( 'opalestate_get_image_placeholder_src', OPALESTATE_PLUGIN_URL . 'assets/images/placeholder.png' );
} }
/** /**

View File

@ -20,11 +20,15 @@ function opalestate_property_mortgage() {
function opalestate_load_template_path( $tpl, $args = [], $layout = '' ) { function opalestate_load_template_path( $tpl, $args = [], $layout = '' ) {
return Opalestate_Template_Loader::get_template_part( $tpl, $args, $layout ); return Opalestate_Template_Loader::get_template_part( $tpl, $args, $layout );
} }
/**
* Get image avatar placeholder src.
*
* @return string
*/
function opalestate_get_image_avatar_placehold() { function opalestate_get_image_avatar_placehold() {
return OPALESTATE_PLUGIN_URL . 'assets/images/avatar-placeholder.png'; return apply_filters( 'opalestate_get_image_avatar_placeholder', OPALESTATE_PLUGIN_URL . 'assets/images/avatar-placeholder.png' );
} }
function opalestate_get_admin_view( $file ) { function opalestate_get_admin_view( $file ) {
@ -246,8 +250,8 @@ function opalestate_show_display_modes( $default = 'list' ) {
if ( ! function_exists( 'opalestate_pagination' ) ) { if ( ! function_exists( 'opalestate_pagination' ) ) {
/** /**
* Opalestate pagination. * Opalestate pagination.
* *
* @param string $pages * @param string $pages
* @param int $range * @param int $range
*/ */
@ -590,7 +594,7 @@ function opalestate_property_author_v2() {
echo opalestate_load_template_path( 'single-property/author-v2' ); echo opalestate_load_template_path( 'single-property/author-v2' );
} }
function opalestate_property_author_v3() { function opalestate_property_author_v3() {
echo opalestate_load_template_path( 'single-property/author-v3' ); echo opalestate_load_template_path( 'single-property/author-v3' );
} }