Skip to content

Instantly share code, notes, and snippets.

@brankoconjic
Created November 12, 2019 19:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brankoconjic/c4efd97e5a1b7c47545fc55c8a962299 to your computer and use it in GitHub Desktop.
Save brankoconjic/c4efd97e5a1b7c47545fc55c8a962299 to your computer and use it in GitHub Desktop.
The modified file for Highend 3.6.2: HighendWP » admin » metabox » class-metabox.php
<?php
/**
* Metabox Class.
*
* @package Highend
* @since 3.5.0
*/
if ( ! class_exists( 'Highend_Metaboxes' ) ) :
/**
* Highend Metabox Class.
*
* @since 3.5.0
*/
class Highend_Metaboxes {
/**
* Primary class constructor.
*
* @since 3.5.1
*/
public function __construct() {
// Enqueue scripts.
add_action( 'admin_print_scripts-post-new.php', array( $this, 'load_assets' ) );
add_action( 'admin_print_scripts-post.php', array( $this, 'load_assets' ) );
}
/**
* Load required assets on the admin page(s).
*
* @since 3.5.1
*/
public function load_assets( $hook ) {
if ( function_exists( 'vc_is_frontend_editor' ) && vc_is_frontend_editor() ) {
return;
}
wp_enqueue_script(
'highend-metabox-js',
HBTHEMES_ADMIN_URI . '/assets/js/metabox.js',
array( 'jquery' ),
HB_THEME_VERSION,
true
);
}
}
endif;
new Highend_Metaboxes;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment