PDA

توجه ! این یک نسخه آرشیو شده میباشد و در این حالت شما عکسی را مشاهده نمیکنید برای مشاهده کامل متن و عکسها بر روی لینک مقابل کلیک کنید : پاک کردن url یا website از قسمت کامنت؟



Amin007
October 17th, 2015, 19:22
سلام.

من چند تا کد پیدا کردم ولی در آخر functions.php که گذاشتم کار نکرد و website رو از قسمت کامنت بر نداشت.
الان من دقیقا کجا باید قرار بدم تا حذف کنه؟


این چند تا کد :


<?php
add_filter('comment_form_default_fields', 'unset_url_field');
function unset_url_field($fields){
if(isset($fields['url']))
unset($fields['url']);
return $fields;
}
?>





add_filter('comment_form_default_fields', 'clear_url_box');
function clear_url_box($fields){
if(isset($fields['url']))
unset($fields['url']);
return $fields;
}







این تمام کد های فانکشن من هستش:



<?php
$themename = "sss";
$themefolder = "sss";
define ('theme_name', $themename );
define ('theme_ver' , 4 );
// Notifier Info
$notifier_name = $themename;
$notifier_url = "http://themes.tielabs.com/xml/".$themefolder.".xml";
//Docs Url
$docs_url = "http://themes.tielabs.com/docs/".$themefolder;
// Constants for the theme name, folder and remote XML url
define( 'MTHEME_NOTIFIER_THEME_NAME', $themename );
define( 'MTHEME_NOTIFIER_THEME_FOLDER_NAME', $themefolder );
define( 'MTHEME_NOTIFIER_XML_FILE', $notifier_url );
define( 'MTHEME_NOTIFIER_CACHE_INTERVAL', 43200 );
// WooCommerce
define('WOOCOMMERCE_USE_CSS', false);
add_action('woocommerce_before_main_content', 'tie_woocommerce_wrapper_start', 22);
function tie_woocommerce_wrapper_start() {
echo '<div class="post-listing"><div class="post-inner">';
}
add_action('woocommerce_after_main_content', 'tie_woocommerce_wrapper_start2', 11);
function tie_woocommerce_wrapper_start2() {
echo '</div></div>';
}
add_action('woocommerce_before_shop_loop', 'tie_woocommerce_wrapper_start3', 33);
function tie_woocommerce_wrapper_start3() {
echo '<div class="clear"></div>';
}

global $pagenow;
if ( is_admin() && isset( $_GET['activated'] ) && $pagenow == 'themes.php' )
add_action( 'init', 'tie_woocommerce_image_dimensions', 1 );
function tie_woocommerce_image_dimensions() {
$catalog = array(
'width' => '400', // px
'height' => '400', // px
'crop' => 1 // true
);

$single = array(
'width' => '600', // px
'height' => '600', // px
'crop' => 1 // true
);

$thumbnail = array(
'width' => '200', // px
'height' => '200', // px
'crop' => 1 // false
);

// Image sizes
update_option( 'shop_catalog_image_size', $catalog ); // Product category thumbs
update_option( 'shop_single_image_size', $single ); // Single product image
update_option( 'shop_thumbnail_image_size', $thumbnail ); // Image gallery thumbs
}

// Custom Functions
include (TEMPLATEPATH . '/custom-functions.php');
// Get Functions
include (TEMPLATEPATH . '/functions/home-cats.php');
include (TEMPLATEPATH . '/functions/home-cat-tabs.php');
include (TEMPLATEPATH . '/functions/home-cat-scroll.php');
include (TEMPLATEPATH . '/functions/home-cat-pic.php');
include (TEMPLATEPATH . '/functions/home-cat-videos.php');
include (TEMPLATEPATH . '/functions/home-recent-box.php');
include (TEMPLATEPATH . '/functions/theme-functions.php');
include (TEMPLATEPATH . '/functions/common-scripts.php');
include (TEMPLATEPATH . '/functions/banners.php');
include (TEMPLATEPATH . '/functions/widgetize-theme.php');
include (TEMPLATEPATH . '/functions/default-options.php');
include (TEMPLATEPATH . '/functions/updates.php');
include (TEMPLATEPATH . '/includes/pagenavi.php');
include (TEMPLATEPATH . '/includes/breadcrumbs.php');
include (TEMPLATEPATH . '/includes/wp_list_comments.php');
include (TEMPLATEPATH . '/includes/widgets.php');
// tie-Panel
include (TEMPLATEPATH . '/panel/shortcodes/shortcode.php');
if (is_admin()) {
include (TEMPLATEPATH . '/panel/mpanel-ui.php');
include (TEMPLATEPATH . '/panel/mpanel-functions.php');
include (TEMPLATEPATH . '/panel/category-options.php');
include (TEMPLATEPATH . '/panel/post-options.php');
include (TEMPLATEPATH . '/panel/custom-slider.php');
include (TEMPLATEPATH . '/panel/notifier/update-notifier.php');
include (TEMPLATEPATH . '/panel/importer/tie-importer.php');
}

