Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP 7.3+: avoid deprecated case-insensitive constant defines #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions events-and-bookings.php
Original file line number Diff line number Diff line change
Expand Up @@ -1564,7 +1564,7 @@ function eab_autoshow_map_off ( $opts ) {
return $opts;
}

define( 'EAB_PLUGIN_BASENAME', basename( dirname( __FILE__ ) ), true );
define( 'EAB_PLUGIN_BASENAME', basename( dirname( __FILE__ ) ) );
define( 'EAB_PLUGIN_DIR', trailingslashit( plugin_dir_path( __FILE__ ) ) );
define( 'EAB_PLUGIN_URL', trailingslashit( plugin_dir_url( __FILE__ ) ) );

Expand All @@ -1575,10 +1575,10 @@ function eab_autoshow_map_off ( $opts ) {


if ( !defined( 'EAB_OLD_EVENTS_EXPIRY_LIMIT' ) ) {
define( 'EAB_OLD_EVENTS_EXPIRY_LIMIT', 100, true );
define( 'EAB_OLD_EVENTS_EXPIRY_LIMIT', 100 );
}
if ( !defined( 'EAB_MAX_UPCOMING_EVENTS' ) ) {
define( 'EAB_MAX_UPCOMING_EVENTS', 500, true );
define( 'EAB_MAX_UPCOMING_EVENTS', 500 );
}

require_once EAB_PLUGIN_DIR . 'lib/class_eab_error_reporter.php';
Expand Down
2 changes: 1 addition & 1 deletion lib/class_eab_addon_handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
class Eab_AddonHandler {

private function __construct () {
define( 'EAB_PLUGIN_ADDONS_DIR', EAB_PLUGIN_DIR . 'lib/plugins', true );
define( 'EAB_PLUGIN_ADDONS_DIR', EAB_PLUGIN_DIR . 'lib/plugins' );
$this->_load_active_plugins();
}

Expand Down
2 changes: 1 addition & 1 deletion lib/class_eab_api.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public function enqueue_api_scripts () {
$this->_data->get_option('facebook-app_id')
) .
"';"));
define('EAB_INTERNAL_FLAG__FB_INIT_ADDED', true, true);
define('EAB_INTERNAL_FLAG__FB_INIT_ADDED', true);
}
}

Expand Down
4 changes: 2 additions & 2 deletions lib/class_eab_collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ class Eab_UpcomingWeeksCollection extends Eab_TimedCollection {
const WEEK_COUNT = 5;

public function __construct ($timestamp=false, $args=array()) {
if (!defined('EAB_COLLECTION_UPCOMING_WEEKS_COUNT')) define('EAB_COLLECTION_UPCOMING_WEEKS_COUNT', self::WEEK_COUNT, true);
if (!defined('EAB_COLLECTION_UPCOMING_WEEKS_COUNT')) define('EAB_COLLECTION_UPCOMING_WEEKS_COUNT', self::WEEK_COUNT);

Eab_Filter::start_date_ordering_set_up();
add_filter('eab-ordering-date_ordering_direction', array($this, 'propagate_direction_filter'));
Expand Down Expand Up @@ -346,7 +346,7 @@ class Eab_UpcomingWeeksArchiveCollection extends Eab_TimedCollection {
const WEEK_COUNT = 5;

public function __construct ($timestamp=false, $args=array()) {
if (!defined('EAB_COLLECTION_UPCOMING_WEEKS_COUNT')) define('EAB_COLLECTION_UPCOMING_WEEKS_COUNT', self::WEEK_COUNT, true);
if (!defined('EAB_COLLECTION_UPCOMING_WEEKS_COUNT')) define('EAB_COLLECTION_UPCOMING_WEEKS_COUNT', self::WEEK_COUNT);

Eab_Filter::start_date_ordering_set_up();
add_filter('eab-ordering-date_ordering_direction', array($this, 'propagate_direction_filter'));
Expand Down
2 changes: 1 addition & 1 deletion lib/default_filters.php
Original file line number Diff line number Diff line change
Expand Up @@ -372,4 +372,4 @@ private function _endpoint_add_to_optimized_cache ($cache) {
// End script concatenation

// Twitter delta threshold correction
define('EAB_OAUTH_TIMESTAMP_DELTA_THRESHOLD', 10, true);
define('EAB_OAUTH_TIMESTAMP_DELTA_THRESHOLD', 10);
4 changes: 2 additions & 2 deletions lib/plugins/eab-events-front_page_editing.php
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ function handle_editor_shortcode ($args=array(), $content='') {
if (!$this->_check_perms($event_id)) return false;
if (defined('EAB_EVENTS_FPE_ALREADY_HERE')) return $content;

define('EAB_EVENTS_FPE_ALREADY_HERE', true, true);
define('EAB_EVENTS_FPE_ALREADY_HERE', true);
return $this->_edit_event_form($event_id); // ... and YAY! for not being able to return wp_editor >.<
}

Expand All @@ -359,7 +359,7 @@ function the_editor_content ($content) {
$is_title = array_reduce($wp_current_filter, create_function('$ret,$val', 'return $ret ? true : preg_match("/title/", $val);'), false);
if ($is_excerpt || $is_head || $is_title) return $content;

define('EAB_EVENTS_FPE_ALREADY_HERE', true, true);
define('EAB_EVENTS_FPE_ALREADY_HERE', true);
return $this->_edit_event_form($event_id); // ... and YAY! for not being able to return wp_editor >.<
}

Expand Down