Changeset 2786524
- Timestamp:
- 09/18/2022 09:54:06 AM (4 years ago)
- Location:
- bubuku-media-library
- Files:
-
- 24 edited
- 1 copied
-
assets/banner-772x250.png (modified) (previous)
-
assets/icon-158x158.png (modified) (previous)
-
assets/icon-256x256.png (modified) (previous)
-
assets/icon.svg (modified) (4 diffs)
-
tags/1.0.2 (copied) (copied from bubuku-media-library/trunk)
-
tags/1.0.2/assets/css/admin.css (modified) (4 diffs)
-
tags/1.0.2/bubuku-media-library.php (modified) (1 diff)
-
tags/1.0.2/readme.txt (modified) (2 diffs)
-
tags/1.0.2/src/BML_assets.php (modified) (4 diffs)
-
tags/1.0.2/src/BML_common.php (modified) (2 diffs)
-
tags/1.0.2/src/BML_db.php (modified) (1 diff)
-
tags/1.0.2/src/BML_filter.php (modified) (3 diffs)
-
tags/1.0.2/src/BML_plugin.php (modified) (2 diffs)
-
tags/1.0.2/src/BML_restapi.php (modified) (3 diffs)
-
tags/1.0.2/src/BML_view.php (modified) (2 diffs)
-
trunk/assets/css/admin.css (modified) (4 diffs)
-
trunk/bubuku-media-library.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/src/BML_assets.php (modified) (4 diffs)
-
trunk/src/BML_common.php (modified) (2 diffs)
-
trunk/src/BML_db.php (modified) (1 diff)
-
trunk/src/BML_filter.php (modified) (3 diffs)
-
trunk/src/BML_plugin.php (modified) (2 diffs)
-
trunk/src/BML_restapi.php (modified) (3 diffs)
-
trunk/src/BML_view.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
bubuku-media-library/assets/icon.svg
r2782825 r2786524 3 3 <rect width="256" height="256" fill="white"/> 4 4 <path fill-rule="evenodd" clip-rule="evenodd" d="M0 0H255.822V91.1304L256 162.087L255.822 256H0L0 0Z" fill="url(#paint0_linear_103_168)"/> 5 <g filter="url(#filter0_d_103_168)"> 6 <path d="M378 -6H-195.894L-197 -2.5974L-195.894 256H310.505L378 -6Z" fill="url(#paint1_linear_103_168)"/> 7 </g> 5 8 <path d="M60.6172 233.181C60.6172 232.975 63.166 217.432 66.3008 198.675C71.8379 165.143 71.9551 164.494 73.0098 162.371C75.1191 158.094 79.6309 154.821 84.3477 154.201C87.3066 153.818 168.693 153.818 171.652 154.201C176.369 154.821 180.881 158.094 182.99 162.371C184.045 164.494 184.162 165.143 189.699 198.675C192.834 217.432 195.383 232.975 195.383 233.181C195.383 233.447 181.701 233.535 128 233.535C74.2988 233.535 60.6172 233.447 60.6172 233.181ZM130.402 220.854C144.055 219.261 154.924 207.376 155.012 193.868C155.1 182.897 147.629 172.25 137.053 168.269C129.582 165.438 121.818 166.116 114.963 170.186C106.994 174.905 102.219 182.189 101.047 191.42C100.402 196.729 102.219 203.542 105.734 208.791C107.287 211.121 110.627 214.454 112.941 216.046C116.604 218.553 121.232 220.352 125.188 220.824C126.33 220.971 127.414 221.089 127.561 221.119C127.736 221.119 128.996 221.001 130.402 220.854Z" fill="#766964"/> 6 9 <path d="M77.0234 135.739C74.6211 135.238 70.373 133.114 68.1758 131.345C66.1836 129.723 63.8691 126.744 62.6387 124.208C61.1445 121.081 60.6172 118.368 60.6172 113.738V109.668H128H195.383V113.738C195.383 119.961 194.27 123.588 190.959 128.012C189.084 130.548 186.828 132.347 183.518 134.029C178.859 136.358 182.639 136.211 127.854 136.181C87.2188 136.181 78.6055 136.093 77.0234 135.739ZM99.9043 118.811C100.578 118.427 100.607 117.985 99.9629 117.277C99.5234 116.776 98.791 116.746 89.0352 116.746C78.9863 116.746 78.5176 116.776 77.873 117.336L77.1699 117.926L77.873 118.516C78.5176 119.076 78.9863 119.105 88.9473 119.105C95.5391 119.105 99.5234 118.987 99.9043 118.811ZM115.139 118.516L115.842 117.926L115.139 117.336C114.553 116.835 114.025 116.746 111.594 116.746C109.162 116.746 108.635 116.835 108.049 117.336L107.346 117.926L108.049 118.516C108.635 119.017 109.162 119.105 111.594 119.105C114.025 119.105 114.553 119.017 115.139 118.516Z" fill="#766964"/> … … 19 22 <path d="M144.033 98.9569C144.033 98.2391 144.076 98.1956 144.79 98.1956C145.202 98.1956 145.548 98.2391 145.548 98.2826C145.548 98.4131 144.249 99.7183 144.119 99.7183C144.076 99.7183 144.033 99.3702 144.033 98.9569Z" fill="#ABD641"/> 20 23 <path d="M89.1532 98.1956C88.9151 98.1086 88.4821 97.7606 88.179 97.4343L87.6378 96.8469L87.5729 89.9731L87.5079 83.0776L93.3098 77.2696L99.1116 71.4399L106.147 78.5095L113.183 85.5791L106.797 91.9961L100.411 98.4131L94.9984 98.3914C92.0325 98.3914 89.3913 98.3044 89.1532 98.1956Z" fill="#ABD641"/> 21 <path d="M127.363 76.116 8C139.573 63.8483 149.683 53.8204 149.835 53.8204C151.004 53.8204 149.878 55.0168 128.532 76.4648C107.879 97.2167 106.645 98.4131 105.931 98.4131C105.195 98.4131 106.083 97.4995 127.363 76.1168Z" fill="#ABD641"/>24 <path d="M127.363 76.1167C139.573 63.8483 149.683 53.8204 149.835 53.8204C151.004 53.8204 149.878 55.0168 128.532 76.4648C107.879 97.2167 106.645 98.4131 105.931 98.4131C105.195 98.4131 106.083 97.4995 127.363 76.1167Z" fill="#ABD641"/> 22 25 <path d="M168.279 97.543C168.279 96.9557 168.344 96.8904 168.929 96.8904C169.513 96.8904 169.557 96.934 169.34 97.3037C169.188 97.5213 168.907 97.8041 168.691 97.9563C168.323 98.1739 168.279 98.1303 168.279 97.543Z" fill="#ABD641"/> 23 26 <path d="M168.929 73.6805C168.929 72.9191 168.929 72.8974 169.362 73.2889C169.6 73.5064 169.795 73.8545 169.795 74.0938C169.795 74.333 169.643 74.4853 169.362 74.4853C169.015 74.4853 168.929 74.333 168.929 73.6805Z" fill="#ABD641"/> … … 37 40 </g> 38 41 <defs> 42 <filter id="filter0_d_103_168" x="-201" y="-6" width="583" height="270" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"> 43 <feFlood flood-opacity="0" result="BackgroundImageFix"/> 44 <feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/> 45 <feOffset dy="4"/> 46 <feGaussianBlur stdDeviation="2"/> 47 <feComposite in2="hardAlpha" operator="out"/> 48 <feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/> 49 <feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_103_168"/> 50 <feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_103_168" result="shape"/> 51 </filter> 39 52 <linearGradient id="paint0_linear_103_168" x1="162.095" y1="405.824" x2="475.362" y2="95.325" gradientUnits="userSpaceOnUse"> 40 53 <stop stop-color="#FEC754"/> … … 46 59 <stop offset="1" stop-color="#FEC754"/> 47 60 </linearGradient> 61 <linearGradient id="paint1_linear_103_168" x1="167.081" y1="409.336" x2="410.439" y2="-120.032" gradientUnits="userSpaceOnUse"> 62 <stop stop-color="#14B4B7"/> 63 <stop offset="0.278014" stop-color="#81C0CA"/> 64 <stop offset="0.475432" stop-color="#7BBAC4"/> 65 <stop offset="0.596493" stop-color="#93C9D1"/> 66 <stop offset="0.82488" stop-color="#B0D8DE"/> 67 <stop offset="1" stop-color="#0061FF"/> 68 <stop offset="1" stop-color="#14B4B7"/> 69 </linearGradient> 48 70 <clipPath id="clip0_103_168"> 49 71 <rect width="256" height="256" fill="white"/> -
bubuku-media-library/tags/1.0.2/assets/css/admin.css
r2783009 r2786524 3 3 --bkml-color-medium: #f6b52c; 4 4 --bkml-color-high: #FC4D0D; 5 --bkml-bg-btn: #B0D8DE; 5 --bkml-bg-btn-light: #a8cdec; 6 --bkml-bg-btn: #2271b1; 6 7 } 7 8 … … 47 48 48 49 .bk_file_size .bk_btn .bk_txt{ 49 display: block;50 50 width: 100%; 51 height: 30px;52 line-height: 30px;53 border-radius: 3px;54 background: var(--bkml-bg-btn);55 text-align: center;56 cursor: pointer;57 51 } 58 52 … … 91 85 height: 4px; 92 86 position: relative; 93 background: var(--bkml-bg-btn );87 background: var(--bkml-bg-btn-light); 94 88 overflow: hidden; 95 89 display: none; … … 105 99 width: 10px; 106 100 height: 4px; 107 background: var(--bkml- color-good);101 background: var(--bkml-bg-btn); 108 102 position: absolute; 109 103 top: 0; -
bubuku-media-library/tags/1.0.2/bubuku-media-library.php
r2783009 r2786524 5 5 * Requires at least: 5.2 6 6 * Requires PHP: 7.2 7 * Version: 1.0. 17 * Version: 1.0.2 8 8 * Author: Bubuku 9 9 * Author URI: https://www.bubuku.com/ -
bubuku-media-library/tags/1.0.2/readme.txt
r2783009 r2786524 5 5 Tested up to: 6.0.2 6 6 Requires PHP: 7.3 7 Stable tag: 1.0. 07 Stable tag: 1.0.2 8 8 License: GPLv3 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 32 32 33 33 == Changelog == 34 = 1.0.2 = 35 * Rename variables 36 * Correctly filter by file size 37 * Styling WordPress Button 34 38 35 39 = 1.0.1 = -
bubuku-media-library/tags/1.0.2/src/BML_assets.php
r2783009 r2786524 1 1 <?php 2 /**3 * Assets Class.4 *5 * @package Bubuku Media Library6 * @author Luis Ruiz <lruiz@bubuku.com>7 * @copyright 2022 Bubuku8 * @version 1.0.19 */10 2 11 3 namespace Bubuku\Plugins\MediaLibrary; … … 36 28 wp_enqueue_style( 37 29 'bk-media-library-css', 38 B BK_PLUGIN_ASSETS_URL . '/css/admin.css',30 BUBUKU_BML_PLUGIN_ASSETS_URL . '/css/admin.css', 39 31 false, 40 '1.0. 1'32 '1.0.2' 41 33 ); 42 34 … … 45 37 wp_enqueue_script( 46 38 'bk-media-library-js', 47 B BK_PLUGIN_ASSETS_URL . '/js/common.js',39 BUBUKU_BML_PLUGIN_ASSETS_URL . '/js/common.js', 48 40 $js_dependencies, 49 41 true … … 51 43 52 44 $args = array( 53 'nonce' => B BK_PLUGIN_NONCE,54 'api_public' => '/wp-json/'. B BK_PLUGIN_ENDPOINTS_URL,45 'nonce' => BUBUKU_BML_PLUGIN_NONCE, 46 'api_public' => '/wp-json/'. BUBUKU_BML_PLUGIN_ENDPOINTS_URL, 55 47 ); 56 48 -
bubuku-media-library/tags/1.0.2/src/BML_common.php
r2783009 r2786524 1 1 <?php 2 /**3 * Common Class.4 *5 * @package Bubuku Media Library6 * @author Luis Ruiz <lruiz@bubuku.com>7 * @copyright 2022 Bubuku8 * @version 1.0.19 */10 2 11 3 namespace Bubuku\Plugins\MediaLibrary; … … 79 71 80 72 if ( 'bk_file_size' == $orderby ) { 81 82 $meta_query = array(83 'relation' => 'OR',84 array(85 'key' => '_bkml_attachment_file_size',86 'compare' => 'NOT EXISTS',87 ),88 array(89 'key' => '_bkml_attachment_file_size',90 ),91 );92 93 $query->set( 'meta_query', $meta_query );94 73 $query->set( 'orderby', 'meta_value_num' ); 74 $query->set( 'meta_key' , '_bkml_attachment_file_size' ); 75 $query->set( 'meta_type' , 'numeric' ); 95 76 } 96 77 } -
bubuku-media-library/tags/1.0.2/src/BML_db.php
r2783009 r2786524 1 1 <?php 2 /**3 * Db Class.4 *5 * @package Bubuku Media Library6 * @author Luis Ruiz <lruiz@bubuku.com>7 * @copyright 2022 Bubuku8 * @version 1.0.19 */10 2 11 3 namespace Bubuku\Plugins\MediaLibrary; -
bubuku-media-library/tags/1.0.2/src/BML_filter.php
r2783009 r2786524 1 1 <?php 2 /**3 * Filter Class.4 *5 * @package Bubuku Media Library6 * @author Luis Ruiz <lruiz@bubuku.com>7 * @copyright 2022 Bubuku8 * @version 1.0.19 */10 2 11 3 namespace Bubuku\Plugins\MediaLibrary; … … 23 15 // Filter query 24 16 add_action( 'pre_get_posts', [ $this, 'filter_results' ] ); 17 add_action( 'load-upload.php', [ $this, 'notice' ] ); 25 18 } 26 19 … … 193 186 } 194 187 } 188 189 public function notice() { 190 global $wp_query; 191 //$count = $custom_posts->found_posts; 192 // media_list_table_query 193 // WP_Media_List_Table::no_items() 194 // has_items 195 // total_items 196 // get_pagenum 197 // $wp_list_table->_pagination_args; 198 // $wp_list_table->_pagination_args['total_items']; 199 200 if(!class_exists('WP_List_Table')){ 201 require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' ); 202 } 203 204 // echo '-+-'; 205 // var_dump($wp_query); 206 207 $wp_list_table = _get_list_table('WP_Media_List_Table'); 208 //$data = $wp_list_table->display(); 209 //usort( $data, array( &$this, 'sort_data' ) ); 210 //$totalItems = count($data); 211 // echo '-+-'. $data; 212 //var_dump($data); 213 214 //$WP_Media_List_Table = new WP_Media_List_Table(); 215 //echo '-*-'. $WP_Media_List_Table->has_items(); 216 217 //exit(); 218 } 195 219 } -
bubuku-media-library/tags/1.0.2/src/BML_plugin.php
r2783009 r2786524 1 1 <?php 2 /**3 * Plugin Class.4 *5 * @package Bubuku Media Library6 * @author Luis Ruiz <lruiz@bubuku.com>7 * @copyright 2022 Bubuku8 * @version 1.0.19 */10 2 11 3 namespace Bubuku\Plugins\MediaLibrary; … … 26 18 */ 27 19 public function init() { 28 define( 'B BK_PLUGIN_PATH', untrailingslashit( plugin_dir_path( __DIR__ ) ) );29 define( 'B BK_PLUGIN_URL', untrailingslashit( plugin_dir_url( __DIR__ ) ) );30 define( 'B BK_PLUGIN_BASE', untrailingslashit( plugin_dir_url( __FILE__ ) ) );31 define( 'B BK_PLUGIN_ASSETS_PATH', BBK_PLUGIN_PATH . '/assets' );32 define( 'B BK_PLUGIN_ASSETS_URL', BBK_PLUGIN_URL . '/assets' );33 define( 'B BK_PLUGIN_ENDPOINTS_URL', 'bbk_medialibrary/v1' );34 define( 'B BK_PLUGIN_VERSION', '1.0.1' );35 define( 'B BK_PLUGIN_NONCE', wp_create_nonce('media-library'. BBK_PLUGIN_VERSION) );20 define( 'BUBUKU_BML_PLUGIN_PATH', untrailingslashit( plugin_dir_path( __DIR__ ) ) ); 21 define( 'BUBUKU_BML_PLUGIN_URL', untrailingslashit( plugin_dir_url( __DIR__ ) ) ); 22 define( 'BUBUKU_BML_PLUGIN_BASE', untrailingslashit( plugin_dir_url( __FILE__ ) ) ); 23 define( 'BUBUKU_BML_PLUGIN_ASSETS_PATH', BUBUKU_BML_PLUGIN_PATH . '/assets' ); 24 define( 'BUBUKU_BML_PLUGIN_ASSETS_URL', BUBUKU_BML_PLUGIN_URL . '/assets' ); 25 define( 'BUBUKU_BML_PLUGIN_ENDPOINTS_URL', 'bbk_medialibrary/v1' ); 26 define( 'BUBUKU_BML_PLUGIN_VERSION', '1.0.2' ); 27 define( 'BUBUKU_BML_PLUGIN_NONCE', wp_create_nonce('media-library'. BUBUKU_BML_PLUGIN_VERSION) ); 36 28 37 load_plugin_textdomain( 'bbkmedialibrary', false, B BK_PLUGIN_BASE . '/languages' );29 load_plugin_textdomain( 'bbkmedialibrary', false, BUBUKU_BML_PLUGIN_BASE . '/languages' ); 38 30 39 31 new BML_assets(); -
bubuku-media-library/tags/1.0.2/src/BML_restapi.php
r2783009 r2786524 1 1 <?php 2 /**3 * Restapi Class.4 *5 * @package Bubuku Bubuku Media Library6 * @author Luis Ruiz <lruiz@bubuku.com>7 * @copyright 2022 Bubuku8 * @version 1.0.19 */10 2 11 3 namespace Bubuku\Plugins\MediaLibrary; … … 24 16 25 17 private function init() { 26 $this->_namespace = B BK_PLUGIN_ENDPOINTS_URL;18 $this->_namespace = BUBUKU_BML_PLUGIN_ENDPOINTS_URL; 27 19 $this->_db = new BML_db(); 28 20 $this->_view = new BML_view(); … … 57 49 $nonce = $request['_wpnonce']; 58 50 59 if ( B BK_PLUGIN_NONCE !== $nonce && empty($media_id)) {51 if ( BUBUKU_BML_PLUGIN_NONCE !== $nonce && empty($media_id)) { 60 52 wp_send_json_error( esc_html__('empty Media ID', 'bbkmedialibrary') ); 61 53 die(); -
bubuku-media-library/tags/1.0.2/src/BML_view.php
r2783009 r2786524 1 1 <?php 2 /**3 * View Class.4 *5 * @package Bubuku Media Library6 * @author Luis Ruiz <lruiz@bubuku.com>7 * @copyright 2022 Bubuku8 * @version 1.0.19 */10 2 11 3 namespace Bubuku\Plugins\MediaLibrary; … … 72 64 <small>'. esc_html__('In order to sort or filter by size, you need to calculate', 'bbkmedialibrary') .'</small> 73 65 <button type="button" class="bk_btn js-calculate" data-id="'. $media_id .'"> 74 <span class="bk_txt ">'. esc_html__('Calculate', 'bbkmedialibrary') .'</span>66 <span class="bk_txt button-primary">'. esc_html__('Calculate', 'bbkmedialibrary') .'</span> 75 67 <span class="bk_loader"></span> 76 68 </button> -
bubuku-media-library/trunk/assets/css/admin.css
r2783009 r2786524 3 3 --bkml-color-medium: #f6b52c; 4 4 --bkml-color-high: #FC4D0D; 5 --bkml-bg-btn: #B0D8DE; 5 --bkml-bg-btn-light: #a8cdec; 6 --bkml-bg-btn: #2271b1; 6 7 } 7 8 … … 47 48 48 49 .bk_file_size .bk_btn .bk_txt{ 49 display: block;50 50 width: 100%; 51 height: 30px;52 line-height: 30px;53 border-radius: 3px;54 background: var(--bkml-bg-btn);55 text-align: center;56 cursor: pointer;57 51 } 58 52 … … 91 85 height: 4px; 92 86 position: relative; 93 background: var(--bkml-bg-btn );87 background: var(--bkml-bg-btn-light); 94 88 overflow: hidden; 95 89 display: none; … … 105 99 width: 10px; 106 100 height: 4px; 107 background: var(--bkml- color-good);101 background: var(--bkml-bg-btn); 108 102 position: absolute; 109 103 top: 0; -
bubuku-media-library/trunk/bubuku-media-library.php
r2783009 r2786524 5 5 * Requires at least: 5.2 6 6 * Requires PHP: 7.2 7 * Version: 1.0. 17 * Version: 1.0.2 8 8 * Author: Bubuku 9 9 * Author URI: https://www.bubuku.com/ -
bubuku-media-library/trunk/readme.txt
r2783009 r2786524 5 5 Tested up to: 6.0.2 6 6 Requires PHP: 7.3 7 Stable tag: 1.0. 07 Stable tag: 1.0.2 8 8 License: GPLv3 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 32 32 33 33 == Changelog == 34 = 1.0.2 = 35 * Rename variables 36 * Correctly filter by file size 37 * Styling WordPress Button 34 38 35 39 = 1.0.1 = -
bubuku-media-library/trunk/src/BML_assets.php
r2783009 r2786524 1 1 <?php 2 /**3 * Assets Class.4 *5 * @package Bubuku Media Library6 * @author Luis Ruiz <lruiz@bubuku.com>7 * @copyright 2022 Bubuku8 * @version 1.0.19 */10 2 11 3 namespace Bubuku\Plugins\MediaLibrary; … … 36 28 wp_enqueue_style( 37 29 'bk-media-library-css', 38 B BK_PLUGIN_ASSETS_URL . '/css/admin.css',30 BUBUKU_BML_PLUGIN_ASSETS_URL . '/css/admin.css', 39 31 false, 40 '1.0. 1'32 '1.0.2' 41 33 ); 42 34 … … 45 37 wp_enqueue_script( 46 38 'bk-media-library-js', 47 B BK_PLUGIN_ASSETS_URL . '/js/common.js',39 BUBUKU_BML_PLUGIN_ASSETS_URL . '/js/common.js', 48 40 $js_dependencies, 49 41 true … … 51 43 52 44 $args = array( 53 'nonce' => B BK_PLUGIN_NONCE,54 'api_public' => '/wp-json/'. B BK_PLUGIN_ENDPOINTS_URL,45 'nonce' => BUBUKU_BML_PLUGIN_NONCE, 46 'api_public' => '/wp-json/'. BUBUKU_BML_PLUGIN_ENDPOINTS_URL, 55 47 ); 56 48 -
bubuku-media-library/trunk/src/BML_common.php
r2783009 r2786524 1 1 <?php 2 /**3 * Common Class.4 *5 * @package Bubuku Media Library6 * @author Luis Ruiz <lruiz@bubuku.com>7 * @copyright 2022 Bubuku8 * @version 1.0.19 */10 2 11 3 namespace Bubuku\Plugins\MediaLibrary; … … 79 71 80 72 if ( 'bk_file_size' == $orderby ) { 81 82 $meta_query = array(83 'relation' => 'OR',84 array(85 'key' => '_bkml_attachment_file_size',86 'compare' => 'NOT EXISTS',87 ),88 array(89 'key' => '_bkml_attachment_file_size',90 ),91 );92 93 $query->set( 'meta_query', $meta_query );94 73 $query->set( 'orderby', 'meta_value_num' ); 74 $query->set( 'meta_key' , '_bkml_attachment_file_size' ); 75 $query->set( 'meta_type' , 'numeric' ); 95 76 } 96 77 } -
bubuku-media-library/trunk/src/BML_db.php
r2783009 r2786524 1 1 <?php 2 /**3 * Db Class.4 *5 * @package Bubuku Media Library6 * @author Luis Ruiz <lruiz@bubuku.com>7 * @copyright 2022 Bubuku8 * @version 1.0.19 */10 2 11 3 namespace Bubuku\Plugins\MediaLibrary; -
bubuku-media-library/trunk/src/BML_filter.php
r2783009 r2786524 1 1 <?php 2 /**3 * Filter Class.4 *5 * @package Bubuku Media Library6 * @author Luis Ruiz <lruiz@bubuku.com>7 * @copyright 2022 Bubuku8 * @version 1.0.19 */10 2 11 3 namespace Bubuku\Plugins\MediaLibrary; … … 23 15 // Filter query 24 16 add_action( 'pre_get_posts', [ $this, 'filter_results' ] ); 17 add_action( 'load-upload.php', [ $this, 'notice' ] ); 25 18 } 26 19 … … 193 186 } 194 187 } 188 189 public function notice() { 190 global $wp_query; 191 //$count = $custom_posts->found_posts; 192 // media_list_table_query 193 // WP_Media_List_Table::no_items() 194 // has_items 195 // total_items 196 // get_pagenum 197 // $wp_list_table->_pagination_args; 198 // $wp_list_table->_pagination_args['total_items']; 199 200 if(!class_exists('WP_List_Table')){ 201 require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' ); 202 } 203 204 // echo '-+-'; 205 // var_dump($wp_query); 206 207 $wp_list_table = _get_list_table('WP_Media_List_Table'); 208 //$data = $wp_list_table->display(); 209 //usort( $data, array( &$this, 'sort_data' ) ); 210 //$totalItems = count($data); 211 // echo '-+-'. $data; 212 //var_dump($data); 213 214 //$WP_Media_List_Table = new WP_Media_List_Table(); 215 //echo '-*-'. $WP_Media_List_Table->has_items(); 216 217 //exit(); 218 } 195 219 } -
bubuku-media-library/trunk/src/BML_plugin.php
r2783009 r2786524 1 1 <?php 2 /**3 * Plugin Class.4 *5 * @package Bubuku Media Library6 * @author Luis Ruiz <lruiz@bubuku.com>7 * @copyright 2022 Bubuku8 * @version 1.0.19 */10 2 11 3 namespace Bubuku\Plugins\MediaLibrary; … … 26 18 */ 27 19 public function init() { 28 define( 'B BK_PLUGIN_PATH', untrailingslashit( plugin_dir_path( __DIR__ ) ) );29 define( 'B BK_PLUGIN_URL', untrailingslashit( plugin_dir_url( __DIR__ ) ) );30 define( 'B BK_PLUGIN_BASE', untrailingslashit( plugin_dir_url( __FILE__ ) ) );31 define( 'B BK_PLUGIN_ASSETS_PATH', BBK_PLUGIN_PATH . '/assets' );32 define( 'B BK_PLUGIN_ASSETS_URL', BBK_PLUGIN_URL . '/assets' );33 define( 'B BK_PLUGIN_ENDPOINTS_URL', 'bbk_medialibrary/v1' );34 define( 'B BK_PLUGIN_VERSION', '1.0.1' );35 define( 'B BK_PLUGIN_NONCE', wp_create_nonce('media-library'. BBK_PLUGIN_VERSION) );20 define( 'BUBUKU_BML_PLUGIN_PATH', untrailingslashit( plugin_dir_path( __DIR__ ) ) ); 21 define( 'BUBUKU_BML_PLUGIN_URL', untrailingslashit( plugin_dir_url( __DIR__ ) ) ); 22 define( 'BUBUKU_BML_PLUGIN_BASE', untrailingslashit( plugin_dir_url( __FILE__ ) ) ); 23 define( 'BUBUKU_BML_PLUGIN_ASSETS_PATH', BUBUKU_BML_PLUGIN_PATH . '/assets' ); 24 define( 'BUBUKU_BML_PLUGIN_ASSETS_URL', BUBUKU_BML_PLUGIN_URL . '/assets' ); 25 define( 'BUBUKU_BML_PLUGIN_ENDPOINTS_URL', 'bbk_medialibrary/v1' ); 26 define( 'BUBUKU_BML_PLUGIN_VERSION', '1.0.2' ); 27 define( 'BUBUKU_BML_PLUGIN_NONCE', wp_create_nonce('media-library'. BUBUKU_BML_PLUGIN_VERSION) ); 36 28 37 load_plugin_textdomain( 'bbkmedialibrary', false, B BK_PLUGIN_BASE . '/languages' );29 load_plugin_textdomain( 'bbkmedialibrary', false, BUBUKU_BML_PLUGIN_BASE . '/languages' ); 38 30 39 31 new BML_assets(); -
bubuku-media-library/trunk/src/BML_restapi.php
r2783009 r2786524 1 1 <?php 2 /**3 * Restapi Class.4 *5 * @package Bubuku Bubuku Media Library6 * @author Luis Ruiz <lruiz@bubuku.com>7 * @copyright 2022 Bubuku8 * @version 1.0.19 */10 2 11 3 namespace Bubuku\Plugins\MediaLibrary; … … 24 16 25 17 private function init() { 26 $this->_namespace = B BK_PLUGIN_ENDPOINTS_URL;18 $this->_namespace = BUBUKU_BML_PLUGIN_ENDPOINTS_URL; 27 19 $this->_db = new BML_db(); 28 20 $this->_view = new BML_view(); … … 57 49 $nonce = $request['_wpnonce']; 58 50 59 if ( B BK_PLUGIN_NONCE !== $nonce && empty($media_id)) {51 if ( BUBUKU_BML_PLUGIN_NONCE !== $nonce && empty($media_id)) { 60 52 wp_send_json_error( esc_html__('empty Media ID', 'bbkmedialibrary') ); 61 53 die(); -
bubuku-media-library/trunk/src/BML_view.php
r2783009 r2786524 1 1 <?php 2 /**3 * View Class.4 *5 * @package Bubuku Media Library6 * @author Luis Ruiz <lruiz@bubuku.com>7 * @copyright 2022 Bubuku8 * @version 1.0.19 */10 2 11 3 namespace Bubuku\Plugins\MediaLibrary; … … 72 64 <small>'. esc_html__('In order to sort or filter by size, you need to calculate', 'bbkmedialibrary') .'</small> 73 65 <button type="button" class="bk_btn js-calculate" data-id="'. $media_id .'"> 74 <span class="bk_txt ">'. esc_html__('Calculate', 'bbkmedialibrary') .'</span>66 <span class="bk_txt button-primary">'. esc_html__('Calculate', 'bbkmedialibrary') .'</span> 75 67 <span class="bk_loader"></span> 76 68 </button>
Note: See TracChangeset
for help on using the changeset viewer.