Skip to content

Commit

Permalink
Move service handlers into independent directories & rename
Browse files Browse the repository at this point in the history
  • Loading branch information
joedolson committed Jan 26, 2025
1 parent 4d43869 commit 0127c99
Show file tree
Hide file tree
Showing 13 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@

<exclude-pattern>*/node_modules/*</exclude-pattern>
<exclude-pattern>*/vendor/*</exclude-pattern>
<exclude-pattern>*/classes/class-wp-oauth.php</exclude-pattern>
<exclude-pattern>*/services/x/class-wp-oauth.php</exclude-pattern>
</ruleset>
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
exit;
} // Exit if accessed directly.

require_once plugin_dir_path( __FILE__ ) . 'classes/class-wpt-bluesky-api.php';
require_once plugin_dir_path( __FILE__ ) . 'class-wpt-bluesky-api.php';

/**
* Upload media to Bluesky API.
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
exit;
} // Exit if accessed directly.

require_once plugin_dir_path( __FILE__ ) . 'classes/class-wpt-mastodon-api.php';
require_once plugin_dir_path( __FILE__ ) . 'class-wpt-mastodon-api.php';

/**
* Upload media to Mastodon API.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/wp-to-twitter-x.php → src/services/x/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ function wpt_oauth_connection( $auth = false, $api = '2' ) {
);
$client = new Client( $settings );
} else {
require_once plugin_dir_path( __FILE__ ) . 'classes/class-wpt-twitteroauth.php';
require_once plugin_dir_path( __FILE__ ) . 'class-wpt-twitteroauth.php';
$connection = new Wpt_TwitterOAuth( $ack, $acs, $ot, $ots );
$connection->useragent = get_option( 'blogname' ) . ' ' . home_url();
$client = $connection;
Expand Down
12 changes: 6 additions & 6 deletions src/wp-to-twitter.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,15 @@
require_once plugin_dir_path( __FILE__ ) . 'includes/ajax.php';
require_once plugin_dir_path( __FILE__ ) . 'wpt-functions.php';
// Service post handlers.
require_once plugin_dir_path( __FILE__ ) . 'wpt-post-to-twitter.php';
require_once plugin_dir_path( __FILE__ ) . 'wpt-post-to-mastodon.php';
require_once plugin_dir_path( __FILE__ ) . 'wpt-post-to-bluesky.php';
require_once plugin_dir_path( __FILE__ ) . 'services/x/post.php';
require_once plugin_dir_path( __FILE__ ) . 'services/mastodon/post.php';
require_once plugin_dir_path( __FILE__ ) . 'services/bluesky/post.php';
// URL Shortening.
require_once plugin_dir_path( __FILE__ ) . 'wp-to-twitter-shorteners.php';
// Service settings.
require_once plugin_dir_path( __FILE__ ) . 'wp-to-twitter-x.php';
require_once plugin_dir_path( __FILE__ ) . 'wp-to-twitter-mastodon.php';
require_once plugin_dir_path( __FILE__ ) . 'wp-to-twitter-bluesky.php';
require_once plugin_dir_path( __FILE__ ) . 'services/x/settings.php';
require_once plugin_dir_path( __FILE__ ) . 'services/mastodon/settings.php';
require_once plugin_dir_path( __FILE__ ) . 'services/bluesky/settings.php';
require_once plugin_dir_path( __FILE__ ) . 'wp-to-twitter-manager.php';
// Template generation.
require_once plugin_dir_path( __FILE__ ) . 'wpt-truncate.php';
Expand Down

0 comments on commit 0127c99

Please sign in to comment.