PluginProbe
Snippet Shortcodes / 3.4.1
Snippet Shortcodes v3.4.1
5.2.1 5.2 5.1.8 5.1.6 5.1.7 5.1.5 trunk 1.0 1.1 1.2 1.3 1.3.1 1.4 1.5 1.5.1 1.6 1.6.1 1.7 1.7.1 1.7.2 1.7.3 1.7.4 1.8 2.0 2.0.1 All 74 releases
shortcode-variables / readme.txt

readme.txt in Snippet Shortcodes 3.4.1, at readme.txt

339 lines 15.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 === Snippet Shortcodes ===
2 Contributors: aliakro
3 Donate link: https://www.paypal.me/yeken
4 Tags: shortcode, variable, php, text, html, parameter, javascript, embed, reuse
5 Requires at least: 5.2
6 Tested up to: 5.7
7 Stable tag: 3.4.1
8 Requires PHP: 7.2
9 License: GPLv2 or later
10 License URI: http://www.gnu.org/licenses/gpl-2.0.html
11 Donate Link: https://www.paypal.me/yeken
12
13 Create your own shortcodes and assign text, html, etc to them. Use these across your site and only change in one place - saving time and effort!
14
15 == Upgrade Notice ==
16
17 * 3.4 -
18
19 == Description ==
20
21 = DOCUMENTATON / UPGRADE =
22
23 [Snippet Shortcodes Website](https://snippet-shortcodes.yeken.uk/ "Snippet Shortcodes Website")
24
25 = WHAT IS SNIPPET SHORTCODES? =
26
27 Do you want to use the same snippet of text or HTML throughout your site but only have to change the value in one location? If so, this plugin maybe just what you need.
28
29 Create your own Shortcodes and assign content to them. Using the standard WP editor, you can add text, HTML, JavaScript, images or other elements that your WordPress install and plugins allow. The main advantage is ability to create a shortcode once and re-use it throughout your site.
30
31 [ sv slug="your-slug-name"]
32
33 = FEATURES =
34
35 * Create a shortcode once and place in multiple locations.
36 * Update the shortcode in one location and it changes throughout your site.
37 * Parameters to extend your shortcodes.
38 * Free and Premium helper shortcodes to make life easier.
39 * Multi-site support.
40 * Process shortcodes within WordPress menu titles.
41
42 = SPECIFY PARAMETERS =
43
44 In some cases you may wish to make your shortcodes more extendable. This is where parameters come in. For example, you may have a shortcode that renders a HTML table, however, depending on where you place that shortcode on your site, you may wish to specify additional arguments. Take the example below, you can see the additional arguments passed into shortcode, “border”, “background” etc.
45
46 [ sv slug="render-table" border="0" background="#FFFFFF" width="50%" site-title="YeKen"]
47
48 Each argument can be rendered into the shortcode in the with the following syntax %%background%%, %%width%%, etc. Below is an example:
49
50 <table border=”%%border%%” style=”background:%%background%%” width=”%%width%%”>
51 <tr>
52 <td>Welcome to our site, %%site-title%%.</td>
53 </tr>
54 </table>
55
56 **Premium Shortcodes**
57
58 The plugin comes with the following premium shortcodes:
59
60 - sc-date - A shortcode that displays today's date with the ability to add or subtract days, months and years. To specify an interval to add or subtract onto the date use the parameter "interval" e.g. [sv slug="sc-date" interval="-1 year"], [sv slug="sc-date" interval="+5 days"], [sv slug="sc-date" interval="+3 months"]. Intervals are based upon PHP intervals and are outlined here <a href="https://www.php.net/manual/en/dateinterval.createfromdatestring.php" target="_blank">https://www.php.net/manual/en/dateinterval.createfromdatestring.php</a>. Default is UK format (DD/MM/YYYY). Format can be changed by adding the parameter format="m/d/Y" onto the shortcode. Format syntax is based upon PHP date: <a href="http://php.net/manual/en/function.date.php" target="_blank">http://php.net/manual/en/function.date.php</a>
61 - sc-site-language - Language code for the current site
62 - sc-site-description - Site tagline (set in Settings > General)
63 - sc-site-wp-url - The WordPress address (URL) (set in Settings > General)
64 - sc-site-charset - The "Encoding for pages and feeds" (set in Settings > Reading)
65 - sc-site-wp-version - The current WordPress version
66 - sc-site-html-type - The content-type (default: "text/html"). Themes and plugins
67 - sc-site-stylesheet-url - URL to the stylesheet for the active theme.
68 - sc-site-stylesheet_directory - Directory path for the active theme.
69 - sc-site-template-url - The URL of the active theme's directory.
70 - sc-site-current-url - The current URL.
71 - sc-site-register-url - The URL to the WordPress registration page.
72 - sc-site-pingback-url - The pingback XML-RPC file URL (xmlrpc.php)
73 - sc-site-atom-feed - The Atom feed URL (/feed/atom)
74 - sc-site-rdf-url - The RDF/RSS 1.0 feed URL (/feed/rfd)
75 - sc-site-rss-url - The RSS 0.92 feed URL (/feed/rss)
76 - sc-site-rss2-url - The RSS 2.0 feed URL (/feed)
77 - sc-site-comments-atom-url - The comments Atom feed URL (/comments/feed)
78 - sc-site-comments-rss2-url - The comments RSS 2.0 feed URL (/comments/feed)
79 - sc-php-server-info - Display data from the PHP $_SERVER global e.g. [sv slug="sc-server-info" field="SERVER_SOFTWARE"]. <a href="http://php.net/manual/en/reserved.variables.server.php" rel="noopener" target="_blank">Allowed values for field attribute</a>.
80 - sc-php-unique-id - Generate a unique ID. Based upon <a href="http://php.net/manual/en/function.uniqid.php" rel="noopener" target="_blank">uniqid()</a>. If you wish the unique ID to be prefixed, add a the prefix attribute e.g. [sv slug="sc-php-unique-id" prefix="yeken"]
81 - sc-php-timestamp - Display the current unix timestamp. Based upon <a href="http://php.net/manual/en/function.time.php" rel="noopener" target="_blank">time()</a>.
82 - sc-php-random-number - Display a random number. Based upon <a href="http://php.net/manual/en/function.rand.php" rel="noopener" target="_blank">rand()</a>. It also supports the optional arguments of min and max e.g. [sv slug="sc-php-random-number" min="5" max="20" ]
83 - sc-php-random-string - Display a random string of characters. It also supports the optional argument of "length". This specifies the number of characters you wish to display (default is 10) [sv slug="sc-php-random-string" length="15"]
84 - sc-php-post-value - Display a value from the $_POST array. The "key" arguments specifies which array value to render. It also supports the optional arguments of "default". If there is no value in the array for the given "key" then the "default" will be displayed. [sv slug="sc-php-post-value" key="username" default="Not Found"]
85 - sc-php-get-value - Display a value from the $_GET array. The "key" arguments specifies which array value to render. It also supports the optional arguments of "default". If there is no value in the array for the given "key" then the "default" will be displayed. [sv slug="sc-php-get-value" key="username" default="Not Found"]
86 - sc-php-info - Display PHP Info
87 - sc-post-id - Display ID for the current post.
88 - sc-post-author - Display the author's display name or ID. The optional argument "field" allows you to specify whether you wish to display the author's "display-name" or "id". [sv slug="sc-post-author" field="id" ]
89 - sc-post-counts - Display a count of posts for certain statuses. Using the argument status, specify whether to return a count for all posts that have a status of "publish" (default), "future", "draft", "pending" or "private". [sv slug="sc-post-counts" status="draft"]
90 - sc-user-counts - Display a count of all WordPress users or the number of WordPress users for a given role e.g. [sv slug="sc-user-counts" role="subscriber"] or [sv slug="sc-user-counts"].
91 - sc-user-profile-photo - Display the WordPress profile photo for the logged in user e.g. [sv slug="sc-user-profile-photo" width="150"] or [sv slug="sc-user-profile-photo"]. Please note, width defaults to 96px.
92
93 **Free Shortcodes**
94
95 The plugin comes with the following free shortcodes:
96
97 - sc-todays-date - Displays today's date. Default is UK format (DD/MM/YYYY). Format can be changed by adding the parameter format="m/d/Y" onto the shortcode. Format syntax is based upon PHP date: <a href="http://php.net/manual/en/function.date.php" target="_blank">http://php.net/manual/en/function.date.php</a>
98 - sc-user-ip - Display the current user's IP address.
99 - sc-user-agent - Display the current user's User Agent
100 - sc-site-url - The Site address (URL) (set in Settings > General)
101 - sc-site-title - Displays the site title.
102 - sc-admin-email - Admin email (set in Settings > General)
103 - sc-page-title - Displays the page title.
104 - sc-login-page - Wordpress login page. Add the parameter "redirect" to specify where the user is taken after a successful login e.g. redirect="http://www.google.co.uk".
105 - sc-privacy-url - Displays the privacy page URL.
106 - sc-username - Display the logged in username.
107 - sc-user-id - Display the current user's ID.
108 - sc-user-email - Display the current user's email address.
109 - sc-first-name - Display the current user's username.
110 - sc-last-name - Display the current user's last name.
111 - sc-display-name - Display the current user's display name.
112
113 **Features**
114
115 - Insert the same piece of data, HTML, text, etc throughout your site and change in only one place.
116 - TinyMCE editor
117 - Place other WordPress shortcodes within yours
118 - Comes with a range of pre-made shortcodes
119 - Pass your own parameters into a shortcode
120
121 * Developed by YeKen.uk *
122
123 Paypal Donate: email@YeKen.uk
124
125 == Installation ==
126
127 1. Login into Wordpress Admin Panel
128 2. Goto Plugins > Add New
129 3. Search for "Snippet Shortcodes"
130 4. Click Install now and activate plugin
131 5. Goto Settings > Snippet Shortcodes
132
133 == Frequently Asked Questions ==
134
135 = How do I add / edit / delete Snippet Shortcodes =
136
137 Login into Wordpress Admin Panel and goto Settings > Snippet Shortcodes
138
139 == Screenshots ==
140
141 1. View all Snippet Shortcodes created.
142 2. Add a new Snippet Shortcode
143 3. Edit an existing Snippet Shortcode
144 4. Using the Snippet Shortcodes into a page
145 5. Snippet Shortcodes rendered in a page
146
147 == Changelog ==
148
149 = 3.4.1 =
150
151 * Bug fix: Fixed issue with saving.
152
153 = 3.4 =
154
155 * Improvement: Cosmetic tweaks to shortcode list table.
156 * Bug fix: Fixed an issue where license price wasn't being displayed correctly.
157 * Change: Updated links to new documentation website: https://snippet-shortcodes.yeken.uk/
158 * Change: Free users are now limited to 15 shortcodes.
159 * Change: Tweaked Upgrade URL and default price.
160
161 = 3.3.3 =
162
163 * Updated "Tested upto" statement within readme.txt.
164
165 = 3.3.2 =
166
167 * Renamed plugin to Snippet Shortcodes!
168
169 = 3.3.1 =
170
171 * Updated tested upto version for 5.6
172
173 = 3.3 =
174
175 * Improvement: Removed "Your shortcode has been saved" confirmation page.
176
177 = 3.2.1 =
178
179 * Readme tweaks.
180
181 = 3.2 =
182
183 * New Shortcode: "sc-user-profile-photo" - display the current user's profile photo.
184
185 = 3.1.1 =
186
187 * Updated compatibility version number.
188
189 = 3.1 =
190
191 * New Shortcode: "sc-site-current-url" - get the current URL.
192 * New Shortcode: "sc-site-register-url" - get the URL for the WordPress registration page.
193 * Improvement: Added localised strings so plugin can now be translated.
194 * Improvement: Licenses are now checked daily and on each upgrade to ensure they are still valid.
195 * Bug fix: Missing array element throwing error on shortcode listing page.
196 * Bug fix: PHP warning being thrown on license page when one hasn't been added.
197 * Bug fix: Always create multisite database table regardless.
198
199 = 3.0.4 =
200
201 * Improvement: Fetch license price from YeKen API
202
203 = 3.0.3 =
204
205 * Bug fix: Removed debug data altogether as causing unintended behaviour.
206
207 = 3.0.2 =
208
209 * Bug fix: Only display HTML caching comment on pages / posts. Currently rendering on things like AJAX responses and causing unintended behaviour.
210
211 = 3.0.1 =
212
213 * Bug fix: Fix error being thrown when not a multi site and DB table missing.
214
215 = 3.0 =
216
217 * Improvement: Support for multi-site variables.
218 * Improvement: Replace shortcodes within menu titles.
219
220 = 2.4.1 =
221
222 * Bug fix: fixed save_result undeclared variable error.
223
224 = 2.4 =
225
226 * New Feature: Added a button to the WordPress text editor (classic mode) to allow users to easily insert shortcodes.
227 * New Fetaure: Added a new shortcode sc-date. Allows you to do render today's date and add or subtract days, months and years.
228
229 = 2.3 =
230
231 * Improvement: sc-user-counts - Display a count of all WordPress users or the number of WordPress users for a given role e.g. [sv slug="sc-user-counts" role="subscriber"] or [sv slug="sc-user-counts"].
232
233 = 2.2.1 =
234
235 * Bug fix: Fixed issue with clone.
236
237 = 2.2 =
238
239 * Improvement: Slugs can now be edited.
240
241 = 2.1 =
242
243 * New Feature: Added the ability to clone your own shortcodes.
244
245 = 2.0.1 =
246
247 * Bug fix: Fixed broken menu
248
249 = 2.0 =
250
251 * New Feature: Added additional premium shortcodes.
252 * New Feature: Inline editing of shortcodes from the main list screen.
253 * New Feature: Able to disable / enable shortcodes from shortcode list.
254 * Improvement: Refactoring and optimisation of the entire plugin code.
255 * Improvement: Added Fooicons.
256 * Improvement: Added simple form validation when adding a record.
257
258 = 1.8 =
259
260 * Improvement: Added escaping for premade shortcodes.
261 * Improvement: Added new shortcode "sc-privacy-url" for rendering Privacy URL link.
262
263 = 1.7.4 =
264
265 - Version and readme.txt updated to reflect 4.8 compatibility.
266
267 = 1.7.3 =
268
269 - BUG FIX: On the very first load of a variable it would return nothing. This was due to a bug in the code. The first load would display nothing to the user, however it would cache the shortcode correctly. Upon the next visit, the shortcode would render correctly!
270
271 = 1.7.2 =
272
273 - When creating a new shortcode, "Disabled" is set by default to "No".
274 - Additional upgrade check added. This compares the previously stored version number against the new version number. If there is a difference, it will run the DB table check again.
275
276 = 1.7.1 =
277
278 - BUG FIX: Tweak made to "on activate" so the code required to change the relevant database tables is called correctly.
279
280 = 1.7 =
281
282 - Disable a variable. You can now disable a variable via the admin panel - if a shortcode is disabled nothing will be rendered in it's place (will remove the shortcode though).
283
284 = 1.6.1 =
285
286 - BUG FIX: Array declaration caused 500 error on non PHP 7
287
288 = 1.6 =
289
290 - Now supports custom parameters. You can now add parameters when inserting a shortcode and specify where in the shortcode those parameters should appear.
291 - BUG FIX: Removed a stray var_dump()
292
293 = 1.5.1 =
294
295 * BUG FIX: "Add new" link for message "You haven't created any shortcodes yet." wasn't working correctly
296 * BUG FIX: Typo - "Shotcodes" instead of "Shortcodes" on "Your Shortcodes" page
297
298 = 1.5 =
299
300 * Added a shorter shortcode slug. So, instead of [shortcode-variables slug="your-slug-name"] you can also use [s-var slug="your-slug-name"]
301 * BUG FIX: Some pre-made shortcodes weren't being rendered in the correct place. Fixed.
302
303 = 1.4 =
304 * Added the new pre-made shortcodes:
305 * sc-login-page - Wordpress login page. Add the parameter "redirect" to specify where the user is taken after a successful login e.g. redirect="http://www.google.co.uk".
306 * sc-username - Display the logged in username.
307 * sc-user-id - Display the current user's ID
308 * sc-user-ip - Display the current user's IP address.
309 * sc-user-email - Display the current user's email address.
310 * sc-username - Display the current user's username.
311 * sc-first-name - Display the current user's first name.
312 * sc-last-name - Display the current user's last name.
313 * sc-display-name - Display the current user's display name.
314 * sc-user-agent - Display the current user's user agent
315 * BUG FIX: Deleting a shortcode from cache when deleted from Admin panel. This stops it getting rendered when removed from the plugin.
316
317 = 1.3.1 =
318
319 * Added some messages to encourage people to suggest premade tags.
320 * Added version numbers. These are stored in DB to aid future upgrades.
321
322 = 1.3 =
323
324 This was a dummy release to fix an SVN issue with the 1.2 release!
325
326 = 1.2 =
327
328 * Added Premade shortcodes and framework to add additional ones
329 * Added Top Level menu item to support two sub pages. One for user defined shortcodes and another for premade shortcodes.
330
331 = 1.1 =
332 * Added caching to SQL queries. Therefore making shortcode rendering faster and reduce load on mySQL.
333 * TinyMCE editor for editing shortcode content.
334 * You can now specify other shortcodes within your Snippet Shortcodes.
335 * Readme.txt fixes
336
337 = 1.0 =
338 * Initial Release
339