Skip to content

Commit

Permalink
deploy: 027555c
Browse files Browse the repository at this point in the history
  • Loading branch information
joedolson committed Feb 28, 2024
1 parent fe09654 commit fd85725
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions wp-to-twitter.php.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
exit;
}

$wpt_debug = get_option( 'wpt_debug_tweets', true );
$wpt_debug = get_option( 'wpt_debug_tweets', false );
define( 'WPT_DEBUG', $wpt_debug );
define( 'WPT_DEBUG_BY_EMAIL', false ); // Email debugging no longer default as of 3.3.0.
define( 'WPT_DEBUG_ADDRESS', get_option( 'admin_email' ) );
Expand All @@ -83,16 +83,16 @@
}
}

require_once( plugin_dir_path( __FILE__ ) . 'vendor_prefixed/vendor/scoper-autoload.php' );
require_once( plugin_dir_path( __FILE__ ) . 'wpt-functions.php' );
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__ ) . 'wp-to-twitter-oauth.php' );
require_once( plugin_dir_path( __FILE__ ) . 'wp-to-twitter-shorteners.php' );
require_once( plugin_dir_path( __FILE__ ) . 'wp-to-twitter-mastodon.php' );
require_once( plugin_dir_path( __FILE__ ) . 'wp-to-twitter-manager.php' );
require_once( plugin_dir_path( __FILE__ ) . 'wpt-truncate.php' );
require_once( plugin_dir_path( __FILE__ ) . 'wpt-rate-limiting.php' );
require_once plugin_dir_path( __FILE__ ) . 'vendor_prefixed/vendor/scoper-autoload.php';
require_once plugin_dir_path( __FILE__ ) . 'wpt-functions.php';
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__ ) . 'wp-to-twitter-oauth.php';
require_once plugin_dir_path( __FILE__ ) . 'wp-to-twitter-shorteners.php';
require_once plugin_dir_path( __FILE__ ) . 'wp-to-twitter-mastodon.php';
require_once plugin_dir_path( __FILE__ ) . 'wp-to-twitter-manager.php';
require_once plugin_dir_path( __FILE__ ) . 'wpt-truncate.php';
require_once plugin_dir_path( __FILE__ ) . 'wpt-rate-limiting.php';

global $wpt_version;
$wpt_version = '4.2.1';
Expand Down Expand Up @@ -705,24 +705,24 @@
/**
* For servers without PEAR normalize installed, approximates normalization. With normalizer, executes normalization on string.
*
* @param string $string Text to normalize.
* @param string $text Text to normalize.
*
* @return string Normalized text.
*/
function wpt_normalize( $string ) {
function wpt_normalize( $text ) {
if ( version_compare( PHP_VERSION, '5.0.0', '>=' ) && function_exists( 'normalizer_normalize' ) ) {
if ( normalizer_is_normalized( $string ) ) {
return $string;
if ( normalizer_is_normalized( $text ) ) {
return $text;
}

return normalizer_normalize( $string );
return normalizer_normalize( $text );
} else {
$normalizer = new WPT_Normalizer();
if ( $normalizer->is_normalized( $string ) ) {
return $string;
if ( $normalizer->is_normalized( $text ) ) {
return $text;
}

return $normalizer->normalize( $string );
return $normalizer->normalize( $text );
}
}

Expand Down Expand Up @@ -1138,7 +1138,7 @@
$first = true;
foreach ( $wpt_selected_users as $acct ) {
if ( wtt_oauth_test( $acct, 'verify' ) ) {
for ( $i = 1; $i <= $repeat; $i ++ ) {
for ( $i = 1; $i <= $repeat; $i++ ) {
$continue = apply_filters( 'wpt_allow_reposts', true, $i, $post_ID, $acct );
if ( $continue ) {
$retweet = apply_filters( 'wpt_set_retweet_text', $template, $i, $post_ID );
Expand Down Expand Up @@ -1356,7 +1356,7 @@
}
if ( mb_strlen( $newtag ) > 2 && ( mb_strlen( $newtag ) <= $max_characters ) && ( $i <= $max_tags ) ) {
$hashtags .= "$newtag ";
$i ++;
++$i;
}
}
}
Expand Down Expand Up @@ -1939,7 +1939,7 @@
* @return link new array.
*/
function wpt_plugin_action( $links, $file ) {
if ( plugin_basename( dirname( __FILE__ ) . '/wp-to-twitter.php' ) === $file ) {
if ( plugin_basename( __DIR__ . '/wp-to-twitter.php' ) === $file ) {
$admin_url = admin_url( 'admin.php?page=wp-tweets-pro' );
$links[] = "<a href='$admin_url'>" . __( 'XPoster Settings', 'wp-to-twitter' ) . '</a>';
}
Expand Down

0 comments on commit fd85725

Please sign in to comment.