<commit_before><?php
function my_enqueue_scripts_frontpage() {
	//载入jquery库
	wp_enqueue_script( 'jquery&migrate', get_template_directory_uri() . '/js/jquery&migrate-1.x.min.js', false, '1.13.0', false);
	wp_enqueue_script( 'base', get_template_directory_uri() . '/js/global.min.js', array(), '2.0', true);
	if( dopt('d_slimbox_b') != '' )
		wp_enqueue_script( 'slimbox', get_template_directory_uri() . '/js/slimbox2.min.js', array(), '1.00', true);
	if( dopt('d_ajax_b') != '' )
		wp_enqueue_script( 'ajax', get_template_directory_uri() . '/js/ajax.min.js', array(), '1.00', true);
	if( dopt('d_autospace_b') != '' )
		wp_enqueue_script( 'autospace', get_template_directory_uri() . '/js/autospace.min.js', array(), '1.00', true);

	wp_localize_script('base', 'ajax', array(
		'ajax_url' => admin_url('admin-ajax.php'),
		'home' => home_url()
	));
}

//让WP自动添加页面title
add_theme_support( 'title-tag' );

//禁用谷歌字体
function remove_open_sans() {
	wp_deregister_style( 'open-sans' );
	wp_register_style( 'open-sans', false );
	wp_enqueue_style('open-sans','');
}
add_action( 'init', 'remove_open_sans' );

//编辑器添加按钮
function enable_more_buttons($buttons) {
	$buttons[] = 'sub';
	$buttons[] = 'sup';
	$buttons[] = 'fontselect';
	$buttons[] = 'fontsizeselect';
	$buttons[] = 'cleanup';
	$buttons[] = 'styleselect';
	$buttons[] = 'wp_page';
	$buttons[] = 'anchor';
	$buttons[] = 'backcolor';
	return $buttons;
}
add_filter("mce_buttons_3", "enable_more_buttons");

//禁用半角符号自动转换为全角
remove_filter('the_content', 'wptexturize');

function reset_emojis() {
	remove_action('wp_head', 'print_emoji_detection_script', 7);
	remove_action('admin_print_scripts', 'print_emoji_detection_script');
	remove_action('wp_print_styles', 'print_emoji_styles');
	remove_action('admin_print_styles', 'print_emoji_styles');
	add_filter('the_content', 'wp_staticize_emoji');
	add_filter('comment_text', 'wp_staticize_emoji',50);
}
add_action('init', 'reset_emojis');

function fixed_activity_widget_avatar_style(){
echo '<style type="text/css">
		#activity-widget #the-comment-list .avatar {
		position: absolute;
		top: 13px;
		width: 50px;
		height: 50px;
	  }
	  </style>';
}
add_action('admin_head', 'fixed_activity_widget_avatar_style' );

add_action( 'wp_enqueue_scripts', 'my_enqueue_scripts_frontpage' );

include_once('inc/widget.php');
include_once('inc/themeset.php');
<commit_msg>不禁用半角符号自动转换为全角<commit_after><?php
function my_enqueue_scripts_frontpage() {
	//载入jquery库
	wp_enqueue_script( 'jquery&migrate', get_template_directory_uri() . '/js/jquery&migrate-1.x.min.js', false, '1.13.0', false);
	wp_enqueue_script( 'base', get_template_directory_uri() . '/js/global.min.js', array(), '2.0', true);
	if( dopt('d_slimbox_b') != '' )
		wp_enqueue_script( 'slimbox', get_template_directory_uri() . '/js/slimbox2.min.js', array(), '1.00', true);
	if( dopt('d_ajax_b') != '' )
		wp_enqueue_script( 'ajax', get_template_directory_uri() . '/js/ajax.min.js', array(), '1.00', true);
	if( dopt('d_autospace_b') != '' )
		wp_enqueue_script( 'autospace', get_template_directory_uri() . '/js/autospace.min.js', array(), '1.00', true);

	wp_localize_script('base', 'ajax', array(
		'ajax_url' => admin_url('admin-ajax.php'),
		'home' => home_url()
	));
}

//让WP自动添加页面title
add_theme_support( 'title-tag' );

//禁用谷歌字体
function remove_open_sans() {
	wp_deregister_style( 'open-sans' );
	wp_register_style( 'open-sans', false );
	wp_enqueue_style('open-sans','');
}
add_action( 'init', 'remove_open_sans' );

//编辑器添加按钮
function enable_more_buttons($buttons) {
	$buttons[] = 'sub';
	$buttons[] = 'sup';
	$buttons[] = 'fontselect';
	$buttons[] = 'fontsizeselect';
	$buttons[] = 'cleanup';
	$buttons[] = 'styleselect';
	$buttons[] = 'wp_page';
	$buttons[] = 'anchor';
	$buttons[] = 'backcolor';
	return $buttons;
}
add_filter("mce_buttons_3", "enable_more_buttons");

function reset_emojis() {
	remove_action('wp_head', 'print_emoji_detection_script', 7);
	remove_action('admin_print_scripts', 'print_emoji_detection_script');
	remove_action('wp_print_styles', 'print_emoji_styles');
	remove_action('admin_print_styles', 'print_emoji_styles');
	add_filter('the_content', 'wp_staticize_emoji');
	add_filter('comment_text', 'wp_staticize_emoji',50);
}
add_action('init', 'reset_emojis');

function fixed_activity_widget_avatar_style(){
echo '<style type="text/css">
		#activity-widget #the-comment-list .avatar {
		position: absolute;
		top: 13px;
		width: 50px;
		height: 50px;
	  }
	  </style>';
}
add_action('admin_head', 'fixed_activity_widget_avatar_style' );

add_action( 'wp_enqueue_scripts', 'my_enqueue_scripts_frontpage' );

include_once('inc/widget.php');
include_once('inc/themeset.php');

{'fraction_non_alphanumeric': 0.1888006865479511, 'fraction_numerical': 0.011585496674533362, 'mean_word_length': 6.8352941176470585, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1247014', 'n_tokens_mistral': 1891, 'n_tokens_neox': 1873, 'n_words': 269}