From 510a7c4e1481144a19e6770d22b1d3e04de56a5f Mon Sep 17 00:00:00 2001 From: "Chris W. Gerber" Date: Mon, 6 Jul 2015 08:44:14 -0500 Subject: [PATCH] Fixed issue where settings were not being called. --- includes/helper_functions.php | 2 +- plugin.php | 30 +++++++++++++++--------------- readme.md | 4 ++++ readme.txt | 6 +++++- 4 files changed, 25 insertions(+), 17 deletions(-) diff --git a/includes/helper_functions.php b/includes/helper_functions.php index 9934f22..2552560 100644 --- a/includes/helper_functions.php +++ b/includes/helper_functions.php @@ -231,7 +231,7 @@ function dfp_get_url() { * @return array|string|int|bool */ function dfp_get_settings_value( $setting ) { - $option_array = get_option( 'DFP_Ad_Positions' ); + $option_array = get_option( 'DFP_Ads_Settings' ); return $option_array[$setting]; } diff --git a/plugin.php b/plugin.php index ea1a32f..154bd11 100644 --- a/plugin.php +++ b/plugin.php @@ -12,8 +12,8 @@ * License URI: http://www.gnu.org/licenses/gpl-2.0.txt * Text Domain: dfp-ads * Github Plugin URI: https://github.com/ThatGerber/dfp-ads - * GitHub Branch: master - * Version: 0.2.0 + * GitHub Branch: stable + * Version: 0.2.1 * * The Plugin File * @@ -21,22 +21,22 @@ * @since 0.0.1 * @subpackage DFP-Ads */ -define( 'EPG_AD_PLUGIN_VER', '0.2.0' ); +define( 'EPG_AD_PLUGIN_VER', '0.2.1' ); /* Autoload */ require_once 'vendor/autoload.php'; /* Library */ -include( 'includes/helper_functions.php' ); -include( 'includes/abstract.dfp_ads_form.php' ); -include( 'includes/class.dfp_ads.php' ); -include( 'includes/class.dfp_ads_post_type.php' ); -include( 'includes/class.dfp_ads_input.php' ); -include( 'includes/class.dfp_ad_position.php' ); -include( 'includes/class.dfp_ads_settings_form.php' ); -include( 'includes/class.dfp_ads_import_form.php' ); -include( 'includes/class.dfp_ads_admin.php' ); -include( 'widget/widget.ad_position.php' ); +include 'includes/helper_functions.php'; +include 'includes/abstract.dfp_ads_form.php'; +include 'includes/class.dfp_ads.php'; +include 'includes/class.dfp_ads_post_type.php'; +include 'includes/class.dfp_ads_input.php'; +include 'includes/class.dfp_ad_position.php'; +include 'includes/class.dfp_ads_settings_form.php'; +include 'includes/class.dfp_ads_import_form.php'; +include 'includes/class.dfp_ads_admin.php'; +include 'widget/widget.ad_position.php'; /* * Initialization for Post Type @@ -62,13 +62,13 @@ /* Begin creating the new ads objects */ $dfp_ads = new DFP_Ads(); $dfp_ads->dir_uri = plugins_url( null, __FILE__ ); -$dfp_ads->set_account_id( dfp_get_settings_value( 'dfp_property_code' ) ); // = '/35190362/'; +$dfp_ads->set_account_id( dfp_get_settings_value( 'dfp_property_code' ) ); /* * Enqueues the styles and scripts into WordPress. When this action runs * it also will grab all of the positions and other filtered in information */ -add_action( 'wp_enqueue_scripts', array($dfp_ads, 'scripts_and_styles') ); +add_action( 'wp_enqueue_scripts', array( $dfp_ads, 'scripts_and_styles' ) ); /* Sets Menu Position. Default 20 */ add_filter( 'dfp_ads_menu_position', ( function( $pos ) { return 79; }), 10 ); diff --git a/readme.md b/readme.md index bd87208..f36b8aa 100644 --- a/readme.md +++ b/readme.md @@ -85,6 +85,10 @@ Submit your questions at [chriswgerber.com/contact/](http://www.chriswgerber.com ## Changelog +### 0.2.1 + +* Fixed issue where settings were not being called. + ### 0.2.0 * Added functionality for importing DFP Ads diff --git a/readme.txt b/readme.txt index 6d215af..217f518 100644 --- a/readme.txt +++ b/readme.txt @@ -1,6 +1,6 @@ === DFP Ad Manager === -Stable tag: trunk +Stable tag: 0.2.1 Contributors: chriswgerber Requires at least: 3.0.0 Tested up to: 4.2.2 @@ -56,6 +56,10 @@ Submit your questions at [chriswgerber.com/contact/](http://www.chriswgerber.com == Changelog == += 0.2.1 + +* Fixed issue where settings were not being called. + = 0.2.0 * Added functionality for importing DFP Ads