Changeset 16814
- Timestamp:
- 12/08/2010 07:53:26 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/dashboard.php
r16438 r16814 139 139 $screen = get_current_screen(); 140 140 global $wp_dashboard_control_callbacks; 141 141 142 if ( $control_callback && current_user_can( 'edit_dashboard' ) && is_callable( $control_callback ) ) { 142 143 $wp_dashboard_control_callbacks[$widget_id] = $control_callback; … … 144 145 list($url) = explode( '#', add_query_arg( 'edit', false ), 2 ); 145 146 $widget_name .= ' <span class="postbox-title-action"><a href="' . esc_url( $url ) . '">' . __( 'Cancel' ) . '</a></span>'; 146 add_meta_box( $widget_id, $widget_name, '_wp_dashboard_control_callback', $screen->id, 'normal', 'core' );147 return;148 }149 list($url) = explode( '#', add_query_arg( 'edit', $widget_id ), 2 );150 $widget_name .= ' <span class="postbox-title-action"><a href="' . esc_url( "$url#$widget_id" ) . '" class="edit-box open-box">' . __( 'Configure' ) . '</a></span>';147 $callback = '_wp_dashboard_control_callback'; 148 } else { 149 list($url) = explode( '#', add_query_arg( 'edit', $widget_id ), 2 ); 150 $widget_name .= ' <span class="postbox-title-action"><a href="' . esc_url( "$url#$widget_id" ) . '" class="edit-box open-box">' . __( 'Configure' ) . '</a></span>'; 151 } 151 152 } 152 153
Note: See TracChangeset
for help on using the changeset viewer.