New button styles.
Using the new buttons: * Button classes are now stackable. * All buttons should use a base class of "button". * Buttons default to the gray style (formerly "button-secondary"). Buttons can add a style by adding additional classes. To make a primary button, add the "button-primary" class. * Buttons can be rendered in various sizes. In addition to the default size, you can add "button-large", "button-small", or "button-tiny". For backwards compatibility reasons, "button-primary" and "button-secondary" both work as standalone classes. get_submit_button() has been adjusted to handle shorthand button classes (i.e. button classes can be passed without the "button-" prefix). props lessbloat, helenyhou, trepmal, nacin. see #21598. git-svn-id: http://core.svn.wordpress.org/trunk@21789 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -1084,9 +1084,9 @@ function get_sample_permalink_html( $id, $new_title = null, $new_slug = null ) {
|
||||
if ( false === strpos($permalink, '%postname%') && false === strpos($permalink, '%pagename%') ) {
|
||||
$return = '<strong>' . __('Permalink:') . "</strong>\n" . '<span id="sample-permalink" tabindex="-1">' . $permalink . "</span>\n";
|
||||
if ( '' == get_option( 'permalink_structure' ) && current_user_can( 'manage_options' ) && !( 'page' == get_option('show_on_front') && $id == get_option('page_on_front') ) )
|
||||
$return .= '<span id="change-permalinks"><a href="options-permalink.php" class="button" target="_blank">' . __('Change Permalinks') . "</a></span>\n";
|
||||
$return .= '<span id="change-permalinks"><a href="options-permalink.php" class="button button-tiny" target="_blank">' . __('Change Permalinks') . "</a></span>\n";
|
||||
if ( isset($view_post) )
|
||||
$return .= "<span id='view-post-btn'><a href='$permalink' class='button'>$view_post</a></span>\n";
|
||||
$return .= "<span id='view-post-btn'><a href='$permalink' class='button button-tiny'>$view_post</a></span>\n";
|
||||
|
||||
$return = apply_filters('get_sample_permalink_html', $return, $id, $new_title, $new_slug);
|
||||
|
||||
@@ -1113,10 +1113,10 @@ function get_sample_permalink_html( $id, $new_title = null, $new_slug = null ) {
|
||||
$return = '<strong>' . __('Permalink:') . "</strong>\n";
|
||||
$return .= '<span id="sample-permalink" tabindex="-1">' . $display_link . "</span>\n";
|
||||
$return .= '‎'; // Fix bi-directional text display defect in RTL languages.
|
||||
$return .= '<span id="edit-slug-buttons"><a href="#post_name" class="edit-slug button hide-if-no-js" onclick="editPermalink(' . $id . '); return false;">' . __('Edit') . "</a></span>\n";
|
||||
$return .= '<span id="edit-slug-buttons"><a href="#post_name" class="edit-slug button button-tiny hide-if-no-js" onclick="editPermalink(' . $id . '); return false;">' . __('Edit') . "</a></span>\n";
|
||||
$return .= '<span id="editable-post-name-full">' . $post_name . "</span>\n";
|
||||
if ( isset($view_post) )
|
||||
$return .= "<span id='view-post-btn'><a href='$view_link' class='button'>$view_post</a></span>\n";
|
||||
$return .= "<span id='view-post-btn'><a href='$view_link' class='button button-tiny'>$view_post</a></span>\n";
|
||||
|
||||
$return = apply_filters('get_sample_permalink_html', $return, $id, $new_title, $new_slug);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user