'. esc_attr( mfn_get_attachment_data( $image, 'alt' ) ) .''; } } /** * Get bar direction */ public function get_direction($position){ if ($position === "left" || $position === "right") { return 'vertical'; } return 'horizontal'; } /** * Display CSS property when filled */ public function display_css_when_filled($css_property, $value){ if (strlen(str_replace(' ', '', $value)) > 0) { return $css_property.':'.$value.';'; } } /** * Render */ public function render($js = false){ $position = mfn_opts_get('gdpr-settings-position','left'); $page_link = ! empty( mfn_opts_get('gdpr-content-more_info_page') ) ? get_permalink( mfn_opts_get('gdpr-content-more_info_page') ) : mfn_opts_get('gdpr-content-more_info_link'); if( $js ){ return '
'.$this->display_image_if_exsists( mfn_opts_get('gdpr-content-image') ).'
'.do_shortcode(mfn_opts_get('gdpr-content')).'
'. mfn_opts_get('gdpr-content-more_info_text') .'
'; } else { echo '
'; echo $this->display_image_if_exsists( mfn_opts_get('gdpr-content-image') ); echo '
'. do_shortcode(mfn_opts_get('gdpr-content')) .'
'; if( ! empty($page_link) ){ echo ''. mfn_opts_get('gdpr-content-more_info_text') .''; } echo ''; echo '
'; } } } $mfn_gdpr = new Mfn_Gdpr();