/
readme.txt
75 lines (67 loc) · 2.21 KB
/
readme.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
=== WhatsApp Share Button for Developers ===
Contributors: martinkeck
Tags: whatsapp, share, button
Requires at least: 4.8
Tested up to: 4.9.4
Requires PHP: 5.4
Stable tag: 1.0.3
License: GPLv3
License URI: http://www.gnu.org/licenses/gpl.html
Adds a configurable share button for WhatsApp via shortcode.
== Description ==
The plugin simply configures a shortcode to add a WhatsApp sharing button wherever you need it in WordPress.
No fancy settings page or complicated configuration. Just add the shortcode in the WP editor or in your theme's templates.
Example usage in the WordPress editor:
<pre><code>[whatsapp-sharebutton button_label="Share on WhatsApp"]
</code></pre>
Example usage in your theme's templates:
<pre><code><?php echo do_shortcode( '[whatsapp-sharebutton button_label="Share on WhatsApp"]' ); ?>
</code></pre>
Possible attributes of the shortcode:
<table>
<thead>
<tr>
<th>Attribute name</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr>
<td>button_label</td>
<td>The button label and link title. By default it is only used in the title attribute of the link. Change the buttons CSS to show also the label (hidden by font-size: 0).</td>
<td>''</td>
</tr>
<tr>
<td>message_text</td>
<td>The text of the generated WhatsApp message.</td>
<td>The title of the current post/page (i.e. the return value of WordPress' <code>get_the_title()</code> function)</td>
</tr>
<tr>
<td>target_url</td>
<td>The URL to add to the generated WhatsApp message.</td>
<td>The URL of the current post/page (i.e. the return value of WordPress' <code>get_permalink()</code> function)</td>
</tr>
<tr>
<td>message_link_separator</td>
<td>The separator of the message_text and target_url.</td>
<td>': '</td>
</tr>
<tr>
<td>wrapper_class</td>
<td>The CSS class(es) of the button's surrounding div tag.</td>
<td>'whatsapp_sharebutton_wrap'</td>
</tr>
<tr>
<td>button_class</td>
<td>The CSS class(es) of the button itself.</td>
<td>'whatsapp_sharebutton'</td>
</tr></tbody></table>
== Installation ==
1. Visit \'Plugins > Add New\'
2. Search for \'Whatsapp Share Button\'
3. Activate the plugin from your Plugins page.
4. Add the shortcode in your posts/pages or theme\'s templates.
== Changelog ==
= 1.0.0 =
Release of initial version.