Changeset 2489591
- Timestamp:
- 03/08/2021 02:20:55 PM (5 years ago)
- Location:
- searchie/trunk
- Files:
-
- 11 edited
-
README.txt (modified) (2 diffs)
-
SIO/API/Widgets.php (modified) (3 diffs)
-
SIO/Media/Controller.php (modified) (1 diff)
-
SIO/Media/Index.php (modified) (6 diffs)
-
SIO/Settings/Controller.php (modified) (1 diff)
-
admin/partials/dashboard/media/local-index.php (modified) (3 diffs)
-
functions/api.php (modified) (1 diff)
-
functions/helper.php (modified) (1 diff)
-
functions/media.php (modified) (1 diff)
-
functions/widgets.php (modified) (1 diff)
-
searchie.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
searchie/trunk/README.txt
r2402490 r2489591 4 4 Tags: video, audio, content 5 5 Requires at least: 5.4 6 Tested up to: 5. 5.17 Stable tag: 1.11.3 06 Tested up to: 5.6.2 7 Stable tag: 1.11.33 8 8 Requires PHP: 7.0 9 9 License: GPLv2 or later … … 27 27 28 28 == Changelog == 29 30 = 1.11.33 = 31 * Update the current version to latest WordPress stable version. 32 * Fix some bug due to some incompatible. 29 33 30 34 = 1.11.30 = -
searchie/trunk/SIO/API/Widgets.php
r2340379 r2489591 89 89 $res = SIO_API::get_instance()->get($args); 90 90 91 if ( $res['http_code'] == 200 ) {91 if ( isset($res['http_code']) && $res['http_code'] == 200 ) { 92 92 $body = json_decode($res['body']); 93 93 $msg = $res['msg']; … … 99 99 ]; 100 100 } else { 101 $body = json_decode($res['body']); 102 $msg = $res['msg']; 101 $resBody = isset($res['body']) ?? []; 102 $body = json_decode($resBody); 103 $msg = $res['msg'] ?? ''; 103 104 104 105 $ret = [ … … 106 107 'msg' => $msg, 107 108 'status' => false, 108 'http_code' => $res['http_code'] ,109 'http_code' => $res['http_code'] ?? '', 109 110 ]; 110 111 } -
searchie/trunk/SIO/Media/Controller.php
r2325888 r2489591 43 43 public function sync() { 44 44 SIO_Media_Index::get_instance()->sync(); 45 sio_redirect_to( admin_url('?page=searchie-media') ); 45 sio_redirect_to( admin_url('?page=searchie-media') ); 46 46 } 47 47 -
searchie/trunk/SIO/Media/Index.php
r2340379 r2489591 85 85 86 86 $res = SIO_API_Files::get_instance()->search([ 'search' => $search, 'paged' => $paged ]); 87 87 88 if ( $res['http_code'] == 200 && $res['body']->meta->total > 0 ) { 88 89 $data = [ … … 129 130 } 130 131 131 public function content( $args = [] ) { 132 public function content($args = []) 133 { 132 134 $defaults = []; 133 135 $data = wp_parse_args( $args, $defaults ); … … 173 175 174 176 $medias = sio_get_local_media(); 175 177 176 178 $data = [ 177 179 'limit' => $limit, … … 185 187 'media_data_source' => $media_data_source 186 188 ]; 189 187 190 SIO_View::get_instance()->admin_partials('dashboard/media/local-index.php', $data); 188 191 } 189 190 191 192 192 193 } … … 222 223 } else { 223 224 //many pages 224 $result_data[] = $data['medias']; 225 $result_data = $data['medias']; 226 225 227 for($i = 2; $i <= $last_page; $i++) { 226 228 $paged = $i; … … 229 231 ]; 230 232 $files = sio_get_media($api_file_args); 231 $result_data[] = $files['body']->data; 232 } 233 } 234 } 233 234 $totalFiles = $files['body']->data; 235 } 236 $result_data += $totalFiles; 237 } 238 } 239 $result_data = array_merge_recursive($result_data, $totalFiles ?? []); 235 240 236 241 sio_store_media_files( $result_data ); 237 238 242 } 239 243 -
searchie/trunk/SIO/Settings/Controller.php
r2340379 r2489591 102 102 103 103 $args['username'] = false; 104 if ( isset($_POST['username']) && sanitize_text_field( $_POST['username'] )!== '' ) {105 $args['username'] = sanitize_text_field( $_POST['username'] );104 if ( isset($_POST['username']) && $_POST['username'] !== '' ) { 105 $args['username'] = $_POST['username']; 106 106 } 107 107 108 108 $args['password'] = false; 109 if ( isset($_POST['password']) && sanitize_text_field( $_POST['password'] )!== '' ) {110 $args['password'] = sanitize_text_field( $_POST['password'] );109 if ( isset($_POST['password']) && $_POST['password'] !== '' ) { 110 $args['password'] = $_POST['password']; 111 111 } 112 112 -
searchie/trunk/admin/partials/dashboard/media/local-index.php
r2340379 r2489591 43 43 <li class="media media-item"> 44 44 <?php 45 $title = $media->title ?? ''; 46 $embed_url = $media->embed_url ?? ''; 45 47 $ajax_url = add_query_arg( 46 48 array( 47 49 'action' => 'tb_show_media', 48 'embed_url' => $ media->embed_url,49 'title' => $ media->title,50 'embed_url' => $embed_url, 51 'title' => $title, 50 52 'width' => 600, 51 53 'height' => 650, … … 58 60 </a> 59 61 <div class="media-body"> 60 <h5 class="mt-0 mb-1"><?php echo $ media->title;?></h5>62 <h5 class="mt-0 mb-1"><?php echo $title;?></h5> 61 63 <div class="input-group mb-3"> 62 64 <input 63 65 type="text" 64 66 class="form-control form-control-sm copy-clipboard" 65 value="[sio_embed_media embed_url='<?php echo $ media->embed_url;?>' width='560' height='315' responsive='0']"67 value="[sio_embed_media embed_url='<?php echo $embed_url;?>' width='560' height='315' responsive='0']" 66 68 style="height:75%;" 67 69 readonly … … 80 82 <div class="row"> 81 83 <?php 82 sio_paginator($limit, $page, $total_page , admin_url($link_href));84 sio_paginator($limit, $page, $total_page ?? 0, admin_url($link_href)); 83 85 ?> 84 86 </div> -
searchie/trunk/functions/api.php
r2325888 r2489591 8 8 define('SIO_API_CLIENT_ID', 14); 9 9 define('SIO_API_CLIENT_SECRET', 'tK0G7BlgOWCuY712PUm0XPIWnJvuMft7ZlwCueJL'); 10 } else { 11 define('SIO_API_URL', 'https://fkwhwvg9azgw.searchie.io/'); 12 define('SIO_API_CLIENT_ID', 14); 13 define('SIO_API_CLIENT_SECRET', 'NR22qtpXfEfB15w6B1G9vu3qTMsj9JAOtnaKxsqy'); 14 } 10 } -
searchie/trunk/functions/helper.php
r2327514 r2489591 60 60 } 61 61 62 function sio_dd( $arr = [] ) {62 function sio_dd( $arr = [], $exit = false ) { 63 63 echo '<pre>'; 64 64 print_r($arr); 65 65 echo '</pre>'; 66 if ( $exit ) 67 { 68 exit(); 69 } 66 70 } 67 71 -
searchie/trunk/functions/media.php
r2327514 r2489591 37 37 if ( $get_data ) { 38 38 foreach( $get_data as $key => $val ) { 39 if ( is_array( $val ) ) { 40 foreach( $val as $val_array ) { 41 $get_data_array[] = $val_array; 42 } 43 } 39 // if ( is_array( $val ) ) { 40 // foreach( $val as $val_array ) { 41 // $get_data_array[] = $val_array; 42 // } 43 // } 44 $get_data_array[] = $val; 44 45 } 45 46 } -
searchie/trunk/functions/widgets.php
r2340379 r2489591 26 26 $ret = new SIO_API_Widgets; 27 27 $widgets = $ret->get( $args ); 28 return $widgets['body']->data ;28 return $widgets['body']->data ?? []; 29 29 } elseif ( $data_source == 'local' ) { 30 30 return sio_get_local_widgets(); -
searchie/trunk/searchie.php
r2402490 r2489591 4 4 * 5 5 * @link https://www.searchie.io/ 6 * @since 1.11.3 06 * @since 1.11.33 7 7 * @package Searchie 8 8 * … … 11 11 * Plugin URI: https://www.searchie.io/ 12 12 * Description: Unlock the full potential of your video and audio content Searchie helps reduce content overwhelm for your customers and team, making your content more accessible and easier to consume. You create� And let Searchie do the work for you. 13 * Version: 1.11.3 013 * Version: 1.11.33 14 14 * Author: Searchie 15 15 * License: GPL-2.0+ … … 29 29 * Rename this for the plugin and update it as you release new versions. 30 30 */ 31 define( 'SEARCHIE_VERSION', '1.11.3 0' );31 define( 'SEARCHIE_VERSION', '1.11.33' ); 32 32 /** 33 33 * Get the root url file.
Note: See TracChangeset
for help on using the changeset viewer.