-
Hi,
I’ll refer your tip and paste this code in my plugin editor –>
wplms_customizer.phpadd_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; }
But its came like this https://prnt.sc/v0388u please solve this problem and i want like this https://prnt.sc/v0398d
hi
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; } */
Viewing 7 posts - 1 through 7 (of 7 total)
The topic ‘open Free unit popup trouble!’ is closed to new replies.