daily pastebin goal
34%
SHARE
TWEET

Untitled

a guest Jul 21st, 2018 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. add_filter("the_content", "learndash_course_grid_css");
  2. function learndash_course_grid_css( $content ) {
  3.     if (
  4.            strpos( $content, "[ld_course_list" ) === false
  5.         && strpos( $content, "[ld_lesson_list" ) === false
  6.         && strpos( $content, "[ld_quiz_list" )   === false
  7.         && strpos( $content, "[ld_topic_list" )  === false
  8.     ) {
  9.         return $content;
  10.     }
  11.  
  12.     wp_enqueue_style( 'learndash_course_grid_css', plugins_url( 'style.css', __FILE__ ) );
  13.     wp_enqueue_script( 'learndash_course_grid_js', plugins_url( 'script.js', __FILE__ ), array('jquery' ) );
  14.     wp_enqueue_style( 'ld-cga-bootstrap', plugins_url( 'bootstrap.min.css', __FILE__ ) );
  15.    
  16.     return preg_replace( '/(.*\[ld_\w+_list.*)/', '<div id="ld_course_list">$1</div>', $content );
  17. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top