'; } $attr = shortcode_atts( array( 'id' => '', 'w' => '', 'h' => '', 'fb' => '', 'mw' => '', 'mh' => '', 'sc' => '', 'pro' => '', 'style' => '', ), $arguments ); // check that the Slideshare ID contains letters, numbers and query strings $pattern = '/[^-_a-zA-Z0-9?=&]/'; if ( empty( $attr['id'] ) || preg_match( $pattern, $attr['id'] ) ) { return ''; } // check the width/height $w = $attr['w']; if ( empty( $w ) && ! empty( $content_width ) ) { $w = intval( $content_width ); } elseif ( ! ( $w = intval( $w ) ) || $w < 300 || $w > 1600 ) { $w = 425; } else { $w = intval( $w ); } $h = ceil( $w * 348 / 425 ); // Note: user-supplied height is ignored. if ( isset( $attr['pro'] ) && $attr['pro'] ) { $source = 'https://www.slideshare.net/slidesharepro/' . $attr['id']; } else { $source = 'https://www.slideshare.net/slideshow/embed_code/' . $attr['id']; } if ( isset( $rel ) ) { $source = add_query_arg( 'rel', intval( $rel ), $source ); } if ( isset( $startSlide ) ) { $source = add_query_arg( 'startSlide', intval( $startSlide ), $source ); } $player = sprintf( "