Файловый менеджер - Редактировать - /home/tuudkjt/globeasy/wp-includes/ID3/ova-framework.zip
Назад
PK �(,]��7�( �( inc/class-metaboxes.phpnu ��� <?php if (!defined( 'ABSPATH' )) exit; if( !class_exists('Tripgo_Metaboxes') ){ class Tripgo_Metaboxes { public $prefix = 'ova_met_'; public function __construct() { add_action( 'add_meta_boxes', array( $this, 'add' ) ); add_action( 'save_post', array($this, 'save') ); } function add(){ // General Setting add_meta_box( $this->prefix.'general_setting', // Unique ID esc_html__('General Setting', 'ova-framework'), // Box title array( $this, 'general_setting' ), // Content callback, must be of type callable apply_filters( 'tripgo_set_header_version' ,array( 'post', 'page' ) ) // Post type ); // Post Format Setting add_meta_box( $this->prefix.'embed_setting', // Unique ID esc_html__('Embed setting', 'ova-framework'), // Box title array( $this, 'embed_setting' ), // Content callback, must be of type callable array( 'post' ), 'side', // priority 'high' // position ); add_meta_box( $this->prefix.'gallery_setting', esc_html__('Gallery', 'ova-framework'), array( $this, 'galery_setting' ), array( 'post' ), 'side', 'high' ); } function save( int $post_id ){ // Header Version if ( array_key_exists( $this->prefix.'header_version', $_POST ) ) { update_post_meta( $post_id, $this->prefix.'header_version', $_POST[$this->prefix.'header_version'] ); } // Footer Version if ( array_key_exists( $this->prefix.'footer_version', $_POST ) ) { update_post_meta( $post_id, $this->prefix.'footer_version', $_POST[$this->prefix.'footer_version'] ); } // Main layout if ( array_key_exists( $this->prefix.'main_layout', $_POST ) ) { update_post_meta( $post_id, $this->prefix.'main_layout', $_POST[$this->prefix.'main_layout'] ); } // Wide layout if ( array_key_exists( $this->prefix.'wide_site', $_POST ) ) { update_post_meta( $post_id, $this->prefix.'wide_site', $_POST[$this->prefix.'wide_site'] ); } // Embed Media if ( array_key_exists( $this->prefix.'embed_media', $_POST ) ) { update_post_meta( $post_id, $this->prefix.'embed_media', $_POST[$this->prefix.'embed_media'] ); } // Save if (!isset($_POST['gallery_meta_nonce']) || !wp_verify_nonce($_POST['gallery_meta_nonce'], basename(__FILE__))) return; if (!current_user_can('edit_post', $post_id)) return; if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) return; if(isset($_POST[$this->prefix.'gallery_id'])) { update_post_meta($post_id, $this->prefix.'gallery_id', $_POST[$this->prefix.'gallery_id']); } else { delete_post_meta($post_id, $this->prefix.'gallery_id'); } } function general_setting( $post ) { // Header Version $header_selected = get_post_meta( $post->ID, $this->prefix.'header_version', true ); $list_header = apply_filters('tripgo_list_header', '') != '' ? array_merge( array( 'global' => 'Global' ), apply_filters('tripgo_list_header', '') ) : array( 'global' => 'Global' ); ?> <label for="<?php echo $this->prefix.'header_version' ?>"> <?php esc_html_e('Header Version', 'ova-framework'); ?> </label> <select name="<?php echo $this->prefix.'header_version' ?>" id="<?php echo $this->prefix.'header_version' ?>" class="postbox"> <?php foreach ($list_header as $key => $value) { ?> <option value="<?php echo $key ?>" <?php selected( $header_selected, $key ); ?>> <?php echo $value; ?> </option> <?php } ?> </select> <br><br> <?php // Footer Version $footer_selected = get_post_meta( $post->ID, $this->prefix.'footer_version', true ); $list_footer = apply_filters('tripgo_list_footer', '') != '' ? array_merge( array( 'global' => 'Global' ), apply_filters('tripgo_list_footer', '') ) : array( 'global' => 'Global' ); ?> <label for="<?php echo $this->prefix.'footer_version' ?>"> <?php esc_html_e('Footer Version', 'ova-framework'); ?> </label> <select name="<?php echo $this->prefix.'footer_version' ?>" id="<?php echo $this->prefix.'footer_version' ?>" class="postbox"> <?php foreach ($list_footer as $key => $value) { ?> <option value="<?php echo $key ?>" <?php selected( $footer_selected, $key ); ?>> <?php echo $value; ?> </option> <?php } ?> </select> <br><br> <?php // Main layout $layout_selected = get_post_meta( $post->ID, $this->prefix.'main_layout', true ); $layouts = apply_filters('tripgo_define_layout', '') != '' ? array_merge( array( 'global' => 'Global' ), apply_filters('tripgo_define_layout', '') ) : array( 'global' => 'Global' ); ?> <label for="<?php echo $this->prefix.'main_layout' ?>"> <?php esc_html_e('Main layout', 'ova-framework'); ?> </label> <select name="<?php echo $this->prefix.'main_layout' ?>" id="<?php echo $this->prefix.'main_layout' ?>" class="postbox"> <?php foreach ($layouts as $key => $value) { ?> <option value="<?php echo $key ?>" <?php selected( $layout_selected, $key ); ?>> <?php echo $value; ?> </option> <?php } ?> </select> <br><br> <?php // Wide site $wide_site_selected = get_post_meta( $post->ID, $this->prefix.'wide_site', true ); $wide_site = apply_filters('tripgo_define_wide_boxed', '') != '' ? array_merge( array( 'global' => 'Global' ), apply_filters('tripgo_define_wide_boxed', '') ) : array( 'global' => 'Global' ); ?> <label for="<?php echo $this->prefix.'wide_site' ?>"> <?php esc_html_e('Wide Site', 'ova-framework'); ?> </label> <select name="<?php echo $this->prefix.'wide_site' ?>" id="<?php echo $this->prefix.'wide_site' ?>" class="postbox"> <?php foreach ($wide_site as $key => $value) { ?> <option value="<?php echo $key ?>" <?php selected( $wide_site_selected, $key ); ?>> <?php echo $value; ?> </option> <?php } ?> </select> <?php } function embed_setting( $post ){ // Embed Media $header_selected = get_post_meta( $post->ID, $this->prefix.'embed_media', true ); ?> <label for="<?php echo $this->prefix.'embed_media' ?>"> <?php esc_html_e('Embed Video Link', 'ova-framework'); ?> </label> <input type="text" name="<?php echo $this->prefix.'embed_media' ?>" value="<?php echo $header_selected; ?>" id="<?php echo $this->prefix.'embed_media' ?>" class="postbox" /> <?php } function galery_setting( $post ) { wp_nonce_field( basename(__FILE__), 'gallery_meta_nonce' ); $ids = get_post_meta($post->ID, $this->prefix.'gallery_id', true); ?> <table class="form-table ova_metabox_gallery"> <tr> <td> <a class="gallery-add button" href="#" data-uploader-title="<?php esc_html_e( 'Add Images', 'ova-framework' ) ?>" data-uploader-button-text="<?php esc_html_e( 'Add Images', 'ova-framework' ) ?>"> <?php esc_html_e( 'Add Images', 'ova-framework' ) ?> </a> <ul id="gallery-metabox-list"> <?php if ($ids) : foreach ($ids as $key => $value) : $image = wp_get_attachment_image_src($value); ?> <li> <input type="hidden" name="<?php echo $this->prefix.'gallery_id';?>[<?php echo $key; ?>]" value="<?php echo $value; ?>"> <img class="image-preview" src="<?php echo $image[0]; ?>"> <a class="change-image button button-small" href="#" data-uploader-title="<?php esc_html_e( 'Change Image', 'ova-framework' ) ?>" data-uploader-button-text="<?php esc_html_e( 'Change Image', 'ova-framework' ) ?>" title="<?php esc_html_e( 'Delete image', 'ova-framework' ); ?>"> <?php esc_html_e( 'Change', 'ova-framework' ) ?> </a> <br> <small> <a class="remove-image" href="#" title="<?php esc_html_e( 'Delete image', 'ova-framework' ); ?>"> <?php esc_html_e( 'Delete', 'ova-framework' ); ?> </a> </small> </li> <?php endforeach; endif; ?> </ul> </td> </tr> </table> <?php } } } return new Tripgo_Metaboxes(); PK �(,]�L�7 7 inc/class-shortcode.phpnu ��� <?php if (!defined( 'ABSPATH' )) exit; if( !class_exists('Tripgo_Shortcode') ){ class Tripgo_Shortcode { public function __construct() { add_shortcode( 'tripgo-elementor-template', array( $this, 'tripgo_elementor_template' ) ); } public function tripgo_elementor_template( $atts ){ $atts = extract( shortcode_atts( array( 'id' => '', ), $atts) ); $args = array( 'id' => $id ); if( did_action( 'elementor/loaded' ) ){ return Elementor\Plugin::instance()->frontend->get_builder_content_for_display( $id ); } return; } } } return new Tripgo_Shortcode(); PK �(,]�P��b b inc/class-hf-builder.phpnu ��� <?php if (!function_exists('OVA_HF_Builder')) { class OVA_HF_Builder { private static $instance; public function __construct() { add_action( 'init', array( $this, 'ova_framework_hf_el' ) ); add_action( 'template_redirect', array( $this, 'block_template_frontend' ) ); add_filter( 'single_template', array( $this, 'ova_load_canvas_template' ) ); if ( is_admin() ) { add_action( 'load-post.php', array( $this, 'init_metabox' ) ); add_action( 'load-post-new.php', array( $this, 'init_metabox' ) ); } } // Make Custom Post Type - ova_hf_elementor ////////////////////////////////////////////////////////////////////////////////// public function ova_framework_hf_el() { $labels = array( 'name' => esc_html__( 'Builder Header Footer', 'post type general name', 'ova-framework' ), 'singular_name' => esc_html__( 'Builder Header Footer', 'post type singular name', 'ova-framework' ), 'menu_name' => esc_html__( 'Builder Header Footer', 'admin menu', 'ova-framework' ), 'name_admin_bar' => esc_html__( 'HF', 'add new on admin bar', 'ova-framework' ), 'add_new' => esc_html__( 'Add New HF', 'Slide', 'ova-framework' ), 'add_new_item' => esc_html__( 'Add New HF', 'ova-framework' ), 'new_item' => esc_html__( 'New HF', 'ova-framework' ), 'edit_item' => esc_html__( 'Edit HF', 'ova-framework' ), 'view_item' => esc_html__( 'View HF', 'ova-framework' ), 'all_items' => esc_html__( 'All HF', 'ova-framework' ), 'search_items' => esc_html__( 'Search HF', 'ova-framework' ), 'parent_item_colon' => esc_html__( 'Parent HF:', 'ova-framework' ), 'not_found' => esc_html__( 'No HF found.', 'ova-framework' ), 'not_found_in_trash' => esc_html__( 'No HF found in Trash.', 'ova-framework' ), ); $args = array( 'labels' => $labels, 'public' => true, 'rewrite' => true, 'show_ui' => true, 'show_in_menu' => true, 'show_in_nav_menus' => false, 'exclude_from_search' => true, 'capability_type' => 'post', 'hierarchical' => false, 'menu_icon' => 'dashicons-editor-kitchensink', 'supports' => array( 'title', 'elementor' ), ); register_post_type( 'ova_framework_hf_el', $args ); } public function block_template_frontend() { if ( is_singular( 'ova_framework_hf_el' ) && ! current_user_can( 'edit_posts' ) ) { wp_redirect( site_url(), 301 ); die; } } /* Single of ova_framework_hf_el will only display in elementor */ public function ova_load_canvas_template( $single_template ) { global $post; if ( 'ova_framework_hf_el' == $post->post_type ) { $elementor_2_0_canvas = ELEMENTOR_PATH . 'modules/page-templates/templates/canvas.php'; if ( file_exists( $elementor_2_0_canvas ) ) { return $elementor_2_0_canvas; } else { return ELEMENTOR_PATH . '/includes/page-templates/canvas.php'; } } return $single_template; } /** * Meta box initialization. */ public function init_metabox() { add_action( 'add_meta_boxes', array( $this, 'add_metabox' ) ); add_action( 'save_post', array( $this, 'save_metabox' ), 10, 2 ); } /** * Adds the meta box. */ public function add_metabox() { add_meta_box( 'hf_el', esc_html__( 'Elementor Header Footer Option', 'ova-framework' ), array( $this, 'ova_render_metabox' ), 'ova_framework_hf_el', 'normal', 'high' ); } /** * Renders the meta box. */ public function ova_render_metabox( $post ) { // Add nonce for security and authentication. $value = get_post_meta($post->ID, 'hf_options', true); ?> <label> <?php esc_html_e( 'Display in', 'ova-framework' ); ?> <select name="hf_options" id="hf_options" > <option value="footer" <?php selected($value, 'footer'); ?>><?php esc_html_e( 'Footer', 'ova-framework' ); ?></option> <option value="header" <?php selected($value, 'header'); ?>><?php esc_html_e( 'Header', 'ova-framework' ); ?></option> <option value="none" <?php selected($value, 'none'); ?>><?php esc_html_e( 'None', 'ova-framework' ); ?></option> </select> </label> <?php wp_nonce_field( 'custom_nonce_action', 'custom_nonce' ); } public function save_metabox( $post_id, $post ) { // Add nonce for security and authentication. $nonce_name = isset( $_POST['custom_nonce'] ) ? $_POST['custom_nonce'] : ''; $nonce_action = 'custom_nonce_action'; // Check if nonce is set. if ( ! isset( $nonce_name ) ) { return; } // Check if nonce is valid. if ( ! wp_verify_nonce( $nonce_name, $nonce_action ) ) { return; } // Check if user has permissions to save data. if ( ! current_user_can( 'edit_post', $post_id ) ) { return; } if (array_key_exists('hf_options', $_POST)) { update_post_meta( $post_id, 'hf_options', sanitize_text_field( $_POST['hf_options'] ) ); } // Check if not an autosave. if ( wp_is_post_autosave( $post_id ) ) { return; } // Check if not a revision. if ( wp_is_post_revision( $post_id ) ) { return; } } } } return new OVA_HF_Builder(); PK �(,]�<�� � assets/css/admin/style.cssnu ��� #gallery-metabox-list li { float: left; width: 50px; text-align: center; margin: 10px 10px 10px 0; cursor: move; } #ova_met_general_setting label{ font-weight: bold; min-width: 150px; display: inline-block; } #ova_met_general_setting select{ border: 1px solid #ccc; padding: 5px 10px; } #ova_met_embed_setting label{ margin-bottom: 10px; display: block; } #ova_met_embed_setting input{ border: 1px solid #ccc; padding: 5px 10px; }PK �(,]�~E�O O assets/js/admin/script.jsnu ��� var file_frame; jQuery(document).on('click', '.ova_metabox_gallery a.gallery-add', function(e) { e.preventDefault(); if (file_frame) file_frame.close(); file_frame = wp.media.frames.file_frame = wp.media({ title: jQuery(this).data('uploader-title'), button: { text: jQuery(this).data('uploader-button-text'), }, multiple: true }); file_frame.on('select', function() { var listIndex = jQuery('#gallery-metabox-list li').index(jQuery('#gallery-metabox-list li:last')), selection = file_frame.state().get('selection'); selection.map(function(attachment, i) { attachment = attachment.toJSON(), index = listIndex + (i + 1); jQuery('#gallery-metabox-list').append('<li><input type="hidden" name="ova_met_gallery_id[' + index + ']" value="' + attachment.id + '"><img class="image-preview" src="' + attachment.sizes.thumbnail.url + '"><a class="change-image button button-small" href="#" data-uploader-title="Change" data-uploader-button-text="Change">Change</a><br><small><a class="remove-image" href="#">Remove</a></small></li>'); }); }); fnSortable(); file_frame.open(); }); jQuery(document).on('click', '.ova_metabox_gallery a.change-image', function(e) { e.preventDefault(); var that = jQuery(this); if (file_frame) file_frame.close(); file_frame = wp.media.frames.file_frame = wp.media({ title: jQuery(this).data('uploader-title'), button: { text: jQuery(this).data('uploader-button-text'), }, multiple: false }); file_frame.on( 'select', function() { attachment = file_frame.state().get('selection').first().toJSON(); that.parent().find('input:hidden').attr('value', attachment.id); that.parent().find('img.image-preview').attr('src', attachment.sizes.thumbnail.url); }); file_frame.open(); }); jQuery(document).on('click', '.ova_metabox_gallery a.remove-image', function(e) { e.preventDefault(); jQuery(this).parents('li').animate({ opacity: 0 }, 200, function() { jQuery(this).remove(); resetIndex(); }); }); function resetIndex() { jQuery('#gallery-metabox-list li').each(function(i) { jQuery(this).find('input:hidden').attr('name', 'ova_met_gallery_id[' + i + ']'); }); } function fnSortable() { jQuery('#gallery-metabox-list').sortable({ opacity: 0.6, stop: function() { resetIndex(); } }); }PK �(,]Ld�o� � ova-framework.phpnu ��� <?php /** Plugin Name: OvaTheme Framework Plugin URI: https://themeforest.net/user/ovatheme/portfolio Description: A plugin to create custom Post Type, Shortcode, Elementor Version: 1.0.0 Author: Ovatheme Author URI: https://themeforest.net/user/ovatheme License: GPL2 Text Domain: ova-framework Domain Path: /languages */ if (!function_exists('OvaFramework')) { class OvaFramework { function __construct() { if (!defined('OVA_PLUGIN_PATH')) { define( 'OVA_PLUGIN_PATH', plugin_dir_path( __FILE__ ) ); } if (!defined('OVA_PLUGIN_URI')) { define( 'OVA_PLUGIN_URI', plugin_dir_url( __FILE__ ) ); } load_plugin_textdomain( 'ova-framework', false, basename( dirname( __FILE__ ) ) .'/languages' ); /* Custom Post Type */ include OVA_PLUGIN_PATH.'inc/class-hf-builder.php'; // Metabox include OVA_PLUGIN_PATH.'inc/class-metaboxes.php'; // Shortcode include OVA_PLUGIN_PATH.'inc/class-shortcode.php'; add_action( 'admin_enqueue_scripts', array( $this, 'ova_admin_scripts' ) ); // Share Social in Single Post add_filter( 'ova_share_social', array( $this, 'tripgo_content_social' ), 2, 10 ); add_filter( 'upload_mimes', array( $this, 'ova_upload_mimes' ), 1, 10); add_filter( 'widget_text', 'do_shortcode' ); } function ova_admin_scripts() { wp_enqueue_script( 'script', OVA_PLUGIN_URI. 'assets/js/admin/script.js', array('jquery'), null, true ); wp_enqueue_style( 'style', OVA_PLUGIN_URI. 'assets/css/admin/style.css', array(), null ); } public function tripgo_content_social( $link, $title ) { $html = '<ul class="share-social-icons clearfix"> <li> <a class="share-ico ico-facebook" target="_blank" href="http://www.facebook.com/sharer.php?u='.$link.'" title="'.$title.'"> <i class="fab fa-facebook-f"></i> </a> </li> <li> <a class="share-ico ico-twitter" target="_blank" href="https://twitter.com/share?url='.$link.'&text='.urlencode($title).'&hashtags=simplesharebuttons" title="'.$title.'"> <i class="fab fa-twitter"></i> </a> </li> <li> <a class="share-ico ico-pinterest" target="_blank" href="https://pinterest.com/pin/create/button/?url='.$link.'" title="'.$title.'"> <i class="fab fa-pinterest-p"></i> </a> </li> </ul>'; echo apply_filters( 'ova_share_social_html', $html, $link, $title ); } public function ova_upload_mimes($mimes){ $mimes['svg'] = 'image/svg+xml'; return $mimes; } } } return new OvaFramework(); PK �(,]��7�( �( inc/class-metaboxes.phpnu ��� PK �(,]�L�7 7 �( inc/class-shortcode.phpnu ��� PK �(,]�P��b b i, inc/class-hf-builder.phpnu ��� PK �(,]�<�� � G assets/css/admin/style.cssnu ��� PK �(,]�~E�O O 'I assets/js/admin/script.jsnu ��� PK �(,]Ld�o� � �R ova-framework.phpnu ��� PK �_
| ver. 1.6 |
Github
|
.
| PHP 8.1.34 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка