~canonical-sysadmins/wordpress/4.9.1

« back to all changes in this revision

Viewing changes to wp-includes/deprecated.php

  • Committer: Barry Price
  • Date: 2017-11-17 04:49:02 UTC
  • mfrom: (1.1.30 upstream)
  • Revision ID: barry.price@canonical.com-20171117044902-5frux4ycbq6g9fyf
Merge WP4.9 from upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
1650
1650
 * @param int $encode_html Optional. How to encode the content.
1651
1651
 */
1652
1652
function the_content_rss($more_link_text='(more...)', $stripteaser=0, $more_file='', $cut = 0, $encode_html = 0) {
1653
 
        _deprecated_function( __FUNCTION__, '2.9.0', 'the_content_feed' );
 
1653
        _deprecated_function( __FUNCTION__, '2.9.0', 'the_content_feed()' );
1654
1654
        $content = get_the_content($more_link_text, $stripteaser);
 
1655
 
 
1656
        /**
 
1657
         * Filters the post content in the context of an RSS feed.
 
1658
         *
 
1659
         * @since 0.71
 
1660
         *
 
1661
         * @param string $content Content of the current post.
 
1662
         */
1655
1663
        $content = apply_filters('the_content_rss', $content);
1656
1664
        if ( $cut && !$encode_html )
1657
1665
                $encode_html = 2;
2798
2806
/**
2799
2807
 * Checks if the current user belong to a given site.
2800
2808
 *
2801
 
 * @since MU
 
2809
 * @since MU (3.0.0)
2802
2810
 * @deprecated 3.3.0 Use is_user_member_of_blog()
2803
2811
 * @see is_user_member_of_blog()
2804
2812
 *
2825
2833
 * @return false Always false.
2826
2834
 */
2827
2835
function debug_fopen( $filename, $mode ) {
2828
 
        _deprecated_function( __FUNCTION__, 'error_log()' );
 
2836
        _deprecated_function( __FUNCTION__, '3.4.0', 'error_log()' );
2829
2837
        return false;
2830
2838
}
2831
2839
 
2842
2850
 * @param string $string Message to log.
2843
2851
 */
2844
2852
function debug_fwrite( $fp, $string ) {
2845
 
        _deprecated_function( __FUNCTION__, 'error_log()' );
 
2853
        _deprecated_function( __FUNCTION__, '3.4.0', 'error_log()' );
2846
2854
        if ( ! empty( $GLOBALS['debug'] ) )
2847
2855
                error_log( $string );
2848
2856
}
2859
2867
 * @param mixed $fp Unused.
2860
2868
 */
2861
2869
function debug_fclose( $fp ) {
2862
 
        _deprecated_function( __FUNCTION__, 'error_log()' );
 
2870
        _deprecated_function( __FUNCTION__, '3.4.0', 'error_log()' );
2863
2871
}
2864
2872
 
2865
2873
/**
3147
3155
 * @deprecated 3.5.0 Use get_post_ancestors()
3148
3156
 * @see get_post_ancestors()
3149
3157
 *
3150
 
 * @param WP_Post &$post Post object, passed by reference (unused).
 
3158
 * @param WP_Post $post Post object, passed by reference (unused).
3151
3159
 */
3152
3160
function _get_post_ancestors( &$post ) {
3153
3161
        _deprecated_function( __FUNCTION__, '3.5.0' );
3364
3372
 * Determine if TinyMCE is available.
3365
3373
 *
3366
3374
 * Checks to see if the user has deleted the tinymce files to slim down
3367
 
 * their WordPress install.
 
3375
 * their WordPress installation.
3368
3376
 *
3369
3377
 * @since 2.1.0
3370
3378
 * @deprecated 3.9.0
3533
3541
 * be applied to an empty string.
3534
3542
 *
3535
3543
 * @since 2.0.0
3536
 
 * @deprecated 4.3.0
 
3544
 * @deprecated 4.3.0 Use format_for_editor()
 
3545
 * @see format_for_editor()
3537
3546
 *
3538
3547
 * @param string $text The text to be formatted.
3539
3548
 * @return string The formatted text after filter is applied.
3814
3823
 * @return int
3815
3824
 */
3816
3825
function _usort_terms_by_ID( $a, $b ) {
3817
 
        _deprecated_function( __FUNCTION__, '4.7.0', 'wp_list_sort' );
 
3826
        _deprecated_function( __FUNCTION__, '4.7.0', 'wp_list_sort()' );
3818
3827
 
3819
3828
        if ( $a->term_id > $b->term_id )
3820
3829
                return 1;
3839
3848
 * @return int
3840
3849
 */
3841
3850
function _usort_terms_by_name( $a, $b ) {
3842
 
        _deprecated_function( __FUNCTION__, '4.7.0', 'wp_list_sort' );
 
3851
        _deprecated_function( __FUNCTION__, '4.7.0', 'wp_list_sort()' );
3843
3852
 
3844
3853
        return strcmp( $a->name, $b->name );
3845
3854
}
3860
3869
function _sort_nav_menu_items( $a, $b ) {
3861
3870
        global $_menu_item_sort_prop;
3862
3871
 
3863
 
        _deprecated_function( __FUNCTION__, '4.7.0', 'wp_list_sort' );
 
3872
        _deprecated_function( __FUNCTION__, '4.7.0', 'wp_list_sort()' );
3864
3873
 
3865
3874
        if ( empty( $_menu_item_sort_prop ) )
3866
3875
                return 0;
3878
3887
        else
3879
3888
                return strcmp( $a->$_menu_item_sort_prop, $b->$_menu_item_sort_prop );
3880
3889
}
 
3890
 
 
3891
/**
 
3892
 * Retrieves the Press This bookmarklet link.
 
3893
 *
 
3894
 * @since 2.6.0
 
3895
 * @deprecated 4.9.0
 
3896
 *
 
3897
 */
 
3898
function get_shortcut_link() {
 
3899
        _deprecated_function( __FUNCTION__, '4.9.0' );
 
3900
 
 
3901
        $link = '';
 
3902
 
 
3903
        /**
 
3904
         * Filters the Press This bookmarklet link.
 
3905
         *
 
3906
         * @since 2.6.0
 
3907
         * @deprecated 4.9.0
 
3908
         *
 
3909
         * @param string $link The Press This bookmarklet link.
 
3910
         */
 
3911
        return apply_filters( 'shortcut_link', $link );
 
3912
}
 
3913
 
 
3914
/**
 
3915
* Ajax handler for saving a post from Press This.
 
3916
*
 
3917
* @since 4.2.0
 
3918
* @deprecated 4.9.0
 
3919
*/
 
3920
function wp_ajax_press_this_save_post() {
 
3921
        _deprecated_function( __FUNCTION__, '4.9.0' );
 
3922
        if ( is_plugin_active( 'press-this/press-this-plugin.php' ) ) {
 
3923
                include( WP_PLUGIN_DIR . '/press-this/class-wp-press-this-plugin.php' );
 
3924
                $wp_press_this = new WP_Press_This_Plugin();
 
3925
                $wp_press_this->save_post();
 
3926
        } else {
 
3927
                wp_send_json_error( array( 'errorMessage' => __( 'The Press This plugin is required.' ) ) );
 
3928
        }
 
3929
}
 
3930
 
 
3931
/**
 
3932
* Ajax handler for creating new category from Press This.
 
3933
*
 
3934
* @since 4.2.0
 
3935
* @deprecated 4.9.0
 
3936
*/
 
3937
function wp_ajax_press_this_add_category() {
 
3938
        _deprecated_function( __FUNCTION__, '4.9.0' );
 
3939
        if ( is_plugin_active( 'press-this/press-this-plugin.php' ) ) {
 
3940
                include( WP_PLUGIN_DIR . '/press-this/class-wp-press-this-plugin.php' );
 
3941
                $wp_press_this = new WP_Press_This_Plugin();
 
3942
                $wp_press_this->add_category();
 
3943
        } else {
 
3944
                wp_send_json_error( array( 'errorMessage' => __( 'The Press This plugin is required.' ) ) );
 
3945
        }
 
3946
}