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 | |
if ( !defined( 'ABSPATH' ) ) { | |
exit; | |
} | |
/* | |
* Plugin Name: BuddyForms VS Event List | |
* Description: BuddyForms VS Event List Integration | |
* Version: 0.1 | |
* Author: ThemeKraft |
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 | |
function my_buddyforms_excerpt_length($length){ | |
global $post, $buddyforms; | |
if( !isset($post->ID) ){ | |
return $length; | |
} |
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( 'buddyforms_update_form_title', 'buddyforms_update_form_title_user_id',9999, 3 ); | |
function buddyforms_update_form_title_user_id( $post_title, $form_slug, $post_id ) { | |
$post_title = str_replace('[post_id]', $post_id, $post_title); | |
// in here | |
$post = get_post($post_id); | |
$author_id = $post->post_author; | |
$post_title = str_replace('[author_id]', $author_id, $post_title); |
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 | |
/** | |
* Validate field Mobile Number | |
* @param string $key | |
* @param attay $array | |
* @param array $args | |
*/ | |
function um_custom_validate_invite_code( $key, $array, $args ) { | |
if(!function_exists('all_in_one_invite_codes_validate_code')){ |
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( 'buddyforms_update_form_title', 'buddyforms_add_id_to_subject', 9999 , 3 ); | |
function buddyforms_add_id_to_subject( $default_post_title, $form_slug, $post_id ){ | |
if($form_slug != 'simple-post-form'){ | |
return $default_post_title; | |
} | |
return $default_post_title . '-' . $post_id; |
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 | |
function buddyforms_redirect_a_page_to_the_buddypress_profile() { | |
if( is_page( 2 ) ) { | |
if(is_user_logged_in()){ | |
wp_safe_redirect( bp_loggedin_user_domain() ); | |
exit; | |
} | |
} | |
} |
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 | |
/** | |
* Enqueue GMW scripts outside the shortcode during page load. | |
* | |
* @return [type] [description] | |
*/ | |
function gmw_custom_load_sctips() { | |
GMW_Maps_API::load_scripts(); |
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( 'gmw_pt_search_query_args', 'buddyforms_geowp_data', 10, 2 ); | |
function buddyforms_geowp_data( $query_args, $form ) { | |
global $wp_querie; | |
// echo '<pre>'; | |
// print_r($query_args); | |
// echo '</pre>'; |
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 | |
/* | |
* Manipulate the user posts list query | |
*/ | |
add_filter( 'buddyforms_user_posts_query_args', 'my_buddyforms_user_posts_query_args', 10, 1 ); | |
function my_buddyforms_user_posts_query_args( $query_args ){ | |
global $buddyforms; | |
$query_args['cat'] = '4'; |
NewerOlder