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( 'ninja_forms_i18n_front_end', 'my_custom_ninja_forms_i18n_front_end' ); | |
| function my_custom_ninja_forms_i18n_front_end( $strings ) { | |
| $strings['validateRequiredField'] = 'this is my required field text'; | |
| return $strings; | |
| } |
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( 'igp_post_title', 'my_igp_post_title' ); | |
| function my_igp_post_title( $title ) { | |
| return $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
| #!/usr/bin/env bash | |
| if [[ -z "$TRAVIS" ]]; then | |
| echo "Script is only to be run by Travis CI" 1>&2 | |
| exit 1 | |
| fi | |
| if [[ -z "$WP_ORG_PASSWORD" ]]; then | |
| echo "WordPress.org password not set" 1>&2 | |
| exit 1 |
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 | |
| docker run -it quay.io/travisci/travis-php /bin/bash | |
| su - travis | |
| git clone https://github.com/deliciousbrains/mergebot-plugin.git | |
| npm install -g grunt-cli | |
| gem update --system && gem install compass | |
| export WP_ORG_PASSWORD=1234 | |
| composer self-update | |
| cd mergebot-plugin |
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( 'mergebot_excluded_queries', 'my_excluded_queries'); | |
| function my_excluded_queries( $queries ) { | |
| $my_queries = array( | |
| 'WHERE `option_name` = \'duplicate_post_version', | |
| 'VALUES \(\'duplicate_post_version', | |
| ); | |
| return array_merge( $queries, $my_queries ); |
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( 'igp_post_title', 'my_igp_post_title' ); | |
| function my_igp_post_title( $title ) { | |
| $delimiter = '||'; | |
| $title_parts = explode( $delimiter , $title ); | |
| return $title_parts[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
| <?php | |
| class Custom_NF_FU_Integrations_NinjaForms_MergeTags { | |
| /** | |
| * Custom_NF_FU_Integrations_NinjaForms_MergeTags constructor. | |
| */ | |
| public function __construct() { | |
| add_filter( 'ninja_forms_merge_tag_value_' . NF_FU_File_Uploads::TYPE, array( $this, 'merge_tag_value' ), 10, 2 ); | |
| } |
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( 'igp_template_caption_no_usernames', 'my_igp_template_first_hashtag' ); | |
| function my_igp_template_first_hashtag( $caption ) { | |
| if ( empty( $caption ) ) { | |
| return $caption; | |
| } | |
| $parts = explode( "#", $caption ); |
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 | |
| $form_data = false; | |
| if( isset( $_POST['formData'] ) ) { | |
| $form_data = json_decode( $_POST['formData'], TRUE ); | |
| if( ! $form_data ) { | |
| $this->_form_data = json_decode( stripslashes( $_POST['formData'] ), 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_filter( 'ninja_forms_uploads_dir', 'my_ninja_forms_uploads_dir' ); | |
| function my_ninja_forms_uploads_dir( $path ) { | |
| if ( substr( $path, -3) === 'tmp' ) { | |
| return $path; | |
| } | |
| return str_replace( '/ninja-forms', '/', $path ); | |
| } |