403Webshell
Server IP : 172.67.201.108  /  Your IP : 216.73.217.85
Web Server : Apache/2.4.68 (Amazon Linux) OpenSSL/3.5.5
System : Linux ip-172-31-69-123.ec2.internal 6.1.176-223.369.amzn2023.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Jul 24 13:34:27 UTC 2026 x86_64
User : ec2-user ( 1000)
PHP Version : 8.4.23
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/home2/etddev/wordpress/wp-content/plugins/etdpass-customization/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/home2/etddev/wordpress/wp-content/plugins/etdpass-customization/etdpass-customization.php
<?php
/**
 * Plugin Name: Etdpass Customization
 * Plugin URI: 
 * Description: Change all customization part in this plugin.
 * Version: 1.0
 * Author: Etdpass Customization
 * Author URI: http://www.xyz-xyz.com
 */

 defined( 'ABSPATH' ) || exit;

define('ETDPASS_CUS_PLUGIN_PATH', plugin_dir_path( __FILE__ ));
define('ETDPASS_CUS_PLUGIN_URL', plugin_dir_url( __FILE__ ));

 //Including required file for plugin
include ETDPASS_CUS_PLUGIN_PATH.'/etdpass-template-function.php';

//** Add fields to admin listing edit
add_filter( 'job_manager_job_listing_data_fields', 'etdpass_admin_add_fields' );
function etdpass_admin_add_fields( $fields ) {
    ///Add only on backend show on listing page
    //Add City
    $fields['_job_etdpass_city'] = array(
        'label'       => __( 'City' ),
        'type'        => 'text',
        'required'    => true,
        'priority'    => 98,
      );
    
    //Add Description
    $fields['_job_etdpass_description'] = array(
        'label'       => __( 'Description' ),
        'type'        => 'textarea',
        'required'    => true,
        'priority'    => 99,
    );

    //// Add fieds also on backend admin
    /// Add Cross Streets
    $fields['_cross_streets'] = array(
        'label'       => __( 'Cross Streets' ),
        'type'        => 'text',
        'required'    => true,
        'placeholder'   => 'Enter Cross Streets',
        'priority'    => 2,
    );

    /// Add Subway lines
    $fields['_subway_lines'] = array(
        'label'       => __( 'Subway lines' ),
        'type'        => 'text',
        'required'    => true,
        'placeholder'   => 'Enter Subway lines',
        'priority'    => 3,
    );

    /// Add Services
    $fields['_job_services'] = array(
        'label'       => __( 'Value Added Services' ),
        'type'        => 'text',
        'required'    => true,
        'placeholder'   => 'Enter Services',
        'priority'    => 5,
    );

    /// Add Contact Person
    $fields['_contact_person_phone'] = array(
        'label'       => __( 'Contact Person Phone' ),
        'type'        => 'text',
        'required'    => true,
        'placeholder'   => 'Enter Contact Person Phone',
        'priority'    => 8,
    );

    /// Add Contact Person
    $fields['_contact_person'] = array(
        'label'       => __( 'Contact Person' ),
        'type'        => 'text',
        'required'    => true,
        'placeholder'   => 'Enter Contact Person Name',
        'priority'    => 7,
    );



    /// Add Reservation Link
    $fields['_reservation_link'] = array(
        'label'       => __( 'Reservation Link' ),
        'type'        => 'text',
        'required'    => false,
        'sanitizer'   => 'url',
        'placeholder'   => 'Enter Reservation Link (Ex. http://link.com)',
        'priority'    => 8,
    );

    /// Add Reservation Link
    $fields['_promo_code'] = array(
        'label'       => __( 'Promo Code' ),
        'type'        => 'text',
        'required'    => false,
        'placeholder'   => 'Enter Promo Code',
        'priority'    => 8,
    );

    /// Add Menu URL
    $fields['_menu_url'] = array(
        'label'       => __( 'Menu URL' ),
        'type'        => 'text',
        'required'    => false,
        'sanitizer'   => 'url',
        'placeholder'   => 'Enter Menu URL (Ex. http://menu.com)',
        'priority'    => 8,
    );

    /// Add Partner Agreement Upload
    $fields['_partner_agreement'] = array(
        'label'                 => __( 'Partner Agreement Upload' ),
        'type'                  => 'file',
        'required'              => false,
        'ajax'                  => true,
        'priority'              => 8,
        'allowed_mime_types'    => array(
                                        'pdf' => 'application/pdf',
                                        'doc|docx' => 'application/msword',
                                    ),
    );

    /// Add COVID Safety Provisions
    $fields['_covid_safety_provisions'] = array(
        'label'       => __( 'COVID Safety Provisions' ),
        'type'        => 'textarea',
        'required'    => false,
        'placeholder'   => 'COVID Safety Provisions',
        'priority'    => 10,
    );

  return $fields;
}

