Fix notices and phpdoc, props hakre, fixes #10758

git-svn-id: https://develop.svn.wordpress.org/trunk@12284 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz
2009-11-26 11:29:54 +00:00
parent 1d918ec7f7
commit 387ac8c9b5
9 changed files with 53 additions and 42 deletions

View File

@@ -933,10 +933,10 @@ function postbox_classes( $id, $page ) {
*
* @since unknown
*
* @param unknown_type $id
* @param unknown_type $title
* @param unknown_type $name
* @return unknown
* @param int|object $id Post ID or post object.
* @param string $title (optional) Title
* @param string $name (optional) Name
* @return array With two entries of type string
*/
function get_sample_permalink($id, $title = null, $name = null) {
$post = &get_post($id);
@@ -951,7 +951,7 @@ function get_sample_permalink($id, $title = null, $name = null) {
// drafts, so we will fake, that our post is published
if (in_array($post->post_status, array('draft', 'pending'))) {
$post->post_status = 'publish';
$post->post_name = sanitize_title($post->post_name? $post->post_name : $post->post_title, $post->ID);
$post->post_name = sanitize_title($post->post_name ? $post->post_name : $post->post_title, $post->ID);
}
$post->post_name = wp_unique_post_slug($post->post_name, $post->ID, $post->post_status, $post->post_type, $post->post_parent);
@@ -959,7 +959,7 @@ function get_sample_permalink($id, $title = null, $name = null) {
// If the user wants to set a new name -- override the current one
// Note: if empty name is supplied -- use the title instead, see #6072
if (!is_null($name)) {
$post->post_name = sanitize_title($name? $name : $title, $post->ID);
$post->post_name = sanitize_title($name ? $name : $title, $post->ID);
}
$post->filter = 'sample';
@@ -987,14 +987,16 @@ function get_sample_permalink($id, $title = null, $name = null) {
}
/**
* {@internal Missing Short Description}}
* sample permalink html
*
* intended to be used for the inplace editor of the permalink post slug on in the post (and page?) editor.
*
* @since unknown
*
* @param unknown_type $id
* @param unknown_type $new_title
* @param unknown_type $new_slug
* @return unknown
* @param int|object $id Post ID or post object.
* @param string $new_title (optional) New title
* @param string $new_slug (optional) New slug
* @return string intended to be used for the inplace editor of the permalink post slug on in the post (and page?) editor.
*/
function get_sample_permalink_html( $id, $new_title = null, $new_slug = null ) {
$post = &get_post($id);

View File

@@ -190,8 +190,8 @@ function wp_widget_control( $sidebar_args ) {
</div>
<input type="hidden" name="widget-id" class="widget-id" value="<?php echo esc_attr($id_format); ?>" />
<input type="hidden" name="id_base" class="id_base" value="<?php echo esc_attr($id_base); ?>" />
<input type="hidden" name="widget-width" class="widget-width" value="<?php echo esc_attr($control['width']); ?>" />
<input type="hidden" name="widget-height" class="widget-height" value="<?php echo esc_attr($control['height']); ?>" />
<input type="hidden" name="widget-width" class="widget-width" value="<?php if (isset( $control['width'] )) echo esc_attr($control['width']); ?>" />
<input type="hidden" name="widget-height" class="widget-height" value="<?php if (isset( $control['height'] )) echo esc_attr($control['height']); ?>" />
<input type="hidden" name="widget_number" class="widget_number" value="<?php echo esc_attr($widget_number); ?>" />
<input type="hidden" name="multi_number" class="multi_number" value="<?php echo esc_attr($multi_number); ?>" />
<input type="hidden" name="add_new" class="add_new" value="<?php echo esc_attr($add_new); ?>" />

View File

@@ -308,7 +308,7 @@ if ( !is_singular() && !isset($_GET['detached']) && !$is_trash ) {
if ( $month_count && !( 1 == $month_count && 0 == $arc_result[0]->mmonth ) ) : ?>
<select name='m'>
<option<?php selected( @$_GET['m'], 0 ); ?> value='0'><?php _e('Show all dates'); ?></option>
<option value='0'><?php _e('Show all dates'); ?></option>
<?php
foreach ($arc_result as $arc_row) {
if ( $arc_row->yyear == 0 )