Как добавить кнопку отправки Whastapp с изображениями в Cpanel? - PullRequest
0 голосов
/ 14 июля 2020

Я добавляю этот код в свой php файл:

<script type='text/javascript'>if(typeof wabtn4fg===&quot;undefined&quot;){wabtn4fg=1;h=document.head||document.getElementsByTagName(&quot;head&quot;)[0],s=document.createElement(&quot;script&quot;);s.type=&quot;text/javascript&quot;;s.src=&quot;https://cdn.jsdelivr.net/whatsapp-sharing/1.3.4/whatsapp-button.js&quot;;h.appendChild(s);}</script>
<a class='wa_btn wa_btn_l' expr:data-href='data:post.url' expr:data-text='data:post.title' href='whatsapp://send' style='display:none'>Share this Article!</a>

Но не отображается. Полный код:

<div class="article-header">
                                        <img src="images/news/<?php echo $news['photo']; ?>" class="article-photo" alt="" />
                                        <div class="article-meta">
                                            <div class="meta-date">
                                                <span class="date"><?php echo substr($news['tanggal'],8,2) ?></span>
                                                <span class="month"><?php echo substr($news['tanggal'],5,2)?>, <?php echo substr($news                      ['tanggal'],0,4) ?> </span>
                                                <span class="author">by <a href="#"><?php echo $news['penulis']; ?></a></span>
                                                </div>
                                                <script type='text/javascript'>if(typeof wabtn4fg===&quot;undefined&quot;){wabtn4fg=1;h=document.head||document.getElementsByTagName(&quot;head&quot;)[0],s=document.createElement(&quot;script&quot;);s.type=&quot;text/javascript&quot;;s.src=&quot;https://cdn.jsdelivr.net/whatsapp-sharing/1.3.4/whatsapp-button.js&quot;;h.appendChild(s);}</script>
<a class='wa_btn wa_btn_l' expr:data-href='data:post.url' expr:data-text='data:post.title' href='whatsapp://send' style='display:none'>Share this Article!</a>
                                                <div class="meta-tools">
                                                <span><i class="fa fa-text-height"></i>Ukuran Font <span class="f-size"><a href="#font-size-down">-</a><span class="f-size-number">16</span><a href="#font-size-up">+</a></span></span>
                                            </div>
                                        </div>
                                    </div>
...