Skip to content

Commit b322169

Browse files
committed
set default icon is whatsapp
1 parent 8646e58 commit b322169

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

dashboard.php

+1
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@
7777
<!-- -> style-2 : 1 button floating wrap all button selected -->
7878

7979
<h1>Floating Button</h1>
80+
<p>Default icon is Whatsapp if you want to change the icon, click upload image button</p>
8081

8182
<form action="options.php" method="POST">
8283
<?php settings_fields('floating_button_settings'); ?>

logic.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ function feature_absolute_dir($path = "") {
107107
if ($selectstyle == 'style-1') {
108108
for ($i = 1; $i <= 5; $i++) {
109109
$image = get_option('floating_image_'.$i);
110-
$imageUrl = wp_get_attachment_image_url($image, 'original');
110+
$imageUrl = wp_get_attachment_image_url($image, 'original') ?: feature_dir('./img/wa-xl.svg');
111111

112112
$bgColor = get_option('floating_background_color_'.$i);
113113
$url = get_option('floating_button_url_'.$i);

0 commit comments

Comments
 (0)