File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed
Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -385,7 +385,7 @@ protected function _register_controls() {
385385 ],
386386 'default ' => 'LocalBusiness ' ,
387387 'description ' => '<b>CivicStructure</b>: A public structure, such as a town hall or concert hall.<br>
388- <b>LocalBusiness</b>:A particular physical business or branch of an organization. ' ,
388+ <b>LocalBusiness</b>:A particular physical business or branch of an organization. Site logo is required to be enabled ' ,
389389 'condition ' => [
390390 'enable_schema ' => 'yes '
391391 ]
@@ -828,11 +828,15 @@ protected function render() {
828828 ?>
829829
830830 <div class="ma-openinghours-wrapper" <?php echo $ enableSchema ? ' itemprop="openingHoursSpecification" itemscope itemtype="http://schema.org/ ' . $ schemaType . '" ' : '' ; ?> >
831-
832- <?php if ( $ enableSchema && $ settings ['schema_type ' ] == "LocalBusiness " ) : ?>
833- <img style="display:none;" itemprop="image" src="http://via.placeholder.com/350x150" alt="test logo" />
834- <?php endif ; ?>
835-
831+ <?php
832+ // Logo for LocalBusiness Schema
833+ if ( $ enableSchema && $ settings ['schema_type ' ] == "LocalBusiness " ) :
834+ $ logo = wp_get_attachment_image_src ( get_theme_mod ( 'custom_logo ' ) , 'full ' );
835+ if ( has_custom_logo () ) {
836+ echo '<img style="display:none;" itemprop="image" src=" ' . esc_url ( $ logo [0 ] ) . '" alt=" ' . get_bloginfo ( 'name ' ) . '"> ' ;
837+ }
838+ endif ;
839+ ?>
836840 <div <?php echo $ enableSchema ? 'itemprop="name" ' : '' ; ?> class="ma-oh-header"><?php echo $ settings ['header_text ' ]; ?> </div>
837841
838842 <div class="ma-oh-rows">
You can’t perform that action at this time.
0 commit comments