芝麻web文件管理V1.00
编辑当前文件:/home/prismawe/clients/origami-events.com/wp-content/plugins/znpb-tiltbox/znpb-tiltbox.php
url = plugin_dir_url( __FILE__ ); $this->path = plugin_dir_path( __FILE__ ); add_action( 'after_setup_theme', array( $this, 'init_plugin' ) ); add_filter( 'zn_pb_dirs', array( $this, 'register_elements_dir' ) ); load_plugin_textdomain('znpb-tiltbox-element', false, basename( dirname( __FILE__ ) ) . '/languages' ); } /** * Fire up the plugin or show a notice in case Kallyas theme is not installed */ function init_plugin(){ if( ! function_exists( 'ZNPB' ) ){ add_action( 'admin_notices', array( $this, 'show_admin_notice' ) ); } } /** * Shows an admin notice telling you that the Kallyas theme is not installed. */ function show_admin_notice(){ $class = 'notice notice-error is-dismissible'; $buy_kallyas_url = 'https://themeforest.net/item/kallyas-responsive-multipurpose-wordpress-theme/4091658'; $buy_link = sprintf( '
%2$s
', $buy_kallyas_url, __( 'Get Kallyas theme from here', 'znpb-tiltbox-element' ) ); $message = __( 'Kallyas theme is not installed! TiltBox Element only works with Kallyas theme.', 'znpb-tiltbox-element' ); printf( '
%2$s
%3$s
', $class, $message, $buy_link ); } /** * Add the path to our elements folder * @param array $dirs the folders that were already loaded * @return array the complete folders list */ function register_elements_dir( $dirs ){ $dirs[] = array( 'url' => trailingslashit( $this->url .'elements' ), 'path' => trailingslashit( $this->path .'elements' ), ); return $dirs; } } ZnPbTiltBoxElement::get_instance();