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
/** | |
* Assign users to forums upon registration | |
*/ | |
function sc_user_activate_forum( $user_id ) { | |
$current_user = get_user_by( 'ID', $user_id ); | |
// Subscribe to forums in listed IDs | |
if ( groups_is_user_member( $user_id, 7 ) ) { | |
$forum_ids = array( | |
997, | |
1070, |
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
.idea | |
.sql | |
.zip | |
.tar | |
.gz | |
/* | |
!.gitignore |
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
/** | |
* Set password by field value | |
*/ | |
function set_password_from_field( $user_id, $feed, $entry, $user_pass ) { | |
$form_id = rgar( $entry, 'form_id' ); | |
// set field id | |
if ( '4' === $form_id ) { | |
wp_set_password( $entry[11], $user_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
add_filter('use_block_editor_for_post', '__return_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
function sc_rewrite_url( $rewrite ) { | |
$rewrite = str_replace( 'domain.local/wp-content/uploads/', 'domain.com/wp-content/uploads/', $rewrite ); | |
return $rewrite; | |
} | |
add_filter( 'wp_get_attachment_url', 'sc_rewrite_url' ); | |
add_filter( 'wp_calculate_image_srcset_meta', function() { return 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 | |
function comment_recipients( $emails, $comment_id ){ | |
$recipient_email = array( | |
'[email protected]', | |
'[email protected]' | |
); | |
return $recipient_email; | |
} | |
add_filter( 'comment_notification_recipients', 'comment_recipients', 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 | |
////////////////// | |
// CHANGE HOWDY // | |
////////////////// | |
function change_howdy( $wp_admin_bar ) { | |
$my_account = $wp_admin_bar->get_node('my-account'); | |
$newtext = str_replace( 'Howdy,', 'Hi,', $my_account->title ); | |
$wp_admin_bar->add_node( 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
////////////////////////////// | |
// CHANGE COMMENT RECIPIENT // | |
////////////////////////////// | |
function override_comment_notice( $emails, $comment_id ) { | |
$emails = array('[email protected]', '[email protected]'); | |
return $emails; | |
} |
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
///////////////////////////// | |
// ENFOLD FORM CUSTOM FROM // | |
///////////////////////////// | |
function avf_form_from_mod($from, $new_post, $form_params) { | |
$from = "[email protected]"; | |
return $from; | |
} |
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
////////////////////////////////////////// | |
// CHANGE DEFAULT WP EMAIL FROM ADDRESS // | |
////////////////////////////////////////// | |
function wp_send_email( $original_email_address ) { | |
return '[email protected]'; | |
} | |
add_filter( 'wp_mail_from', 'wp_send_email' ); | |
/////////////////////////////////////// |