Modal Dialogue On Page Load
Posted 27 November 2012 - 06:10 PM
i.e. the user is required to click something in the modal box (like a warning or a notice) to get the page to load?
Would be great to have this option with the editablity and flexibility that the current modal/button shortcode has.
modal shortcode open
Modal popup content
modal shortcode close
Posted 27 November 2012 - 06:16 PM Best Answer
Posted 27 November 2012 - 07:35 PM
a ) click a link to go elsewhere
b ) agree to an information box - click the checkbox and open the page
(within the modal popup)
Posted 11 December 2012 - 10:44 PM
Went a different route
and yes - I know you shouldn't tinker with the actual code
but if you amend (slightly) the php class.shortcode.php for Bootstrap Modal Popup from line 1300
you then have a new parameter to use in the shortcode
which can be false (default needs a button click to launch)
or true - whereby the modal loads over the page - straight away without the first button click
[pl_modal title="Title" type="btn" show='true' colortype="info" label="Click Me!"]
all seems fine - but not good to mod the original files so....
Question: Probably a Wordpress thing(still a bit new to modifying WP code) - but If I put the whole (modified) function in my child base theme's function.php
and revert the class.shortcodes.php - it doesnt overwrite the function? confused
Posted 11 December 2012 - 11:54 PM
You can only define functions once, its a PHP thing.
Submit this as a ticket and we'll consider it for inclusion.
Posted 03 April 2013 - 08:09 PM
Did this get implemented? If it did the docs don't mention it?
Posted 03 April 2013 - 09:00 PM
Yes it did, just add show="true" to the modal shortcode.