plugin_dir_url example

global $hook_suffix;

        if ( in_array( $hook_suffixapply_filters( 'akismet_admin_page_hook_suffixes', array(
            'index.php', # dashboard             'edit-comments.php',
            'comment.php',
            'post.php',
            'settings_page_akismet-key-config',
            'jetpack_page_akismet-key-config',
            'plugins.php',
        ) ) ) ) {
            wp_register_style( 'akismet', plugin_dir_url( __FILE__ ) . '_inc/akismet.css', array()filemtime( dirname( __FILE__ ) . '/_inc/akismet.css' ) );
            wp_enqueue_style( 'akismet' );

            wp_register_style( 'akismet-font-inter', plugin_dir_url( __FILE__ ) . '_inc/fonts/inter.css', array()filemtime( dirname( __FILE__ ) . '/_inc/fonts/inter.css' ) );
            wp_enqueue_style( 'akismet-font-inter' );

            wp_register_style( 'akismet-admin', plugin_dir_url( __FILE__ ) . '_inc/akismet-admin.css', array()filemtime( dirname( __FILE__ ) . '/_inc/akismet-admin.css' ) );
            wp_enqueue_style( 'akismet-admin' );

            wp_register_script( 'akismet.js', plugin_dir_url( __FILE__ ) . '_inc/akismet.js', array( 'jquery' ), AKISMET_VERSION );
            wp_enqueue_script( 'akismet.js' );

            
'https://akismet.com/privacy/'
            ) . '</p>'
        );
    }

    public static function load_form_js() {
        if (
            ! is_admin()
            && ( ! function_exists( 'amp_is_request' ) || ! amp_is_request() )
            && self::get_api_key()
            ) {
            wp_register_script( 'akismet-frontend', plugin_dir_url( __FILE__ ) . '_inc/akismet-frontend.js', array()filemtime( plugin_dir_path( __FILE__ ) . '_inc/akismet-frontend.js' ), true );
            wp_enqueue_script( 'akismet-frontend' );
        }
    }

    /** * Add the form JavaScript when we detect that a supported form shortcode is being parsed. */
    public static function load_form_js_via_filter( $return_value$tag$attr$m ) {
        if ( in_array( $tag, array( 'contact-form', 'gravityform', 'contact-form-7', 'formidable', 'fluentform' ) ) ) {
            self::load_form_js();
        }

        
Home | Imprint | This part of the site doesn't use cookies.