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

Fix PHP Notices: #17

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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 chartbeat.php
Original file line number Diff line number Diff line change
Expand Up @@ -316,8 +316,8 @@ function add_chartbeat_config(){
<?php
$enable_newsbeat = get_option('chartbeat_enable_newsbeat');
if ($enable_newsbeat) { ?>
_sf_async_config.authors = "<?php echo esc_js($cb_configs["author"]); ?>";
_sf_async_config.sections = "<?php echo esc_js($cb_configs["sections"]); ?>";
_sf_async_config.authors = "<?php echo esc_js( isset( $cb_configs["author"] ) ? $cb_configs["author"] : '' ); ?>";
_sf_async_config.sections = "<?php echo esc_js( isset( $cb_configs["sections"] ) ? $cb_configs["sections"] : '' ); ?>";
<?php }

}
Expand All @@ -328,7 +328,7 @@ function add_chartbeat_footer() {

// if visitor is admin AND tracking is off, do not load chartbeat
if ( current_user_can( 'manage_options') && get_option('chartbeat_trackadmins') == 0)
return $analytics ;
return ;

?>
<script type="text/javascript">
Expand Down