Skip to content

Commit

Permalink
Merge pull request #36 from WP-for-Church/dev
Browse files Browse the repository at this point in the history
Release 2.1.0
  • Loading branch information
Nikola Miljković authored Apr 19, 2017
2 parents 047e1d7 + 2d6bef6 commit 8656d5d
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 22 deletions.
4 changes: 2 additions & 2 deletions includes/fix-dates.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ public function getAction( $action ) {
*/
public function render_warning() {
?>
<div class="notice notice-error">
<div class="notice notice-error is-dismissible">
<p><strong>Important!</strong> Sermon Manager needs to check dates of old sermons.
<a href="<?php echo admin_url( 'edit.php?post_type=wpfc_sermon&page=' . basename( SERMON_MANAGER_PATH ) . '/includes/options.php#sermon-options-dates-fix' ); ?>">Click
here</a> if you want to do it now.</p>
Expand Down Expand Up @@ -191,7 +191,7 @@ public function fix() {
}
}
?>
<br>Done. Check right sidebar for details. <?php echo count( $dates ) ? 'Please click on "Fix All".' : ''; ?>
<br>Done. <?php echo count( $dates ) ? 'Please reload the page and click on "Fix All".' : 'No errors.'; ?>
</span><?php echo wpfc_console_zsh( '', false ); ?>
<?php
} else if ( $action === SM_DATES_FIX ) {
Expand Down
41 changes: 26 additions & 15 deletions includes/options.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,9 @@ function wpfc_sermon_options_render_form() {
}

.sm-box h3 {
text-align: center;
background: #f7f7f7;
border-bottom: 1px solid #efefef;
text-align: center;
background: #f7f7f7;
border-bottom: 1px solid #efefef;
}
</style>
<?php $sermon_settings = get_option( 'wpfc_options' );
Expand Down Expand Up @@ -228,10 +228,13 @@ function wpfc_sermon_options_render_form() {
<div class="inside">
<p><?php _e( 'Did you know you can get expert support for only $49 per year! <a href="https://wpforchurch.com/wordpress-plugins/sermon-manager/?utm_source=sermon-manager&utm_medium=wordpress" target="_blank">Sign up</a> today and get support from the developers who are building the Sermon Manager.', 'sermon-manager' ); ?></p>
<div style="text-align: center;">
<a href="https://wordpress.org/support/plugin/sermon-manager-for-wordpress" target="_blank" class="button-secondary">Free Support</a> <a href="mailto:help@wpforchurch.com" class="button-primary">Priority Support</a>
<a href="https://wordpress.org/support/plugin/sermon-manager-for-wordpress"
target="_blank" class="button-secondary">Free Support</a> <a
href="https://wpforchurch.com/my/clientarea.php" class="button-primary">Priority
Support</a>
</div>
<div style="text-align: center; font-size: 0.85em; padding: 0.7rem 0 0;">
<span>We offer limited free support via WordPress.org</span>
<span>We offer limited free support via WordPress.org</span>
</div>
</div>
</div>
Expand All @@ -241,13 +244,23 @@ function wpfc_sermon_options_render_form() {
<div class="inside">

<ul>
<li>- <a href="https://www.wpforchurch.com/my/knowledgebase/72/Getting-Started-with-Sermon-Manager-for-WordPress.html" title="" target="_blank">Getting Started with Sermon Manager</a></li>
<li>- <a href="https://www.wpforchurch.com/my/knowledgebase/75/Sermon-Manager-Shortcodes.html" title="Sermon Manager Shortcodes" target="_blank">Sermon Manager Shortcodes</a></li>
<li>- <a href="https://www.wpforchurch.com/my/knowledgebase/67/Troubleshooting-Sermon-Manager.html" title="Troubleshooting Sermon Manager" target="_blank">Troubleshooting Sermon Manager</a></li>
<li>- <a
href="https://www.wpforchurch.com/my/knowledgebase/72/Getting-Started-with-Sermon-Manager-for-WordPress.html"
title="" target="_blank">Getting Started with Sermon Manager</a></li>
<li>- <a
href="https://www.wpforchurch.com/my/knowledgebase/75/Sermon-Manager-Shortcodes.html"
title="Sermon Manager Shortcodes" target="_blank">Sermon Manager
Shortcodes</a></li>
<li>- <a
href="https://www.wpforchurch.com/my/knowledgebase/67/Troubleshooting-Sermon-Manager.html"
title="Troubleshooting Sermon Manager" target="_blank">Troubleshooting
Sermon Manager</a></li>
</ul>

<div style="text-align: center; font-size: 0.85em; padding: 0.4rem 0 0;">
<span>Find out more in our <a href="https://www.wpforchurch.com/my/knowledgebase.php" title="Knowledgebase" target="_blank">Knowledgebase</a></span>
<span>Find out more in our <a
href="https://www.wpforchurch.com/my/knowledgebase.php"
title="Knowledgebase" target="_blank">Knowledgebase</a></span>
</div>
</div>
</div>
Expand All @@ -259,7 +272,8 @@ function wpfc_sermon_options_render_form() {
<p><?php _e( 'If you have ideas on how to make Sermon Manager or any of our products better, let us know!', 'sermon-manager' ); ?></p>

<div style="text-align: center;">
<a href="https://feedback.userreport.com/05ff651b-670e-4eb7-a734-9a201cd22906/" target="_blank" class="button-secondary">Submit Your Idea</a>
<a href="https://feedback.userreport.com/05ff651b-670e-4eb7-a734-9a201cd22906/"
target="_blank" class="button-secondary">Submit Your Idea</a>
</div>
</div>
</div>
Expand Down Expand Up @@ -615,7 +629,7 @@ function wpfc_sermon_options_render_form() {
<p><?php _e( 'For more info on PodTrac or to sign up for an account, visit <a href=http://podtrac.com>podtrac.com</a>', 'sermon-manager' ); ?></p>
</td>
</tr>

</table>

<br/>
Expand Down Expand Up @@ -662,7 +676,7 @@ function wpfc_sermon_options_render_form() {
<a class="button-primary"
href="<?php echo admin_url( 'edit.php?post_type=wpfc_sermon&page=' . basename( SERMON_MANAGER_PATH ) . '/includes/options.php' ) . '&fix_dates=check#sermon-options-dates-fix' ?>">Check
dates for errors</a>
<a class="button-primary <?php echo ! get_option( 'wpfc_sm_dates_checked', 0 ) || $_GET['fix_dates'] !== 'check' || get_option( 'wpfc_sm_dates_all_fixed', true ) ? 'disabled' : ''; ?>"
<a class="button-primary <?php echo ! get_option( 'wpfc_sm_dates_checked', 0 ) || ( isset( $_GET['fix_dates'] ) && $_GET['fix_dates'] !== 'check' ) || get_option( 'wpfc_sm_dates_all_fixed', true ) ? 'disabled' : ''; ?>"
href="<?php echo admin_url( 'edit.php?post_type=wpfc_sermon&page=' . basename( SERMON_MANAGER_PATH ) . '/includes/options.php' ) . '&fix_dates=fix#sermon-options-dates-fix' ?>">Fix
All</a>
<a class="button-secondary disabled" href="">Revert fix</a>
Expand Down Expand Up @@ -692,9 +706,6 @@ function wpfc_console_zsh( $command = '', $close_span = true ) {
<?php do_action( 'wpfc_fix_dates' ); ?>
</span>
</div>
<div class="console-explanation">* Note: This is not a real console. It's
made for humorous puroposes.
</div>
</div>
<div class="damage-report">
<div class="main-errors">
Expand Down
4 changes: 2 additions & 2 deletions includes/template-tags.php
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ function wpfc_render_audio( $url = '' ) {
return '';
}

$output = '<audio controls>';
$output = '<audio controls preload="none">';
$output .= '<source src="' . $url . '">';
$output .= '</audio>';

Expand Down Expand Up @@ -377,7 +377,7 @@ function wpfc_sermon_attachments() {
}
}
if ( get_wpfc_sermon_meta( 'sermon_audio' ) ) {
$html .= '<a href="' . get_wpfc_sermon_meta( 'sermon_audio' ) . '" class="sermon-attachments"><span class="dashicons dashicons-media-audio" download="true"></span>' . __( 'MP3', 'sermon-manager' ) . '</a>';
$html .= '<a href="' . get_wpfc_sermon_meta( 'sermon_audio' ) . '" class="sermon-attachments" download="true"><span class="dashicons dashicons-media-audio"></span>' . __( 'MP3', 'sermon-manager' ) . '</a>';
}
if ( get_wpfc_sermon_meta( 'sermon_notes' ) ) {
$html .= '<a href="' . get_wpfc_sermon_meta( 'sermon_notes' ) . '" class="sermon-attachments"><span class="dashicons dashicons-media-document"></span>' . __( 'Notes', 'sermon-manager' ) . '</a>';
Expand Down
1 change: 1 addition & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ Visit the [plugin homepage](https://wpforchurch.com/wordpress-plugins/sermon-man
* Add date fixing feature - should fix most of date-related bugs
* Add a new player for MP3 files
* Add PodTrac Support (thanks @reykroona)
* Add warning if user is using PHP version less than 5.6.0
* Simplify shortcodes

= 2.0.8 =
Expand Down
21 changes: 18 additions & 3 deletions sermons.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,16 @@
Domain Path: /languages/
*/

if ( ! defined( 'ABSPATH' ) ) {
exit;
} // Exit if accessed directly
defined( 'ABSPATH' ) or die;

// Fail safe version check for PHP <5.6.0.
if ( version_compare( PHP_VERSION, '5.6.0', '<' ) ) {
if ( is_admin() ) {
add_action( 'admin_notices', 'wpfc_sm_php_version_warning' );
}

return;
}

// define some basic stuff
define( 'SERMON_MANAGER_PATH', plugin_dir_path( __FILE__ ) );
Expand Down Expand Up @@ -253,3 +260,11 @@ function sm_instance() {
return SermonManager::get_instance();

}


function wpfc_sm_php_version_warning()
{
echo '<div class="error"><p>';
echo sprintf("You are running PHP %s, but Sermon Manager needs at least PHP %s to run.", PHP_VERSION, '5.6.0');
echo '</p></div>';
}

0 comments on commit 8656d5d

Please sign in to comment.