style fix
This commit is contained in:
parent
055c22e9c3
commit
852634360b
3 changed files with 4 additions and 4 deletions
|
@ -133,7 +133,7 @@ function flush_rewrite_rules() {
|
||||||
*/
|
*/
|
||||||
function activate_plugin() {
|
function activate_plugin() {
|
||||||
if ( ! function_exists( 'get_plugin_data' ) ) {
|
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__ );
|
$plugin_data = \get_plugin_data( __FILE__ );
|
||||||
\add_option( 'activitypub_version', $plugin_data['Version'] );
|
\add_option( 'activitypub_version', $plugin_data['Version'] );
|
||||||
|
|
|
@ -205,7 +205,7 @@ class Admin {
|
||||||
public static function migrate_post_action() {
|
public static function migrate_post_action() {
|
||||||
if ( wp_verify_nonce( $_POST['nonce'], 'activitypub_migrate_actions' ) ) {
|
if ( wp_verify_nonce( $_POST['nonce'], 'activitypub_migrate_actions' ) ) {
|
||||||
\Activitypub\Tools\Posts::migrate_post( rawurldecode( $_POST['post_url'] ), absint( $_POST['post_author'] ) );
|
\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 {
|
} else {
|
||||||
$error = new WP_Error( 'nonce_failure', __( 'Unauthorized', 'activitypub' ) );
|
$error = new WP_Error( 'nonce_failure', __( 'Unauthorized', 'activitypub' ) );
|
||||||
wp_send_json_error( $error );
|
wp_send_json_error( $error );
|
||||||
|
|
|
@ -95,9 +95,9 @@ class Post {
|
||||||
),
|
),
|
||||||
trailingslashit( site_url() )
|
trailingslashit( site_url() )
|
||||||
);
|
);
|
||||||
|
|
||||||
$pretty_permalink = \get_post_meta( $post->ID, '_activitypub_permalink_compat', true );
|
$pretty_permalink = \get_post_meta( $post->ID, '_activitypub_permalink_compat', true );
|
||||||
|
|
||||||
if ( ! empty( $pretty_permalink ) ) {
|
if ( ! empty( $pretty_permalink ) ) {
|
||||||
$object_id = $pretty_permalink;
|
$object_id = $pretty_permalink;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue