get_slug();
$open_addon_slug = fs_request_get( 'slug' );
$open_addon = false;
/**
* @var FS_Plugin[]
*/
$addons = $fs->get_addons();
$has_addons = ( is_array( $addons ) && 0 < count( $addons ) );
$has_tabs = $fs->_add_tabs_before_content();
?>
get_plugin_name() ) ) ?>
slug ) );
$price = 0;
$has_trial = false;
$has_free_plan = false;
$has_paid_plan = false;
$result = $fs->get_api_plugin_scope()->get( "/addons/{$addon->id}/pricing.json?type=visible" );
if ( ! isset( $result->error ) ) {
$plans = $result->plans;
if ( is_array( $plans ) && 0 < count( $plans ) ) {
foreach ( $plans as $plan ) {
if ( ! isset( $plan->pricing ) ||
! is_array( $plan->pricing ) ||
0 == count( $plan->pricing )
) {
// No pricing means a free plan.
$has_free_plan = true;
continue;
}
$has_paid_plan = true;
$has_trial = $has_trial || ( is_numeric( $plan->trial_period ) && ( $plan->trial_period > 0 ) );
$min_price = 999999;
foreach ( $plan->pricing as $pricing ) {
if ( ! is_null( $pricing->annual_price ) && $pricing->annual_price > 0 ) {
$min_price = min( $min_price, $pricing->annual_price );
} else if ( ! is_null( $pricing->monthly_price ) && $pricing->monthly_price > 0 ) {
$min_price = min( $min_price, 12 * $pricing->monthly_price );
}
}
if ( $min_price < 999999 ) {
$price = $min_price;
}
}
}
}
?>
-
',
esc_url( network_admin_url( 'plugin-install.php?tab=plugin-information&parent_plugin_id=' . $fs->get_id() . '&plugin=' . $addon->slug .
'&TB_iframe=true&width=600&height=550' ) ),
esc_attr( sprintf( fs_text_inline( 'More information about %s', 'more-information-about-x', $slug ), $addon->title ) ),
esc_attr( $addon->title )
);
?>
info ) ) {
$addon->info = new stdClass();
}
if ( ! isset( $addon->info->card_banner_url ) ) {
$addon->info->card_banner_url = '//dashboard.freemius.com/assets/img/marketing/blueprint-300x100.jpg';
}
if ( ! isset( $addon->info->short_description ) ) {
$addon->info->short_description = 'What\'s the one thing your add-on does really, really well?';
}
?>
- title ?>
-
0)
$descriptors[] = '$' . number_format( $price, 2 );
if ($has_trial)
$descriptors[] = fs_text_x_inline( 'Trial', 'trial period', 'trial', $slug );
echo implode(' - ', $descriptors) ?>
- info->short_description ) ? $addon->info->short_description : 'SHORT DESCRIPTION' ?>
_add_tabs_after_content();
}
$params = array(
'page' => 'addons',
'module_id' => $fs->get_id(),
'module_type' => $fs->get_module_type(),
'module_slug' => $slug,
'module_version' => $fs->get_plugin_version(),
);
fs_require_template( 'powered-by.php', $params );