Skip to content

Commit

Permalink
Merge pull request #32 from moderntribe/fix/39832-include-community-t…
Browse files Browse the repository at this point in the history
…ickets

Include Community Tickets
  • Loading branch information
bordoni committed Nov 16, 2015
2 parents 2219fda + 1b067a1 commit f53f07c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 8 deletions.
27 changes: 20 additions & 7 deletions src/Tribe/Admin/Help_Page.php
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,14 @@ public function get_addons( $plugin = null, $is_active = null, $is_important = n
'is_active' => class_exists( 'Tribe__Tickets_Plus__Main' ),
);

$addons['event-community-tickets'] = array(
'id' => 'event-community-tickets',
'title' => esc_html__( 'Event Community Tickets', 'tribe-common' ),
'link' => '@todo',
'plugin' => array( 'event-tickets' ),
'is_active' => class_exists( 'Tribe__Events__Community__Tickets__Main' ),
);

/**
* Filter the array of premium addons upsold on the sidebar of the Settings > Help tab
*
Expand Down Expand Up @@ -851,15 +859,20 @@ public function print_plugin_box( $plugin ) {
<h3><?php esc_html_e( 'Premium Add-Ons', 'tribe-common' ); ?></h3>
<ul class='tribe-list-addons'>
<?php foreach ( $addons as $addon ) {
echo '<li class="' . ( isset( $addon['is_active'] ) && $addon['is_active'] ? 'tribe-active-addon' : '' ) . '">';
if ( isset( $addon['link'] ) ) {
echo '<a href="' . esc_url( $addon['link'] ) . '" target="_blank">';
$addon = (object) $addon;

if ( isset( $addon->is_active ) && $addon->is_active ) {
$active_title = __( 'Plugin Active', 'tribe-common' );
} else {
$active_title = __( 'Plugin Inactive', 'tribe-common' );
}
echo esc_html( $addon['title'] );
if ( isset( $addon['coming_soon'] ) ) {
echo is_string( $addon['coming_soon'] ) ? ' ' . $addon['coming_soon'] : ' ' . esc_html__( '(Coming Soon!)', 'tribe-common' );

echo '<li title="' . esc_attr( $active_title ) . '" class="' . ( isset( $addon->is_active ) && $addon->is_active ? 'tribe-active-addon' : '' ) . '">';
if ( isset( $addon->link ) ) {
echo '<a href="' . esc_url( $addon->link ) . '" title="' . esc_attr__( 'Visit the Add-on Page', 'tribe-common' ) . '" target="_blank">';
}
if ( isset( $addon['link'] ) ) {
echo esc_html( $addon->title );
if ( isset( $addon->link ) ) {
echo '</a>';
}
echo '</li>';
Expand Down
2 changes: 1 addition & 1 deletion src/admin-views/tribe-options-help.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
), 10 );

// By default these three will be gathered
$help->add_section_content( 'extra-help', __( 'Please note that all hands-on support is provided via the forums. You can email or tweet at us… ​but we will probably point you back to the forums 😄.', 'tribe-common' ), 40 );
$help->add_section_content( 'extra-help', __( 'Please note that all hands-on support is provided via the forums. You can email or tweet at us… ​but we will probably point you back to the forums 😄', 'tribe-common' ), 40 );
$help->add_section_content( 'extra-help', '<div style="text-align: right;"><a href="http://m.tri.be/18ji" target="_blank" class="button">' . __( 'Read more about our support policy', 'tribe-common' ) . '</a></div>', 40 );

// Creates the System Info section
Expand Down

0 comments on commit f53f07c

Please sign in to comment.