This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Register exporter for Plugin user data. | |
| * | |
| * @see https://github.com/allendav/wp-privacy-requests/blob/master/EXPORT.md | |
| * | |
| * @param $exporters | |
| * | |
| * @return array |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * If your forms process submissions via ajax/javascript this is the method you will need to use. | |
| * | |
| * The following function will handle everything on the Popup Maker side. | |
| * You just need to get your form plugin to call this function when succesffully submitted with the popup ID field. | |
| * | |
| * Example usages. Read below to learn how to complete the full solution for your form plugin. | |
| * | |
| * Mileage will vary as every form & plugin does this in a different way. | |
| * You will need to find out how to do something on successful submission. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Customize the click selector (.pdf-link). Elements targeted by this script should not be set up as normal click triggers. | |
| // This effectively acts as the click trigger. | |
| jQuery(document).on('click', '.pdf-link', function (e) { | |
| var popupID = 123, // Popup ID # | |
| linkFieldName = 'link_field_name_attr', // Form field name="" value. | |
| // Stop editing below this line. | |
| // --------------------------------------- | |
| $popup = PUM.getPopup(popupID), // Change this to your popup ID. | |
| $i |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function JSONToCSVConvertor(JSONData, ReportTitle, ShowLabel) { | |
| //If JSONData is not an object then JSON.parse will parse the JSON string in an Object | |
| var arrData = typeof JSONData != 'object' ? JSON.parse(JSONData) : JSONData; | |
| var CSV = ''; | |
| //Set Report title in first row or line | |
| CSV += ReportTitle + '\r\n\n'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Returns count of unique site/user combinations. | |
| */ | |
| SELECT count(DISTINCT(uuid)) FROM `pmapi_pum_reviews` | |
| /** | |
| * Get count of each reason. | |
| * Use Having to limit these results or pivot the table. | |
| */ | |
| SELECT `reason`, COUNT(*) FROM `pmapi_pum_reviews` GROUP BY `reason` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Copy below this line to your php file. | |
| // ---------------------------------------------------------------------------- | |
| add_action( 'popmake_preload_popup', 'pum_14_force_preload_content_scan' ); | |
| function pum_14_force_preload_content_scan( $popup_id ) { | |
| $popup = get_post( $popup_id ); | |
| do_shortcode( $popup->post_content ); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| jQuery(document).ready(function () { | |
| setTimeout(function () { | |
| jQuery.fn.popmake.close = function (callback) { | |
| return this.each(function () { | |
| var $popup = PUM.getPopup(this), | |
| $container = $popup.popmake('getContainer'), | |
| $close = $popup.popmake('getClose').add($('.popmake-close', $popup).not($popup.popmake('getClose'))); | |
| $popup.trigger('pumBeforeClose'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Only copy below this line. | |
| // ------------------------------------------------------------- | |
| /** | |
| * Register a custom attribute or more. This is useful to limit where your custom fields appear. | |
| */ | |
| add_filter( 'pum_sub_form_shortcode_defaults', 'custom_pum_mc_shortcode_atts' ); |