'',
'class' =>'',
'effect' =>'',
'title' =>'',
'title_color' =>'',
'heading_background' =>'',
'background' =>'',
'color' =>'',
'width' =>'',
'height' =>'',
'overlay_color' =>'#000000',
'overlay_opacity' =>'0.3',
'close_icon' =>'yes',
), $args
);
extract( $defaults );
self::$args = $defaults;
$uniqid = uniqid('modal-');
$this->id = $id.$uniqid;
if(isset($width) && is_numeric($width))
$width = $width.'px';
if(isset($height) && is_numeric($height))
$height = $height.'px';
$html = '';
$html .='';
do_shortcode( Magee_Core::fix_shortcodes($content));
$html .= sprintf('
%s
',$id,$class,$uniqid,$title,do_shortcode( Magee_Core::fix_shortcodes($this->modal_content)),$effect,$close_icon,do_shortcode( Magee_Core::fix_shortcodes($this->modal_anchor_text)));
return $html;
}
/**
* Render the child shortcode
* @param array $args Shortcode paramters
* @param string $content Content between shortcode
* @return string HTML output
*/
function render_modal_anchor_text( $args, $content = '') {
$defaults = Magee_Core::set_shortcode_defaults(
array(
), $args
);
extract( $defaults );
self::$args = $defaults;
$this->modal_anchor_text = do_shortcode( Magee_Core::fix_shortcodes($content));
}
/**
* Render the child shortcode
* @param array $args Shortcode paramters
* @param string $content Content between shortcode
* @return string HTML output
*/
function render_modal_content( $args, $content = '') {
$defaults = Magee_Core::set_shortcode_defaults(
array(
), $args
);
extract( $defaults );
self::$args = $defaults;
$this->modal_content = do_shortcode( Magee_Core::fix_shortcodes($content));
}
}
new Magee_Modal();
endif;