Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/wp-conte.../plugins/content-.../inc/freemius/includes
File: class-freemius.php
[23000] Fix | Delete
$is_network_action = $this->is_network_level_action();
[23001] Fix | Delete
$blog_id = $this->is_network_level_site_specific_action();
[23002] Fix | Delete
$is_parent_plugin_action = ( $plugin_id == $this->get_id() );
[23003] Fix | Delete
[23004] Fix | Delete
if ( is_numeric( $blog_id ) ) {
[23005] Fix | Delete
$this->switch_to_blog( $blog_id );
[23006] Fix | Delete
} else {
[23007] Fix | Delete
$blog_id = '';
[23008] Fix | Delete
}
[23009] Fix | Delete
[23010] Fix | Delete
switch ( $action ) {
[23011] Fix | Delete
case 'opt_in':
[23012] Fix | Delete
check_admin_referer( trim( "{$action}:{$blog_id}:{$install_id}", ':' ) );
[23013] Fix | Delete
[23014] Fix | Delete
if ( $is_parent_plugin_action ) {
[23015] Fix | Delete
if ( $is_network_action && ! empty( $blog_id ) ) {
[23016] Fix | Delete
if ( ! $this->is_registered() ) {
[23017] Fix | Delete
$this->install_with_user(
[23018] Fix | Delete
$this->get_network_user(),
[23019] Fix | Delete
false,
[23020] Fix | Delete
false,
[23021] Fix | Delete
false,
[23022] Fix | Delete
false
[23023] Fix | Delete
);
[23024] Fix | Delete
[23025] Fix | Delete
$this->_admin_notices->add(
[23026] Fix | Delete
$this->get_text_inline( 'Site successfully opted in.', 'successful-opt-in' ),
[23027] Fix | Delete
$this->get_text_inline( 'Awesome', 'awesome' )
[23028] Fix | Delete
);
[23029] Fix | Delete
}
[23030] Fix | Delete
}
[23031] Fix | Delete
}
[23032] Fix | Delete
break;
[23033] Fix | Delete
[23034] Fix | Delete
case 'toggle_tracking':
[23035] Fix | Delete
check_admin_referer( trim( "{$action}:{$blog_id}:{$install_id}", ':' ) );
[23036] Fix | Delete
[23037] Fix | Delete
if ( $is_parent_plugin_action ) {
[23038] Fix | Delete
if ( $is_network_action && ! empty( $blog_id ) ) {
[23039] Fix | Delete
if ( $this->is_registered( true ) ) {
[23040] Fix | Delete
if ( $this->is_tracking_prohibited( $blog_id ) ) {
[23041] Fix | Delete
if ( $this->toggle_site_tracking( true, $blog_id ) ) {
[23042] Fix | Delete
$this->_admin_notices->add(
[23043] Fix | Delete
sprintf( $this->get_text_inline( 'Sharing diagnostic data with %s helps to provide functionality that\'s more relevant to your website, avoid WordPress or PHP version incompatibilities that can break your website, and recognize which languages & regions the plugin should be translated and tailored to.', 'opt-out-message-appreciation' ), "<b>{$this->get_plugin_title()}</b>" ),
[23044] Fix | Delete
$this->get_text_inline( 'Thank you!', 'thank-you' )
[23045] Fix | Delete
);
[23046] Fix | Delete
}
[23047] Fix | Delete
} else {
[23048] Fix | Delete
if ( $this->toggle_site_tracking( false, $blog_id ) ) {
[23049] Fix | Delete
$install = $this->get_install_by_blog_id( $blog_id );
[23050] Fix | Delete
[23051] Fix | Delete
$this->_admin_notices->add(
[23052] Fix | Delete
sprintf(
[23053] Fix | Delete
$this->get_text_inline( 'Diagnostic data will no longer be sent from %s to %s.', 'opted-out-successfully' ),
[23054] Fix | Delete
self::get_unfiltered_site_url( $blog_id, true ),
[23055] Fix | Delete
"<b>{$this->get_plugin_title()}</b>"
[23056] Fix | Delete
)
[23057] Fix | Delete
);
[23058] Fix | Delete
}
[23059] Fix | Delete
}
[23060] Fix | Delete
}
[23061] Fix | Delete
}
[23062] Fix | Delete
}
[23063] Fix | Delete
[23064] Fix | Delete
break;
[23065] Fix | Delete
[23066] Fix | Delete
case 'delete_account':
[23067] Fix | Delete
check_admin_referer( trim( "{$action}:{$blog_id}:{$install_id}", ':' ) );
[23068] Fix | Delete
[23069] Fix | Delete
$is_network_deletion = $is_network_action && empty( $blog_id );
[23070] Fix | Delete
[23071] Fix | Delete
if ( $is_parent_plugin_action ) {
[23072] Fix | Delete
// Delete add-on installs if have any.
[23073] Fix | Delete
$installed_addons = $this->get_installed_addons();
[23074] Fix | Delete
foreach ( $installed_addons as $fs_addon ) {
[23075] Fix | Delete
if ( $is_network_deletion ) {
[23076] Fix | Delete
$fs_addon->delete_network_account_event();
[23077] Fix | Delete
} else {
[23078] Fix | Delete
$fs_addon->delete_account_event();
[23079] Fix | Delete
}
[23080] Fix | Delete
}
[23081] Fix | Delete
[23082] Fix | Delete
if ( $is_network_deletion ) {
[23083] Fix | Delete
$this->delete_network_account_event();
[23084] Fix | Delete
} else {
[23085] Fix | Delete
$this->delete_account_event();
[23086] Fix | Delete
}
[23087] Fix | Delete
[23088] Fix | Delete
// Clear user and site.
[23089] Fix | Delete
$this->_site = null;
[23090] Fix | Delete
$this->_user = null;
[23091] Fix | Delete
[23092] Fix | Delete
$this->maybe_set_slug_and_network_menu_exists_flag();
[23093] Fix | Delete
[23094] Fix | Delete
fs_redirect( $this->get_activation_url() );
[23095] Fix | Delete
} else {
[23096] Fix | Delete
if ( $this->is_addon_activated( $plugin_id ) ) {
[23097] Fix | Delete
$fs_addon = self::get_instance_by_id( $plugin_id );
[23098] Fix | Delete
[23099] Fix | Delete
if ( $is_network_deletion ) {
[23100] Fix | Delete
$fs_addon->delete_network_account_event();
[23101] Fix | Delete
} else {
[23102] Fix | Delete
$fs_addon->delete_account_event();
[23103] Fix | Delete
}
[23104] Fix | Delete
[23105] Fix | Delete
fs_redirect( $this->_get_admin_page_url( 'account' ) );
[23106] Fix | Delete
}
[23107] Fix | Delete
}
[23108] Fix | Delete
[23109] Fix | Delete
return;
[23110] Fix | Delete
[23111] Fix | Delete
case 'downgrade_account':
[23112] Fix | Delete
if ( is_numeric( $blog_id ) ) {
[23113] Fix | Delete
check_admin_referer( trim( "{$action}:{$blog_id}:{$install_id}", ':' ) );
[23114] Fix | Delete
} else {
[23115] Fix | Delete
check_admin_referer( $action );
[23116] Fix | Delete
}
[23117] Fix | Delete
[23118] Fix | Delete
$switch_to_network_install_blog_after_cancellation = (
[23119] Fix | Delete
is_numeric( $blog_id ) &&
[23120] Fix | Delete
$plugin_id == $this->get_id() &&
[23121] Fix | Delete
! $this->is_trial()
[23122] Fix | Delete
);
[23123] Fix | Delete
[23124] Fix | Delete
$result = $this->cancel_subscription_or_trial( $plugin_id );
[23125] Fix | Delete
if ( $this->is_api_error( $result ) ) {
[23126] Fix | Delete
$this->_admin_notices->add(
[23127] Fix | Delete
$result->error->message,
[23128] Fix | Delete
$this->get_text_x_inline( 'Oops', 'exclamation', 'oops' ) . '...',
[23129] Fix | Delete
'error'
[23130] Fix | Delete
);
[23131] Fix | Delete
}
[23132] Fix | Delete
[23133] Fix | Delete
if ( $switch_to_network_install_blog_after_cancellation ) {
[23134] Fix | Delete
$this->switch_to_blog( $this->_storage->network_install_blog_id );
[23135] Fix | Delete
}
[23136] Fix | Delete
[23137] Fix | Delete
return;
[23138] Fix | Delete
[23139] Fix | Delete
case 'activate_license':
[23140] Fix | Delete
check_admin_referer( trim( "{$action}:{$blog_id}:{$install_id}", ':' ) );
[23141] Fix | Delete
[23142] Fix | Delete
$fs = $this;
[23143] Fix | Delete
if ( $plugin_id != $this->get_id() ) {
[23144] Fix | Delete
$fs = $this->is_addon_activated( $plugin_id ) ?
[23145] Fix | Delete
self::get_instance_by_id( $plugin_id ) :
[23146] Fix | Delete
null;
[23147] Fix | Delete
}
[23148] Fix | Delete
[23149] Fix | Delete
if ( is_object( $fs ) ) {
[23150] Fix | Delete
$fs->_activate_license();
[23151] Fix | Delete
[23152] Fix | Delete
/**
[23153] Fix | Delete
* Remove the product ID from `$_REQUEST` so that the syncing of the license for the other products will work properly.
[23154] Fix | Delete
*
[23155] Fix | Delete
* @author Leo Fajardo (@leorw)
[23156] Fix | Delete
* @since 2.4.0
[23157] Fix | Delete
*/
[23158] Fix | Delete
unset( $_REQUEST['plugin_id'] );
[23159] Fix | Delete
[23160] Fix | Delete
if ( $this->is_bundle_license_auto_activation_enabled() ) {
[23161] Fix | Delete
$fs->maybe_activate_bundle_license( null, array(), is_numeric( $blog_id ) ? $blog_id : 0 );
[23162] Fix | Delete
}
[23163] Fix | Delete
}
[23164] Fix | Delete
[23165] Fix | Delete
return;
[23166] Fix | Delete
[23167] Fix | Delete
case 'deactivate_license':
[23168] Fix | Delete
check_admin_referer( trim( "{$action}:{$blog_id}:{$install_id}", ':' ) );
[23169] Fix | Delete
[23170] Fix | Delete
if ( $plugin_id == $this->get_id() ) {
[23171] Fix | Delete
$this->_deactivate_license();
[23172] Fix | Delete
[23173] Fix | Delete
if ( $this->is_only_premium() ) {
[23174] Fix | Delete
// Clear user and site.
[23175] Fix | Delete
$this->_site = null;
[23176] Fix | Delete
$this->_user = null;
[23177] Fix | Delete
[23178] Fix | Delete
if ( ! $is_network_action ) {
[23179] Fix | Delete
fs_redirect( $this->get_activation_url() );
[23180] Fix | Delete
} else if ( is_numeric( $blog_id ) ) {
[23181] Fix | Delete
$this->switch_to_blog( $this->_storage->network_install_blog_id );
[23182] Fix | Delete
}
[23183] Fix | Delete
}
[23184] Fix | Delete
} else {
[23185] Fix | Delete
if ( $this->is_addon_activated( $plugin_id ) ) {
[23186] Fix | Delete
$fs_addon = self::get_instance_by_id( $plugin_id );
[23187] Fix | Delete
$fs_addon->_deactivate_license();
[23188] Fix | Delete
}
[23189] Fix | Delete
}
[23190] Fix | Delete
[23191] Fix | Delete
return;
[23192] Fix | Delete
[23193] Fix | Delete
case 'check_updates':
[23194] Fix | Delete
check_admin_referer( $action );
[23195] Fix | Delete
$this->check_updates();
[23196] Fix | Delete
[23197] Fix | Delete
return;
[23198] Fix | Delete
[23199] Fix | Delete
case 'change_owner':
[23200] Fix | Delete
$state = fs_request_get( 'state', 'init' );
[23201] Fix | Delete
switch ( $state ) {
[23202] Fix | Delete
case 'init':
[23203] Fix | Delete
// The nonce is injected by the error handler in `_email_address_update_ajax_handler` function.
[23204] Fix | Delete
check_admin_referer( 'change_owner' );
[23205] Fix | Delete
[23206] Fix | Delete
$candidate_email = fs_request_get( 'candidate_email' );
[23207] Fix | Delete
$transfer_type = fs_request_get( 'transfer_type' );
[23208] Fix | Delete
[23209] Fix | Delete
if ( $this->init_change_owner( $candidate_email, $transfer_type ) ) {
[23210] Fix | Delete
if ( 'transfer' === $transfer_type ) {
[23211] Fix | Delete
$this->_admin_notices->add( sprintf( $this->get_text_inline( 'A confirmation email was just sent to %s. The email owner must confirm the update within the next 4 hours.', 'change-owner-request-sent-x-transfer' ), '<b>' . $this->_user->email . '</b>' ) );
[23212] Fix | Delete
} else {
[23213] Fix | Delete
$this->_admin_notices->add( sprintf( $this->get_text_inline( 'A confirmation email was just sent to %s. You must confirm the update within the next 4 hours. If you cannot find the email, please check your spam folder.', 'change-owner-request-sent-x' ), '<b>' . $this->_user->email . '</b>' ) );
[23214] Fix | Delete
}
[23215] Fix | Delete
}
[23216] Fix | Delete
break;
[23217] Fix | Delete
case 'owner_confirmed':
[23218] Fix | Delete
// We cannot (or need not to) check the nonce and referer here, because the link comes from the email sent by our API.
[23219] Fix | Delete
$candidate_email = fs_request_get( 'candidate_email', '' );
[23220] Fix | Delete
[23221] Fix | Delete
if ( ! is_email($candidate_email ) ) {
[23222] Fix | Delete
return;
[23223] Fix | Delete
}
[23224] Fix | Delete
[23225] Fix | Delete
$this->_admin_notices->add( sprintf( $this->get_text_inline( 'Thanks for confirming the ownership change. An email was just sent to %s for final approval.', 'change-owner-request_owner-confirmed' ), '<b>' . $candidate_email . '</b>' ) );
[23226] Fix | Delete
break;
[23227] Fix | Delete
case 'candidate_confirmed':
[23228] Fix | Delete
// We do not need to validate the authenticity of this request here, because the `complete_change_owner` does that for us through API calls.
[23229] Fix | Delete
if ( $this->complete_change_owner() ) {
[23230] Fix | Delete
$this->_admin_notices->add_sticky(
[23231] Fix | Delete
sprintf( $this->get_text_inline( '%s is the new owner of the account.', 'change-owner-request_candidate-confirmed' ), '<b>' . $this->_user->email . '</b>' ),
[23232] Fix | Delete
'ownership_changed',
[23233] Fix | Delete
$this->get_text_x_inline( 'Congrats', 'as congratulations', 'congrats' ) . '!'
[23234] Fix | Delete
);
[23235] Fix | Delete
} else {
[23236] Fix | Delete
// @todo Handle failed ownership change message.
[23237] Fix | Delete
}
[23238] Fix | Delete
break;
[23239] Fix | Delete
}
[23240] Fix | Delete
[23241] Fix | Delete
return;
[23242] Fix | Delete
[23243] Fix | Delete
case 'update_user_name':
[23244] Fix | Delete
check_admin_referer( 'update_user_name' );
[23245] Fix | Delete
[23246] Fix | Delete
$result = $this->update_user_name();
[23247] Fix | Delete
[23248] Fix | Delete
if ( isset( $result->error ) ) {
[23249] Fix | Delete
$this->_admin_notices->add(
[23250] Fix | Delete
$this->get_text_inline( 'Please provide your full name.', 'name-update-failed-message' ),
[23251] Fix | Delete
$oops_text,
[23252] Fix | Delete
'error'
[23253] Fix | Delete
);
[23254] Fix | Delete
} else {
[23255] Fix | Delete
$this->_admin_notices->add( $this->get_text_inline( 'Your name was successfully updated.', 'name-updated-message' ) );
[23256] Fix | Delete
}
[23257] Fix | Delete
[23258] Fix | Delete
return;
[23259] Fix | Delete
[23260] Fix | Delete
#region Actions that might be called from external links (e.g. email)
[23261] Fix | Delete
[23262] Fix | Delete
/**
[23263] Fix | Delete
* !!IMPORTANT!!: We cannot check for a valid nonce in this region, because the links could be coming from emails.
[23264] Fix | Delete
*/
[23265] Fix | Delete
[23266] Fix | Delete
case 'cancel_trial':
[23267] Fix | Delete
$result = $this->cancel_subscription_or_trial( $plugin_id );
[23268] Fix | Delete
if ( $this->is_api_error( $result ) ) {
[23269] Fix | Delete
$this->_admin_notices->add(
[23270] Fix | Delete
$result->error->message,
[23271] Fix | Delete
$this->get_text_x_inline( 'Oops', 'exclamation', 'oops' ) . '...',
[23272] Fix | Delete
'error'
[23273] Fix | Delete
);
[23274] Fix | Delete
}
[23275] Fix | Delete
[23276] Fix | Delete
return;
[23277] Fix | Delete
[23278] Fix | Delete
case 'verify_email':
[23279] Fix | Delete
$this->verify_email();
[23280] Fix | Delete
[23281] Fix | Delete
return;
[23282] Fix | Delete
[23283] Fix | Delete
case 'sync_user':
[23284] Fix | Delete
$this->_handle_account_user_sync();
[23285] Fix | Delete
[23286] Fix | Delete
return;
[23287] Fix | Delete
[23288] Fix | Delete
case $this->get_unique_affix() . '_sync_license':
[23289] Fix | Delete
$this->_sync_license();
[23290] Fix | Delete
[23291] Fix | Delete
return;
[23292] Fix | Delete
[23293] Fix | Delete
case 'download_latest':
[23294] Fix | Delete
$this->download_latest_directly( $plugin_id );
[23295] Fix | Delete
[23296] Fix | Delete
return;
[23297] Fix | Delete
[23298] Fix | Delete
#endregion
[23299] Fix | Delete
}
[23300] Fix | Delete
[23301] Fix | Delete
if ( WP_FS__IS_POST_REQUEST ) {
[23302] Fix | Delete
$properties = array( 'site_secret_key', 'site_id', 'site_public_key' );
[23303] Fix | Delete
foreach ( $properties as $p ) {
[23304] Fix | Delete
if ( 'update_' . $p === $action ) {
[23305] Fix | Delete
check_admin_referer( $action );
[23306] Fix | Delete
[23307] Fix | Delete
$this->_logger->log( $action );
[23308] Fix | Delete
[23309] Fix | Delete
$site_property = substr( $p, strlen( 'site_' ) );
[23310] Fix | Delete
$site_property_value = fs_request_get( 'fs_' . $p . '_' . $this->get_unique_affix(), '' );
[23311] Fix | Delete
$this->get_site()->{$site_property} = $site_property_value;
[23312] Fix | Delete
[23313] Fix | Delete
// Store account after modification.
[23314] Fix | Delete
$this->_store_site();
[23315] Fix | Delete
[23316] Fix | Delete
$this->do_action( 'account_property_edit', 'site', $site_property, $site_property_value );
[23317] Fix | Delete
[23318] Fix | Delete
$this->_admin_notices->add( sprintf(
[23319] Fix | Delete
/* translators: %s: User's account property (e.g. email address, name) */
[23320] Fix | Delete
$this->get_text_inline( 'You have successfully updated your %s.', 'x-updated' ),
[23321] Fix | Delete
'<b>' . str_replace( '_', ' ', $p ) . '</b>'
[23322] Fix | Delete
) );
[23323] Fix | Delete
[23324] Fix | Delete
return;
[23325] Fix | Delete
}
[23326] Fix | Delete
}
[23327] Fix | Delete
}
[23328] Fix | Delete
}
[23329] Fix | Delete
[23330] Fix | Delete
/**
[23331] Fix | Delete
* Adds CSS classes for the body tag in the admin.
[23332] Fix | Delete
*
[23333] Fix | Delete
* @param string $classes Space-separated string of class names.
[23334] Fix | Delete
*
[23335] Fix | Delete
* @return string $classes FS Admin body tag class names.
[23336] Fix | Delete
*/
[23337] Fix | Delete
public function fs_addons_body_class( $classes ) {
[23338] Fix | Delete
$classes .= ' plugins-php';
[23339] Fix | Delete
return $classes;
[23340] Fix | Delete
}
[23341] Fix | Delete
[23342] Fix | Delete
/**
[23343] Fix | Delete
* Account page resources load.
[23344] Fix | Delete
*
[23345] Fix | Delete
* @author Vova Feldman (@svovaf)
[23346] Fix | Delete
* @since 1.0.6
[23347] Fix | Delete
*/
[23348] Fix | Delete
function _account_page_load() {
[23349] Fix | Delete
$this->_logger->entrance();
[23350] Fix | Delete
[23351] Fix | Delete
$this->_logger->info( var_export( $_REQUEST, true ) );
[23352] Fix | Delete
[23353] Fix | Delete
fs_enqueue_local_style( 'fs_account', '/admin/account.css' );
[23354] Fix | Delete
[23355] Fix | Delete
if ( $this->has_addons() ) {
[23356] Fix | Delete
wp_enqueue_script( 'plugin-install' );
[23357] Fix | Delete
add_thickbox();
[23358] Fix | Delete
add_filter( 'admin_body_class', array( $this, 'fs_addons_body_class' ) );
[23359] Fix | Delete
}
[23360] Fix | Delete
[23361] Fix | Delete
if ( $this->has_paid_plan() &&
[23362] Fix | Delete
! $this->has_any_license() &&
[23363] Fix | Delete
! $this->is_sync_executed() &&
[23364] Fix | Delete
$this->is_tracking_allowed()
[23365] Fix | Delete
) {
[23366] Fix | Delete
/**
[23367] Fix | Delete
* If no licenses found and no sync job was executed during the last 24 hours,
[23368] Fix | Delete
* just execute the sync job right away (blocking execution).
[23369] Fix | Delete
*
[23370] Fix | Delete
* @since 1.1.7.3
[23371] Fix | Delete
*/
[23372] Fix | Delete
$this->run_manual_sync();
[23373] Fix | Delete
}
[23374] Fix | Delete
[23375] Fix | Delete
$this->_handle_account_edits();
[23376] Fix | Delete
[23377] Fix | Delete
if (
[23378] Fix | Delete
is_object( $this->_license ) &&
[23379] Fix | Delete
$this->_license->user_id == $this->_user->id &&
[23380] Fix | Delete
! $this->is_whitelabeled( true )
[23381] Fix | Delete
) {
[23382] Fix | Delete
$this->_admin_notices->add(
[23383] Fix | Delete
sprintf(
[23384] Fix | Delete
$this->get_text_inline( "Is this your client's site? %s if you wish to hide sensitive info like your email, license key, prices, billing address & invoices from the WP Admin.", 'license_not_whitelabeled' ),
[23385] Fix | Delete
sprintf(
[23386] Fix | Delete
'<a href="#" class="fs-toggle-whitelabel-mode">%s</a>',
[23387] Fix | Delete
$this->get_text_inline( 'Click here', 'click-here' )
[23388] Fix | Delete
)
[23389] Fix | Delete
),
[23390] Fix | Delete
'',
[23391] Fix | Delete
'success',
[23392] Fix | Delete
false,
[23393] Fix | Delete
'license_not_whitelabeled'
[23394] Fix | Delete
);
[23395] Fix | Delete
}
[23396] Fix | Delete
[23397] Fix | Delete
$this->do_action( 'account_page_load_before_departure' );
[23398] Fix | Delete
}
[23399] Fix | Delete
[23400] Fix | Delete
/**
[23401] Fix | Delete
* Renders the "Affiliation" page.
[23402] Fix | Delete
*
[23403] Fix | Delete
* @author Leo Fajardo (@leorw)
[23404] Fix | Delete
* @since 1.2.3
[23405] Fix | Delete
*/
[23406] Fix | Delete
function _affiliation_page_render() {
[23407] Fix | Delete
$this->_logger->entrance();
[23408] Fix | Delete
[23409] Fix | Delete
$this->fetch_affiliate_and_terms();
[23410] Fix | Delete
[23411] Fix | Delete
fs_enqueue_local_style( 'fs_affiliation', '/admin/affiliation.css' );
[23412] Fix | Delete
[23413] Fix | Delete
$is_bundle_context = $this->has_bundle_context();
[23414] Fix | Delete
[23415] Fix | Delete
$plugin_title = $this->get_plugin_title();
[23416] Fix | Delete
[23417] Fix | Delete
if ( $is_bundle_context ) {
[23418] Fix | Delete
$plugin_title = $this->plugin_affiliate_terms->plugin_title;
[23419] Fix | Delete
[23420] Fix | Delete
// Add the suffix "Bundle" only if the word is not present in the title itself.
[23421] Fix | Delete
if ( false === mb_stripos( $plugin_title, fs_text_inline( 'Bundle', 'bundle' ) ) ) {
[23422] Fix | Delete
$plugin_title = $this->apply_filters(
[23423] Fix | Delete
'formatted_bundle_title',
[23424] Fix | Delete
$plugin_title . ' ' . fs_text_inline( 'Bundle', 'bundle' )
[23425] Fix | Delete
);
[23426] Fix | Delete
}
[23427] Fix | Delete
}
[23428] Fix | Delete
[23429] Fix | Delete
$vars = array(
[23430] Fix | Delete
'id' => $this->_module_id,
[23431] Fix | Delete
'plugin_title' => $plugin_title,
[23432] Fix | Delete
);
[23433] Fix | Delete
echo $this->apply_filters( "/forms/affiliation.php", fs_get_template( '/forms/affiliation.php', $vars ) );
[23434] Fix | Delete
}
[23435] Fix | Delete
[23436] Fix | Delete
[23437] Fix | Delete
/**
[23438] Fix | Delete
* Render account page.
[23439] Fix | Delete
*
[23440] Fix | Delete
* @author Vova Feldman (@svovaf)
[23441] Fix | Delete
* @since 1.0.0
[23442] Fix | Delete
*/
[23443] Fix | Delete
function _account_page_render() {
[23444] Fix | Delete
$this->_logger->entrance();
[23445] Fix | Delete
[23446] Fix | Delete
$template = 'account.php';
[23447] Fix | Delete
$vars = array( 'id' => $this->_module_id );
[23448] Fix | Delete
[23449] Fix | Delete
/**
[23450] Fix | Delete
* Added filter to the template to allow developers wrapping the template
[23451] Fix | Delete
* in custom HTML (e.g. within a wizard/tabs).
[23452] Fix | Delete
*
[23453] Fix | Delete
* @author Vova Feldman (@svovaf)
[23454] Fix | Delete
* @since 1.2.1.6
[23455] Fix | Delete
*/
[23456] Fix | Delete
echo $this->apply_filters( "templates/{$template}", fs_get_template( $template, $vars ) );
[23457] Fix | Delete
}
[23458] Fix | Delete
[23459] Fix | Delete
/**
[23460] Fix | Delete
* Render account connect page.
[23461] Fix | Delete
*
[23462] Fix | Delete
* @author Vova Feldman (@svovaf)
[23463] Fix | Delete
* @since 1.0.7
[23464] Fix | Delete
*/
[23465] Fix | Delete
function _connect_page_render() {
[23466] Fix | Delete
$this->_logger->entrance();
[23467] Fix | Delete
[23468] Fix | Delete
$vars = array( 'id' => $this->_module_id );
[23469] Fix | Delete
[23470] Fix | Delete
/**
[23471] Fix | Delete
* Added filter to the template to allow developers wrapping the template
[23472] Fix | Delete
* in custom HTML (e.g. within a wizard/tabs).
[23473] Fix | Delete
*
[23474] Fix | Delete
* @author Vova Feldman (@svovaf)
[23475] Fix | Delete
* @since 1.2.1.6
[23476] Fix | Delete
*/
[23477] Fix | Delete
echo $this->apply_filters( 'templates/connect.php', fs_get_template( 'connect.php', $vars ) );
[23478] Fix | Delete
}
[23479] Fix | Delete
[23480] Fix | Delete
/**
[23481] Fix | Delete
* Load required resources before add-ons page render.
[23482] Fix | Delete
*
[23483] Fix | Delete
* @author Vova Feldman (@svovaf)
[23484] Fix | Delete
* @since 1.0.6
[23485] Fix | Delete
*/
[23486] Fix | Delete
function _addons_page_load() {
[23487] Fix | Delete
$this->_logger->entrance();
[23488] Fix | Delete
[23489] Fix | Delete
fs_enqueue_local_style( 'fs_addons', '/admin/add-ons.css' );
[23490] Fix | Delete
[23491] Fix | Delete
wp_enqueue_script( 'plugin-install' );
[23492] Fix | Delete
add_thickbox();
[23493] Fix | Delete
add_filter( 'admin_body_class', array( $this, 'fs_addons_body_class' ) );
[23494] Fix | Delete
[23495] Fix | Delete
if ( ! $this->is_registered() && $this->is_org_repo_compliant() ) {
[23496] Fix | Delete
$this->_admin_notices->add(
[23497] Fix | Delete
sprintf( $this->get_text_inline( 'Just letting you know that the add-ons information of %s is being pulled from an external server.', 'addons-info-external-message' ), '<b>' . $this->get_plugin_name() . '</b>' ),
[23498] Fix | Delete
$this->get_text_x_inline( 'Heads up', 'advance notice of something that will need attention.', 'heads-up' ),
[23499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function