Plugin Directory

Changeset 1455063


Ignore:
Timestamp:
07/15/2016 05:51:41 AM (10 years ago)
Author:
webarthur
Message:

v2.2.2

Location:
advanced-settings
Files:
3 deleted
8 edited
1 copied

Legend:

Unmodified
Added
Removed
  • advanced-settings/tags/2.2.2/admin-code.php

    r975355 r1455063  
    114114
    115115            <tr valign="top">
     116                <th scope="row"><?php _e('Comments'); ?></th>
     117                <td>
     118                    <label for="remove_pingbacks_trackbacks_count">
     119                        <input name="remove_pingbacks_trackbacks_count" type="checkbox" id="remove_pingbacks_trackbacks_count" value="1" <?php advset_check_if('remove_pingbacks_trackbacks_count') ?> />
     120                        <?php _e('Remove Trackbacks and Pingbacks from Comment Count') ?>
     121                        </label>
     122
     123                </td>
     124            </tr>
     125
     126            <tr valign="top">
    116127                <th scope="row"><?php _e('Author Bio'); ?></th>
    117128                <td>
  • advanced-settings/tags/2.2.2/admin-system.php

    r975355 r1455063  
    3131                <th scope="row"><?php _e('Dashboard'); ?></th>
    3232                <td>
    33                     <label for="hide_update_message">
    34                         <input name="hide_update_message" type="checkbox" id="hide_update_message" value="1" <?php advset_check_if('hide_update_message') ?> />
    35                         <?php _e('Hide the WordPress update message in the Dashboard') ?>
    36                         </label>
     33                    <p>
     34                        <label for="hide_update_message">
     35                            <input name="hide_update_message" type="checkbox" id="hide_update_message" value="1" <?php advset_check_if('hide_update_message') ?> />
     36                            <?php _e('Hide the WordPress update message in the Dashboard') ?>
     37                            </label>
     38                    </p>
     39                   
     40                    <p>
     41                        <label for="dashboard_logo">
     42                            <input name="dashboard_logo" type="text" size="50" placeholder="<?php _e('http://araujo.cc/dashboard-logo-example.png') ?>" id="dashboard_logo" value="<?php echo advset_option('dashboard_logo') ?>" />
     43                            <i style="color:#999">(<?php _e('paste your custom dashboard logo here') ?>)</i>
     44                            </label>
     45                    </p>
     46
    3747                   
    3848                </td>
  • advanced-settings/tags/2.2.2/index.php

    r1234818 r1455063  
    66Author: Arthur Araújo
    77Author URI: http://araujo.cc
    8 Version: 2.2.1
     8Version: 2.2.2
    99*/
    1010
     
    128128if ( advset_option('hide_update_message') ) {
    129129  add_action( 'admin_menu', create_function( null, "remove_action( 'admin_notices', 'update_nag', 3 );" ), 2 );
     130}
     131
     132# Add a Custom Dashboard Logo
     133# from https://www.codementor.io/wordpress/tutorial/wordpress-functions-php-cheatsheet
     134if ( advset_option('dashboard_logo') ) {
     135    add_action('wp_before_admin_bar_render', '__advsettings_dashboard_logo');
     136    function __advsettings_dashboard_logo() {
     137        if(is_admin())
     138            echo '
     139<style>
     140#wpadminbar #wp-admin-bar-wp-logo > .ab-item .ab-icon:before {
     141    background-image: url('.advset_option('dashboard_logo').') !important;
     142    background-position: 0 0;
     143    color:rgba(0, 0, 0, 0);
     144}
     145#wpadminbar #wp-admin-bar-wp-logo.hover > .ab-item .ab-icon {
     146    background-position: 0 0;
     147}
     148</style>
     149';
     150    }
     151}
     152
     153# Remove Trackbacks and Pingbacks from Comment Count
     154# from https://www.codementor.io/wordpress/tutorial/wordpress-functions-php-cheatsheet
     155if ( advset_option('remove_pingbacks_trackbacks_count') ) {
     156    add_filter('get_comment_number', '__advsettings_comment_count', 0);
     157    function __advsettings_comment_count( $count ) {
     158        if ( ! is_admin() ) {
     159            global $id;
     160            $comments_by_type = &separate_comments(get_comments('status=approve&post_id=' . $id));
     161            return count($comments_by_type['comment']);
     162        }
     163        else {
     164            return $count;
     165        }
     166    }
    130167}
    131168
  • advanced-settings/tags/2.2.2/readme.txt

    r1234813 r1455063  
    66Requires at least: 3.0
    77Tested up to: 4.3
    8 Stable tag: 2.2.1
     8Stable tag: 2.2.2
    99License: GPLv2 or later
    1010Get advanced settings and change all you imagine that are not provided by WordPress.
     
    4848* Display total number of executed SQL queries
    4949* Remove any filter you want
     50* Remove Trackbacks and Pingbacks from Comment Count
     51* Add a Custom Dashboard Logo
    5052* and more to come ...
     53
     54Visit: http://araujo.cc/
    5155
    5256Contribute on github: [github.com/webarthur/advanced-settings](https://github.com/webarthur/advanced-settings)
     
    6771
    6872== Changelog ==
     73
     74= 2.2.2 =
     75* Remove Trackbacks and Pingbacks from Comment Count
     76* Add a Custom Dashboard Logo
    6977
    7078= 2.2.1 =
  • advanced-settings/trunk/admin-code.php

    r975355 r1455063  
    114114
    115115            <tr valign="top">
     116                <th scope="row"><?php _e('Comments'); ?></th>
     117                <td>
     118                    <label for="remove_pingbacks_trackbacks_count">
     119                        <input name="remove_pingbacks_trackbacks_count" type="checkbox" id="remove_pingbacks_trackbacks_count" value="1" <?php advset_check_if('remove_pingbacks_trackbacks_count') ?> />
     120                        <?php _e('Remove Trackbacks and Pingbacks from Comment Count') ?>
     121                        </label>
     122
     123                </td>
     124            </tr>
     125
     126            <tr valign="top">
    116127                <th scope="row"><?php _e('Author Bio'); ?></th>
    117128                <td>
  • advanced-settings/trunk/admin-system.php

    r975355 r1455063  
    3131                <th scope="row"><?php _e('Dashboard'); ?></th>
    3232                <td>
    33                     <label for="hide_update_message">
    34                         <input name="hide_update_message" type="checkbox" id="hide_update_message" value="1" <?php advset_check_if('hide_update_message') ?> />
    35                         <?php _e('Hide the WordPress update message in the Dashboard') ?>
    36                         </label>
     33                    <p>
     34                        <label for="hide_update_message">
     35                            <input name="hide_update_message" type="checkbox" id="hide_update_message" value="1" <?php advset_check_if('hide_update_message') ?> />
     36                            <?php _e('Hide the WordPress update message in the Dashboard') ?>
     37                            </label>
     38                    </p>
     39                   
     40                    <p>
     41                        <label for="dashboard_logo">
     42                            <input name="dashboard_logo" type="text" size="50" placeholder="<?php _e('http://araujo.cc/dashboard-logo-example.png') ?>" id="dashboard_logo" value="<?php echo advset_option('dashboard_logo') ?>" />
     43                            <i style="color:#999">(<?php _e('paste your custom dashboard logo here') ?>)</i>
     44                            </label>
     45                    </p>
     46
    3747                   
    3848                </td>
  • advanced-settings/trunk/index.php

    r1234818 r1455063  
    66Author: Arthur Araújo
    77Author URI: http://araujo.cc
    8 Version: 2.2.1
     8Version: 2.2.2
    99*/
    1010
     
    128128if ( advset_option('hide_update_message') ) {
    129129  add_action( 'admin_menu', create_function( null, "remove_action( 'admin_notices', 'update_nag', 3 );" ), 2 );
     130}
     131
     132# Add a Custom Dashboard Logo
     133# from https://www.codementor.io/wordpress/tutorial/wordpress-functions-php-cheatsheet
     134if ( advset_option('dashboard_logo') ) {
     135    add_action('wp_before_admin_bar_render', '__advsettings_dashboard_logo');
     136    function __advsettings_dashboard_logo() {
     137        if(is_admin())
     138            echo '
     139<style>
     140#wpadminbar #wp-admin-bar-wp-logo > .ab-item .ab-icon:before {
     141    background-image: url('.advset_option('dashboard_logo').') !important;
     142    background-position: 0 0;
     143    color:rgba(0, 0, 0, 0);
     144}
     145#wpadminbar #wp-admin-bar-wp-logo.hover > .ab-item .ab-icon {
     146    background-position: 0 0;
     147}
     148</style>
     149';
     150    }
     151}
     152
     153# Remove Trackbacks and Pingbacks from Comment Count
     154# from https://www.codementor.io/wordpress/tutorial/wordpress-functions-php-cheatsheet
     155if ( advset_option('remove_pingbacks_trackbacks_count') ) {
     156    add_filter('get_comment_number', '__advsettings_comment_count', 0);
     157    function __advsettings_comment_count( $count ) {
     158        if ( ! is_admin() ) {
     159            global $id;
     160            $comments_by_type = &separate_comments(get_comments('status=approve&post_id=' . $id));
     161            return count($comments_by_type['comment']);
     162        }
     163        else {
     164            return $count;
     165        }
     166    }
    130167}
    131168
  • advanced-settings/trunk/readme.txt

    r1234813 r1455063  
    66Requires at least: 3.0
    77Tested up to: 4.3
    8 Stable tag: 2.2.1
     8Stable tag: 2.2.2
    99License: GPLv2 or later
    1010Get advanced settings and change all you imagine that are not provided by WordPress.
     
    4848* Display total number of executed SQL queries
    4949* Remove any filter you want
     50* Remove Trackbacks and Pingbacks from Comment Count
     51* Add a Custom Dashboard Logo
    5052* and more to come ...
     53
     54Visit: http://araujo.cc/
    5155
    5256Contribute on github: [github.com/webarthur/advanced-settings](https://github.com/webarthur/advanced-settings)
Note: See TracChangeset for help on using the changeset viewer.