style fix

This commit is contained in:
Django Doucet 2022-10-31 14:59:43 -06:00
parent 055c22e9c3
commit 852634360b
3 changed files with 4 additions and 4 deletions

View file

@ -133,7 +133,7 @@ function flush_rewrite_rules() {
*/
function activate_plugin() {
if ( ! function_exists( 'get_plugin_data' ) ) {
require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
require_once ABSPATH . 'wp-admin/includes/plugin.php';
}
$plugin_data = \get_plugin_data( __FILE__ );
\add_option( 'activitypub_version', $plugin_data['Version'] );

View file

@ -205,7 +205,7 @@ class Admin {
public static function migrate_post_action() {
if ( wp_verify_nonce( $_POST['nonce'], 'activitypub_migrate_actions' ) ) {
\Activitypub\Tools\Posts::migrate_post( rawurldecode( $_POST['post_url'] ), absint( $_POST['post_author'] ) );
\delete_post_meta( \url_to_postid( $_POST['post_url'] ), '_activitypub_permalink_compat' );
\delete_post_meta( \url_to_postid( $_POST['post_url'] ), '_activitypub_permalink_compat' );
} else {
$error = new WP_Error( 'nonce_failure', __( 'Unauthorized', 'activitypub' ) );
wp_send_json_error( $error );

View file

@ -95,9 +95,9 @@ class Post {
),
trailingslashit( site_url() )
);
$pretty_permalink = \get_post_meta( $post->ID, '_activitypub_permalink_compat', true );
if ( ! empty( $pretty_permalink ) ) {
$object_id = $pretty_permalink;
}