Home › Forums › Legacy Support › Support queries › Other issues › open Free unit popup trouble!
- This topic has 6 replies, 3 voices, and was last updated 3 years, 6 months ago by spyboys.
Viewing 7 posts - 1 through 7 (of 7 total)
-
AuthorPosts
-
October 15, 2020 at 7:09 pm #318659spyboysSpectatorHi, I'll refer your tip and paste this code in my plugin editor --> wplms_customizer.php
But its came like this https://prnt.sc/v0388u please solve this problem and i want like this https://prnt.sc/v0398dadd_filter('wplms_curriculum_course_lesson','wplms_custom_course_curriculum_free_access_2',999,3); function wplms_custom_course_curriculum_free_access_2($html,$lesson,$course_id){ $free=get_post_meta($lesson,'vibe_free',true); if(vibe_validate($free)) $html ='<a href="'.get_permalink($lesson).'" class="ajax_unit">'.get_the_title($lesson).(vibe_validate($free)?'<span>'.__('FREE','vibe').'</span>':'').'</a>'; ?> jQuery(document).ready(function(){ jQuery('.ajax_unit').magnificPopup({ type: 'ajax', alignTop: true, fixedContentPos: true, fixedBgPos: true, overflowY: 'auto', closeBtnInside: true, preloader: false, midClick: true, removalDelay: 300, mainClass: 'my-mfp-zoom-in', callbacks: { parseAjax: function(mfpResponse) { mfpResponse.data = jQuery(mfpResponse.data).find('.unit_wrap'); }, ajaxContentAdded: function() { // jQuery('video,audio').mediaelementplayer(); jQuery('.fitvids').fitVids(); jQuery('.tip').tooltip(); jQuery('.nav-tabs li:first a').tab('show'); jQuery('.nav-tabs li a').click(function(event){ event.preventDefault(); jQuery(this).tab('show'); }); } } }); }); <style> .mfp-ajax-holder .mfp-content{max-width:720px;} </style> <?php return $html; }
October 16, 2020 at 7:31 am #318778VeronicaModeratorok let me try this on my local setupOctober 16, 2020 at 10:36 am #318821spyboysSpectatorping here after your test :)October 16, 2020 at 10:48 am #318823VeronicaModeratorhi please add this in wplms-customizer.php//Open Free Unit PopUp /* add_filter('wplms_curriculum_course_lesson','wplms_custom_course_curriculum_free_access_2',999,3); function wplms_custom_course_curriculum_free_access_2($html,$lesson,$course_id){ $free=get_post_meta($lesson,'vibe_free',true); if(vibe_validate($free)) $html ='<a href="'.get_permalink($lesson).'" class="ajax_unit">'.get_the_title($lesson).(vibe_validate($free)?'<span>'.__('FREE','vibe').'</span>':'').'</a>'; ?> <script> jQuery(document).ready(function(){ jQuery('.ajax_unit').magnificPopup({ type: 'ajax', alignTop: true, fixedContentPos: true, fixedBgPos: true, overflowY: 'auto', closeBtnInside: true, preloader: false, midClick: true, removalDelay: 300, mainClass: 'my-mfp-zoom-in', callbacks: { parseAjax: function(mfpResponse) { mfpResponse.data = jQuery(mfpResponse.data).find('.unit_wrap'); }, ajaxContentAdded: function() { // jQuery('video,audio').mediaelementplayer(); jQuery('.fitvids').fitVids(); jQuery('.tip').tooltip(); jQuery('.nav-tabs li:first a').tab('show'); jQuery('.nav-tabs li a').click(function(event){ event.preventDefault(); jQuery(this).tab('show'); }); } } }); }); </script> <style> .mfp-ajax-holder .mfp-content{max-width:720px;} </style> <?php return $html; } */
October 16, 2020 at 2:36 pm #318908spyboysSpectatorThis reply has been marked as private.October 17, 2020 at 2:52 pm #319135Anshuman SahuKeymasterThis reply has been marked as private.October 17, 2020 at 3:56 pm #319146spyboysSpectatorThank you so much -
AuthorPosts
Viewing 7 posts - 1 through 7 (of 7 total)
- The topic ‘open Free unit popup trouble!’ is closed to new replies.