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:
- Adding a Taxonomy Filter to Admin List for a Custom Post Type?
- How to tell if a plugin is multisite compatible?
- Get plugin directory from a theme
- Recommended eCommerce Plugin for a T-Shirt Sales Business? [closed]
- GPL and plugins
- Redirection Plugin: Redirect all URLs with a regular expression
- How to un-attach rich text editor from named textarea elements
- WordPress media upload limit?
- Post source link plugin – small modification
- How to add users roles dropdown in registration in wordpress
- Send Data to WordPress from kiosk
- how to not show plugin in admin area
- Getting User email on logout. wp_logout
- delay function on publish?
- Can a plugin add to header/footer/body content?
- Login with email (WP Modal Login)
- How to set CORS header?
- How do I remove the entire left nav bar in admin for certain level users?
- Getting a 404 when trying to load /wp-admin/plugin-install.php
- custom_list_table edit/delete bulk actions
- Why plugin ajax response is -1?
- How to integrate blog status?
- What plugin will allow me to redirect 404 errors to a specific page?
- Changed permalink structure. Need help with redirecting old posts
- Change permalink structure hidden button edit
- How to load plugin after page is loaded – pagespeed issues
- Plugin “WP Attachments” outputs after the_content, how can I best change the location?
- One of my plugins broke when I tried to update it, how do I safely uninstall it?
- How to Add custom subtitle as og:title to Facebook Open Graph Meta Data in WordPress Themes?
- WooCommerce Checkout Error [closed]
- How can I change a plugin’s URL?
- LinkedIn Social Wall | Is there a plug-in (Free / Paid) to display a LinkedIn feed in a social wall (not just a feed)?
- jquery not calling php function
- Custom Fields with Pods not being translated
- page loading time of a cached page
- Create custom registration form for WordPress Multisite
- update_user_meta() misfires sometimes
- Migrating to WordPress Recipe Plugin and Some SQL Issues
- add tabs in rdp-plugin/includes/settings.php and get settings saved
- Adding CSS to custom post type admin page causes error
- Strange ASCII characters overlapping content
- How to add apply_filter for a class property in plugin
- Create a post builder skin in a plugin
- creating a plug in that would tap into save/update action of posts [closed]
- Photo Gallery Plugin and Touch Devices
- Content-Security-Policy Headers are there and showing the correct settings, but still getting a refused connection
- How to use the pre_option filter before a plugin loads?
- Is it unethical to remove another plugin’s meta keys?
- Disable plugin If slug contains specific word
- How can ι create my own (custom) WordPress table/list?
- Custom template for all woo commerce categories
- WordPress subfolder installation AJAX Problem
- Why do I get jQuery reference error / undefined when changing name of plugin file?
- Adding submenu to custom plugin menu page created with add_menu_page() function
- Plugin: Hooking up classes that have their own hooks
- What is necessary to secure a WP plugin against direct file access attempts?
- How to prevent tabs from opening all at once
- Admin Message Broadcast for all wp users [closed]
- Building a plugin into a theme
- Add a Custom Field in Comment Box next to the Text area
- How do you create a re-useable HTML fragment in wordpress
- How to reduce the number of revisions?
- plugin to organize data [closed]
- How translate it? Intensedebate
- How to Get Recent 5 post in My Title bar?
- Can Postie be used to submit podcasts via email?
- How to authorize viewing and clicking a function only logged users?
- woocommerce: Customize email with item total count
- Callback hooked to post_updated firing on new posts as well
- The styles in the recent posts widgets plugin not working
- Virtual Ticket selling
- How to reset WP plugin?
- There has been a critical error on your website
- Trouble running python script in WordPress
- How to disable a widget area of a specific page?
- wp_insert_post with data from graph api inside a plugin
- Plugin broke the site and unable to login in admin panel
- Plugin Guidelines require plugin to be GNU General Public License
- How to set From filed in contact form 7 Use Mail (2) auto responder
- How to print shortcode with js in visual composer?
- Save selectlist value (taxonomy) in wp:wp_set_object_terms
- Page doesn’t load
- Plugins missing in front end but appear in backend FTP
- Restrict ability to edit pages by username
- Force download a file within plugin file
- Ger posts from similar tags and categories
- How do I reset BackWPup?
- Simple Social Icons plugin not work on my blog
- Is it possible to run javascript on plugin deactivated?
- Getting label name of extra user fields
- Updating WordPress [closed]
- Child Plugin Admin Panel
- How to output cmb2 wysiwyg by using timber
- Exceeded the virtual memory limit
- WordPress custom block: Link saved in database not retrieved when editing post
- Accessing Correct Database to Create REST API Endpoint
- How do I replace a logo image that’s hard-coded into a plugin’s logo.php file?
- How to Order Posts by Taxonomy in Jetengine Plugin
- Detect if user is on the specific page in WordPress
- A multi-section WordPress store [closed]