Skip to content

Commit a0bc975

Browse files
author
Antti Kuosmanen
committed
Remove section about using outside of post_content
This is now obsolete since script is enqueued to footer when shortcode gets rendered.
1 parent 42b06dd commit a0bc975

1 file changed

Lines changed: 0 additions & 13 deletions

File tree

readme.md

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -190,19 +190,6 @@ You can use the xclass attribute inside the shortcode to add your own extra clas
190190
[libre-form id="1" xclass="extra"]
191191
```
192192

193-
## Using the shortcode outside post content
194-
195-
By default, scripts are only loaded when the shortcode is within the content.
196-
If you use shortcodes outside the content, ex. custom fields or by `do_shortcode`, you need to manually enqueue the scripts for the submit to work.
197-
198-
```php
199-
wp_enqueue_script('wplf-form-js');
200-
wp_localize_script( 'wplf-form-js', 'ajax_object', array(
201-
'ajax_url' => admin_url( 'admin-ajax.php' ),
202-
'ajax_credentials' => apply_filters('wplf_frontend_script_credentials', 'same-origin')
203-
) );
204-
```
205-
206193
## Contributing
207194

208195
Please make sure your code conforms to the code style used in the rest of the plugin.

0 commit comments

Comments
 (0)