进行了一些小修复
This commit is contained in:
1 parent
02cbff1ddf
commit
fbada8bd6a
20 files changed
+294
-191
No files matched your search
@@ -99,11 +99,9 @@ if (!function_exists('aksrt_get_single_meta_box')) :
|
||||
/**
|
||||
* legacy equivalent.
|
||||
*
|
||||
* @param string $class Extra class on wrapper.
|
||||
* @param string $direction Unused (kept for API parity).
|
||||
* @param int|null $post_id Post ID.
|
||||
*/
|
||||
function aksrt_get_single_meta_box(string $class = 'abs-right', string $direction = 'down', $post_id = null): string {
|
||||
function aksrt_get_single_meta_box($post_id = null): string {
|
||||
if (!is_single() && !is_singular()) {
|
||||
return '';
|
||||
}
|
||||
@@ -128,11 +126,12 @@ if (!function_exists('aksrt_get_single_meta_box')) :
|
||||
}
|
||||
$permalink = get_permalink($post_id);
|
||||
$login_url = function_exists('aksrt_get_login_url') ? aksrt_get_login_url() : wp_login_url($permalink ?: home_url('/'));
|
||||
$menu_id = 'post-drop-meta-menu-' . $post_id;
|
||||
|
||||
$more .= '<div class="clearfix ml6 post-drop-meta">';
|
||||
$more .= '<button type="button" class="but cir post-drop-meta__toggle" aria-haspopup="true" aria-expanded="false" aria-label="' . esc_attr__('更多', 'aksrt') . '">';
|
||||
$more .= '<button type="button" class="but cir post-drop-meta__toggle" aria-haspopup="true" aria-controls="' . esc_attr($menu_id) . '" aria-expanded="false" aria-label="' . esc_attr__('更多', 'aksrt') . '">';
|
||||
$more .= '<i class="fa fas fa-ellipsis-h" aria-hidden="true"></i></button>';
|
||||
$more .= '<div class="post-drop-meta__menu" aria-hidden="true">';
|
||||
$more .= '<div id="' . esc_attr($menu_id) . '" class="post-drop-meta__menu" aria-hidden="true">';
|
||||
if ($edit_link) {
|
||||
$more .= '<a href="' . esc_url($edit_link) . '" class="post-drop-meta__item"><i class="fa fas fa-edit" aria-hidden="true"></i><span>' . esc_html__('编辑文章', 'aksrt') . '</span></a>';
|
||||
}
|
||||
@@ -144,7 +143,7 @@ if (!function_exists('aksrt_get_single_meta_box')) :
|
||||
}
|
||||
$more .= '</div></div>';
|
||||
|
||||
return '<div class="flex ac single-metabox ' . esc_attr($class) . '"><div class="post-metas">' . $meta . '</div>' . $more . '</div>';
|
||||
return '<div class="flex ac single-metabox"><div class="post-metas">' . $meta . '</div>' . $more . '</div>';
|
||||
}
|
||||
endif;
|
||||
|
||||
|
||||
Reference in new issue
Block a user