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 | |
| add_filter( 'bp_user_query_uid_clauses', 'filtering_memberpress', 10, 2 ); | |
| /** | |
| * Filtering only users with an active memebership | |
| * @param $sql array | |
| * @param $query BP_User_Query | |
| * @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
| <?php | |
| add_action( 'wp_enqueue_scripts', 'child_theme_styles' ); | |
| function child_theme_styles() { | |
| wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' ); | |
| } |
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 | |
| /** | |
| * League Table Class | |
| * | |
| * The SportsPress league table class handles individual league table data. | |
| * | |
| * @class SP_League_Table | |
| * @version 2.3 | |
| * @package SportsPress/Classes | |
| * @category Class |
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 | |
| /** | |
| * Checkout Form | |
| * | |
| * This template can be overridden by copying it to yourtheme/woocommerce/checkout/form-checkout.php. | |
| * | |
| * HOWEVER, on occasion WooCommerce will need to update template files and you | |
| * (the theme developer) will need to copy the new files to your theme to | |
| * maintain compatibility. We try to do this as little as possible, but it does | |
| * happen. When this occurs the version of the template file will be bumped and |
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 | |
| //Add Custom WP Rewrite Rule to add taxo to link for Courses CPT | |
| function resources_cpt_generating_rule( $wp_rewrite ) { | |
| $rules = array(); | |
| $terms = get_terms( array( | |
| ‘taxonomy’ => ‘cours_topic’, | |
| ‘hide_empty’ => false, | |
| )); |
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 | |
| // Front | |
| add_action( 'wp_enqueue_scripts', 'repeater_field_enqueue' ); | |
| // Admin | |
| add_action( 'admin_enqueue_scripts', 'repeater_field_enqueue' ); | |
| function repeater_field_enqueue() { | |
| wp_enqueue_script( 'repeater-js', plugin_dir_url( __FILE__ ) . 'assets/js/repeater.js', array( 'jquery', 'wp-util' ), '', 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
| <?php | |
| add_action( 'admin_init', 'ibenic_get_all_posts_shortcodes' ); | |
| function ibenic_get_all_posts_shortcodes() { | |
| if( isset( $_REQUEST['get_shortcodes'] ) ) { | |
| // Our code will go here | |
| die(); | |
| } | |
| } |
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
| const path = require('path'); | |
| module.exports = { | |
| entry: './src/index.js', | |
| output: { | |
| filename: 'bundle.js', | |
| path: path.resolve(__dirname, 'dist') | |
| } | |
| }; |
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 | |
| /** | |
| * Get all integrations. If there are any integrations, the array will be: | |
| * array( | |
| * 'integration_slug' => 'My_Integration_Class' | |
| * ) | |
| */ | |
| $integrations = apply_filters( 'my_plugin_integrations', array() ); |