close

Plugin Directory

Changeset 1324553


Ignore:
Timestamp:
01/09/2016 10:46:05 AM (10 years ago)
Author:
daniluk4000
Message:

Branch update

Location:
bbpress-new-ui/branches/3.5
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • bbpress-new-ui/branches/3.5/bbpress-new-ui.php

    r1319832 r1324553  
    33Plugin Name: bbPress New UI
    44Description: A great plugin completely changes the entire design of bbpress in light or dark color
    5 Version: 3.5
     5Version: 3.5.0.1
    66Author: Daniel 4000
    77Author URI: http://dk4000.com
    88Contributors: daniluk4000
    9 Text Domain: bbp-new-ui
     9Text Domain: bbpress-new-ui
    1010Domain Path: /languages
    1111*/
    1212//----------------------------------------
    1313// Constructor
    14 $val2 = get_option('bbp_new_ui_option');
     14$val2 = get_option('bbpress_new_ui_option');
    1515$val2 = $val2['3'];
    16 $val3 = get_option('bbp_new_ui_option');
     16$val3 = get_option('bbpress_new_ui_option');
    1717$val3 = $val3['4'];
    1818if ( $val2 == '1'){
     
    3535        return $actions;
    3636       
    37     $settings_link = '<a href="options-general.php?page=bbp_new_ui">'.__( 'Settings', 'bbpress' ).'</a>';
     37    $settings_link = '<a href="options-general.php?page=bbpress_new_ui">'.__( 'Settings', 'bbpress' ).'</a>';
    3838    array_unshift( $actions, $settings_link );
    3939    return $actions;
     
    4242//----------------------------------------
    4343// Iniciate our plugin class
    44 class BBP_NEW_UI {
     44class bbpress_new_ui {
    4545function __construct() {
    4646add_action( 'wp_enqueue_scripts', array( $this, 'bbpui_register_plugin_styles' ) );
     
    4848}
    4949public function bbpui_register_plugin_styles() {
    50 $val = get_option('bbp_new_ui_option');
     50$val = get_option('bbpress_new_ui_option');
    5151$val = $val['1'];
    5252if ( $val == '1'){
    5353$css_path = plugin_dir_path( __FILE__ ) . '/inc/css/dark.css';
    54 wp_enqueue_style( 'bbp_new_ui', plugin_dir_url( __FILE__ ) . '/inc/css/dark.css', filemtime( $css_path ) );
     54wp_enqueue_style( 'bbpress_new_ui', plugin_dir_url( __FILE__ ) . '/inc/css/dark.css', filemtime( $css_path ) );
    5555}
    5656else {
    5757$css_path = plugin_dir_path( __FILE__ ) . '/inc/css/light.css';
    58 wp_enqueue_style( 'bbp_new_ui', plugin_dir_url( __FILE__ ) . '/inc/css/light.css', filemtime( $css_path ) );
     58wp_enqueue_style( 'bbpress_new_ui', plugin_dir_url( __FILE__ ) . '/inc/css/light.css', filemtime( $css_path ) );
    5959}
    6060}
    6161
    6262public function bbpui_hide_the_copirytht() {
    63 $valnew = get_option('bbp_new_ui_option');
     63$valnew = get_option('bbpress_new_ui_option');
    6464$valnew = $valnew['2'];
    6565if ( $valnew == '1') {
     
    8181// Notice
    8282//----------------------------------------
    83 add_action('admin_notices', 'bbp_new_ui_admin_notice');
    84 
    85 function bbp_new_ui_admin_notice() {
     83add_action('admin_notices', 'bbpress_new_ui_admin_notice');
     84
     85function bbpress_new_ui_admin_notice() {
    8686    global $current_user ;
    8787        $user_id = $current_user->ID;
    8888        /* Check that the user hasn't already clicked to ignore the message */
    89     if ( ! get_user_meta($user_id, 'bbp_new_ui_ignore_notice') ) {
     89    if ( ! get_user_meta($user_id, 'bbpress_new_ui_ignore_notice') ) {
    9090        echo '<div class="updated"><p>';
    91         printf(__('Want to test the new versions of BBP New UI plugin or to add your translation or have an idea/suggestion? Write me in admin@dk4000.com! | <a href="%1$s">Hide notice</a>', 'bbp-new-ui'), '?bbp_new_ui_nag_ignore=0');
     91        printf(__('Want to test the new versions of BBP New UI plugin or to add your translation or have an idea/suggestion? Write me in admin@dk4000.com! | <a href="%1$s">Hide notice</a>', 'bbpress-new-ui'), '?bbpress_new_ui_nag_ignore=0');
    9292        echo "</p></div>";
    9393    }
    9494}
    9595
    96 add_action('admin_init', 'bbp_new_ui_nag_ignore');
    97 
    98 function bbp_new_ui_nag_ignore() {
     96add_action('admin_init', 'bbpress_new_ui_nag_ignore');
     97
     98function bbpress_new_ui_nag_ignore() {
    9999    global $current_user;
    100100        $user_id = $current_user->ID;
    101101        /* If user clicks to ignore the notice, add that to their user meta */
    102         if ( isset($_GET['bbp_new_ui_nag_ignore']) && '0' == $_GET['bbp_new_ui_nag_ignore'] ) {
    103              add_user_meta($user_id, 'bbp_new_ui_ignore_notice', 'true', true);
     102        if ( isset($_GET['bbpress_new_ui_nag_ignore']) && '0' == $_GET['bbpress_new_ui_nag_ignore'] ) {
     103             add_user_meta($user_id, 'bbpress_new_ui_ignore_notice', 'true', true);
    104104    }
    105105}
     
    107107// Notice
    108108//----------------------------------------
    109 add_action('admin_notices', 'bbp_new_ui_admin_notice_2');
    110 
    111 function bbp_new_ui_admin_notice_2() {
     109add_action('admin_notices', 'bbpress_new_ui_admin_notice_2');
     110
     111function bbpress_new_ui_admin_notice_2() {
    112112    global $current_user ;
    113113        $user_id = $current_user->ID;
    114114        /* Check that the user hasn't already clicked to ignore the message */
    115     if ( ! get_user_meta($user_id, 'bbp_new_ui_ignore_notice_2') ) {
     115    if ( ! get_user_meta($user_id, 'bbpress_new_ui_ignore_notice_2') ) {
    116116        echo '<div class="updated"><p>';
    117         printf(__('Please try our new plugin - <a href="https://wordpress.org/plugins/bp-new-ui/">BuddyPress New UI</a> | <a href="%1$s">Hide notice</a>', 'bbp-new-ui'), '?bbp_new_ui_nag_ignore_2=0');
     117        printf(__('Please try our new plugin - <a href="https://wordpress.org/plugins/bp-new-ui/">BuddyPress New UI</a> | <a href="%1$s">Hide notice</a>', 'bbpress-new-ui'), '?bbpress_new_ui_nag_ignore_2=0');
    118118        echo "</p></div>";
    119119    }
    120120}
    121121
    122 add_action('admin_init', 'bbp_new_ui_nag_ignore_2');
    123 
    124 function bbp_new_ui_nag_ignore_2() {
     122add_action('admin_init', 'bbpress_new_ui_nag_ignore_2');
     123
     124function bbpress_new_ui_nag_ignore_2() {
    125125    global $current_user;
    126126        $user_id = $current_user->ID;
    127127        /* If user clicks to ignore the notice, add that to their user meta */
    128         if ( isset($_GET['bbp_new_ui_nag_ignore_2']) && '0' == $_GET['bbp_new_ui_nag_ignore_2'] ) {
    129              add_user_meta($user_id, 'bbp_new_ui_ignore_notice_2', 'true', true);
     128        if ( isset($_GET['bbpress_new_ui_nag_ignore_2']) && '0' == $_GET['bbpress_new_ui_nag_ignore_2'] ) {
     129             add_user_meta($user_id, 'bbpress_new_ui_ignore_notice_2', 'true', true);
    130130    }
    131131}
     
    134134// Load
    135135//----------------------------------------
    136 function bbp_new_ui_load_plugin_textdomain() {
    137     load_plugin_textdomain( 'bbp-new-ui', FALSE, basename( dirname( __FILE__ ) ) . '/languages/' );
    138 }
    139 add_action( 'plugins_loaded', 'bbp_new_ui_load_plugin_textdomain' );
     136function bbpress_new_ui_load_plugin_textdomain() {
     137    load_plugin_textdomain( 'bbpress-new-ui', FALSE, basename( dirname( __FILE__ ) ) . '/languages/' );
     138}
     139add_action( 'plugins_loaded', 'bbpress_new_ui_load_plugin_textdomain' );
    140140
    141141//----------------------------------------
     
    144144
    145145function bbpui_add_plugin_page(){
    146 add_options_page( ''.__('Settings').' bbPress New UI', ' bbPress New UI', 'manage_options', 'bbp_new_ui', 'bbp_new_ui_options_page_output' );
    147 }
    148 
    149 function bbp_new_ui_options_page_output(){
     146add_options_page( ''.__('Settings').' bbPress New UI', ' bbPress New UI', 'manage_options', 'bbpress_new_ui', 'bbpress_new_ui_options_page_output' );
     147}
     148
     149function bbpress_new_ui_options_page_output(){
    150150?>
    151151<div class="wrap bbpress-new-ui-wrap" id="bbpui">
     
    212212<h2><?php echo get_admin_page_title() ?></h2>
    213213<form action="options.php" method="POST">
    214 <?php settings_fields( 'bbp_new_ui_group' ); ?>
    215 <?php do_settings_sections( 'bbp_new_ui_page' ); ?>
     214<?php settings_fields( 'bbpress_new_ui_group' ); ?>
     215<?php do_settings_sections( 'bbpress_new_ui_page' ); ?>
    216216<?php submit_button(); ?>
    217217</form>
     
    225225$pluginname = __( 'bbPress New UI' );
    226226$settingsname = __( 'Settings' );
    227 $changestylename = __( ''.__('Change').' '.__('Style').'', 'bbp-new-ui' );
    228 $hidename = __( ''.__('Hide').' '.__('the Copyright', 'bbp-new-ui').'', 'bbp-new-ui' );
    229 $bbpaaname = __( ''.__('Settings').' bbPress Admin Answers', 'bbp-new-ui');
    230 $bbpreplylock = __( ''.__('Advanced').' '.__('Settings').'', 'bbp-new-ui');
    231 register_setting( 'bbp_new_ui_group', 'bbp_new_ui_option' );
    232 add_settings_section( 'bbp_new_ui_id', '', '', 'bbp_new_ui_page' );
    233 add_settings_field('bbp_new_ui_field', $changestylename, 'fill_bbp_new_ui_field', 'bbp_new_ui_page', 'bbp_new_ui_id' );
    234 add_settings_field('bbp_new_ui_field_1', $hidename, 'fill_bbp_new_ui_field_1', 'bbp_new_ui_page', 'bbp_new_ui_id' );
    235 add_settings_field('bbp_new_ui_field_2', $bbpaaname, 'fill_bbp_new_ui_field_2', 'bbp_new_ui_page', 'bbp_new_ui_id' );
    236 add_settings_field('bbp_new_ui_field_3', $bbpreplylock, 'fill_bbp_new_ui_field_3', 'bbp_new_ui_page', 'bbp_new_ui_id' );
     227$changestylename = __( ''.__('Change').' '.__('Style').'', 'bbpress-new-ui' );
     228$hidename = __( ''.__('Hide').' '.__('the Copyright', 'bbpress-new-ui').'', 'bbpress-new-ui' );
     229$bbpaaname = __( ''.__('Settings').' bbPress Admin Answers', 'bbpress-new-ui');
     230$bbpreplylock = __( ''.__('Advanced').' '.__('Settings').'', 'bbpress-new-ui');
     231register_setting( 'bbpress_new_ui_group', 'bbpress_new_ui_option' );
     232add_settings_section( 'bbpress_new_ui_id', '', '', 'bbpress_new_ui_page' );
     233add_settings_field('bbpress_new_ui_field', $changestylename, 'fill_bbpress_new_ui_field', 'bbpress_new_ui_page', 'bbpress_new_ui_id' );
     234add_settings_field('bbpress_new_ui_field_1', $hidename, 'fill_bbpress_new_ui_field_1', 'bbpress_new_ui_page', 'bbpress_new_ui_id' );
     235add_settings_field('bbpress_new_ui_field_2', $bbpaaname, 'fill_bbpress_new_ui_field_2', 'bbpress_new_ui_page', 'bbpress_new_ui_id' );
     236add_settings_field('bbpress_new_ui_field_3', $bbpreplylock, 'fill_bbpress_new_ui_field_3', 'bbpress_new_ui_page', 'bbpress_new_ui_id' );
    237237}
    238238add_action('admin_init', 'bbpui_plugin_settings');
    239239
    240 function fill_bbp_new_ui_field(){
    241 $val = get_option('bbp_new_ui_option');
     240function fill_bbpress_new_ui_field(){
     241$val = get_option('bbpress_new_ui_option');
    242242$locale = get_locale();
    243243$val = $val['1'];
     
    245245?>
    246246<label>
    247 <input type="checkbox" name="bbp_new_ui_option[1]" value="1" <?php checked( 1, $val ) ?>  /> <?php _e( 'Change style to Dark color', 'bbp-new-ui'); ?></label> <br>
     247<input type="checkbox" name="bbpress_new_ui_option[1]" value="1" <?php checked( 1, $val ) ?>  /> <?php _e( 'Change style to Dark color', 'bbpress-new-ui'); ?></label> <br>
    248248<?php
    249249if ( $val == '1') {
    250 echo'<status class="dark">';_e( 'Now active Dark Theme', 'bbp-new-ui' );echo'</status>';
     250echo'<status class="dark">';_e( 'Now active Dark Theme', 'bbpress-new-ui' );echo'</status>';
    251251}
    252252else {
    253 echo'<status class="light">';_e( 'Now active Light Theme', 'bbp-new-ui' );echo'</status>';
    254 }
    255 }
    256 
    257 function fill_bbp_new_ui_field_2(){
    258 $val2 = get_option('bbp_new_ui_option');
     253echo'<status class="light">';_e( 'Now active Light Theme', 'bbpress-new-ui' );echo'</status>';
     254}
     255}
     256
     257function fill_bbpress_new_ui_field_2(){
     258$val2 = get_option('bbpress_new_ui_option');
    259259$val2 = $val2['3'];
    260260?>
    261261<label>
    262262
    263 <input type="checkbox" name="bbp_new_ui_option[3]" value="1" <?php checked( 1, $val2 ) ?>  /> <?php _e( 'Deactivate' ); ?>  bbP New UI Admin Answers   <div class="desc"><?php _e( 'If you have <code>call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, BBP_Admin_Replies::update_reply</code> error and same and if you have all blue posts if you check "this <strong>topic</strong> of keymaster/moderator check this checkbox', 'bbp-new-ui' ); ?></div> </label><br>
    264 <?php
    265 }
    266 
    267 function fill_bbp_new_ui_field_1(){
    268 $valnew = get_option('bbp_new_ui_option');
     263<input type="checkbox" name="bbpress_new_ui_option[3]" value="1" <?php checked( 1, $val2 ) ?>  /> <?php _e( 'Deactivate' ); ?>  bbP New UI Admin Answers   <div class="desc"><?php _e( 'If you have <code>call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, BBP_Admin_Replies::update_reply</code> error and same and if you have all blue posts if you check "this <strong>topic</strong> of keymaster/moderator check this checkbox', 'bbpress-new-ui' ); ?></div> </label><br>
     264<?php
     265}
     266
     267function fill_bbpress_new_ui_field_1(){
     268$valnew = get_option('bbpress_new_ui_option');
    269269$valnew = $valnew['2'];
    270270?>
    271271<label>
    272272
    273 <input type="checkbox" name="bbp_new_ui_option[2]" value="1" <?php checked( 1, $valnew ) ?>  /> <?php _e( 'Hide'); ?> </label></div><br>
    274 <?php
    275 }
    276 
    277 function fill_bbp_new_ui_field_3(){
    278 $val3 = get_option('bbp_new_ui_option');
     273<input type="checkbox" name="bbpress_new_ui_option[2]" value="1" <?php checked( 1, $valnew ) ?>  /> <?php _e( 'Hide'); ?> </label></div><br>
     274<?php
     275}
     276
     277function fill_bbpress_new_ui_field_3(){
     278$val3 = get_option('bbpress_new_ui_option');
    279279$val3 = $val3['4'];
    280280?>
    281281<label>
    282282
    283 <input type="checkbox" name="bbp_new_ui_option[4]" value="1" <?php checked( 1, $val3 ) ?>  /> <?php _e( 'Deactivate' ); ?>  User reply spam block </label><br>
     283<input type="checkbox" name="bbpress_new_ui_option[4]" value="1" <?php checked( 1, $val3 ) ?>  /> <?php _e( 'Deactivate' ); ?>  User reply spam block </label><br>
    284284<?php
    285285}
    286286
    287287// instantiate our plugin's class
    288 $GLOBALS['bbp_new_ui'] = new BBP_NEW_UI();
    289 ?>
     288$GLOBALS['bbpress_new_ui'] = new bbpress_new_ui();
     289?>
  • bbpress-new-ui/branches/3.5/inc/forumui/new-forum.php

    r1319832 r1324553  
    4949            <li class="bbp-forum-topic-count"><?php _e( 'Topics', 'bbpress' ); ?></li>
    5050            <li class="bbp-forum-reply-count"><?php bbp_show_lead_topic() ? _e( 'Replies', 'bbpress' ) : _e( 'Posts', 'bbpress' ); ?></li>
    51             <li class="bbp-forum-freshness"><?php _e( 'Latest activity', 'bbp-new-ui' ); ?></li>
     51            <li class="bbp-forum-freshness"><?php _e( 'Latest activity', 'bbpress-new-ui' ); ?></li>
    5252        </ul>
    5353
  • bbpress-new-ui/branches/3.5/inc/online-status/online.php

    r1319832 r1324553  
    3636        echo '<li>';
    3737        if (bbpui_is_user_online($user_id)) {
    38             echo '<div class="status_online is_online">'.__('Online', 'bbp-new-ui').'</div>';
     38            echo '<div class="status_online is_online">'.__('Online', 'bbpress-new-ui').'</div>';
    3939        } else {
    40             echo '<div class="status_online is_not_online">'.__('Offline', 'bbp-new-ui').'</div>';
     40            echo '<div class="status_online is_not_online">'.__('Offline', 'bbpress-new-ui').'</div>';
    4141        }
    4242        echo '</li>';
  • bbpress-new-ui/branches/3.5/inc/replyui/lock.php

    r1319832 r1324553  
    2121    var d = document.createElement('DIV');
    2222    d.className = "dk-no-reply";
    23     var t = document.createTextNode("<?php _e('You cannot post more replies as long as you are the last poster. Please edit your post instead.', 'bbp-new-ui'); ?>");
     23    var t = document.createTextNode("<?php _e('You cannot post more replies as long as you are the last poster. Please edit your post instead.', 'bbpress-new-ui'); ?>");
    2424    d.appendChild(t);
    2525    c.appendChild(d);
  • bbpress-new-ui/branches/3.5/readme.txt

    r1319832 r1324553  
    44Tags: bbPress, new UI, UI, Forums, daniluk4000, Forum, Interface, Redesign, plugin, online, online status, design, lock, spam, spam lock
    55Tested up to: 4.5
    6 Stable Tag: 3.5
     6Stable Tag: 3.5.0.1
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    8080
    8181== Changelog ==
     82
     83= 3.5.0.1 =
     84* Fixed GlotPress translations
    8285
    8386= 3.5 =
Note: See TracChangeset for help on using the changeset viewer.