Skip to content

Commit b3f85dc

Browse files
committed
20211220
1 parent 45fea0c commit b3f85dc

File tree

5 files changed

+25
-11
lines changed

5 files changed

+25
-11
lines changed

inc/frame/classes/metabox.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public function render_meta_box_content( $post, $callback ) {
126126
$default = ( isset( $field['default'] ) ) ? $field['default'] : '';
127127
$elem_id = ( isset( $field['id'] ) ) ? $field['id'] : '';
128128
if($callback['args']['data_type'] !== 'serialize' ) {//iotheme.cn
129-
$elem_value = get_term_meta($post->ID, $elem_id,true);
129+
$elem_value = get_post_meta($post->ID, $elem_id,true);
130130
}else{
131131
$elem_value = ( is_array( $meta_value ) && isset( $meta_value[$elem_id] ) ) ? $meta_value[$elem_id] : $default;
132132
}//iotheme.cn

inc/frame/functions/fallback.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
<?php if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access pages directly.
2+
/*
3+
* @Author: iowen
4+
* @Author URI: https://www.iowen.cn/
5+
* @Date: 2020-02-22 21:26:04
6+
* @LastEditors: iowen
7+
* @LastEditTime: 2021-12-20 22:47:45
8+
* @FilePath: \WebStack\inc\frame\functions\fallback.php
9+
* @Description:
10+
*/
211
/**
312
*
413
* A fallback for get term meta
@@ -28,7 +37,7 @@ function get_term_meta( $term_id, $key = '', $single = false ) {
2837
*
2938
*/
3039
if( ! function_exists( 'add_term_meta' ) ) {
31-
function add_term_meta( $term_id, $meta_key = '', $meta_value, $unique = false ) {
40+
function add_term_meta( $term_id, $meta_key = '', $meta_value = '', $unique = false ) {
3241

3342
return update_term_meta( $term_id, $meta_key, $meta_value, $unique );
3443

inc/inc.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* @Author URI: https://www.iowen.cn/
77
* @Date: 2019-02-22 21:26:02
88
* @LastEditors: iowen
9-
* @LastEditTime: 2021-08-22 23:20:28
9+
* @LastEditTime: 2021-12-20 23:48:24
1010
* @FilePath: \WebStack\inc\inc.php
1111
* @Description:
1212
*/
@@ -524,8 +524,8 @@ function searchfilter($query) {
524524
*/
525525
add_filter('posts_join', 'cf_search_join' );
526526
function cf_search_join( $join ) {
527-
if(is_admin())
528-
return $join;
527+
//if(is_admin())
528+
// return $join;
529529
global $wpdb;
530530
if ( is_search() ) {
531531
$join .=' LEFT JOIN '.$wpdb->postmeta. ' ON '. $wpdb->posts . '.ID = ' . $wpdb->postmeta . '.post_id ';
@@ -538,8 +538,8 @@ function cf_search_join( $join ) {
538538
*/
539539
add_filter('posts_where', 'cf_search_where');
540540
function cf_search_where( $where ) {
541-
if(is_admin())
542-
return $where;
541+
//if(is_admin())
542+
// return $where;
543543
global $pagenow, $wpdb;
544544
if ( is_search() ) {
545545
$where = preg_replace("/\(\s*".$wpdb->posts.".post_title\s+LIKE\s*(\'[^\']+\')\s*\)/",
@@ -553,8 +553,8 @@ function cf_search_where( $where ) {
553553
*/
554554
add_filter ('posts_distinct', 'cf_search_distinct');
555555
function cf_search_distinct($where) {
556-
if(is_admin())
557-
return $where;
556+
//if(is_admin())
557+
// return $where;
558558
global $wpdb;
559559
if ( is_search() ) {
560560
return "DISTINCT";

inc/post-type.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* @Author URI: https://www.iowen.cn/
77
* @Date: 2020-02-22 21:26:05
88
* @LastEditors: iowen
9-
* @LastEditTime: 2021-08-22 21:47:11
9+
* @LastEditTime: 2021-12-20 23:53:13
1010
* @FilePath: \WebStack\inc\post-type.php
1111
* @Description:
1212
*/
@@ -218,12 +218,17 @@ function io_work_convert_restrict($query) {
218218
add_filter('manage_edit-sites_columns', 'io_ordinal_manage_posts_columns');
219219
add_action('manage_posts_custom_column','io_ordinal_manage_posts_custom_column',10,2);
220220
function io_ordinal_manage_posts_columns($columns){
221+
$columns['link'] = '链接';
221222
$columns['ordinal'] = '排序';
222223
$columns['visible'] = '可见性';
223224
return $columns;
224225
}
225226
function io_ordinal_manage_posts_custom_column($column_name,$id){
226227
switch( $column_name ) :
228+
case 'link': {
229+
echo get_post_meta($id, '_sites_link', true);
230+
break;
231+
}
227232
case 'ordinal': {
228233
echo get_post_meta($id, '_sites_order', true);
229234
break;

style.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Theme Name:WebStack
33
Theme URI:https://www.iotheme.cn
44
Description:wordpress 导航主题!官方网站:<a href="https://www.iotheme.cn">一为主题</a>,</br><a href="https://www.iotheme.cn/store/onenav.html">升级pro版</a>,体验更多功能
5-
Version:1.1522
5+
Version:1.1620
66
Requires at least: 5.4
77
Tested up to: 5.8
88
Requires PHP: 5.6

0 commit comments

Comments
 (0)