Skip to content
This repository has been archived by the owner on Aug 25, 2021. It is now read-only.

Commit

Permalink
Merge pull request #96 from jannejava/master
Browse files Browse the repository at this point in the history
Fix error-notice if current_screen is null
  • Loading branch information
MWDelaney committed Dec 12, 2014
2 parents 61b9758 + 39d21c0 commit b8fac3e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions includes/actions-filters.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function bootstrap_shortcodes_styles_all() {

function bootstrap_shortcodes_help_styles() {
$screen = get_current_screen();
if($screen->parent_base != "gf_edit_forms") {
if($screen != null && $screen->parent_base != "gf_edit_forms") {
wp_register_style( 'bs-font', plugins_url( 'bootstrap-3-shortcodes/includes/help/bs-font.css' ) );
wp_register_style( 'bootstrap-shortcodes-help', plugins_url( 'bootstrap-3-shortcodes/includes/help/css/bootstrap-shortcodes-help.css' ) );
wp_register_style( 'bootstrap-modal', plugins_url( 'bootstrap-3-shortcodes/includes/help/css/bootstrap-modal.css' ) );
Expand All @@ -32,7 +32,7 @@ function bootstrap_shortcodes_help_styles() {
//action to add a custom button to the content editor
function add_bootstrap_button() {
$screen = get_current_screen();
if($screen->parent_base != "gf_edit_forms") {
if($screen != null && $screen->parent_base != "gf_edit_forms") {
//the id of the container I want to show in the popup
$popup_id = 'bootstrap-shortcodes-help';

Expand Down

0 comments on commit b8fac3e

Please sign in to comment.