[ Root ] [ Search ] [ Index ]

PHP Cross Reference of WordPress 3.0.1

Provided by Yoast

title

Body

[close]

/wp-admin/includes/ -> deprecated.php (source)

   1  <?php
   2  /**
   3   * Deprecated admin functions from past WordPress versions. You shouldn't use these
   4   * functions and look for the alternatives instead. The functions will be removed
   5   * in a later version.
   6   *
   7   * @package WordPress
   8   * @subpackage Deprecated
   9   */
  10  
  11  /*
  12   * Deprecated functions come here to die.
  13   */
  14  
  15  /**
  16   * @since 2.1
  17   * @deprecated 2.1
  18   * @deprecated Use wp_tiny_mce().
  19   * @see wp_tiny_mce()
  20   */
  21  function tinymce_include() {
  22      _deprecated_function( __FUNCTION__, '2.1', 'wp_tiny_mce()' );
  23  
  24      wp_tiny_mce();
  25  }
  26  
  27  /**
  28   * Unused Admin function.
  29   *
  30   * @since 2.0
  31   * @deprecated 2.5
  32   *
  33   */
  34  function documentation_link() {
  35      _deprecated_function( __FUNCTION__, '2.5', '' );
  36      return;
  37  }
  38  
  39  /**
  40   * Calculates the new dimentions for a downsampled image.
  41   *
  42   * @since 2.0.0
  43   * @deprecated 3.0.0
  44   * @deprecated Use wp_constrain_dimensions()
  45   *
  46   * @param int $width Current width of the image
  47   * @param int $height Current height of the image
  48   * @param int $wmax Maximum wanted width
  49   * @param int $hmax Maximum wanted height
  50   * @return mixed Array(height,width) of shrunk dimensions.
  51   */
  52  function wp_shrink_dimensions( $width, $height, $wmax = 128, $hmax = 96 ) {
  53      _deprecated_function( __FUNCTION__, '3.0', 'wp_constrain_dimensions()' );
  54      return wp_constrain_dimensions( $width, $height, $wmax, $hmax );
  55  }
  56  
  57  /**
  58   * {@internal Missing Short Description}}
  59   *
  60   * @since unknown
  61   * @deprecated unknown
  62   * @deprecated Use wp_category_checklist()
  63   * @see wp_category_checklist()
  64   *
  65   * @param unknown_type $default
  66   * @param unknown_type $parent
  67   * @param unknown_type $popular_ids
  68   */
  69  function dropdown_categories( $default = 0, $parent = 0, $popular_ids = array() ) {
  70      _deprecated_function( __FUNCTION__, '0.0', 'wp_category_checklist()' );
  71      global $post_ID;
  72      wp_category_checklist( $post_ID );
  73  }
  74  
  75  /**
  76   * {@internal Missing Short Description}}
  77   *
  78   * @since unknown
  79   * @deprecated unknown
  80   * @deprecated Use wp_link_category_checklist()
  81   * @see wp_link_category_checklist()
  82   *
  83   * @param unknown_type $default
  84   */
  85  function dropdown_link_categories( $default = 0 ) {
  86      _deprecated_function( __FUNCTION__, '0.0', 'wp_link_category_checklist()' );
  87      global $link_id;
  88      wp_link_category_checklist( $link_id );
  89  }
  90  
  91  /**
  92   * {@internal Missing Short Description}}
  93   *
  94   * @since unknown
  95   * @deprecated 3.0.0
  96   * @deprecated Use wp_dropdown_categories()
  97   * @see wp_dropdown_categories()
  98   *
  99   * @param unknown_type $currentcat
 100   * @param unknown_type $currentparent
 101   * @param unknown_type $parent
 102   * @param unknown_type $level
 103   * @param unknown_type $categories
 104   * @return unknown
 105   */
 106  function wp_dropdown_cats( $currentcat = 0, $currentparent = 0, $parent = 0, $level = 0, $categories = 0 ) {
 107      _deprecated_function( __FUNCTION__, '3.0', 'wp_dropdown_categories()' );
 108      if (!$categories )
 109          $categories = get_categories( array('hide_empty' => 0) );
 110  
 111      if ( $categories ) {
 112          foreach ( $categories as $category ) {
 113              if ( $currentcat != $category->term_id && $parent == $category->parent) {
 114                  $pad = str_repeat( '&#8211; ', $level );
 115                  $category->name = esc_html( $category->name );
 116                  echo "\n\t<option value='$category->term_id'";
 117                  if ( $currentparent == $category->term_id )
 118                      echo " selected='selected'";
 119                  echo ">$pad$category->name</option>";
 120                  wp_dropdown_cats( $currentcat, $currentparent, $category->term_id, $level +1, $categories );
 121              }
 122          }
 123      } else {
 124          return false;
 125      }
 126  }
 127  
 128  /**
 129   * Register a setting and its sanitization callback
 130   *
 131   * @since 2.7.0
 132   * @deprecated 3.0.0
 133   * @deprecated Use register_setting()
 134   * @see register_setting()
 135   *
 136   * @param string $option_group A settings group name.  Should correspond to a whitelisted option key name.
 137   *     Default whitelisted option key names include "general," "discussion," and "reading," among others.
 138   * @param string $option_name The name of an option to sanitize and save.
 139   * @param unknown_type $sanitize_callback A callback function that sanitizes the option's value.
 140   * @return unknown
 141   */
 142  function add_option_update_handler( $option_group, $option_name, $sanitize_callback = '' ) {
 143      _deprecated_function( __FUNCTION__, '3.0', 'register_setting()' );
 144      return register_setting( $option_group, $option_name, $sanitize_callback );
 145  }
 146  
 147  /**
 148   * Unregister a setting
 149   *
 150   * @since 2.7.0
 151   * @deprecated 3.0.0
 152   * @deprecated Use unregister_setting()
 153   * @see unregister_setting()
 154   *
 155   * @param unknown_type $option_group
 156   * @param unknown_type $option_name
 157   * @param unknown_type $sanitize_callback
 158   * @return unknown
 159   */
 160  function remove_option_update_handler( $option_group, $option_name, $sanitize_callback = '' ) {
 161      _deprecated_function( __FUNCTION__, '3.0', 'unregister_setting()' );
 162      return unregister_setting( $option_group, $option_name, $sanitize_callback );
 163  }
 164  
 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  **/
 173  function 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  **/
 184  function 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  **/
 195  function use_codepress() {
 196      _deprecated_function( __FUNCTION__, '3.0' );
 197      return;
 198  }
 199  
 200  ?>


Generated: Thu Oct 14 05:12:05 2010 Cross-referenced by PHPXref 0.7