Plugin Directory

Changeset 1000579


Ignore:
Timestamp:
10/02/2014 12:00:38 PM (11 years ago)
Author:
flashcentury
Message:

0.3.0

Location:
broken-link-manager/trunk
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • broken-link-manager/trunk/config/class/broken_url.php

    r998351 r1000579  
    8282function inline_editor() {
    8383    return '
    84     <form method="post" action="admin.php?page=wblm-broken&amp;editURL=on">
    85     <input type="hidden" value="%s" name="url">
    86     <input type="hidden" value="old" name="type">
    87     <input type="hidden" value="%s" name="rpage">
    8884        <div class="blc-inline-editor-content">
    8985            <label>
    9086                <span class="title">URL</span>
    91                 <span><input type="text" placeholder="http://" name="new_url" value="" class="wblm-table-add-field" /></span>
     87                <span><input type="text" placeholder="http://" name="new_url%s" value="" class="wblm-table-add-field" /></span>
    9288            </label>
    93             <input type="submit" class="button-primary save alignright" value="Add" />
     89            <button type="submit" class="button-primary save alignright" name="urlAdd" value="%s">Add</button>
    9490        <div class="clear"></div>
    95         </div>
    96     </form>';
     91        </div>';
    9792}
    9893
     
    108103
    109104function column_new_url($item){
    110     $rpage = isset($_GET['page']) ? 'page=' . $_GET['page'] : 'page=wblm-broken';
    111     $rpage .= isset($_GET['orderby']) ? '&orderby=' . $_GET['orderby'] : null;
    112     $rpage .= isset($_GET['order']) ? '&order=' . $_GET['order'] : null;
    113     $rpage .= isset($_GET['paged']) ? '&paged=' . $_GET['paged'] : null;
    114     $rpage .= isset($_GET['s']) ? '&s=' . $_GET['s'] : null;
    115105    $actions = array(
    116         'add_url'    => sprintf($this->inline_editor() ,$item['id'],$rpage),
     106        'add_url'    => sprintf($this->inline_editor() ,$item['id'],$item['id']),
    117107    );
    118108    return sprintf('%1$s %2$s', $item['new_url'], $this->row_actions($actions) );
    119109}
    120110
     111
    121112function get_bulk_actions() {
    122113  $actions = array(
    123     'delete'    => 'Delete'
     114    'delete'    => 'Delete URL (URLs and URLs LOG)',
     115    'deleteLog'    => 'Delete only URL LOG'
    124116  );
    125117  return $actions;
     
    129121    return sprintf('<input type="checkbox" name="url[]" value="%s" />', $item['id']);   
    130122}
    131    
     123
     124function process_bulk_action() {
     125    $url = null;           
     126    if( 'delete'===$this->current_action() ) {
     127        foreach($_POST['url'] as $url) {
     128            global $wpdb;   
     129            $wpdb->query("DELETE FROM " . TABLE_WBLM . " WHERE id = $url");
     130            $wpdb->query("DELETE FROM " . TABLE_WBLM_LOG . " WHERE url = $url");
     131        }
     132    }elseif( 'deleteLog'===$this->current_action() ) {
     133        foreach($_POST['url'] as $url) {
     134            global $wpdb;   
     135            $wpdb->query("DELETE FROM " . TABLE_WBLM_LOG . " WHERE url = $url");
     136        }
     137    }
     138   
     139    $urlAdd  = isset($_REQUEST['urlAdd']) ? $_REQUEST['urlAdd'] : null;
     140    if($urlAdd){
     141        global $wpdb;
     142        $new_url  = isset($_REQUEST['new_url'.$urlAdd]) ? $_REQUEST['new_url'.$urlAdd] : null;
     143        $wpdb->query("UPDATE " . TABLE_WBLM . " SET `new_url` = '$new_url', `active` = '1' WHERE id = '$urlAdd'");
     144    }
     145   
     146   
     147   
     148   
     149}
     150
    132151
    133152function prepare_items($search=''){
     
    141160 
    142161$this->_column_headers = array($columns, $hidden, $sortable);
     162$this->process_bulk_action();
    143163
    144164$paged = isset($_REQUEST['paged']) ? max(0, intval($_REQUEST['paged']) - 1) : 0;
  • broken-link-manager/trunk/config/class/log_url.php

    r998351 r1000579  
    140140
    141141function column_cb($item) {
    142         return sprintf(
    143             '<input type="checkbox" name="url[]" value="%s" />', $item['id']
    144         );   
    145 }
     142    return sprintf('<input type="checkbox" name="log[]" value="%s" />', $item['id']);   
     143}
     144
     145
     146function process_bulk_action() {
     147    $url = null;           
     148    if( 'delete'===$this->current_action() ) {
     149        foreach($_POST['log'] as $log) {
     150            global $wpdb;   
     151            $wpdb->query("DELETE FROM " . TABLE_WBLM_LOG . " WHERE id = $log");
     152        }
     153    }
     154}
     155
     156
    146157
    147158function prepare_items($url='',$search=''){
     
    155166 
    156167$this->_column_headers = array($columns, $hidden, $sortable);
     168$this->process_bulk_action();
    157169
    158170$paged = isset($_REQUEST['paged']) ? max(0, intval($_REQUEST['paged']) - 1) : 0;
  • broken-link-manager/trunk/config/class/redirected_url.php

    r998351 r1000579  
    8888function get_bulk_actions() {
    8989  $actions = array(
    90     'delete'    => 'Delete'
     90    'delete'    => 'Delete URL (URLs and URLs LOG)',
     91    'deleteLog'    => 'Delete only URL LOG'
    9192  );
    9293  return $actions;
     
    9697    return sprintf('<input type="checkbox" name="url[]" value="%s" />', $item['id']);   
    9798}
     99
     100function process_bulk_action() {
     101    $url = null;           
     102    if( 'delete'===$this->current_action() ) {
     103        foreach($_POST['url'] as $url) {
     104            global $wpdb;   
     105            $wpdb->query("DELETE FROM " . TABLE_WBLM . " WHERE id = $url");
     106            $wpdb->query("DELETE FROM " . TABLE_WBLM_LOG . " WHERE url = $url");
     107        }
     108    }elseif( 'deleteLog'===$this->current_action() ) {
     109        foreach($_POST['url'] as $url) {
     110            global $wpdb;   
     111            $wpdb->query("DELETE FROM " . TABLE_WBLM_LOG . " WHERE url = $url");
     112        }
     113    }       
     114}
     115
    98116
    99117function prepare_items($search=''){
     
    107125 
    108126$this->_column_headers = array($columns, $hidden, $sortable);
     127$this->process_bulk_action();
    109128 
    110129$paged = isset($_REQUEST['paged']) ? max(0, intval($_REQUEST['paged']) - 1) : 0;
  • broken-link-manager/trunk/config/functions.php

    r998351 r1000579  
    5050_e('Updated ', 'wblm');
    5151
    52 echo '<script type="text/javascript">
    53 window.location="'. admin_url("admin.php?$page"). '";
    54 </script>';
     52//echo '<script type="text/javascript">
     53//window.location="'. admin_url("admin.php?$page"). '";
     54//</script>';
    5555}
    5656
     
    9494}
    9595
     96function get_wblmFooter(){
     97    echo '<div class="navbar navbar-default" id="footer" role="footer">&copy; All rights reserved, <a target="_blank" href="http://k-78.de">K78 Let`s do more</a> and <a target="_blank" href="http://beqo.de">BEQO</a>   ver. <?php echo WBLM_VERSION; ?></div>';
     98}
     99
     100function get_wblmTopNavi(){
     101    $topNavi ='
     102    <ul class="nav navbar-top-links navbar-right">
     103        <li class="dropdown">
     104            <a class="dropdown-toggle" data-toggle="dropdown" href="#"><i class="fa fa-tasks fa-fw"></i>  <i class="fa fa-caret-down"></i></a>
     105                <ul class="dropdown-menu dropdown-user">
     106                    <li><a href="%s"><div><i class="fa fa-area-chart fa-fw"></i> Dashboard</div></a></li>
     107                    <li class="divider"></li>
     108                    <li><a href="%s"><div><i class="fa fa-link  fa-fw"></i> Redirect URLs</div></a></li>
     109                    <li class="divider"></li>
     110                    <li><a href="%s"><div><i class="fa fa-unlink fa-fw"></i> Broken URLs</div></a></li>
     111                    <li class="divider"></li>
     112                    <li><a href="%s"><div><i class="fa fa-plus fa-fw"></i> Add URLs</div></a></li>
     113                    <li class="divider"></li>
     114                    <li><a href="%s"><div><i class="fa fa-list-alt fa-fw"></i> Log</div></a></li>
     115                    <li class="divider"></li>
     116                    <li><a class="text-center" href="%s"><i class="fa fa-cogs "></i>
     117                    <strong>Settings</strong></a></li>
     118                </ul>
     119        </li>
     120    </ul>';
     121    printf($topNavi, admin_url("admin.php?page=wblm-dashboard"), admin_url("admin.php?page=wblm-redirect"), admin_url("admin.php?page=wblm-broken"), admin_url("admin.php?page=wblm-add-url"), admin_url("admin.php?page=wblm-log"), admin_url("admin.php?page=wblm-settings"));
     122}
     123
     124
    96125if($settingsSaveFunc){ wpslSettingsSave(); }
    97126if($editURLFunc){ wpslEditURL(); }
  • broken-link-manager/trunk/readme.txt

    r998351 r1000579  
    44Requires at least: 3.0
    55Tested up to: 4.0
    6 Stable tag: 0.2.9
     6Stable tag: 0.3.0
    77Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=8NYR3F4RVTBHS
    88
     
    1616
    1717> <strong>SEO Friendly</strong><br>
    18 > Method 301, as recommended by Google, is used in the routing process. Thus, you will not suffer from loss by broken links in terms of SEO.
     18> Method 301, as recommended by Google, is used in the routing process. Thus, you will not suffer from loss by broken links in terms of SEO.<br>
    1919> [Click here for more information about 301 redirect](https://support.google.com/webmasters/answer/93633?hl=en)
    2020
     
    4040
    4141== Changelog ==
     42
     43= 0.3.0 =
     44* wp_debug_log warnings were organized.
     45* Added Bulk delete feature
     46* Added Bulk delete feature for LOG
     47* Added menu icon
     48* Beta version now ended
    4249
    4350= 0.2.9 BETA =
  • broken-link-manager/trunk/wblm-broken-url.php

    r997783 r1000579  
    1616        <div class="row">
    1717            <div class="col-lg-12">
    18                 <h3 class="page-header">Broken URLs</h3>
    19                 <?php include WBLM_CONFIG_PATH . 'topnavi.php'; ?>
     18                <h3 class="page-header"><?php _e('Broken URLs', 'wblm') ?></h3>
     19                <?php get_wblmTopNavi(); ?>
    2020            </div>
    2121            <!-- /.col-lg-12 -->
     
    3737                    <div class="panel-body">
    3838                        <div class="table-responsive">
     39                        <form action="<?php echo admin_url('admin.php?page=wblm-broken'); ?>" id="wpse-list-table-form" method="post">
    3940                        <?php $WblmListTable->display(); ?>
     41                        </form>
    4042                        </div>
    4143                        <!-- /.table-responsive -->
     
    4951    </div>
    5052    <!-- /#page-wrapper -->
    51     <?php include WBLM_CONFIG_PATH . 'footer.php'; ?>
     53    <?php get_wblmFooter(); ?>
    5254</div>
  • broken-link-manager/trunk/wblm-dashboard.php

    r997783 r1000579  
    2020                <div class="col-lg-12">
    2121                <h1 class="page-header"><?php _e('Dashboard', 'wblm') ?></h1>
    22                 <?php include WBLM_CONFIG_PATH . 'topnavi.php'; ?>
     22                <?php get_wblmTopNavi(); ?>
    2323                </div>
    24                 <!-- /.col-lg-12 -->
    2524            </div>           
    2625            <!-- /.row -->
     
    170169        </div>
    171170        <!-- /#page-wrapper -->
    172         <?php include WBLM_CONFIG_PATH . 'footer.php'; ?>
     171        <?php get_wblmFooter(); ?>
    173172</div>
    174173<!-- /#wrapper -->
  • broken-link-manager/trunk/wblm-redirect-url.php

    r997783 r1000579  
    1717            <div class="col-lg-12">
    1818                <h3 class="page-header"><?php _e('Redirected URLs', 'wblm') ?></h3>
    19                 <?php include WBLM_CONFIG_PATH . 'topnavi.php'; ?>
     19                <?php get_wblmTopNavi(); ?>
    2020            </div>
    2121            <!-- /.col-lg-12 -->
     
    3535                    <div class="panel-body">
    3636                        <div class="table-responsive">
     37                        <form action="<?php echo admin_url('admin.php?page=wblm-redirect'); ?>" id="wpse-list-table-form" method="post">
    3738                        <?php $WblmListTable->display(); ?>
     39                        </form>
    3840                        </div>
    3941                        <!-- /.table-responsive -->
     
    4749    </div>
    4850    <!-- /#page-wrapper -->
    49     <?php include WBLM_CONFIG_PATH . 'footer.php'; ?>
     51    <?php get_wblmFooter(); ?>
    5052</div>
  • broken-link-manager/trunk/wblm-settings.php

    r997315 r1000579  
    77                </a>
    88            </div>
    9             <!-- /.navbar-header -->
    109        </nav>
    1110
     
    1413                <div class="col-lg-12">
    1514                   <h3 class="page-header"><?php _e('Settings', 'wblm') ?></h3>
    16                    <?php include WBLM_CONFIG_PATH . 'topnavi.php'; ?>
     15                   <?php get_wblmTopNavi(); ?>
    1716                </div>
    1817                <!-- /.col-lg-12 -->
    1918            </div>           
    20             <!-- /.row -->
    21            
    2219            <form class="form-horizontal" role="form" action="admin.php?page=wblm-settings&settingsSave=on" method="post">
    23            
    24            
    2520            <!-- General Settings -->
    2621            <div class="row">
     
    214209        </div>
    215210        <!-- /#page-wrapper -->
    216         <?php include WBLM_CONFIG_PATH . 'footer.php'; ?>
     211        <?php get_wblmFooter(); ?>
    217212</div>
    218213<!-- /#wrapper -->
  • broken-link-manager/trunk/wblm-url-add.php

    r997783 r1000579  
    1111    <div id="page-wrapper">
    1212        <div class="row">
    13             <div class="col-lg-12"><h3 class="page-header"><?php _e('Add URL', 'wblm') ?></h3><?php include WBLM_CONFIG_PATH . 'topnavi.php'; ?></div>
    14             <!-- /.col-lg-12 -->
     13            <div class="col-lg-12"><h3 class="page-header"><?php _e('Add URL', 'wblm') ?></h3><?php get_wblmTopNavi(); ?></div>
    1514        </div>           
    1615        <!-- /.row -->
     
    5251    </div>
    5352    <!-- /#page-wrapper -->
    54     <?php include WBLM_CONFIG_PATH . 'footer.php'; ?>
     53    <?php get_wblmFooter(); ?>
    5554</div>
    5655<!-- /#wrapper -->
  • broken-link-manager/trunk/wblm-url-edit.php

    r997315 r1000579  
    1717        <div class="row">
    1818            <div class="col-lg-12">
    19                 <h3 class="page-header"><?php _e('Edit URL', 'wblm') ?></h3><?php include WBLM_CONFIG_PATH . 'topnavi.php'; ?>
     19                <h3 class="page-header"><?php _e('Edit URL', 'wblm') ?></h3>
     20                <?php get_wblmTopNavi(); ?>
    2021            </div>
    2122            <!-- /.col-lg-12 -->
     
    6263    </div>
    6364    <!-- /#page-wrapper -->
    64     <?php include WBLM_CONFIG_PATH . 'footer.php'; ?>
     65    <?php get_wblmFooter(); ?>
    6566</div>
    6667<!-- /#wrapper -->
  • broken-link-manager/trunk/wblm-url-log.php

    r997783 r1000579  
    1818            <div class="col-lg-12">
    1919                <h3 class="page-header">LOG</h3>
    20                 <?php include WBLM_CONFIG_PATH . 'topnavi.php'; ?>
     20                <?php get_wblmTopNavi(); ?>
    2121            </div>
    2222            <!-- /.col-lg-12 -->
     
    3737                    <div class="panel-body">
    3838                        <div class="table-responsive">
    39                         <?php $WblmListTable->display(); ?>
     39                        <form action="<?php echo admin_url('admin.php?page=wblm-log'); ?>" id="wpse-list-table-form" method="post">
     40                        <?php $WblmListTable->display(); ?>
     41                        </form>
    4042                        </div>
    4143                        <!-- /.table-responsive -->
     
    4951    </div>
    5052    <!-- /#page-wrapper -->
    51     <?php include WBLM_CONFIG_PATH . 'footer.php'; ?>
     53    <?php get_wblmFooter(); ?>
    5254</div>
  • broken-link-manager/trunk/wblm.php

    r998351 r1000579  
    44Plugin URI: https://wordpress.org/plugins/broken-link-manager
    55Description: WBLM -> Wordpress Broken Link Manager. This plugin helps you check, organise and monitor your broken backlinks.
    6 Version: 0.2.9
     6Version: 0.3.0
    77Author: Hüseyin Kocak
    88Author URI: http://k-78.de
     
    2525along with this program.  If not, see <http://www.gnu.org/licenses/>.
    2626*/
    27 if(!defined('WBLM_VERSION')) {
    28     define( 'WBLM_VERSION', '0.2.9' );
    29 }
     27if ( ! function_exists( 'get_plugins' ) ) {
     28    require_once ABSPATH . 'wp-admin/includes/plugin.php';
     29}
     30$get_wblm = get_plugin_data(__FILE__);
    3031if(!defined('WBLM_PLUGIN_PATH')) {
    3132    define( 'WBLM_PLUGIN_PATH', trailingslashit( dirname( __FILE__ ) ) );
    3233}
     34if(!defined('WBLM_VERSION')) {
     35    define( 'WBLM_VERSION', $get_wblm['Version'] );
     36}
    3337if(!defined('WBLM_CONFIG_PATH')) {
    3438    define( 'WBLM_CONFIG_PATH', WBLM_PLUGIN_PATH . 'config/' );
     
    4145}
    4246if(!defined('WBLM_NAME')) {
    43     define( 'WBLM_NAME', 'BROKEN LINK MANAGER' );
     47    define( 'WBLM_NAME', strtoupper($get_wblm['Name']) );
     48}
     49if(!defined('WBLM_ICON')) {
     50    define( 'WBLM_ICON', $get_wblm['AuthorURI'].'/wblm/icon.png?ver='.WBLM_VERSION );
    4451}
    4552global $wpdb;
     
    8491    wp_enqueue_script( 'wblm-morris', plugins_url( '/js/plugins/morris/morris.min.js', __FILE__ ), array('jquery', 'wblm-bootstrap', 'wblm-raphael'), null, true );
    8592    wp_enqueue_script( 'wblm-dashboard-data', plugins_url( '/js/dashboard.php', __FILE__ ), array('jquery', 'wblm-bootstrap', 'wblm-raphael', 'wblm-morris'), null, true );
    86 }
    87 function wblm_menu(){
    88     include 'wblm-admin.php';
    8993}
    9094function menuDashboardFunc(){
     
    135139    $wpdb->query($sql_wblm_log);
    136140/*************************************************************************************
    137  *  LOG KLASORU (SIMDILIK SADECE KLASOR OLUSTURULUYOR)
     141 *  LOG PATH (SIMDILIK SADECE KLASOR OLUSTURULUYOR)
    138142 *************************************************************************************/
    139143    $log_dir = WBLM_PLUGIN_PATH.'/log';
     
    217221  global $wpdb;
    218222  if ( $wp_query->is_404() ){
    219 $current_time = current_time( 'mysql' );
    220 
    221 $referer = $_SERVER['HTTP_REFERER'];
    222 if (!$referer){$referer = 'Direct';}
    223 $useragent = $_SERVER['HTTP_USER_AGENT'];
    224 $ip =  $_SERVER['REMOTE_ADDR'];
    225 $admin_email = get_option('admin_email');
    226 
    227 $https  = isset($_SERVER[HTTPS]) ? $_SERVER[HTTPS] : null;
    228 $brokenUrl = 'http' . $https . '://' . $_SERVER[HTTP_HOST] . $_SERVER[REQUEST_URI];
    229 
    230 $url_check = $wpdb->get_row("SELECT * FROM " . TABLE_WBLM . "  WHERE old_url = '$brokenUrl' limit 1");
    231 $urlID = $url_check->id;
    232 
    233 if($url_check->old_url){
    234     if(SAVE_URL_STATS){
    235     $urlHit = $url_check->hit + 1;
    236     $wpdb->query("UPDATE " . TABLE_WBLM . " SET `hit` = '$urlHit' WHERE id = '$urlID'");
    237     }
    238     if($url_check->new_url){
    239         $redirectedUrl = $url_check->new_url;
     223    $referer  = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : 'Direct';
     224    $useragent  = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : null;
     225    $ip  = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : null;
     226    $current_time = current_time('mysql');
     227    $https  = isset($_SERVER['HTTPS']) ? $_SERVER['HTTPS'] : null;
     228    $brokenUrl = 'http' . $https . '://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
     229
     230    $url_check = $wpdb->get_row("SELECT * FROM " . TABLE_WBLM . "  WHERE old_url = '$brokenUrl' limit 1"); 
     231    $urlID  = isset($url_check->id) ? $url_check->id : null;
     232
     233    if($urlID){
     234        if(SAVE_URL_STATS){
     235        $urlHit = $url_check->hit + 1;
     236        $wpdb->query("UPDATE " . TABLE_WBLM . " SET `hit` = '$urlHit' WHERE id = '$urlID'");
     237        }
     238        if($url_check->new_url){
     239            $redirectedUrl = $url_check->new_url;
     240        }else{
     241            $redirectedUrl = 0;
     242            if(SAVE_URL_LOG){
     243                if(REDIRECT_DEFAULT_URL){$http_statu = 301;}else{$http_statu = 404;}
     244                $wpdb->query("INSERT INTO " . TABLE_WBLM_LOG . " (`url`, `date`, `referer`, `useragent`, `ip`, `broken`, `http_statu`) VALUES ('$urlID', '$current_time', '$referer', '$useragent', '$ip', '1', '$http_statu')");           
     245            }//SAVE_URL_LOG
     246        }
    240247    }else{
    241248        $redirectedUrl = 0;
    242         if(SAVE_URL_LOG){
    243             if(REDIRECT_DEFAULT_URL){$http_statu = 301;}else{$http_statu = 404;}
    244             $wpdb->query("INSERT INTO " . TABLE_WBLM_LOG . " (`url`, `date`, `referer`, `useragent`, `ip`, `broken`, `http_statu`) VALUES ('$urlID', '$current_time', '$referer', '$useragent', '$ip', '1', '$http_statu')");           
    245         }//SAVE_URL_LOG
     249        if(SAVE_BROKEN_URLS){
     250            $wpdb->query("INSERT INTO " . TABLE_WBLM . " (`old_url`, `hit`) VALUES ('$brokenUrl', '1')");
     251                if(SAVE_URL_LOG){
     252                    if(REDIRECT_DEFAULT_URL){$http_statu = 301;}else{$http_statu = 404;}
     253                    $newUrl = $wpdb->get_row("SELECT id FROM " . TABLE_WBLM . " where `old_url` = '$brokenUrl'");
     254                    $newUrlID = $newUrl->id;
     255                    $wpdb->query("INSERT INTO " . TABLE_WBLM_LOG . " (`url`, `date`, `referer`, `useragent`, `ip`, `broken`, `http_statu`) VALUES ('$newUrlID', '$current_time', '$referer', '$useragent', '$ip', '1', '$http_statu')");           
     256                }//SAVE_URL_LOG
     257            }//SAVE_BROKEN_URLS
    246258    }
    247 }else{
    248     $redirectedUrl = 0;
    249     if(SAVE_BROKEN_URLS){
    250         $wpdb->query("INSERT INTO " . TABLE_WBLM . " (`old_url`, `hit`) VALUES ('$brokenUrl', '1')");
    251             if(SAVE_URL_LOG){
    252                 if(REDIRECT_DEFAULT_URL){$http_statu = 301;}else{$http_statu = 404;}
    253                 $newUrl = $wpdb->get_row("SELECT id FROM " . TABLE_WBLM . " where `old_url` = '$brokenUrl'");
    254                 $newUrlID = $newUrl->id;
    255                 $wpdb->query("INSERT INTO " . TABLE_WBLM_LOG . " (`url`, `date`, `referer`, `useragent`, `ip`, `broken`, `http_statu`) VALUES ('$newUrlID', '$current_time', '$referer', '$useragent', '$ip', '1', '$http_statu')");           
    256             }//SAVE_URL_LOG
    257         }//SAVE_BROKEN_URLS
    258     }
     259   
    259260    if ($redirectedUrl){
    260261        if(SAVE_URL_LOG){
     
    287288}
    288289function createBaclinksMenu() {
    289     $menu_wblm_dashboard = add_menu_page("Backlinks", "Backlinks", 'manage_options', "wblm-dashboard", "menuDashboardFunc");
     290    $menu_wblm_dashboard = add_menu_page("Backlinks", "Backlinks", 'manage_options', "wblm-dashboard", "menuDashboardFunc", WBLM_ICON);
    290291    $menu_wblm_redirecturl = add_submenu_page("wblm-dashboard", "Redirected URLs", "Redirected URLs", 'manage_options', "wblm-redirect", "menuRedirectUrlFunc");
    291292    $menu_wblm_brokenurl = add_submenu_page("wblm-dashboard", "Broken URLs", "Broken URLs", 'manage_options', "wblm-broken", "menuBrokenUrlFunc");
Note: See TracChangeset for help on using the changeset viewer.