//** Add fields to the frontend
add_filter( 'submit_job_form_fields', 'etdpass_frontend_add_fields', 25, 1 );
function etdpass_frontend_add_fields( $fields ) {
    // Adding new fields in submit listing front end
    /// Add Subway lines
    $fields['job']['subway_lines'] = array(
        'label'       => __( 'Subway lines' ),
        'type'        => 'text',
        'required'    => true,
        'placeholder'   => 'Enter Subway lines',
        'priority'    => 2,
    );

    /// Add Cross Streets
    $fields['job']['cross_streets'] = array(
        'label'       => __( 'Cross Streets' ),
        'type'        => 'text',
        'required'    => true,
        'placeholder'   => 'Enter Cross Streets',
        'priority'    => 2,
    );

    $fields['job']['job_location']['label'] = "Street, City, State, ZIP";
    $fields['job']['job_location']['placeholder'] = "123 Main St. New York, NY 10001";
    $fields['job']['job_location']['priority'] = "2";
    

    /// Add Cross Streets
    $fields['job']['company_website_frt'] = array(
        'label'       => __( 'URL' ),
        'type'        => 'text',
        'required'    => true,
        'sanitizer'   => 'url',
        'placeholder'   => 'Website http://',
        'priority'    => 3,
    );

    /// Add COVID Safety Provisions
    $fields['job']['covid_safety_provisions'] = array(
        'label'       => __( 'COVID Safety Provisions' ),
        'type'        => 'textarea',
        'required'    => false,
        'placeholder'   => 'COVID Safety Provisions',
        'priority'    => 5,
    );

    /// Add Services
    $fields['job']['job_services'] = array(
        'label'       => __( 'Value Added Services' ),
        'type'        => 'text',
        'required'    => true,
        'placeholder'   => 'Enter Services',
        'priority'    => 6,
    );


    

    /// Add Contact Person
    $fields['job']['contact_person'] = array(
        'label'       => __( 'Contact Person' ),
        'type'        => 'text',
        'required'    => true,
        'placeholder'   => 'Enter Contact Person Name',
        'priority'    => 8,
    );

    //alter email fields
    $fields['job']['application']['label'] = "Contact Email";
    $fields['job']['application']['priority'] = "8";

    /// Add Contact Person
    $fields['job']['contact_person_phone'] = array(
        'label'       => __( 'Contact Person Phone' ),
        'type'        => 'text',
        'required'    => true,
        'placeholder'   => 'Enter Contact Person Phone',
        'priority'    => 9,
    );


    /// Add Reservation Link
    $fields['job']['reservation_link'] = array(
        'label'       => __( 'Reservation Link' ),
        'type'        => 'text',
        'required'    => false,
        'sanitizer'   => 'url',
        'placeholder'   => 'Enter Reservation Link (Ex. http://link.com)',
        'description'   => 'This is the URL where Pass Holders go to reserve a ticket or seat.',
        'priority'    => 10,
    );

    /// Add Reservation Link
    $fields['job']['promo_code'] = array(
        'label'       => __( 'Promo Code' ),
        'type'        => 'text',
        'required'    => false,
        'placeholder'   => 'Enter Promo Code',
        'description'   => 'If there isn’t a dedicated reservation URL, this is the code a Passholder uses to receive their discount.',
        'priority'    => 11,
    );

    /// Add Menu URL
    $fields['job']['menu_url'] = array(
        'label'       => __( 'Menu URL' ),
        'type'        => 'text',
        'required'    => false,
        'sanitizer'   => 'url',
        'placeholder'   => 'Enter Menu URL (Ex. http://menu.com)',
        'description'   => 'This is the URL that links to restaurant’s menu.',
        'priority'    => 12,
    );

    $fields['job']['company_logo']['priority'] = "13";
    $fields['job']['listing_gallery_images']['priority'] = "14";

    /// Add Partner Agreement Upload
    $fields['job']['partner_agreement'] = array(
        'label'                 => __( 'Partner Agreement Upload' ),
        'type'                  => 'file',
        'required'              => false,
        'ajax'                  => true,
        'priority'              => 25,
        'allowed_mime_types'    => array(
                                        'pdf' => 'application/pdf',
                                        'doc|docx' => 'application/msword',
                                    ),
    );


    /// Add terms_conditions
    $fields['job']['terms_conditions'] = array(
        'label'       => __( 'By submitting this form you agree to all the terms and conditions set forth in the ETD Pass Partner Agreement' ),
        'type'        => 'checkbox',
        'required'    => true,
        'placeholder'   => 'Enter Menu',
        'priority'    => 88,
    );
 
  return $fields;
}

