Skip to content

Commit

Permalink
Merge pull request #17 from ThatGerber/hotfix
Browse files Browse the repository at this point in the history
Fixed issue where settings were not being called.
  • Loading branch information
chriswgerber committed Jul 6, 2015
2 parents fde31ab + 510a7c4 commit 35315df
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 17 deletions.
2 changes: 1 addition & 1 deletion includes/helper_functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}
Expand Down
30 changes: 15 additions & 15 deletions plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,31 @@
* 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
*
* @link http://www.chriswgerber.com/dfp-ads
* @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
Expand All @@ -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 );
Expand Down
4 changes: 4 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ Submit your questions at [chriswgerber.com/contact/](http://www.chriswgerber.com
<a name="Changelog"></a>
## Changelog

### 0.2.1

* Fixed issue where settings were not being called.

### 0.2.0

* Added functionality for importing DFP Ads
Expand Down
6 changes: 5 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 35315df

Please sign in to comment.