Skip to content

Instantly share code, notes, and snippets.

View SlavaET's full-sized avatar

Slava SlavaET

  • elegantthemes.com
View GitHub Profile
$output = sprintf(
'<div%3$s class="et_pb_text%2$s%4$s">
%1$s
</div> <!-- .et_pb_text -->',
do_shortcode( et_pb_fix_shortcodes( preg_replace( '|http://www\.youtube\.com/watch\?.*\bv=([^<\, ]+)|','<iframe src=http://www.youtube.com/embed/$1 frameborder="0" allowfullscreen></iframe>',$content ) ) ),
( '' !== $module_id ? sprintf( ' id="%1$s"', esc_attr( $module_id ) ) : '' ),
( '' !== $module_class ? sprintf( ' %1$s', esc_attr( $module_class ) ) : '' )
);
<?php
function override_parent() {
remove_shortcode( 'et_pb_map_pin', 'et_pb_map_pin' );
add_shortcode( 'et_pb_map_pin', 'et_pb_map_pin_custom' );
}
add_action('after_setup_theme','override_parent');
function et_pb_map_pin_custom( $atts, $content = null ) {
global $et_pb_tab_titles;
function override_parent(){
remove_shortcode( 'et_pb_slide', 'et_pb_slide' );
add_shortcode( 'et_pb_slide', 'et_pb_slide_custom' );
}
add_action('after_theme_setup','override_parent');
function et_pb_slide_custom( $atts, $content = '' ) {
extract( shortcode_atts( array(
'alignment' => 'center',
'heading' => '',
'button_text' => '',
<!DOCTYPE html>
<!--[if IE 6]>
<html id="ie6" lang="en-US">
<![endif]-->
<!--[if IE 7]>
<html id="ie7" lang="en-US">
<![endif]-->
<!--[if IE 8]>
<html id="ie8" lang="en-US">
$.ajax( {
type: "POST",
url: et_custom.ajaxurl,
data:
{
action : 'et_pb_submit_subscribe_form',
et_load_nonce : et_custom.et_load_nonce,
et_list_id : list_id,
et_firstname : $firstname.val(),
et_lastname : $lastname.val(),