WordPress.org

Make WordPress Core

Changeset 14718


Ignore:
Timestamp:
05/18/2010 03:48:22 AM (9 years ago)
Author:
nacin
Message:

Remove autocomplete and codepress. for autocomplete, see #13283. for codepress, see #13307.

Location:
trunk
Files:
2 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/css/wp-admin.dev.css

    r14673 r14718  
    21562156
    21572157.wp-hidden-children .wp-hidden-child,
    2158 .ui-tabs-hide,
    2159 #codepress-off {
     2158.ui-tabs-hide {
    21602159    display: none;
    21612160}
  • trunk/wp-admin/includes/deprecated.php

    r13805 r14718  
    163163}
    164164
     165/**
     166 * Determines the language to use for CodePress syntax highlighting.
     167 *
     168 * @since 2.8.0
     169 * @deprecated 3.0.0
     170 *
     171 * @param string $filename
     172**/
     173function codepress_get_lang( $filename ) {
     174    _deprecated_function( __FUNCTION__, '3.0' );
     175    return;
     176}
     177
     178/**
     179 * Adds Javascript required to make CodePress work on the theme/plugin editors.
     180 *
     181 * @since 2.8.0
     182 * @deprecated 3.0.0
     183**/
     184function codepress_footer_js() {
     185    _deprecated_function( __FUNCTION__, '3.0' );
     186    return;
     187}
     188
     189/**
     190 * Determine whether to use CodePress.
     191 *
     192 * @since 2.8
     193 * @deprecated 3.0.0
     194**/
     195function use_codepress() {
     196    _deprecated_function( __FUNCTION__, '3.0' );
     197    return;
     198}
     199
    165200?>
  • trunk/wp-admin/includes/misc.php

    r14312 r14718  
    314314
    315315/**
    316  * Determines the language to use for CodePress syntax highlighting,
    317  * based only on a filename.
    318  *
    319  * @since 2.8
    320  *
    321  * @param string $filename The name of the file to be highlighting
    322 **/
    323 function codepress_get_lang( $filename ) {
    324     $codepress_supported_langs = apply_filters( 'codepress_supported_langs',
    325                                     array( '.css' => 'css',
    326                                             '.js' => 'javascript',
    327                                             '.php' => 'php',
    328                                             '.html' => 'html',
    329                                             '.htm' => 'html',
    330                                             '.txt' => 'text'
    331                                             ) );
    332     $extension = substr( $filename, strrpos( $filename, '.' ) );
    333     if ( $extension && array_key_exists( $extension, $codepress_supported_langs ) )
    334         return $codepress_supported_langs[$extension];
    335 
    336     return 'generic';
    337 }
    338 
    339 /**
    340  * Adds Javascript required to make CodePress work on the theme/plugin editors.
    341  *
    342  * This code is attached to the action admin_print_footer_scripts.
    343  *
    344  * @since 2.8
    345 **/
    346 function codepress_footer_js() {
    347     // Script-loader breaks CP's automatic path-detection, thus CodePress.path
    348     // CP edits in an iframe, so we need to grab content back into normal form
    349     ?><script type="text/javascript">
    350 /* <![CDATA[ */
    351 var codepress_path = '<?php echo includes_url('js/codepress/'); ?>';
    352 jQuery('#template').submit(function(){
    353     if (jQuery('#newcontent_cp').length)
    354         jQuery('#newcontent_cp').val(newcontent.getCode()).removeAttr('disabled');
    355 });
    356 jQuery('#codepress-on').hide();
    357 jQuery('#codepress-off').show();
    358 /* ]]> */
    359 </script>
    360 <?php
    361 }
    362 
    363 /**
    364  * Determine whether to use CodePress.
    365  *
    366  * @since 2.8
    367 **/
    368 function use_codepress() {
    369 
    370     if ( isset($_GET['codepress']) ) {
    371         $on = 'on' == $_GET['codepress'] ? 'on' : 'off';
    372         set_user_setting( 'codepress', $on );
    373     } else {
    374         $on = get_user_setting('codepress', 'on');
    375     }
    376 
    377     if ( 'on' == $on ) {
    378         add_action( 'admin_print_footer_scripts', 'codepress_footer_js' );
    379         return true;
    380     }
    381 
    382     return false;
    383 }
    384 
    385 /**
    386316 * Saves option for number of rows when listing posts, pages, comments, etc.
    387317 *
  • trunk/wp-admin/plugin-editor.php

    r14348 r14718  
    128128
    129129    $content = htmlspecialchars( $content );
    130     $codepress_lang = codepress_get_lang($real_file);
    131 
    132130    ?>
    133131<?php if (isset($_GET['a'])) : ?>
     
    207205<form name="template" id="template" action="plugin-editor.php" method="post">
    208206    <?php wp_nonce_field('edit-plugin_' . $file) ?>
    209         <div><textarea cols="70" rows="25" name="newcontent" id="newcontent" tabindex="1" class="codepress <?php echo $codepress_lang ?>"><?php echo $content ?></textarea>
     207        <div><textarea cols="70" rows="25" name="newcontent" id="newcontent" tabindex="1"><?php echo $content ?></textarea>
    210208        <input type="hidden" name="action" value="update" />
    211209        <input type="hidden" name="file" value="<?php echo esc_attr($file) ?>" />
  • trunk/wp-admin/theme-editor.php

    r14647 r14718  
    103103
    104104        $content = htmlspecialchars( $content );
    105         $codepress_lang = codepress_get_lang($file);
    106105    }
    107106
     
    196195    <form name="template" id="template" action="theme-editor.php" method="post">
    197196    <?php wp_nonce_field('edit-theme_' . $file . $theme) ?>
    198          <div><textarea cols="70" rows="25" name="newcontent" id="newcontent" tabindex="1" class="codepress <?php echo $codepress_lang ?>"><?php echo $content ?></textarea>
     197         <div><textarea cols="70" rows="25" name="newcontent" id="newcontent" tabindex="1"><?php echo $content ?></textarea>
    199198         <input type="hidden" name="action" value="update" />
    200199         <input type="hidden" name="file" value="<?php echo esc_attr($file) ?>" />
  • trunk/wp-includes/script-loader.php

    r14715 r14718  
    164164    $scripts->add( 'jquery-table-hotkeys', "/wp-includes/js/jquery/jquery.table-hotkeys$suffix.js", array('jquery', 'jquery-hotkeys'), '20090102' );
    165165    $scripts->add_data( 'jquery-table-hotkeys', 'group', 1 );
    166 
    167     $scripts->add( 'jquery-autocomplete', "/wp-includes/js/jquery/autocomplete$suffix.js", array('jquery'), '1.1' );
    168     $scripts->add_data( 'jquery-autocomplete', 'group', 1 );
    169166
    170167    $scripts->add( 'thickbox', "/wp-includes/js/thickbox/thickbox.js", array('jquery'), '3.1-20100407');
     
    378375        $scripts->add_data( 'media', 'group', 1 );
    379376
    380         $scripts->add( 'codepress', '/wp-includes/js/codepress/codepress.js', false, '0.9.6' );
    381         $scripts->add_data( 'codepress', 'group', 1 );
    382 
    383377        $scripts->add( 'image-edit', "/wp-admin/js/image-edit$suffix.js", array('jquery', 'json2', 'imgareaselect'), '20091111' );
    384378        $scripts->add_data( 'image-edit', 'group', 1 );
Note: See TracChangeset for help on using the changeset viewer.