Edit File by line
/home/zeestwma/richards.../wp-conte.../plugins/jetpack/modules/shortcod...
File: houzz.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* Houzz Embed
[2] Fix | Delete
*
[3] Fix | Delete
* Examples:
[4] Fix | Delete
* Post content:
[5] Fix | Delete
* - [houzz=http://www.houzz.com/pro/james-crisp]
[6] Fix | Delete
* - http://www.houzz.com/pro/james-crisp
[7] Fix | Delete
* Blog sidebar: [houzz=http://www.houzz.com/profile/alon w=200 h=300]
[8] Fix | Delete
*
[9] Fix | Delete
* @package automattic/jetpack
[10] Fix | Delete
*/
[11] Fix | Delete
[12] Fix | Delete
if ( ! defined( 'ABSPATH' ) ) {
[13] Fix | Delete
exit( 0 );
[14] Fix | Delete
}
[15] Fix | Delete
[16] Fix | Delete
// Register oEmbed provider.
[17] Fix | Delete
wp_oembed_add_provider( '#https?://(.+?\.)?houzz\.(com|co\.uk|com\.au|de|fr|ru|jp|it|es|dk|se)/.*#i', 'https://www.houzz.com/oembed', true );
[18] Fix | Delete
[19] Fix | Delete
/**
[20] Fix | Delete
* Display shortcode
[21] Fix | Delete
*
[22] Fix | Delete
* @param array $atts Shortcode attributes.
[23] Fix | Delete
*/
[24] Fix | Delete
function jetpack_houzz_shortcode( $atts ) {
[25] Fix | Delete
$url = substr( $atts[0], 1 );
[26] Fix | Delete
$args = array();
[27] Fix | Delete
if ( isset( $atts['w'] ) && is_numeric( $atts['w'] ) ) {
[28] Fix | Delete
$args['width'] = $atts['w'];
[29] Fix | Delete
}
[30] Fix | Delete
if ( isset( $atts['h'] ) && is_numeric( $atts['h'] ) ) {
[31] Fix | Delete
$args['height'] = $atts['h'];
[32] Fix | Delete
}
[33] Fix | Delete
$oembed = _wp_oembed_get_object();
[34] Fix | Delete
return $oembed->get_html( $url, $args );
[35] Fix | Delete
}
[36] Fix | Delete
add_shortcode( 'houzz', 'jetpack_houzz_shortcode' );
[37] Fix | Delete
[38] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function