From fd857258fc94712168aff05779bbf8f8e244610f Mon Sep 17 00:00:00 2001 From: joedolson Date: Wed, 28 Feb 2024 22:37:11 +0000 Subject: [PATCH] deploy: 027555cf917ad033e66831b60064fb24285cd069 --- wp-to-twitter.php.html | 44 +++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/wp-to-twitter.php.html b/wp-to-twitter.php.html index b9a1b4f..3f12aeb 100644 --- a/wp-to-twitter.php.html +++ b/wp-to-twitter.php.html @@ -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' ) ); @@ -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'; @@ -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 ); } } @@ -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 ); @@ -1356,7 +1356,7 @@ } if ( mb_strlen( $newtag ) > 2 && ( mb_strlen( $newtag ) <= $max_characters ) && ( $i <= $max_tags ) ) { $hashtags .= "$newtag "; - $i ++; + ++$i; } } } @@ -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>'; }