Ticket #449: deprecated.diff
File deprecated.diff, 2.8 KB (added by , 11 years ago) |
---|
-
content-reference.php
2 2 3 3 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 4 4 5 <?php echo get_deprecated(); ?> 6 5 7 <h1><a href="<?php the_permalink() ?>"><?php echo get_signature(); ?></a></h1> 6 8 7 9 <section class="description"> -
inc/template-tags.php
698 698 } 699 699 700 700 /** 701 * Retrieve deprecated flag 702 * 703 * @param int $post_id 704 * 705 * @return string 706 */ 707 function get_deprecated( $post_id = null ) { 708 if ( empty( $post_id ) ) { 709 $post_id = get_the_ID(); 710 } 711 $type = ucwords( array_pop( explode( '-', get_post_type( $post_id ) ) ) ); 712 $tags = get_post_meta( $post_id, '_wp-parser_tags', true ); 713 $deprecated = wp_filter_object_list( $tags, array( 'name' => 'deprecated' ) ); 714 715 if ( empty( $deprecated ) ) { 716 return ''; 717 } else { 718 $deprecated = array_shift( $deprecated ); 719 $description = empty( $deprecated['content'] ) ? '' : esc_html( $deprecated['content'] ); 720 return "<div class='deprecated'>" . wp_kses_post( sprintf( __( 'Warning: This %s has been deprecated. %s</div>', 'wporg' ), $type, $description ) ); 721 } 722 } 723 724 /** 701 725 * Retrieve URL to source file archive. 702 726 * 703 727 * @param string $name -
scss/main.scss
940 940 border-radius: 5px; 941 941 padding: 20px; 942 942 } 943 .deprecated { 944 background-color: #be2423; 945 border: 1px solid #a4322f; 946 padding: 20px; 947 color: #ffffff; 948 } 943 949 } 944 950 945 951 &.archive, &.search { -
stylesheets/main.css
1145 1145 border-radius: 5px; 1146 1146 padding: 20px; 1147 1147 } 1148 .devhub-wrap .wp-parser-class .deprecated, .devhub-wrap .wp-parser-function .deprecated, .devhub-wrap .wp-parser-hook .deprecated, .devhub-wrap .wp-parser-method .deprecated { 1149 background-color: #be2423; 1150 border: 1px solid #a4322f; 1151 padding: 20px; 1152 color: #ffffff; 1153 } 1148 1154 .devhub-wrap.archive .wp-parser-class h1 a, .devhub-wrap.archive .wp-parser-function h1 a, .devhub-wrap.archive .wp-parser-hook h1 a, .devhub-wrap.archive .wp-parser-method h1 a, .devhub-wrap.search .wp-parser-class h1 a, .devhub-wrap.search .wp-parser-function h1 a, .devhub-wrap.search .wp-parser-hook h1 a, .devhub-wrap.search .wp-parser-method h1 a { 1149 1155 font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif; 1150 1156 color: #21759b;