imath / wp-idea-stream

Share ideas, great ones will rise to the top!
GNU General Public License v2.0
27 stars 5 forks source link

Add class to Edit Idea link. #42

Closed BoweFrankema closed 8 years ago

BoweFrankema commented 8 years ago

A small change to the templates so that an icon can be easily added to edit links.

imath commented 8 years ago

Thanks a lot @BoweFrankema It may be a surprising workflow, but i like to have master === latest stable tag and i do my edits on a new branch and just before releasing the plugin i merge the new branch with master. So would it be possible to pull this request on branch 2.3.1 instead ?

$class = 'edit-item';

$labels = wp_idea_stream_post_type_register_labels();
if ( ! empty( $labels['labels']['edit_item'] ) {
   $class = 'edit-' . $labels['labels']['edit_item'];
}

return '<a class="' . sanitize_html_class(  $class ) .'">';
imath commented 8 years ago

@BoweFrankema thanks for your PR, the class will be included in 2.3.1 see https://github.com/imath/wp-idea-stream/commit/b7e55e917ac58071a1e91b9b3f7f766d2c16e2fd