Skip to content

Commit

Permalink
Merge pull request #1 from itthinx/pre-1.1.0
Browse files Browse the repository at this point in the history
version 1.1.0
  • Loading branch information
itthinx authored Mar 11, 2019
2 parents 352f83f + 8dcff30 commit fb01ba8
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 13 deletions.
2 changes: 1 addition & 1 deletion COPYRIGHT.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

The Affiliates BuddyPress Wordpress Plugin

Copyright 2016 - 2017 "kento" (Karim Rahimpur) www.itthinx.com
Copyright 2016 - 2019 "kento" (Karim Rahimpur) www.itthinx.com

The files COPYRIGHT.txt and LICENSE.txt as well as ALL NOTICES IN THE
HEADERS OF ALL FILES MUST BE KEPT INTACT.
Expand Down
17 changes: 9 additions & 8 deletions affiliates-buddypress.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* affiliates-buddypress.php
*
* Copyright (c) 2016 - 2017 "kento" Karim Rahimpur www.itthinx.com
* Copyright (c) 2016 - 2019 "kento" Karim Rahimpur www.itthinx.com
*
* This code is released under the GNU General Public License.
* See COPYRIGHT.txt and LICENSE.txt.
Expand All @@ -23,10 +23,10 @@
* Plugin Name: Affiliates BuddyPress
* Plugin URI: http://www.itthinx.com/plugins/affiliates-buddypress
* Description: Affiliates integration with BuddyPress that allows to display affiliate content in the BuddyPress user profile.
* Version: 1.0.2
* Version: 1.1.0
* Author: itthinx
* Author URI: http://www.itthinx.com
* Donate-Link: http://www.itthinx.com
* Donate-Link: http://www.itthinx.com/shop/
* Text Domain: affiliates-buddypress
* Domain Path: /languages
* License: GPLv3
Expand All @@ -36,6 +36,7 @@
exit;
}

define( 'AFFILIATES_BUDDYPRESS_VERSION', '1.1.0' );
define( 'AFFILIATES_BUDDYPRESS_PLUGIN_NAME', 'affiliates-buddypress' );
define( 'AFFILIATES_BUDDYPRESS_FILE', __FILE__ );
define( 'AFFILIATES_BUDDYPRESS_PLUGIN_URL', plugins_url( 'affiliates-buddypress' ) );
Expand All @@ -61,7 +62,8 @@ public static function init() {
add_action( 'init', array( __CLASS__, 'wp_init' ) );
add_action( 'admin_notices', array( __CLASS__, 'admin_notices' ) );

add_action( 'admin_head', array( __CLASS__, 'enqueue_scripts' ) );
// Our admin stylesheet is currently empty, so skip this.
// add_action( 'admin_head', array( __CLASS__, 'enqueue_scripts' ) );

}

Expand Down Expand Up @@ -104,11 +106,10 @@ public static function wp_init() {
}

/**
* Load scripts.
* Load scripts ... currently not used.
*/
public static function enqueue_scripts() {
wp_register_style( 'affbp-admin-styles', AFFILIATES_BUDDYPRESS_PLUGIN_URL . '/css/admin-styles.css' );
wp_enqueue_style( 'affbp-admin-styles' );
wp_register_style( 'affbp-admin-styles', AFFILIATES_BUDDYPRESS_PLUGIN_URL . '/css/admin-styles.css', array(), AFFILIATES_BUDDYPRESS_VERSION );
}

/**
Expand Down Expand Up @@ -202,7 +203,7 @@ public static function buddypress_admin_page () {
$output .= __( 'The page that provides the content for the Affiliates BuddyPress profile section.', 'affiliates-buddypress' );
$output .= ' ';
$output .= '<select name="affiliates-buddypress-page">';
$post_select_options = '<option value="">--</option>';
$post_select_options = '<option value="">&mdash;</option>';
foreach( $post_ids as $post_id ) {
$selected = '';
if ( $post_id == $selected_page_id ) {
Expand Down
4 changes: 4 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
== Affiliates BuddyPress - Changelog ==

= 1.1.0 =
* WordPress 5.1 compatible.
* Added a CSS rule to for the Profile item in the affiliates dashboard.

= 1.0.2 =
* WordPress 4.9 compatible.

Expand Down
3 changes: 3 additions & 0 deletions css/affiliates-buddypress.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.affiliates-dashboard .profile.section-link-item {
margin-top: unset;
}
9 changes: 9 additions & 0 deletions lib/class-affiliates-buddypress.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,17 @@ public static function init() {
$page_id = get_option( 'affiliates-buddypress-page', null );
if ( $page_id ) {
add_action( 'bp_setup_nav', array( __CLASS__, 'bp_setup_nav' ), 100 );
add_action( 'wp_enqueue_scripts', array( __CLASS__, 'wp_enqueue_scripts' ) );
}
}

/**
* Registers our front end styles.
*/
public static function wp_enqueue_scripts() {
wp_register_style( 'affiliates-buddypress', AFFILIATES_BUDDYPRESS_PLUGIN_URL . '/css/affiliates-buddypress.css', array(), AFFILIATES_BUDDYPRESS_VERSION );
}

/**
* Adds a BP navigation item for the Affiliate Area.
*/
Expand Down Expand Up @@ -95,6 +103,7 @@ public static function bp_template_title() {
public static function bp_template_content() {
$page_id = get_option( 'affiliates-buddypress-page', null );
if ( $page_id ) {
wp_enqueue_style( 'affiliates-buddypress' );
$post = get_post( $page_id );
echo $post->post_content;
}
Expand Down
12 changes: 8 additions & 4 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ Contributors: itthinx, proaktion, eggemplo
Donate link: http://www.itthinx.com/plugins/affiliates-buddypress
Tags: affiliates, itthinx, buddypress, profile
Requires at least: 4.0.0
Tested up to: 4.9
Requires PHP: 5.5.0
Stable tag: 1.0.2
Tested up to: 5.1
Requires PHP: 5.6.0
Stable tag: 1.1.0
License: GPLv3

Affiliates integration with BuddyPress.
Expand Down Expand Up @@ -45,6 +45,10 @@ Please refer to the [Settings > Pages](http://docs.itthinx.com/document/affiliat

== Changelog ==

= 1.1.0 =
* WordPress 5.1 compatible.
* Added a CSS rule to for the Profile item in the affiliates dashboard.

= 1.0.2 =
* WordPress 4.9 compatible.

Expand All @@ -56,4 +60,4 @@ Please refer to the [Settings > Pages](http://docs.itthinx.com/document/affiliat

== Upgrade Notice ==

WordPress 4.9 compatible.
WordPress 5.1 tested and adds a minor CSS fix.

0 comments on commit fb01ba8

Please sign in to comment.