mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
Add the jQuery UI Touch Punch plugin to handle dragging on mobile devices, props georgestephanis, see #20014
git-svn-id: https://develop.svn.wordpress.org/trunk@20433 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -12,6 +12,9 @@ if ( !defined('ABSPATH') )
|
||||
|
||||
wp_enqueue_script('post');
|
||||
|
||||
if ( wp_is_mobile() )
|
||||
wp_enqueue_script( 'jquery-touch-punch' );
|
||||
|
||||
if ( post_type_supports($post_type, 'editor') || post_type_supports($post_type, 'thumbnail') ) {
|
||||
add_thickbox();
|
||||
wp_enqueue_script('media-upload');
|
||||
|
||||
@@ -19,6 +19,9 @@ wp_enqueue_script( 'plugin-install' );
|
||||
wp_enqueue_script( 'media-upload' );
|
||||
add_thickbox();
|
||||
|
||||
if ( wp_is_mobile() )
|
||||
wp_enqueue_script( 'jquery-touch-punch' );
|
||||
|
||||
$title = __('Dashboard');
|
||||
$parent_file = 'index.php';
|
||||
|
||||
|
||||
@@ -23,6 +23,9 @@ wp_reset_vars(array('action', 'cat_id', 'linkurl', 'name', 'image',
|
||||
wp_enqueue_script('link');
|
||||
wp_enqueue_script('xfn');
|
||||
|
||||
if ( wp_is_mobile() )
|
||||
wp_enqueue_script( 'jquery-touch-punch' );
|
||||
|
||||
$link = get_default_link_to_edit();
|
||||
include('./edit-link-form.php');
|
||||
|
||||
|
||||
@@ -99,6 +99,9 @@ switch ($action) {
|
||||
wp_enqueue_script('link');
|
||||
wp_enqueue_script('xfn');
|
||||
|
||||
if ( wp_is_mobile() )
|
||||
wp_enqueue_script( 'jquery-touch-punch' );
|
||||
|
||||
$parent_file = 'link-manager.php';
|
||||
$submenu_file = 'link-manager.php';
|
||||
$title = __('Edit Link');
|
||||
|
||||
@@ -35,6 +35,9 @@ wp_enqueue_script( 'common' );
|
||||
wp_enqueue_script( 'wp-lists' );
|
||||
wp_enqueue_script( 'postbox' );
|
||||
|
||||
if ( wp_is_mobile() )
|
||||
wp_enqueue_script( 'jquery-touch-punch' );
|
||||
|
||||
// Container for any messages displayed to the user
|
||||
$messages = array();
|
||||
|
||||
|
||||
@@ -25,11 +25,15 @@ function wp_widgets_access_body_class($classes) {
|
||||
return "$classes widgets_access ";
|
||||
}
|
||||
|
||||
if ( 'on' == $widgets_access )
|
||||
if ( 'on' == $widgets_access ) {
|
||||
add_filter( 'admin_body_class', 'wp_widgets_access_body_class' );
|
||||
else
|
||||
} else {
|
||||
wp_enqueue_script('admin-widgets');
|
||||
|
||||
if ( wp_is_mobile() )
|
||||
wp_enqueue_script( 'jquery-touch-punch' );
|
||||
}
|
||||
|
||||
do_action( 'sidebar_admin_setup' );
|
||||
|
||||
$title = __( 'Widgets' );
|
||||
|
||||
Reference in New Issue
Block a user