/*-----------------------------------------------------------------------------------*/
# Custom Admin Bar Menus
/*-----------------------------------------------------------------------------------*/
function tie_admin_bar() {
global $wp_admin_bar;

if ( current_user_can( 'switch_themes' ) ){
$wp_admin_bar->add_menu( array(
'parent' => 0,
'id' => 'mpanel_page',
'title' => theme_name ,
'href' => admin_url( 'admin.php?page=panel')
) );
}

}
add_action( 'wp_before_admin_bar_render', 'tie_admin_bar' );
if ( ! isset( $content_width ) ) $content_width = 618;

// with activate istall option
if ( is_admin() && isset($_GET['activated'] ) && $pagenow == 'themes.php' ) {
if( !get_option('tie_active') ){
tie_save_settings( $default_data );
update_option( 'tie_active' , theme_ver );
}
//header("Location: admin.php?page=panel");
}
add_action( 'import_done', 'wordpress_importer_init' );
function _fetch_rss_feed($url) {
while ( stristr($url, 'http') != $url )
$url = substr($url, 1);
if ( empty($url) )
return;
$rss = fetch_feed($url); $desc = ''; $link = '';
if ( ! is_wp_error($rss) ) {
$desc = esc_attr(strip_tags(@html_entity_decode($rss->get_description(), ENT_QUOTES, get_option('blog_charset'))));
$link = esc_url(strip_tags($rss->get_permalink()));
while ( stristr($link, 'http') != $link )
$link = substr($link, 1);
}
$url = esc_url(strip_tags($url));
wp_widget_rss_output($rss);

}
?>

eramserver
October 17th, 2015, 19:45
سلام
دوست عزیز از این افزونه (https://wordpress.org/plugins/hide-n-disable-comment-url-field/) استفاده کنید

Amin007
October 17th, 2015, 21:11
سلام
دوست عزیز از این افزونه (https://wordpress.org/plugins/hide-n-disable-comment-url-field/) استفاده کنید

افزونه نمیخام استفاده کنم برا این کار.

گروه مایان
October 18th, 2015, 00:23
برای اینکار کد زیر رو در قسمت
functions.php اضافه کن. بدون ایجاد تغییرات





function crunchify_disable_comment_url($fields) { unset($fields['url']); return $fields;}add_filter('comment_form_default_fields', 'crunchify_disable_comment_url');





گروه مایان (http://mayannet.com/)
www.mayannet.com (http://mayannet.com/)

Amin007
October 18th, 2015, 01:46
برای اینکار کد زیر رو در قسمت
functions.php اضافه کن. بدون ایجاد تغییرات






function crunchify_disable_comment_url($fields) { unset($fields['url']); return $fields;}add_filter('comment_form_default_fields', 'crunchify_disable_comment_url');





گروه مایان (http://mayannet.com/)
www.mayannet.com (http://mayannet.com/)

کد های functions رو گذاشتم کجاش باید قرار بدم؟
آخرش و قبل پرانتز گذاشتم هیچ کدوم کار نکرد.
کد های پست اول رو هم گذاشتم کار نکرد.

sabafa
October 29th, 2015, 10:18
کافیه کد زیر رو بزنید تو function قالبتون:


remove_filter('comment_text', 'make_clickable', 9);