Created
August 1, 2018 07:04
-
-
Save mahbubme/b9a1677a41f401b5af892805adb42cb4 to your computer and use it in GitHub Desktop.
Create sticky post with WP User Frontend post form
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 wpuf_stick_post( $post_id ) { | |
$form_id = $_POST['form_id']; | |
if ( $form_id == 19102 ) { | |
stick_post($post_id); | |
} | |
} | |
add_action( 'wpuf_add_post_after_insert', 'wpuf_stick_post' ); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment