Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
mirai-mamori authored Apr 8, 2020
1 parent 5e28b98 commit d016797
Show file tree
Hide file tree
Showing 8 changed files with 76 additions and 64 deletions.
18 changes: 9 additions & 9 deletions inc/categories-images.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ function z_add_texonomy_field() {
}

echo '<div class="form-field">
<label for="taxonomy_image">' . __('category/tag image', 'sakura') /*分类/标签图像*/. '</label>
<label for="taxonomy_image">' . __('category/tag image', 'sakurairo') /*分类/标签图像*/. '</label>
<input type="text" name="taxonomy_image" id="taxonomy_image" value="" />
<br/>
<button class="z_upload_image_button button">' . __('add image', 'sakura') /*添加图像*/. '</button>
<button class="z_upload_image_button button">' . __('add image', 'sakurairo') /*添加图像*/. '</button>
</div>'.z_script();
}

Expand All @@ -63,10 +63,10 @@ function z_edit_texonomy_field($taxonomy) {
else
$image_url = z_taxonomy_image_url( $taxonomy->term_id, NULL, TRUE );
echo '<tr class="form-field">
<th scope="row" valign="top"><label for="taxonomy_image">' .__('category/tag image', 'sakura') /*分类/标签图像*/. '</label></th>
<th scope="row" valign="top"><label for="taxonomy_image">' .__('category/tag image', 'sakurairo') /*分类/标签图像*/. '</label></th>
<td><img class="taxonomy-image" src="' . z_taxonomy_image_url( $taxonomy->term_id, 'medium', TRUE ) . '"/><br/><input type="text" name="taxonomy_image" id="taxonomy_image" value="'.$image_url.'" /><br />
<button class="z_upload_image_button button">' . __('add image', 'sakura') /*添加图像*/. '</button>
<button class="z_remove_image_button button">' . __('remove image', 'sakura') /*删除图像*/. '</button>
<button class="z_upload_image_button button">' . __('add image', 'sakurairo') /*添加图像*/. '</button>
<button class="z_remove_image_button button">' . __('remove image', 'sakurairo') /*删除图像*/. '</button>
</td>
</tr>'.z_script();
}
Expand Down Expand Up @@ -194,8 +194,8 @@ function z_quick_edit_custom_box($column_name, $screen, $name) {
<span class="title"><img src="" alt="暂无"/></span>
<span class="input-text-wrap"><input type="text" name="taxonomy_image" value="" class="tax_list" /></span>
<span class="input-text-wrap">
<button class="z_upload_image_button button">' . __('add image', 'sakura') /*添加图像*/. '</button>
<button class="z_remove_image_button button">' . __('remove image', 'sakura') /*删除图像*/. '</button>
<button class="z_upload_image_button button">' . __('add image', 'sakurairo') /*添加图像*/. '</button>
<button class="z_remove_image_button button">' . __('remove image', 'sakurairo') /*删除图像*/. '</button>
</span>
</label>
</div>
Expand All @@ -208,7 +208,7 @@ function z_quick_edit_custom_box($column_name, $screen, $name) {
function z_taxonomy_columns( $columns ) {
$new_columns = array();
$new_columns['cb'] = $columns['cb'];
$new_columns['thumb'] = __('image', 'sakura')/*图像*/;
$new_columns['thumb'] = __('image', 'sakurairo')/*图像*/;

unset( $columns['cb'] );

Expand All @@ -220,7 +220,7 @@ function z_taxonomy_columns( $columns ) {
*/
function z_taxonomy_column( $columns, $column, $id ) {
if ( $column == 'thumb' )
$columns = '<span><img src="' . z_taxonomy_image_url($id, 'thumbnail', TRUE) . '" alt="' . __('no image', 'sakura') /*暂无*/. '" class="wp-post-image" /></span>';
$columns = '<span><img src="' . z_taxonomy_image_url($id, 'thumbnail', TRUE) . '" alt="' . __('no image', 'sakurairo') /*暂无*/. '" class="wp-post-image" /></span>';

return $columns;
}
Expand Down
4 changes: 2 additions & 2 deletions inc/classes/Cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public static function search_json() {
"link" => get_comment_link($comment),
"title" => get_the_title($comment->comment_post_ID),
"comments" => "",
"text" => $is_private ? ($comment->comment_author . ": " . __('The comment is private', 'sakura')) : str_replace($vowels, ' ', preg_replace($regex, ' ', $comment->comment_author . "" . $comment->comment_content))
"text" => $is_private ? ($comment->comment_author . ": " . __('The comment is private', 'sakurairo')) : str_replace($vowels, ' ', preg_replace($regex, ' ', $comment->comment_author . "" . $comment->comment_content))
);
}
}
Expand All @@ -77,7 +77,7 @@ public static function search_json() {

public static function update_database() {
global $wpdb;
$sakura_table_name = $wpdb->base_prefix . 'sakura';
$sakura_table_name = $wpdb->base_prefix . 'sakurairo';
$img_domain = akina_option('cover_cdn') ? akina_option('cover_cdn') : get_template_directory();
$manifest = file_get_contents($img_domain . "/manifest/manifest.json");
if ($manifest) {
Expand Down
34 changes: 23 additions & 11 deletions inc/css/optionsframework.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ body {

.nav-tab-wrapper {
position: relative;
max-width: 960px;
max-width: 900px;
margin: auto !important;
}

Expand Down Expand Up @@ -37,10 +37,10 @@ body {
.nav-tab {
background: none;
border:none;
padding: 10px 20px;
font-weight: 300;
font-size: 15px;
color: darkgoldenrod;
padding: 8px 15px;
font-weight: 400;
font-size: 14.5px;
color: #cc7878;
border-radius: 3px 3px 0 0;
}

Expand Down Expand Up @@ -68,7 +68,7 @@ a#options-group-3-tab:before {

a#options-group-4-tab:before {
font-family: "dashicons";
content: "\f487";
content: "\f237";
float: left;
}

Expand All @@ -80,13 +80,25 @@ a#options-group-5-tab:before {

a#options-group-6-tab:before {
font-family: "dashicons";
content: "\f325";
content: "\f331";
float: left;
}

a#options-group-7-tab:before {
font-family: "dashicons";
content: "\f487";
content: "\f155";
float: left;
}

a#options-group-8-tab:before {
font-family: "dashicons";
content: "\f180";
float: left;
}

a#options-group-9-tab:before {
font-family: "dashicons";
content: "\f309";
float: left;
}

Expand Down Expand Up @@ -170,7 +182,7 @@ input[type="submit" i], input[type="reset" i]{
}
#optionsframework .section {
padding: 10px;
margin-bottom: 20px;
margin-bottom: 10px;
padding-bottom: 30px;
border-bottom: 1px solid #E8E8E8;
}
Expand All @@ -181,7 +193,7 @@ input[type="submit" i], input[type="reset" i]{
padding:10px 0px;
margin:0 0 15px;
font-weight: 600;
color: #455E8C;
color: #cc7878;
}
#optionsframework .section .controls {
float: left;
Expand Down Expand Up @@ -375,7 +387,7 @@ input[type="submit" i], input[type="reset" i]{
float: left;
box-shadow: none;
border: none;
background: #374D6F;
background: #ae7d55;
text-shadow: none;
color:#fff;
height: 40px;
Expand Down
2 changes: 1 addition & 1 deletion inc/decorate.php
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ function customizer_css() { ?>
.art-content #archives .al_mon_list span {
color: <?php echo akina_option('theme_skin'); ?>;
}
<?php if(akina_option('entry_content_theme') == "sakura"){ ?>
<?php if(akina_option('entry_content_theme') == "sakurairo"){ ?>
.entry-content th {
background-color: <?php echo akina_option('theme_skin'); ?>
}
Expand Down
10 changes: 5 additions & 5 deletions inc/options-framework.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,8 @@ function optionsframework_setdefaults() {
function optionsframework_menu_settings() {

$menu = array(
'page_title' => __('Sakura Options', 'sakura'),
'menu_title' => __('Sakura Options', 'sakura'),
'page_title' => __('Sakurairo Options', 'sakurairo'),
'menu_title' => __('Sakurairo Options', 'sakurairo'),
'capability' => 'edit_theme_options',
'menu_slug' => 'options-framework',
'callback' => 'optionsframework_page'
Expand Down Expand Up @@ -272,8 +272,8 @@ function optionsframework_page() { ?>
<?php settings_fields( 'optionsframework' ); ?>
<?php optionsframework_fields(); /* Settings */ ?>
<div id="optionsframework-submit">
<input type="submit" class="button-primary" name="update" value="<?php _e( 'Save', 'sakura' ); ?>" />
<input type="submit" class="reset-button button-secondary" name="reset" value="<?php esc_attr_e( 'Restore default', 'sakura' ); ?>" onclick="return confirm( '<?php print esc_js( __( 'All setting will be lost, sure?', 'sakura' ) ); ?>' );" />
<input type="submit" class="button-primary" name="update" value="<?php _e( 'Save', 'sakurairo' ); ?>" />
<input type="submit" class="reset-button button-secondary" name="reset" value="<?php esc_attr_e( 'Restore default', 'sakurairo' ); ?>" onclick="return confirm( '<?php print esc_js( __( 'All setting will be lost, sure?', 'sakurairo' ) ); ?>' );" />
<div class="clear"></div>
</div>
</form>
Expand Down Expand Up @@ -409,7 +409,7 @@ function optionsframework_adminbar() {
$wp_admin_bar->add_menu( array(
'parent' => 'appearance',
'id' => 'of_theme_options',
'title' => __('Sakura Options', 'sakura'),
'title' => __('Sakurairo Options', 'sakurairo'),
'href' => admin_url( 'themes.php?page=options-framework' )
));
}
Expand Down
2 changes: 1 addition & 1 deletion inc/swicher.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function font_end_js_control() { ?>
mashiro_option.clipboardCopyright = true;
<?php } ?>

<?php if(akina_option('entry_content_theme') == "sakura"){ ?>
<?php if(akina_option('entry_content_theme') == "sakurairo"){ ?>
mashiro_option.entry_content_theme_src = "<?php echo get_template_directory_uri() ?>/cdn/theme/sakura.css?<?php echo SAKURA_VERSION.akina_option('cookie_version', ''); ?>";
<?php }elseif(akina_option('entry_content_theme') == "github") {?>
mashiro_option.entry_content_theme_src = "<?php echo get_template_directory_uri() ?>/cdn/theme/github.css?<?php echo SAKURA_VERSION.akina_option('cookie_version', ''); ?>";
Expand Down
16 changes: 8 additions & 8 deletions inc/template-tags.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ function akina_posted_on() {
);

$posted_on = sprintf(
_x( 'Posted on %s', 'post date', 'sakura' ),
_x( 'Posted on %s', 'post date', 'sakurairo' ),
'<a href="' . esc_url( get_permalink() ) . '" rel="bookmark">' . $time_string . '</a>'
);

$byline = sprintf(
_x( 'by %s', 'post author', 'sakura' ),
_x( 'by %s', 'post author', 'sakurairo' ),
'<span class="author vcard"><a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '">' . esc_html( get_the_author() ) . '</a></span>'
);

Expand All @@ -47,29 +47,29 @@ function akina_entry_footer() {
// Hide category and tag text for pages.
if ( 'post' === get_post_type() ) {
/* translators: used between list items, there is a space after the comma */
$categories_list = get_the_category_list( __( ', ', 'sakura' ) );
$categories_list = get_the_category_list( __( ', ', 'sakurairo' ) );
if ( $categories_list && akina_categorized_blog() ) {
printf( '<span class="cat-links">' . __( 'Posted in %1$s', 'sakura' ) . '</span>', $categories_list ); // WPCS: XSS OK.
printf( '<span class="cat-links">' . __( 'Posted in %1$s', 'sakurairo' ) . '</span>', $categories_list ); // WPCS: XSS OK.
}

/* translators: used between list items, there is a space after the comma */
$tags_list = get_the_tag_list( '', __( ', ', 'sakura' ) );
$tags_list = get_the_tag_list( '', __( ', ', 'sakurairo' ) );
if ( $tags_list ) {
printf( '<span class="tags-links">' . __( 'Tagged %1$s', 'sakura' ) . '</span>', $tags_list ); // WPCS: XSS OK.
printf( '<span class="tags-links">' . __( 'Tagged %1$s', 'sakurairo' ) . '</span>', $tags_list ); // WPCS: XSS OK.
}
}

if ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) {
echo '<span class="comments-link">';
/* translators: %s: post title */
comments_popup_link( sprintf( wp_kses( __( 'Leave a Comment<span class="screen-reader-text"> on %s</span>', 'sakura' ), array( 'span' => array( 'class' => array() ) ) ), get_the_title() ) );
comments_popup_link( sprintf( wp_kses( __( 'Leave a Comment<span class="screen-reader-text"> on %s</span>', 'sakurairo' ), array( 'span' => array( 'class' => array() ) ) ), get_the_title() ) );
echo '</span>';
}

edit_post_link(
sprintf(
/* translators: %s: Name of current post */
__( 'Edit %s', 'sakura' ),
__( 'Edit %s', 'sakurairo' ),
the_title( '<span class="screen-reader-text">"', '"</span>', false )
),
'<span class="edit-link">',
Expand Down
Loading

0 comments on commit d016797

Please sign in to comment.