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 | |
| /** | |
| * Class Ajax | |
| * | |
| * @package Tutor\Certificate\Builder | |
| * @author Themeum <[email protected]> | |
| * @license GPLv2 or later | |
| * @link https://www.themeum.com/product/tutor-lms/ | |
| * @since 1.0.0 |
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
| //need to replace 262-263 line with this code in the templates->course-course-list.php file | |
| <div class="tutor-course-loop-price"> | |
| <?php | |
| $course_id = get_the_ID(); | |
| $is_public = get_post_meta( $course_id, '_tutor_is_public_course', true )=='yes'; | |
| $enroll_btn = '<div class="tutor-public-course-start-learning">' . apply_filters( 'tutor_course_restrict_new_entry', '<a href="'. get_the_permalink(). '">' . __('Get Enrolled', 'tutor') . '</a>' ) . '</div>'; | |
| $default_price = apply_filters('tutor-loop-default-price', ($is_public ? '' : __('Free', 'tutor') )); | |
| $free_html = '<div class="price"> '.$default_price.$enroll_btn. '</div>'; | |
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
| //***Need to override tutor-course.php file from plugins-> tutor->templates-> shortcode | |
| <?php | |
| /** | |
| * @package TutorLMS/Templates | |
| * @version 1.4.3 | |
| */ | |
| $column_per_row = $GLOBALS['tutor_shortcode_arg']['column_per_row']; |
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
| /** | |
| * Enrolled Course Shortcode | |
| */ | |
| function tutor_enrolled_course_register_shortcodes() { | |
| add_shortcode( 'enrolled-course', 'shortcode_tutor_enrolled_course' ); | |
| } | |
| add_action( 'init', 'tutor_enrolled_course_register_shortcodes' ); | |
| /** |
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
| add_shortcode( 'sales', 'show_sales_by_product_id' ); | |
| function show_sales_by_product_id( $atts ) { | |
| $atts = shortcode_atts( array( | |
| 'id' => '' | |
| ), $atts ); | |
| $units_sold = get_post_meta( $atts['id'], 'total_sales', true ); | |
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
| { | |
| "categories": [ | |
| { | |
| "name": "Electronics", | |
| "slug": "", | |
| "description": "", | |
| "meta": "", | |
| "order": 0, | |
| "child":[ |
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
| # to initialize | |
| git init | |
| #Add the files in your new local repository. This stages them for the first commit | |
| git add . | |
| #Commit the files that you’ve staged in your local repository | |
| git commit -m "initial commit" | |
| #add the URL for the remote repository where your local repository will be pushed |
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
| #!/bin/bash | |
| i=2 | |
| while (( i++ < 1000 )); do | |
| cp ka1.txt "test$i.txt" | |
| done |
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
| #file acess permission | |
| chmod +x copy.sh |