drl47263 2016-07-31 08:13
浏览 45
已采纳

Gallery Pro Table进入wordpress的mysql

How I can reach Gallery Pro Plugin Table Into mysql at wordpress ?

I Need To find Gallery Pro Plugin Query To show show Gallery Images On App Via Rest API

At Admin Panel I Add New Image Into Gallery With Short Code [WG id=1606] It Make Row Into wp_posts Table

When I Add Image From PC It Add New Row With post_parent = '1606'

But When I Add Image Allready Uploaded On Server It Doesn't Add Any Row To wp_posts Table

  • 写回答

1条回答 默认 最新

  • doumingo04696 2016-07-31 10:31
    关注

    I Found Solution :

        $lksg_Id = '1606';
        $TotalImg =  get_post_meta( $lksg_Id, 'lksg_total_images_count', true );
        $lksg_Gallery_Settings = "lksg_Gallery_Settings_".$lksg_Id;
        $lksg_AllPhotosDetails = unserialize(base64_decode(get_post_meta( $lksg_Id, 'lksg_all_photos_details', true)));
        // echo 'All Photos Details : <br /> ' . var_dump($lksg_AllPhotosDetails) . '<br /><br /><br />';
        if(count($lksg_Gallery_setting)) {
            $lk_gallery_title       =   $lksg_Gallery_setting['lk_gallery_title'];
            $lk_show_image_label        =   $lksg_Gallery_setting['lk_show_image_label'];
            $lk_Gallery_Layout      =   $lksg_Gallery_setting['lk_Gallery_Layout'];
            $wgp_Color          =   $lksg_Gallery_setting['wgp_Color'];
            $lk_label_Color             =       $lksg_Gallery_setting['lk_label_Color'];
            $lk_desc_font_Color         =       $lksg_Gallery_setting['lk_desc_font_Color'];
            $lk_btn_Color               =       $lksg_Gallery_setting['lk_btn_Color'];
            $lk_btn_font_Color      =       $lksg_Gallery_setting['lk_btn_font_Color'];
            $lk_font_style          =       $lksg_Gallery_setting['lk_font_style'];
            $lk_Custom_CSS          =       $lksg_Gallery_setting['lk_Custom_CSS'];
            $lk_show_img_desc       =       $lksg_Gallery_setting['lk_show_img_desc'];
            $lk_Light_Box           =       $lksg_Gallery_setting['lk_Light_Box'];
            $lk_open_link           =       $lksg_Gallery_setting['lk_open_link'];
            $lk_button_title        =       $lksg_Gallery_setting['lk_button_title'];
        }
        // echo 'Gallery setting : ' . var_dump($lksg_Gallery_setting) . '<br /><br /><br />';
        // echo 'Total Img : ' . var_dump($TotalImg) . '<br /><br /><br />';
        $results = array();
        if($TotalImg) {
            foreach($lksg_AllPhotosDetails as $data) {
                // echo 'data : <br /> '  . var_dump($data) . '<br /><br /><br />';
                $item = new stdclass();
                // $item->id = $data->ID;
                $item->title = $data['lksg_image_label'];
                $item->content = $data['img_desc'];
                $item->image = $data['lksg_image_url'];
                $item->tbn = $data['lksg_img_medium'];
                $results[] = $item;
            }
        }
        // Finally Return Array As Json String
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 使用ue5插件narrative时如何切换关卡也保存叙事任务记录
  • ¥20 软件测试决策法疑问求解答
  • ¥15 win11 23H2删除推荐的项目,支持注册表等
  • ¥15 matlab 用yalmip搭建模型,cplex求解,线性化处理的方法
  • ¥15 qt6.6.3 基于百度云的语音识别 不会改
  • ¥15 关于#目标检测#的问题:大概就是类似后台自动检测某下架商品的库存,在他监测到该商品上架并且可以购买的瞬间点击立即购买下单
  • ¥15 神经网络怎么把隐含层变量融合到损失函数中?
  • ¥15 lingo18勾选global solver求解使用的算法
  • ¥15 全部备份安卓app数据包括密码,可以复制到另一手机上运行
  • ¥20 测距传感器数据手册i2c