Skip to content

Commit

Permalink
bump 3.6.8
Browse files Browse the repository at this point in the history
  • Loading branch information
slaFFik committed Apr 6, 2016
1 parent e019885 commit f616069
Show file tree
Hide file tree
Showing 40 changed files with 1,777 additions and 1,418 deletions.
11 changes: 6 additions & 5 deletions bpge.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Plugin URI: http://ovirium.com/portfolio/bp-groups-extras/
Description: Adding extra fields and pages, menu sorting and other missing functionality to groups
Version: 3.6.8
Text Domain: bpge
Text Domain: buddypress-groups-extras
Domain Path: /langs/
Author: slaFFik
Author URI: https://ovirium.com/
Expand All @@ -22,6 +22,7 @@
define( 'BPGE_FIELDS_SET', 'bpge_fields_set' );
define( 'BPGE_GFIELDS', 'bpge_gfields' );
define( 'BPGE_GPAGES', 'gpages' );
define( 'BPGE_I18N', 'buddypress-groups-extras' );

if ( ! defined( 'DS' ) ) {
define( 'DS', DIRECTORY_SEPARATOR );
Expand Down Expand Up @@ -90,10 +91,10 @@ function bpge_clear( $type = 'all' ) {
*/
function bpge_load_textdomain() {
$locale = apply_filters( 'buddypress_locale', get_locale() );
$mofile = dirname( __File__ ) . "/langs/bpge-$locale.mo";
$mofile = dirname( __File__ ) . '/langs/' . BPGE_I18N . "-$locale.mo";

if ( file_exists( $mofile ) ) {
load_textdomain( 'bpge', $mofile );
load_textdomain( BPGE_I18N, $mofile );
}
}

Expand All @@ -108,8 +109,8 @@ function bpge_admin_init() {
$admin = new BPGE_ADMIN();
add_submenu_page(
is_multisite() ? 'settings.php' : 'options-general.php',
__( 'BP Groups Extras', 'bpge' ),
'<span id="bpge-admin-menu" class="dashicons dashicons-groups"></span>&nbsp;' . __( 'BP Groups Extras', 'bpge' ),
__( 'BP Groups Extras', BPGE_I18N ),
'<span id="bpge-admin-menu" class="dashicons dashicons-groups"></span>&nbsp;' . __( 'BP Groups Extras', BPGE_I18N ),
'manage_options',
BPGE_ADMIN_SLUG,
array( $admin, 'admin_page' ) );
Expand Down
36 changes: 18 additions & 18 deletions core/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ public function __construct() {
public function manage_columns() {
return array(
'cb' => '<input type="checkbox" />',
'title' => __( 'Title', 'bpge' ),
'group_link' => __( 'Group Links', 'bpge' ),
'page_link' => __( 'Page Links', 'bpge' ),
'date' => __( 'Date', 'bpge' )
'title' => __( 'Title', BPGE_I18N ),
'group_link' => __( 'Group Links', BPGE_I18N ),
'page_link' => __( 'Page Links', BPGE_I18N ),
'date' => __( 'Date', BPGE_I18N )
);
}

Expand Down Expand Up @@ -80,9 +80,9 @@ public function manage_columns_content( $column, $post_id ) {
break;
}

echo '<a href="' . $group_link . '" target="_blank">' . __( 'Visit', 'bpge' ) . '</a>';
echo '<a href="' . $group_link . '" target="_blank">' . __( 'Visit', BPGE_I18N ) . '</a>';
echo ' | ';
echo '<a href="' . $group_admin_link . '" target="_blank">' . __( 'Edit', 'bpge' ) . '</a>';
echo '<a href="' . $group_admin_link . '" target="_blank">' . __( 'Edit', BPGE_I18N ) . '</a>';

break;

Expand All @@ -91,9 +91,9 @@ public function manage_columns_content( $column, $post_id ) {
break;
}

echo '<a href="' . $group_link . BPGE_GPAGES . '/' . $post->post_name . '/" target="_blank">' . __( 'Visit', 'bpge' ) . '</a>';
echo '<a href="' . $group_link . BPGE_GPAGES . '/' . $post->post_name . '/" target="_blank">' . __( 'Visit', BPGE_I18N ) . '</a>';
echo ' | ';
echo '<a href="' . $group_admin_link . 'extras/pages-manage/?edit=' . $post_id . '" target="_blank">' . __( 'Edit', 'bpge' ) . '</a>';
echo '<a href="' . $group_admin_link . 'extras/pages-manage/?edit=' . $post_id . '" target="_blank">' . __( 'Edit', BPGE_I18N ) . '</a>';
break;
}
}
Expand Down Expand Up @@ -183,11 +183,11 @@ public function load_assets() {
public function load_pointers() {
$page = is_multisite() ? 'network/settings.php' : 'options-general.php';

$vote_content = '<h3>' . __( 'Vote for Features', 'bpge' ) . '</h3>';
$vote_content .= '<p>' . __( 'Based on voting results I will implement features in new versions (either in core or as modules to extend the initial functionality).', 'bpge' ) . '</p>';
$vote_content = '<h3>' . __( 'Vote for Features', BPGE_I18N ) . '</h3>';
$vote_content .= '<p>' . __( 'Based on voting results I will implement features in new versions (either in core or as modules to extend the initial functionality).', BPGE_I18N ) . '</p>';

$tuts_content = '<h3>' . __( 'Tutorials Included' ) . '</h3>';
$tuts_content .= '<p>' . sprintf( __( 'You can get the basic help of how to use this plugin right from the plugin admin area - several <a href="%s">very detailed tutorials</a> are bundled into the plugin.', 'bpge' ), admin_url( '/' . $page . '?page=' . BPGE_ADMIN_SLUG . '&tab=tuts' ) ) . '</p>';
$tuts_content .= '<p>' . sprintf( __( 'You can get the basic help of how to use this plugin right from the plugin admin area - several <a href="%s">very detailed tutorials</a> are bundled into the plugin.', BPGE_I18N ), admin_url( '/' . $page . '?page=' . BPGE_ADMIN_SLUG . '&tab=tuts' ) ) . '</p>';

// get all pointer that we dismissed
$dismissed = explode( ',', (string) get_user_meta( get_current_user_id(), 'dismissed_wp_pointers', true ) );
Expand Down Expand Up @@ -326,28 +326,28 @@ public function header() {
$current_tab = $this->get_cur_tab();

echo '<h2>';
_e( 'BuddyPress Groups Extras', 'bpge' );
_e( 'BuddyPress Groups Extras', BPGE_I18N );
echo '<sup>v' . BPGE_VERSION . '</sup> ';
do_action( 'bpge_admin_header_title_pro' );
echo '&rarr; ';
_e( 'Extend Your Groups', 'bpge' );
_e( 'Extend Your Groups', BPGE_I18N );
do_action( 'bpge_admin_header_title' );
echo '</h2>'; ?>

<?php
if ( isset( $_GET['saved'] ) ) {
echo '<div style="clear:both"></div>';
echo '<div id="message" class="updated fade"><p>' . __( 'All changes were saved. Go and check results!', 'bpge' ) . '</p></div>';
echo '<div id="message" class="updated fade"><p>' . __( 'All changes were saved. Go and check results!', BPGE_I18N ) . '</p></div>';
}

if ( ! isset( $this->bpge['reviewed'] ) || $this->bpge['reviewed'] == 'no' ) {
echo '<div style="clear:both"></div>';
echo '<div id="message" class="updated fade"><p>' .
sprintf(
__( 'If you like the plugin please review it on its <a href="%s">WordPress Repository page</a>. Thanks in advance!', 'bpge' ),
__( 'If you like the plugin please review it on its <a href="%s">WordPress Repository page</a>. Thanks in advance!', BPGE_I18N ),
'http://wordpress.org/support/view/plugin-reviews/buddypress-groups-extras'
) .
'<span style="float:right"><a href="#" class="bpge_review_dismiss" style="color:red">' . __( 'Dismiss', 'bpge' ) . '</span>' .
'<span style="float:right"><a href="#" class="bpge_review_dismiss" style="color:red">' . __( 'Dismiss', BPGE_I18N ) . '</span>' .
'</p></div>';
}

Expand All @@ -360,9 +360,9 @@ public function header() {
do_action( 'bpge_admin_tabs_links' );

if ( defined( 'BPGE_PRO' ) ) {
echo '<a class="nav-tab" target="_blank" style="float:right" href="http://ovirium.com/support/">' . __( 'Support', 'bpge' ) . '</a>';
echo '<a class="nav-tab" target="_blank" style="float:right" href="http://ovirium.com/support/">' . __( 'Support', BPGE_I18N ) . '</a>';
} else {
echo '<a class="nav-tab" target="_blank" style="float:right" href="http://wordpress.org/support/plugin/buddypress-groups-extras#latest">' . __( 'Support', 'bpge' ) . '</a>';
echo '<a class="nav-tab" target="_blank" style="float:right" href="http://wordpress.org/support/plugin/buddypress-groups-extras#latest">' . __( 'Support', BPGE_I18N ) . '</a>';
}
echo '</h3>';
}
Expand Down
50 changes: 25 additions & 25 deletions core/admin_tabs/general.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class BPGE_ADMIN_GENERAL extends BPGE_ADMIN_TAB {
public $title = null;

public function __construct() {
$this->title = __( 'General Options', 'bpge' );
$this->title = __( 'General Options', BPGE_I18N );

parent::__construct();
}
Expand All @@ -25,27 +25,27 @@ public function register_sections() {
do_action( 'bpge_admin_general_section_before', $this );

add_settings_field( 're_pages',
__( 'Rich Editor for Pages', 'bpge' ),
__( 'Rich Editor for Pages', BPGE_I18N ),
array( $this, 'display_re_pages' ),
$this->slug,
$this->slug . '_settings' );
add_settings_field( 're_fields',
__( 'Rich Editor for Fields', 'bpge' ),
__( 'Rich Editor for Fields', BPGE_I18N ),
array( $this, 'display_re_fields' ),
$this->slug,
$this->slug . '_settings' );
add_settings_field( 'access',
__( 'User Access', 'bpge' ),
__( 'User Access', BPGE_I18N ),
array( $this, 'display_access' ),
$this->slug,
$this->slug . '_settings' );
add_settings_field( 'import',
__( 'Data Import', 'bpge' ),
__( 'Data Import', BPGE_I18N ),
array( $this, 'display_import' ),
$this->slug,
$this->slug . '_settings' );
add_settings_field( 'uninstall',
__( 'Uninstall Options', 'bpge' ),
__( 'Uninstall Options', BPGE_I18N ),
array( $this, 'display_uninstall' ),
$this->slug,
$this->slug . '_settings' );
Expand All @@ -57,7 +57,7 @@ public function register_sections() {
* Display the tab description
*/
public function display() {
echo '<p class="description">' . __( 'Here are some general settings.', 'bpge' ) . '</p>';
echo '<p class="description">' . __( 'Here are some general settings.', BPGE_I18N ) . '</p>';
}

/**
Expand All @@ -66,10 +66,10 @@ public function display() {
public function display_access() {
?>
<p>
<?php _e( 'Sometimes we want to change the access level to different parts of a site. Options below will help you to do this.', 'bpge' );?>
<?php _e( 'Sometimes we want to change the access level to different parts of a site. Options below will help you to do this.', BPGE_I18N ); ?>
</p>

<p><?php _e( 'Who can open group admin tab Extras?', 'bpge' ); ?></p>
<p><?php _e( 'Who can open group admin tab Extras?', BPGE_I18N ); ?></p>
<?php
if ( ! isset( $this->bpge['access_extras'] ) || empty( $this->bpge['access_extras'] ) ) {
$this->bpge['access_extras'] = 'g_s_admin';
Expand All @@ -79,12 +79,12 @@ public function display_access() {
<li><label>
<input name="bpge_access_extras" type="radio"
value="s_admin" <?php checked( 's_admin', $this->bpge['access_extras'] ); ?> />&nbsp;
<?php _e( 'Site admins only', 'bpge' ); ?>
<?php _e( 'Site admins only', BPGE_I18N ); ?>
</label></li>
<li><label>
<input name="bpge_access_extras" type="radio"
value="g_s_admin" <?php checked( 'g_s_admin', $this->bpge['access_extras'] ); ?> />&nbsp;
<?php _e( 'Group administrators and site admins', 'bpge' ); ?>
<?php _e( 'Group administrators and site admins', BPGE_I18N ); ?>
</label></li>
</ul>

Expand All @@ -96,19 +96,19 @@ public function display_access() {
*/
public function display_import() { ?>
<p>
<?php _e( 'If you upgraded from any version of BuddyPress Groups Extras, which had the version number less than 3.4, and if you want to preserve all previously generated content (like default and groups fields etc) please do the import using controls below.', 'bpge' );?>
<?php _e( 'If you upgraded from any version of BuddyPress Groups Extras, which had the version number less than 3.4, and if you want to preserve all previously generated content (like default and groups fields etc) please do the import using controls below.', BPGE_I18N ); ?>
</p>

<p class="description"><?php _e( '<strong>Important</strong>: Do not import data twice - as this will create lots of duplicated fields.', 'bpge' ); ?></p>
<p class="description"><?php _e( '<strong>Important</strong>: Do not import data twice - as this will create lots of duplicated fields.', BPGE_I18N ); ?></p>

<p>
<input type="submit" name="bpge-import-data" value="<?php _e( 'Import Data', 'bpge' ); ?>"
<input type="submit" name="bpge-import-data" value="<?php _e( 'Import Data', BPGE_I18N ); ?>"
class="button-secondary"/> &nbsp;
<input type="submit" name="bpge-clear-data" value="<?php _e( 'Clear Data', 'bpge' ); ?>"
<input type="submit" name="bpge-clear-data" value="<?php _e( 'Clear Data', BPGE_I18N ); ?>"
class="button"/>
</p>

<p class="description"><?php _e( 'Note: Clearing data will delete everything except options on this page.', 'bpge' ); ?></p>
<p class="description"><?php _e( 'Note: Clearing data will delete everything except options on this page.', BPGE_I18N ); ?></p>
<?php
}

Expand All @@ -117,12 +117,12 @@ class="button"/>
*/
public function display_re_pages() {
echo '<p>';
_e( 'Would you like to enable Rich Editor for easy use of html tags for groups custom pages?', 'bpge' );
_e( 'Would you like to enable Rich Editor for easy use of html tags for groups custom pages?', BPGE_I18N );
echo '</p>';

echo '<ul>';
echo '<li><label><input type="radio" name="bpge_re" ' . ( $this->bpge['re'] == 1 ? 'checked="checked"' : '' ) . ' value="1">&nbsp' . __( 'Enable', 'bpge' ) . '</label></li>';
echo '<li><label><input type="radio" name="bpge_re" ' . ( $this->bpge['re'] != 1 ? 'checked="checked"' : '' ) . ' value="0">&nbsp' . __( 'Disable', 'bpge' ) . '</label></li>';
echo '<li><label><input type="radio" name="bpge_re" ' . ( $this->bpge['re'] == 1 ? 'checked="checked"' : '' ) . ' value="1">&nbsp' . __( 'Enable', BPGE_I18N ) . '</label></li>';
echo '<li><label><input type="radio" name="bpge_re" ' . ( $this->bpge['re'] != 1 ? 'checked="checked"' : '' ) . ' value="0">&nbsp' . __( 'Disable', BPGE_I18N ) . '</label></li>';
echo '</ul>';
}

Expand All @@ -131,16 +131,16 @@ public function display_re_pages() {
*/
public function display_re_fields() {
echo '<p>';
_e( 'Would you like to enable Rich Editor for easy use of html tags for groups custom textarea fields?', 'bpge' );
_e( 'Would you like to enable Rich Editor for easy use of html tags for groups custom textarea fields?', BPGE_I18N );
echo '</p>';

if ( ! isset( $this->bpge['re_fields'] ) || empty( $this->bpge['re_fields'] ) ) {
$this->bpge['re_fields'] = 'no';
}

echo '<ul>';
echo '<li><label><input type="radio" name="bpge_re_fields" ' . checked( $this->bpge['re_fields'], 'yes', false ) . ' value="yes">&nbsp' . __( 'Enable', 'bpge' ) . '</label></li>';
echo '<li><label><input type="radio" name="bpge_re_fields" ' . checked( $this->bpge['re_fields'], 'no', false ) . ' value="no">&nbsp' . __( 'Disable', 'bpge' ) . '</label></li>';
echo '<li><label><input type="radio" name="bpge_re_fields" ' . checked( $this->bpge['re_fields'], 'yes', false ) . ' value="yes">&nbsp' . __( 'Enable', BPGE_I18N ) . '</label></li>';
echo '<li><label><input type="radio" name="bpge_re_fields" ' . checked( $this->bpge['re_fields'], 'no', false ) . ' value="no">&nbsp' . __( 'Disable', BPGE_I18N ) . '</label></li>';
echo '</ul>';
}

Expand All @@ -149,16 +149,16 @@ public function display_re_fields() {
*/
public function display_uninstall() {
echo '<p>';
_e( 'On BPGE deactivation you can delete or preserve all its settings and created content (like groups pages and fields). What do you want to do?', 'bpge' );
_e( 'On BPGE deactivation you can delete or preserve all its settings and created content (like groups pages and fields). What do you want to do?', BPGE_I18N );
echo '</p>';

if ( ! isset( $this->bpge['uninstall'] ) ) {
$this->bpge['uninstall'] = 'no';
}

echo '<p>';
echo '<label><input type="radio" name="bpge_uninstall" ' . ( $this->bpge['uninstall'] == 'no' ? 'checked="checked"' : '' ) . ' value="no">&nbsp' . __( 'Preserve all data', 'bpge' ) . '</label><br />';
echo '<label><input type="radio" name="bpge_uninstall" ' . ( $this->bpge['uninstall'] == 'yes' ? 'checked="checked"' : '' ) . ' value="yes">&nbsp' . __( 'Delete everything', 'bpge' ) . '</label>';
echo '<label><input type="radio" name="bpge_uninstall" ' . ( $this->bpge['uninstall'] == 'no' ? 'checked="checked"' : '' ) . ' value="no">&nbsp' . __( 'Preserve all data', BPGE_I18N ) . '</label><br />';
echo '<label><input type="radio" name="bpge_uninstall" ' . ( $this->bpge['uninstall'] == 'yes' ? 'checked="checked"' : '' ) . ' value="yes">&nbsp' . __( 'Delete everything', BPGE_I18N ) . '</label>';
echo '</p>';
}

Expand Down
2 changes: 1 addition & 1 deletion core/admin_tabs/groups.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class BPGE_ADMIN_GROUPS extends BPGE_ADMIN_TAB {
public $title = null;

public function __construct() {
$this->title = __( 'Allowed Groups', 'bpge' );
$this->title = __( 'Allowed Groups', BPGE_I18N );

parent::__construct();
}
Expand Down
4 changes: 2 additions & 2 deletions core/admin_tabs/poll.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ class BPGE_ADMIN_POLL extends BPGE_ADMIN_TAB {
public $title = null;

public function __construct() {
$this->title = __( 'Poll', 'bpge' );
$this->title = __( 'Poll', BPGE_I18N );

parent::__construct();
}

public function display() {
echo '<p class="description">';
_e( 'Please answer the question below - this will help me to prioritize my development work.', 'bpge' );
_e( 'Please answer the question below - this will help me to prioritize my development work.', BPGE_I18N );
echo '</p><br />';

// hide Submit button
Expand Down
6 changes: 3 additions & 3 deletions core/admin_tabs/sets.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ class BPGE_ADMIN_SETS extends BPGE_ADMIN_TAB {
public $title = null;

public function __construct() {
$this->title = __( 'Default Sets of Fields', 'bpge' );
$this->title = __( 'Default Sets of Fields', BPGE_I18N );

parent::__construct();
}

public function display() {
echo '<p class="description">';
_e( 'Please create/edit here fields you want to be available as standard blocks of data.<br />This will be helpful for group admins - no need for them to create lots of fields from scratch.', 'bpge' );
_e( 'Please create/edit here fields you want to be available as standard blocks of data.<br />This will be helpful for group admins - no need for them to create lots of fields from scratch.', BPGE_I18N );
echo '</p>';

$set_args = array(
Expand Down Expand Up @@ -52,7 +52,7 @@ public function display() {
}
} else {
echo '<li>';
echo '<span class="no_fields">' . __( 'Currently there are no predefined fields. Groups admins should create all fields by themselves.', 'bpge' ) . '</span>';
echo '<span class="no_fields">' . __( 'Currently there are no predefined fields. Groups admins should create all fields by themselves.', BPGE_I18N ) . '</span>';
echo '</li>';
}
echo '</ul>';
Expand Down
4 changes: 2 additions & 2 deletions core/admin_tabs/tuts.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ class BPGE_ADMIN_TUTS extends BPGE_ADMIN_TAB {
public $title = null;

public function __construct() {
$this->title = __( 'Tutorials', 'bpge' );
$this->title = __( 'Tutorials', BPGE_I18N );

parent::__construct();
}

public function display() {
echo '<p class="description">';
_e( 'Below you will see several tutorials and how to, that will help you to better understand the plugin and how to work with it.', 'bpge' );
_e( 'Below you will see several tutorials and how to, that will help you to better understand the plugin and how to work with it.', BPGE_I18N );
echo '</p>';

bpge_view( 'admin/tuts_data' );
Expand Down
Loading

0 comments on commit f616069

Please sign in to comment.