chipbennett / oenology

WordPress Theme Oenology
62 stars 10 forks source link

Custom Widgets Throwing `sprintf` Warning #138

Closed chipbennett closed 8 years ago

chipbennett commented 8 years ago

Custom Widgets are throwing this warning:

Warning: sprintf() [function.sprintf]: Too few arguments

Caused by this construct:

sprintf( esc_attr_x( 'Subscribe to the %s feed', 'Tag Name', 'oenology' ), $customtag->name )

Rearrange like so:

esc_attr_x( sprintf( 'Subscribe to the %s feed', $customtag->name ), 'Tag Name', 'oenology' )
chipbennett commented 8 years ago

Also, default widget instance args need to be updated. This is throwing sprintf error:

'before_widget' => '<div id="%1$s" class="widget %2$s">'

Change to:

'before_widget' => '<div class="widget %s">'
chipbennett commented 8 years ago

Fix in OP breaks the translation functions. Revert.