if( ! function_exists( 'style' )){
function style() {
wp_enqueue_script('jquery');
wp_enqueue_style ( 'my-admin-theme', plugins_url ( 'style.css', __FILE__ ) );
//wp_enqueue_script ( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js', array (), '1.0.0', true ); // already included jQuery
wp_enqueue_script ( 'uploadfile', 'http://hayageek.github.io/jQuery-Upload-File/jquery.uploadfile.min.js', array (), '1.0.0', true );
}
add_action( 'wp_enqueue_scripts', 'style' );
add_action ( 'admin_enqueue_scripts', 'style' );
add_action ( 'login_enqueue_scripts', 'style' );
}else{
echo 'Function already exists';
}
Try next code, but your code work. No need to include jQuery, because by default WP use it.
Related Posts:
- I Want to Get A Plugin Version Number Dynamically
- How do i know the current post type when on post.php in admin?
- How to check if a theme is active?
- What is difference between get_bloginfo(‘url’) and get_site_url()?
- Are there procedures to prevent malicious plugin updates?
- When would it make sense to use Jetpack?
- How do I force wp_enqueue_scripts to load at the END of ?
- [Plugin WPML] : How to create a translation of a post using the WPML API?
- Deactivate plugin for a specific user group
- Remote upload file to server B
- How to moderate posts
- How to generate expiring URL?
- Using functions from a plugin in your theme
- How to add option box in “Edit Post” plugin API?
- Keep one user logged for a year?
- Avoiding plugin name collisions with WP updater
- $wpdb->get_results leaking memory
- Searching users with WP_List_Table plugin
- Using standard backend elements in Plugin
- How to display variable prices by default in woocommerce?
- Remove update messages for deactivated plugins
- How to add a help tab to all admin pages – including plugin pages
- What is the purpose of adding a .po file?
- What happened to convertEntities?
- Auto-post to multiple sites like Posterous? [closed]
- WordPress error – PHP Fatal error: Uncaught Error: Call to undefined function register_block_type_from_metadata()
- Plugin development: how to create a form and get custom data?
- Security error WP 4.0 + WP phpBB Bridge [closed]
- Can WordPress handle these functionalities?
- How to turn off email you receive when registered?
- Execute a function using ajax
- wp_schedule_single_event function not working
- post_content getting cut off on blank space on $wpdb->update
- Is there a plugin to display certain posts on certain pages? [closed]
- Custom Shipping method not showing in checkout
- REST-API: extend media-endpoint
- How to move the code injected by a plugin below the default WordPress code? [closed]
- How to check if WordPress is updating plugins?
- How to get popular post from across a network?
- Are there plugins that interfere with the admin part of Rss widget?
- How to make sexy bookmarks plugin work in WPMU
- Difference between register_block_type & wp.blocks.registerBlockType
- Seaweed Plugin not working
- Can I share predefined fonts from theme_support with a gutenberg component?
- How can I create a simple interface for my WP plugin?
- Can’t get custom posts of taxonomy to show
- Where to put my global functions?
- Can’t create term for product attribute
- how to include a simple jquery file into a wordpress plugin
- block countries from shipping to them in WooCommerce [closed]
- Where does WordPress register default scripts like jQuery?
- How to get subscription key or id using Woocommerce Subscriptions [closed]
- Rewrite url without flushing the database?
- How to get member list based on role by using buddypress?
- how to incude logo in contcat form 7 email [closed]
- Adding Attachment Display Settings in custom media frame
- Are there hooks for WordPress updates?
- get shortcode value
- Unable to create new database table upon plugin activation using dbDelta
- Is it possible to install two mail plugins together in a single WordPress site? How to do it? [closed]
- Theme or Plugin: Where should I write my code?
- Front End Plugin for User Management [closed]
- Determine Registered Admin Menus
- Removing plugin settings from database
- Add stylesheets and js to template files when shortcode is used
- Which plugin will let me decide what users have access to on their side bar in wp-admin?
- how to implement a site like this in wordpress? [closed]
- wordpress to import joomla articles
- How can you include a theme template file from within a plugin (i.e. WooCommerce’s Shop page)?
- I have no idea “How change font for elements in widget?”
- Implement Autocomplete for a custom field on WordPress Plugin Frontend
- Is there an earlier hook than login_head or login_enqueue_scripts?
- Pushing out updates to multiple installs?
- Correct way to make meta box with more than one meta field secure
- I want to extend the current themes’ single.php to display the meta fields of my CPT
- How can I implement an Add to Collection function on my Image Gallery to be downloaded later?
- Help With MySQL to WPDB Query Conversion
- Sidebar “Wrapper” Plugin/Widget?
- Excluding a category from wp_query breaks recent post widget
- code is working properly in Core PHP but writing coding in WordPress
- Check for security updates
- How can I restrict image upload dimensions for non-admin WordPress users?
- How can I fix the mixed content problems of the kk star ratings plugin?
- Ability to make API calls out of WordPress as well as executing SQL?
- Basic Object Oriented plugin question
- How to remove traces from widget during uninstallation
- Change Product Addon price based on select Variation
- WooCommerce – Maximum qty per line per product
- Custom plugin init action causing general slowness
- Enable users to change change and add taxonomies of posts
- admin-ajax.php warning max input vars exceeded on layered pop plugins [closed]
- Create page from plugin, but have it completely hidden
- Where can I always find the price of a plugin
- Multiple instance of data in plugin custom database table on plugin activation
- add_action() not working for admin
- WordPress Plugin translation not working EN To FR
- View Version Details” on Plugin update shows “Plugin not found
- i have updated my wordpress to 6.3 and getting these errors. please help
- Custom page template from plugin does not work with pre-installed themes in WordPress 6.6.1
- Framework plugin inside wordpress