🤸♂️
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( 'psts_withdraw', 'psts_withdraw_cb', 10, 2 ); | |
add_action( 'psts_upgrade', 'psts_upgrade_cb', 10, 3 ); | |
add_action( 'psts_downgrade', 'psts_downgrade_cb', 10, 3 ); | |
function psts_withdraw_cb( $blog_id, $new_expire ) | |
{ | |
assign_membership_to_admins( $blog_id ); | |
} |
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 | |
// Running validation | |
$this->validate($request, [ | |
'user_id' => 'bail|required|integer|unique:users,user_id' | |
]); |
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( 'ms_model_event', 'my_event_handler', 10, 2 ); | |
/** | |
* Handles an event and process the correct communication if required. | |
* | |
* @param MS_Model_Event $event The event that is processed. | |
* @param mixed $data The data passed to the event handler. | |
*/ |
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( 'ms_model_relationship_create_ms_relationship_before', 'ms_controller_member_assign_memberships_done_cb', 99, 4 ); | |
function ms_controller_member_assign_memberships_done_cb( $membership_id, $user_id, $gateway_id, $move_from_id ) { | |
$user = new WP_User( $user_id ); | |
switch( $membership_id ){ | |
case 1343: | |
$user->set_role( 'editor' ); | |
break; | |
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
javascript | |
ES6ValidationInspection | |
JSAccessibilityCheckInspection | |
JSBitwiseOperatorUsageInspection | |
JSCheckFunctionSignaturesInspection | |
JSClosureCompilerSyntaxInspection | |
JSCommentMatchesSignatureInspection | |
JSComparisonWithNaNInspection | |
JSConsecutiveCommasInArrayLiteralInspection |
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
#!/bin/bash | |
if [[ $# -eq 0 ]] ; then | |
echo "Please enter a version number:" | |
read VERSION | |
else | |
VERSION=$1 | |
fi | |
if [[ -z "$VERSION" ]] ; then | |
echo "Sorry, I need a version number!" |