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

Merge Geodirectory master #9

Merged
merged 17 commits into from
Mar 10, 2016
Merged
Show file tree
Hide file tree
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
20 changes: 11 additions & 9 deletions bp-compliments.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
Plugin Name: BuddyPress Compliments
Plugin URI: http://wpgeodirectory.com/
Description: Compliments module for BuddyPress.
Version: 1.0.1
Version: 1.0.4
Author: GeoDirectory
Author URI: http://wpgeodirectory.com
*/
Expand All @@ -19,7 +19,7 @@
if ( !defined( 'ABSPATH' ) ) exit;

// Define the plugin version.
define( 'BP_COMPLIMENTS_VER', '1.0.1' );
define( 'BP_COMPLIMENTS_VER', '1.0.4' );

/**
* BuddyPress compliments text domain.
Expand Down Expand Up @@ -68,12 +68,8 @@ function bp_compliments_init() {

// show admin notice for users on BP 1.2.x
} else {
$older_version_notice = __( "Hey! BP Compliments requires BuddyPress 1.5 or higher.", 'bp-compliments' );

add_action( 'admin_notices', create_function( '', "
echo '<div class=\"error\"><p>' . $older_version_notice . '</p></div>';
" ) );

add_action( 'admin_notices', 'bp_compliments_older_version_notice' );

return;
}
}
Expand Down Expand Up @@ -105,7 +101,7 @@ function bp_compliments_activate() {
*/
$table_prefix = apply_filters( 'bp_core_get_table_prefix', $wpdb->base_prefix );

$sql[] = "CREATE TABLE IF NOT EXISTS {$table_prefix}bp_compliments (
$sql = "CREATE TABLE {$table_prefix}bp_compliments (
id bigint(20) NOT NULL AUTO_INCREMENT PRIMARY KEY,
term_id int(10) NOT NULL,
post_id int(10) NULL DEFAULT NULL,
Expand Down Expand Up @@ -154,3 +150,9 @@ function bp_compliments_required_plugins_nag() {
echo"<div class=\"$class\"> <p>$message</p></div>";
}
}

function bp_compliments_older_version_notice() {
$older_version_notice = __( "Hey! BP Compliments requires BuddyPress 1.5 or higher.", 'bp-compliments' );

echo '<div class="error"><p>' . $older_version_notice . '</p></div>';
}
2 changes: 1 addition & 1 deletion change_log.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
v1.0.2
v1.0.4
Compliment user settings page - ADDED
Linebreaks are removed on compliment messages - FIXED
Compliments message links are clickable - ADDED
Expand Down
2 changes: 2 additions & 0 deletions css/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?php
# Silence is golden.
2 changes: 2 additions & 0 deletions images/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?php
# Silence is golden.
11 changes: 11 additions & 0 deletions includes/bp-compliments-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,17 @@ function bp_compliments_remove_data( $user_id ) {
*/
do_action( 'bp_compliments_after_remove_data', $user_id );
}

/**
* Inject buddypress compliments content into BP.
*
* @since 0.0.1
* @package BuddyPress_Compliments
*/
function bp_compliments_single_compliments_content() {
bp_get_template_part( 'members/single/compliments' ); // note the new template name for our template part.
}

add_action( 'wpmu_delete_user', 'bp_compliments_remove_data' );
add_action( 'delete_user', 'bp_compliments_remove_data' );
add_action( 'make_spam_user', 'bp_compliments_remove_data' );
5 changes: 1 addition & 4 deletions includes/bp-compliments-screens.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,7 @@ function bp_compliments_load_template_filter( $found_template, $templates ) {
$found_template = locate_template( 'members/single/plugins.php', false, false );

// add our hook to inject content into BP
// note the new template name for our template part
add_action( 'bp_template_content', create_function( '', "
bp_get_template_part( 'members/single/compliments' );
" ) );
add_action( 'bp_template_content', 'bp_compliments_single_compliments_content' );
}

/**
Expand Down
2 changes: 2 additions & 0 deletions includes/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?php
# Silence is golden.
2 changes: 2 additions & 0 deletions index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?php
# Silence is golden.
2 changes: 2 additions & 0 deletions js/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?php
# Silence is golden.
Binary file modified languages/bp-compliments-en_US.mo
Binary file not shown.
Loading