View bulk-transfer-gh-issues.sh
This file contains 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
gh issue list -s all -L 500 --json number | \ | |
jq -r '.[] | .number' | \ | |
xargs -I% gh issue transfer % https://github.com/<destination repo> |
View console.save.js
This file contains 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
(function(console){ | |
console.save = function(data, filename){ | |
if(!data) { | |
console.error('Console.save: No data'); | |
return; | |
} | |
if(!filename) filename = 'console.json'; |
View wpforms-display-form-under-confirmation.php
This file contains 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( | |
'wpforms_frontend_output_success', | |
static function ( $form_data, $fields, $entry_id ) { | |
unset( | |
$_GET['wpforms_return'], | |
$_POST['wpforms']['id'] | |
); |
View wpforms-remove-single-entry-page-sections.php
This file contains 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 | |
/** | |
* This code removes all sections on a single entry page in the admin area. | |
* Methods names in the remove_action() function call are self explanatory. | |
* Comment out or remove those lines which sections you want to show. | |
*/ | |
// Main content area. | |
add_action( 'wpforms_entry_details_content', static function ( $entry, $form_data, $single_entry ) { |
View expose.php
This file contains 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 | |
// phpcs:ignoreFile | |
define( 'EXPOSED_DOMAIN', 'example.sharedwithexpose.com' ); | |
// Load only if we are running under Expose. | |
if ( empty( $_SERVER['HTTP_X_ORIGINAL_HOST'] ) || $_SERVER['HTTP_X_ORIGINAL_HOST'] !== EXPOSED_DOMAIN ) { | |
return; | |
} |
View wpforms-new-smarttag-current-time.php
This file contains 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 | |
// Register the smart tag. | |
add_filter( 'wpforms_smart_tags', static function( $tags ) { | |
// Key is the tag, value is the tag name. | |
$tags['current_time'] = 'Current Date/Time'; | |
return $tags; | |
} ); |
View wpforms-field-description-notification-emails.php
This file contains 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 | |
// HTML Email. | |
add_filter( 'wpforms_html_field_value', static function ( $field_val, $field, $form_data, $context ) { | |
if ( $context !== 'email-html' ) { | |
return $field_val; | |
} | |
if ( empty( $form_data['fields'][ $field['id'] ] ) ) { |
View wp-mail-smtp-authtype-login.php
This file contains 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( 'wp_mail_smtp_custom_options', function( $phpmailer ) { | |
$phpmailer->AuthType = 'LOGIN'; | |
return $phpmailer; | |
} ); |
View wpforms-merge-field-values.php
This file contains 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( 'wpforms_entry_save_data', static function ( $fields, $entry, $form_data ) { | |
$value1 = ''; | |
$value2 = ''; | |
// These are field IDs to take data from, and to merge into. | |
$field1_id = 1; | |
$field2_id = 2; |
NewerOlder