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 | |
// Update the geo location after save or update the post with buddyforms | |
add_action('buddyforms_after_save_post', 'my_buddyforms_gmw_update_location', 10, 1 ); | |
function my_buddyforms_gmw_update_location( $post_id ) { | |
//make sure we have post ID | |
if ( !$post_id ) | |
return; | |
//change meta_field_name to the BuddyForms Form Lelement SLUG of the address field |
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
{ | |
"name": "WWSC-WP-Connect", | |
"slug": "wwsc-wp-connect", | |
"version": "1.1.13", | |
"download_url": "http://buddyforms/wwsc-wp-connect.zip", | |
"homepage": "https://wwsc.de/", | |
"requires": "4.0", | |
"tested": "4.8", | |
"last_updated": "2017-01-01 16:17:00", | |
"upgrade_notice": "Here's why you should upgrade...", |
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_user_posts_query_args_posts_per_page', 'my_buddyforms_user_posts_query_args_posts_per_page', 10, 1 ); | |
function my_buddyforms_user_posts_query_args_posts_per_page( $posts_per_page ){ | |
return 3; | |
} |
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_wp_editor', 'buddyforms_support_siteorigin', 10, 2); | |
function buddyforms_support_siteorigin($wp_editor, $post_id){ | |
// First let us make sure the siteorigin_panels_render function exists | |
// Check if the editor content is created by siteorigin and overwrite the variable $wp_editor with a noice. | |
if (function_exists('siteorigin_panels_render') && siteorigin_panels_render( $post_id )){ | |
// Change this notice to your needs. | |
$wp_editor = 'This Post is Created with Site Origin Page Builder and can not get changed in the Frontend. How ever, you can still change all other form elements ;)'; |
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_wp_insert_post_args', 'my_buddyforms_wp_insert_post_args', 10, 2); | |
function my_buddyforms_wp_insert_post_args( $args, $forms_slug ){ | |
if( $forms_slug == 'FORM SLUG' ){ | |
$args['page_template'] = 'template-name.php'; | |
} | |
return $args; |
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_loop_template_name', 'my_buddyforms_loop_template_name' ); | |
function my_buddyforms_loop_template_name($templates){ | |
$templates['new-template'] = 'New Template'; | |
return $templates; | |
} |
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
jQuery(document).ready(function () { | |
var $instance = jQuery('.buddyforms-pin').easypin({ | |
init: '{"91":{"0":{"coords":{"lat":"303","long":"215.5"}},"canvas":{"src":"img/2011-12-18-23.51.12.jpg","width":"auto","height":"auto"}}}', | |
limit: 1, | |
exceeded: function(element) { | |
alert('You only able to create one pin at the time ;)'); | |
}, | |
responsive: 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
<select onchange="location = this.options[this.selectedIndex].value;"> | |
<option>Please select the form you like to use</option> | |
<option value="DOMAIN/PAGE/create/FORM1/">Form 1</option> | |
<option value="DOMAIN/PAGE/create/FORM2/">Form 2</option> | |
<option value="DOMAIN/PAGE/create/FORM3/">Form 3</option> | |
</select> |