Skip to content

Commit 5803f1b

Browse files
committed
remove legacy code
1 parent d831c43 commit 5803f1b

File tree

3 files changed

+4
-24
lines changed

3 files changed

+4
-24
lines changed

includes/class-webmention.php

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ public function init() {
5656
$this->register_hooks();
5757
$this->register_admin_hooks();
5858
$this->add_post_type_support();
59-
$this->unregister_legacy_hooks();
6059

6160
// Load language files.
6261
load_plugin_textdomain( self::TEXT_DOMAIN, false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
@@ -180,17 +179,4 @@ public function updated_postmeta( $meta_id, $object_id, $meta_key, $meta_value )
180179
\delete_post_meta( $object_id, 'webmentions_disabled' );
181180
}
182181
}
183-
184-
/**
185-
* Remove old Webmention/Semantic-Linkbacks code.
186-
*/
187-
public function unregister_legacy_hooks() {
188-
// remove old Webmention code.
189-
remove_action( 'init', array( '\WebMentionFormPlugin', 'init' ) );
190-
remove_action( 'init', array( '\WebMentionForCommentsPlugin', 'init' ) );
191-
192-
// remove old Semantic Linkbacks code
193-
remove_action( 'plugins_loaded', array( 'Semantic_Linkbacks_Plugin', 'init' ), 11 );
194-
remove_action( 'admin_init', array( 'Semantic_Linkbacks_Plugin', 'admin_init' ) );
195-
}
196182
}

tests/test-webmention.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
<?php
22
class Webmention_Test extends WP_UnitTestCase {
3-
public function test_remove_sl() {
4-
\Webmention\remove_semantic_linkbacks();
53

6-
$this->assertEquals( true, true );
7-
}
84
}

webmention.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414

1515
namespace Webmention;
1616

17-
use WP_CLI;
18-
1917
\define( 'WEBMENTION_VERSION', '5.3.3' );
2018

2119
\define( 'WEBMENTION_PLUGIN_DIR', \plugin_dir_path( __FILE__ ) );
@@ -30,10 +28,10 @@
3028
require_once __DIR__ . '/includes/debug.php';
3129
}
3230

33-
// Register the autoloader
31+
// Register the autoloader.
3432
Autoloader::register_path( __NAMESPACE__, __DIR__ . '/includes' );
3533

36-
// Initialize the plugin
34+
// Initialize the plugin.
3735
$webmention = Webmention::get_instance();
3836
$webmention->init();
3937

@@ -81,6 +79,6 @@ function get_plugin_meta( $default_headers = array() ) {
8179
}
8280

8381
// Check for CLI env, to add the CLI commands
84-
if ( defined( 'WP_CLI' ) && WP_CLI ) {
85-
WP_CLI::add_command( 'webmention', '\Webmention\Cli' );
82+
if ( \defined( 'WP_CLI' ) && \WP_CLI ) {
83+
\WP_CLI::add_command( 'webmention', '\Webmention\Cli' );
8684
}

0 commit comments

Comments
 (0)