Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /** 1. CREAR FUNCION EN EL ARCHIVO FUNCTIONS.PHP DE WORDPRESS */
- // Permite crear IFRAMES en las entradas de WordPress
- function iframe_sc( $atts, $content = null )
- {
- extract( shortcode_atts( array(
- 'width' => ($width) ? $width : '100%',
- 'height' => ($height) ? $height : '400px',
- 'src' => $src
- ), $atts ) );
- if ($width || $height || $latlon)
- return "<iframe width='{$width}' height='{$height}' frameborder='0' marginheight='0' marginwidth='0' src='{$src}'></iframe>";
- }
- add_shortcode( 'iframe', 'iframe_sc' );
- /** 2. CREAR ENTRADA */
- // En la entrada donde queramos compartir codigo escribimos: [iframe src="IFRAME SRC URL"]
- // IFRAME SRC URL, es la URL arrojada por PasteBin o jsFiddle segun su opcion de embeber.
- // Este es un ejemplo utilizando PasteBin.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement