HEX
Server: Apache/2.4.62 (Unix) OpenSSL/1.1.1k
System: Linux box12.multicloud.host 4.18.0-553.52.1.el8_10.x86_64 #1 SMP Wed May 14 09:36:12 EDT 2025 x86_64
User: kashmira (1008)
PHP: 8.1.32
Disabled: NONE
Upload Files
File: /home/kashmira/public_html/razitahir.com/wp-content/plugins/stylo-core/admin/fields.php
<?php
/**
 * Setting fields callback functions
 * @param array $args
 */
function stylocore_license_data_field_cb() {

    global $stylo_sdk_license;

    $license_data = get_option('stylocore_license_data');
    $license_validation = stylothemes_is_valid_license();

    $order_id = '';
    $license_key = '';
    
    if(!empty($license_data)) {
        $order_id = $license_data['order_id'];
        $license_key = $license_data['license_key'];
    }
    
    // Could use ob_start.
    $html  = '';
    $html .= '<div class="license-data-form-fields">';
    if($license_validation == true) {
        $html .= '<div class="license-data-form-row">';
            $html .= '<label>Order ID</label>';
            $html .= '<input id="stOrderID" type="text" name="orderID" value="******" disabled />';
        $html .= '</div>';
        $html .= '<div class="license-data-form-row">';
            $html .= '<label>License Key</label>';
            $html .= '<input id="stLicenseKey" name="license_key" type="text" value="****-****-****-****" disabled />';
        $html .= '</div>';
    } else {
        $html .= '<div class="license-data-form-row">';
            $html .= '<label>Order ID</label>';
            $html .= '<input id="stOrderID" name="stylocore_license_data[order_id]" type="number" placeholder="1234" value="'.$order_id.'" required />';
        $html .= '</div>';
        $html .= '<div class="license-data-form-row">';
            $html .= '<label>License Key</label>';
            $html .= '<input id="stLicenseKey" name="stylocore_license_data[license_key]" type="text" placeholder="A1B2-C3D4-E5F6-G7H8" value="'.$license_key.'" required />';
        $html .= '</div>';
    }
    $html .= '</div>';
    if($license_key != '') { 
        $html .= '<div class="license_action_btns">';
            if($license_validation == true) {
                $html .= '<button type="button" onclick="stylo_deactivate_license()" id="deactiavtionBTN" class="stylo-action-button deactivate">Deactivate License</button>';
            } else {
                $html .= '<button type="button" onclick="stylo_activate_license()" id="actiavtionBTN" class="stylo-action-button activate">Activate License</button>';
            }
        $html .= '</div>';
        $html .= '<div id="wpacAjaxResponse"><span></span></div>';
    } else { 
        $html .= '<div class="invalid-license-message">Enter your license information and save settings</div>';
    } 
    $tags = array(
        'span' => array(
            'class' => array()
        ),
        'a' => array(
            'href'  => array(),
            'class' => array(),
            'id' => array()
        ),
        'button' => array(
            'type'  => array(),
            'class' => array(),
            'id' => array(),
            'onclick' => array()
        ),
        'div'   => array(
            'class' => array(),
            'id'    => array()
        ),
        'label' => array(
            'class' => array()
        ),
        'input' => array(
            'id'    => array(),
            'name'  => array(),
            'type'  => array(),
            'checked'   => array(),
            'placeholder'   => array(),
            'value' => array(),
            'class' => array(),
            'required' => array(),
            'disabled' => array()
        )
    );
    echo wp_kses($html, $tags);
}