//** Add and edit field name to the frontend
add_filter( 'submit_job_form_fields', 'etdpass_frontend_update_fields', 20, 1 );
function etdpass_frontend_update_fields( $fields ) {

    // Updating existing field label
    $fields['job']['job_title']['label'] = "Company";
    $fields['job']['job_title']['priority'] = "1";

    

    $fields['job']['job_type']['label'] = "Category";
    $fields['job']['job_type']['required'] = false;
    $fields['job']['job_location']['priority'] = "5";

    
    $fields['job']['listing_gallery_images']['label'] = "Additional Photo";

    return $fields;
}

//** add filter for custom add select option in category type
add_filter('job_manager_term_select_field_wp_dropdown_categories_args','term_categories_args_custom',100,3);

function term_categories_args_custom($arg, $key, $field){
    $arg['show_option_none'] = $field['required'] ? '' : 'Select a Category';
    return $arg;
}

//** Update field value when save data to the frontend
add_action( 'job_manager_update_job_data', 'etdpass_update_field_data', 100, 2 );

function etdpass_update_field_data( $job_id, $values ){
	// Check for value in $_POST, then set var with sanitized value, CHANGE my_input_name to the NAME used in the input HTML element
	$input_name = isset( $_POST['company_website_frt'] ) ? sanitize_text_field( $_POST['company_website_frt'] ) : false;
	// Update the listing with the value, !! ALL META KEYS SHOULD BE PREPENDED WITH AN UNDERSCORE !!!
	if( $input_name ) update_post_meta( $job_id, '_company_website', $input_name );

}

/*
* Function and action for change subcategory selection heading 
*/
add_action('wp_footer', 'manipulation_name_js');
function manipulation_name_js(){
    if(is_page('submit-venue')){
?>
        <script>
        jQuery( document ).ajaxComplete(function( event, xhr, settings ) {
            var string = jQuery('.qodef-ls-type-field-wrapper h3').html();
            var res = string.split('"');
            var conc_text = 'Select Categories For "'+res[1]+'"';
            console.log(conc_text);
            jQuery('.qodef-ls-type-field-wrapper h3').html(conc_text);
        });
        </script>
<?php
    } 
}

/*
* Function and action for add custom css
*/
add_action( 'init', 'enqueue_custom_scripts_css' );
function enqueue_custom_scripts_css()
{
    wp_register_style('custom_css',  plugin_dir_url(__FILE__) . '/etdpass-custom-css.css?v=25', array(), 'v1.0.0');
    wp_enqueue_style('custom_css');
}

//** add shortcode for header user info
add_shortcode('welcome_user_header','welcome_user_header_fun');

function welcome_user_header_fun(){
    $current_user = wp_get_current_user();
    echo  ' <span style="color:black;"><b>Welcome, '.$current_user->user_firstname.'!</b></span>';

}

//** Add Filter for user stats plugin remove user condition
add_filter('wpjms_job_listing_loop_args','wpjms_job_listing_loop_args_custom',20,2);

function wpjms_job_listing_loop_args_custom( $args, $context){
    // print_r($args);
    unset($args['author']);
    return $args;
}

Youez - 2016 - github.com/yon3zu
LinuXploit