Last active
February 1, 2022 07:58
-
-
Save janboddez/d1574bc217f7c0498ccdced6116ae430 to your computer and use it in GitHub Desktop.
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( 'after_micropub', function( $input, $wp_args ) { | |
if ( empty( $wp_args['ID'] ) || empty( $input['properties']['bookmark-of'][0] ) ) { | |
// Micropub request did not involve a (bookmark) post. | |
return; | |
} | |
set_post_format( $wp_args['ID'], 'link' ); | |
}, 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment