Changeset 2697405
- Timestamp:
- 03/22/2022 01:30:38 AM (4 years ago)
- Location:
- pxl-tools
- Files:
-
- 2 added
- 20 edited
- 1 copied
-
tags/1.1.21 (copied) (copied from pxl-tools/trunk)
-
tags/1.1.21/README.md (modified) (1 diff)
-
tags/1.1.21/custom/wp/enable-webp-upload.php (added)
-
tags/1.1.21/helpers/Post.php (modified) (2 diffs)
-
tags/1.1.21/pxl-tools.php (modified) (1 diff)
-
tags/1.1.21/readme.txt (modified) (2 diffs)
-
tags/1.1.21/vendor/autoload.php (modified) (1 diff)
-
tags/1.1.21/vendor/composer/InstalledVersions.php (modified) (2 diffs)
-
tags/1.1.21/vendor/composer/autoload_real.php (modified) (5 diffs)
-
tags/1.1.21/vendor/composer/autoload_static.php (modified) (2 diffs)
-
tags/1.1.21/vendor/composer/installed.php (modified) (2 diffs)
-
tags/1.1.21/vendor/symfony/polyfill-mbstring/bootstrap.php (modified) (1 diff)
-
trunk/README.md (modified) (1 diff)
-
trunk/custom/wp/enable-webp-upload.php (added)
-
trunk/helpers/Post.php (modified) (2 diffs)
-
trunk/pxl-tools.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/vendor/autoload.php (modified) (1 diff)
-
trunk/vendor/composer/InstalledVersions.php (modified) (2 diffs)
-
trunk/vendor/composer/autoload_real.php (modified) (5 diffs)
-
trunk/vendor/composer/autoload_static.php (modified) (2 diffs)
-
trunk/vendor/composer/installed.php (modified) (2 diffs)
-
trunk/vendor/symfony/polyfill-mbstring/bootstrap.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
pxl-tools/tags/1.1.21/README.md
r2691584 r2697405 61 61 Return a posts pagination 62 62 63 $pagination = \Pxl\Post::pagination($args = [], $per_page );63 $pagination = \Pxl\Post::pagination($args = [], $per_page = 6, $paginate_args = []); 64 64 65 65 - **\$args** see get_posts - https://developer.wordpress.org/reference/functions/get_posts/ 66 67 - **\$args** array $paginate_args https://developer.wordpress.org/reference/functions/paginate_links/ 66 68 67 69 #### get_posts_keys() -
pxl-tools/tags/1.1.21/helpers/Post.php
r2691584 r2697405 62 62 * Get wordpress paginations links 63 63 * 64 * @param mixed $args https://developer.wordpress.org/reference/functions/get_posts/ args 65 * @param mixed $per_page results per page 64 * @param array $args https://developer.wordpress.org/reference/functions/get_posts/ args 65 * @param int $per_page results per page 66 * @param array $paginate_args https://developer.wordpress.org/reference/functions/paginate_links/ args 66 67 * @return array 67 68 */ 68 public static function pagination($args = [], $per_page )69 public static function pagination($args = [], $per_page = 4, $paginate_args = []) 69 70 { 70 71 71 $big = 999999999;72 72 $args['posts_per_page'] = -1; 73 73 unset($args['paged']); 74 74 75 $query = new \WP_Query($args); 75 76 $published_count = $query->found_posts; 76 77 78 $big = 999999999; 77 79 $total_posts = ceil($published_count / $per_page); 78 80 79 $ pagination = paginate_links([81 $default_paginate_args = [ 80 82 'base' => str_replace($big, '%#%', esc_url(get_pagenum_link($big))), 81 83 'format' => '?paged=%#%', … … 83 85 'total' => $total_posts, 84 86 'type' => 'array', 85 'mid_size' => 0,86 87 'prev_text' => '<<', 87 88 'next_text' => '>>', 88 ]); 89 ]; 90 91 $paginate_links_args = array_merge($default_paginate_args, $paginate_args); 92 93 $pagination = paginate_links($paginate_links_args); 89 94 90 95 return is_array($pagination) ? $pagination : []; -
pxl-tools/tags/1.1.21/pxl-tools.php
r2691584 r2697405 10 10 * License: GPL-2.0 11 11 * License URI: https://opensource.org/licenses/GPL-2.0 12 * Version: 1.1.2 012 * Version: 1.1.21 13 13 * 14 14 * -
pxl-tools/tags/1.1.21/readme.txt
r2691584 r2697405 7 7 License: https://opensource.org/licenses/GPL-2.0 8 8 License URI: https://opensource.org/licenses/GPL-2.0 9 Stable tag: 1.1.2 09 Stable tag: 1.1.21 10 10 A Toolbelt for Wordpress development 11 11 … … 13 13 Helpers, Functions and Shortcuts to Wordpress development 14 14 15 =1.1.21= 16 * Add paginate_links args in \Pxl\Post::pagination 17 * Enable webp upload 15 18 16 19 = 1.1.20 = -
pxl-tools/tags/1.1.21/vendor/autoload.php
r2691584 r2697405 5 5 require_once __DIR__ . '/composer/autoload_real.php'; 6 6 7 return ComposerAutoloaderInit cfd64b7794319c2e56256ba8a9836ef5::getLoader();7 return ComposerAutoloaderInit9f710a513326c38d1f77df8cb4d18344::getLoader(); -
pxl-tools/tags/1.1.21/vendor/composer/InstalledVersions.php
r2691584 r2697405 31 31 array ( 32 32 ), 33 'reference' => ' 6992f77bded268719d72f2bdf6f6fa7ce53fa49e',33 'reference' => '89d18178436ab03ef748ee1369cba34fd409485d', 34 34 'name' => 'communicatti/pxl', 35 35 ), … … 43 43 array ( 44 44 ), 45 'reference' => ' 6992f77bded268719d72f2bdf6f6fa7ce53fa49e',45 'reference' => '89d18178436ab03ef748ee1369cba34fd409485d', 46 46 ), 47 47 'doctrine/inflector' => -
pxl-tools/tags/1.1.21/vendor/composer/autoload_real.php
r2691584 r2697405 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit cfd64b7794319c2e56256ba8a9836ef55 class ComposerAutoloaderInit9f710a513326c38d1f77df8cb4d18344 6 6 { 7 7 private static $loader; … … 25 25 require __DIR__ . '/platform_check.php'; 26 26 27 spl_autoload_register(array('ComposerAutoloaderInit cfd64b7794319c2e56256ba8a9836ef5', 'loadClassLoader'), true, true);27 spl_autoload_register(array('ComposerAutoloaderInit9f710a513326c38d1f77df8cb4d18344', 'loadClassLoader'), true, true); 28 28 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__))); 29 spl_autoload_unregister(array('ComposerAutoloaderInit cfd64b7794319c2e56256ba8a9836ef5', 'loadClassLoader'));29 spl_autoload_unregister(array('ComposerAutoloaderInit9f710a513326c38d1f77df8cb4d18344', 'loadClassLoader')); 30 30 31 31 $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); … … 33 33 require __DIR__ . '/autoload_static.php'; 34 34 35 call_user_func(\Composer\Autoload\ComposerStaticInit cfd64b7794319c2e56256ba8a9836ef5::getInitializer($loader));35 call_user_func(\Composer\Autoload\ComposerStaticInit9f710a513326c38d1f77df8cb4d18344::getInitializer($loader)); 36 36 } else { 37 37 $map = require __DIR__ . '/autoload_namespaces.php'; … … 54 54 55 55 if ($useStaticLoader) { 56 $includeFiles = Composer\Autoload\ComposerStaticInit cfd64b7794319c2e56256ba8a9836ef5::$files;56 $includeFiles = Composer\Autoload\ComposerStaticInit9f710a513326c38d1f77df8cb4d18344::$files; 57 57 } else { 58 58 $includeFiles = require __DIR__ . '/autoload_files.php'; 59 59 } 60 60 foreach ($includeFiles as $fileIdentifier => $file) { 61 composerRequire cfd64b7794319c2e56256ba8a9836ef5($fileIdentifier, $file);61 composerRequire9f710a513326c38d1f77df8cb4d18344($fileIdentifier, $file); 62 62 } 63 63 … … 66 66 } 67 67 68 function composerRequire cfd64b7794319c2e56256ba8a9836ef5($fileIdentifier, $file)68 function composerRequire9f710a513326c38d1f77df8cb4d18344($fileIdentifier, $file) 69 69 { 70 70 if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { -
pxl-tools/tags/1.1.21/vendor/composer/autoload_static.php
r2691584 r2697405 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit cfd64b7794319c2e56256ba8a9836ef57 class ComposerStaticInit9f710a513326c38d1f77df8cb4d18344 8 8 { 9 9 public static $files = array ( … … 138 138 { 139 139 return \Closure::bind(function () use ($loader) { 140 $loader->prefixLengthsPsr4 = ComposerStaticInit cfd64b7794319c2e56256ba8a9836ef5::$prefixLengthsPsr4;141 $loader->prefixDirsPsr4 = ComposerStaticInit cfd64b7794319c2e56256ba8a9836ef5::$prefixDirsPsr4;142 $loader->classMap = ComposerStaticInit cfd64b7794319c2e56256ba8a9836ef5::$classMap;140 $loader->prefixLengthsPsr4 = ComposerStaticInit9f710a513326c38d1f77df8cb4d18344::$prefixLengthsPsr4; 141 $loader->prefixDirsPsr4 = ComposerStaticInit9f710a513326c38d1f77df8cb4d18344::$prefixDirsPsr4; 142 $loader->classMap = ComposerStaticInit9f710a513326c38d1f77df8cb4d18344::$classMap; 143 143 144 144 }, null, ClassLoader::class); -
pxl-tools/tags/1.1.21/vendor/composer/installed.php
r2691584 r2697405 7 7 array ( 8 8 ), 9 'reference' => ' 6992f77bded268719d72f2bdf6f6fa7ce53fa49e',9 'reference' => '89d18178436ab03ef748ee1369cba34fd409485d', 10 10 'name' => 'communicatti/pxl', 11 11 ), … … 19 19 array ( 20 20 ), 21 'reference' => ' 6992f77bded268719d72f2bdf6f6fa7ce53fa49e',21 'reference' => '89d18178436ab03ef748ee1369cba34fd409485d', 22 22 ), 23 23 'doctrine/inflector' => -
pxl-tools/tags/1.1.21/vendor/symfony/polyfill-mbstring/bootstrap.php
r2691584 r2697405 13 13 14 14 if (!function_exists('mb_convert_encoding')) { 15 function mb_convert_encoding($string, $to_encoding, $from_encoding = null) 16 { 17 return p\Mbstring::mb_convert_encoding($string, $to_encoding, $from_encoding); 18 } 15 function mb_convert_encoding($string, $to_encoding, $from_encoding = null) { return p\Mbstring::mb_convert_encoding($string, $to_encoding, $from_encoding); } 19 16 } 20 17 if (!function_exists('mb_decode_mimeheader')) { 21 function mb_decode_mimeheader($string) 22 { 23 return p\Mbstring::mb_decode_mimeheader($string); 24 } 18 function mb_decode_mimeheader($string) { return p\Mbstring::mb_decode_mimeheader($string); } 25 19 } 26 20 if (!function_exists('mb_encode_mimeheader')) { 27 function mb_encode_mimeheader($string, $charset = null, $transfer_encoding = null, $newline = "\r\n", $indent = 0) 28 { 29 return p\Mbstring::mb_encode_mimeheader($string, $charset, $transfer_encoding, $newline, $indent); 30 } 21 function mb_encode_mimeheader($string, $charset = null, $transfer_encoding = null, $newline = "\r\n", $indent = 0) { return p\Mbstring::mb_encode_mimeheader($string, $charset, $transfer_encoding, $newline, $indent); } 31 22 } 32 23 if (!function_exists('mb_decode_numericentity')) { 33 function mb_decode_numericentity($string, $map, $encoding = null) 34 { 35 return p\Mbstring::mb_decode_numericentity($string, $map, $encoding); 36 } 24 function mb_decode_numericentity($string, $map, $encoding = null) { return p\Mbstring::mb_decode_numericentity($string, $map, $encoding); } 37 25 } 38 26 if (!function_exists('mb_encode_numericentity')) { 39 function mb_encode_numericentity($string, $map, $encoding = null, $hex = false) 40 { 41 return p\Mbstring::mb_encode_numericentity($string, $map, $encoding, $hex); 42 } 27 function mb_encode_numericentity($string, $map, $encoding = null, $hex = false) { return p\Mbstring::mb_encode_numericentity($string, $map, $encoding, $hex); } 43 28 } 44 29 if (!function_exists('mb_convert_case')) { 45 function mb_convert_case($string, $mode, $encoding = null) 46 { 47 return p\Mbstring::mb_convert_case($string, $mode, $encoding); 48 } 30 function mb_convert_case($string, $mode, $encoding = null) { return p\Mbstring::mb_convert_case($string, $mode, $encoding); } 49 31 } 50 32 if (!function_exists('mb_internal_encoding')) { 51 function mb_internal_encoding($encoding = null) 52 { 53 return p\Mbstring::mb_internal_encoding($encoding); 54 } 33 function mb_internal_encoding($encoding = null) { return p\Mbstring::mb_internal_encoding($encoding); } 55 34 } 56 35 if (!function_exists('mb_language')) { 57 function mb_language($language = null) 58 { 59 return p\Mbstring::mb_language($language); 60 } 36 function mb_language($language = null) { return p\Mbstring::mb_language($language); } 61 37 } 62 38 if (!function_exists('mb_list_encodings')) { 63 function mb_list_encodings() 64 { 65 return p\Mbstring::mb_list_encodings(); 66 } 39 function mb_list_encodings() { return p\Mbstring::mb_list_encodings(); } 67 40 } 68 41 if (!function_exists('mb_encoding_aliases')) { 69 function mb_encoding_aliases($encoding) 70 { 71 return p\Mbstring::mb_encoding_aliases($encoding); 72 } 42 function mb_encoding_aliases($encoding) { return p\Mbstring::mb_encoding_aliases($encoding); } 73 43 } 74 44 if (!function_exists('mb_check_encoding')) { 75 function mb_check_encoding($value = null, $encoding = null) 76 { 77 return p\Mbstring::mb_check_encoding($value, $encoding); 78 } 45 function mb_check_encoding($value = null, $encoding = null) { return p\Mbstring::mb_check_encoding($value, $encoding); } 79 46 } 80 47 if (!function_exists('mb_detect_encoding')) { 81 function mb_detect_encoding($string, $encodings = null, $strict = false) 82 { 83 return p\Mbstring::mb_detect_encoding($string, $encodings, $strict); 84 } 48 function mb_detect_encoding($string, $encodings = null, $strict = false) { return p\Mbstring::mb_detect_encoding($string, $encodings, $strict); } 85 49 } 86 50 if (!function_exists('mb_detect_order')) { 87 function mb_detect_order($encoding = null) 88 { 89 return p\Mbstring::mb_detect_order($encoding); 90 } 51 function mb_detect_order($encoding = null) { return p\Mbstring::mb_detect_order($encoding); } 91 52 } 92 53 if (!function_exists('mb_parse_str')) { 93 function mb_parse_str($string, &$result = []) 94 { 95 parse_str($string, $result); 96 return (bool) $result; 97 } 54 function mb_parse_str($string, &$result = []) { parse_str($string, $result); return (bool) $result; } 98 55 } 99 56 if (!function_exists('mb_strlen')) { 100 function mb_strlen($string, $encoding = null) 101 { 102 return p\Mbstring::mb_strlen($string, $encoding); 103 } 57 function mb_strlen($string, $encoding = null) { return p\Mbstring::mb_strlen($string, $encoding); } 104 58 } 105 59 if (!function_exists('mb_strpos')) { 106 function mb_strpos($haystack, $needle, $offset = 0, $encoding = null) 107 { 108 return p\Mbstring::mb_strpos($haystack, $needle, $offset, $encoding); 109 } 60 function mb_strpos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_strpos($haystack, $needle, $offset, $encoding); } 110 61 } 111 62 if (!function_exists('mb_strtolower')) { 112 function mb_strtolower($string, $encoding = null) 113 { 114 return p\Mbstring::mb_strtolower($string, $encoding); 115 } 63 function mb_strtolower($string, $encoding = null) { return p\Mbstring::mb_strtolower($string, $encoding); } 116 64 } 117 65 if (!function_exists('mb_strtoupper')) { 118 function mb_strtoupper($string, $encoding = null) 119 { 120 return p\Mbstring::mb_strtoupper($string, $encoding); 121 } 66 function mb_strtoupper($string, $encoding = null) { return p\Mbstring::mb_strtoupper($string, $encoding); } 122 67 } 123 68 if (!function_exists('mb_substitute_character')) { 124 function mb_substitute_character($substitute_character = null) 125 { 126 return p\Mbstring::mb_substitute_character($substitute_character); 127 } 69 function mb_substitute_character($substitute_character = null) { return p\Mbstring::mb_substitute_character($substitute_character); } 128 70 } 129 71 if (!function_exists('mb_substr')) { 130 function mb_substr($string, $start, $length = 2147483647, $encoding = null) 131 { 132 return p\Mbstring::mb_substr($string, $start, $length, $encoding); 133 } 72 function mb_substr($string, $start, $length = 2147483647, $encoding = null) { return p\Mbstring::mb_substr($string, $start, $length, $encoding); } 134 73 } 135 74 if (!function_exists('mb_stripos')) { 136 function mb_stripos($haystack, $needle, $offset = 0, $encoding = null) 137 { 138 return p\Mbstring::mb_stripos($haystack, $needle, $offset, $encoding); 139 } 75 function mb_stripos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_stripos($haystack, $needle, $offset, $encoding); } 140 76 } 141 77 if (!function_exists('mb_stristr')) { 142 function mb_stristr($haystack, $needle, $before_needle = false, $encoding = null) 143 { 144 return p\Mbstring::mb_stristr($haystack, $needle, $before_needle, $encoding); 145 } 78 function mb_stristr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_stristr($haystack, $needle, $before_needle, $encoding); } 146 79 } 147 80 if (!function_exists('mb_strrchr')) { 148 function mb_strrchr($haystack, $needle, $before_needle = false, $encoding = null) 149 { 150 return p\Mbstring::mb_strrchr($haystack, $needle, $before_needle, $encoding); 151 } 81 function mb_strrchr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_strrchr($haystack, $needle, $before_needle, $encoding); } 152 82 } 153 83 if (!function_exists('mb_strrichr')) { 154 function mb_strrichr($haystack, $needle, $before_needle = false, $encoding = null) 155 { 156 return p\Mbstring::mb_strrichr($haystack, $needle, $before_needle, $encoding); 157 } 84 function mb_strrichr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_strrichr($haystack, $needle, $before_needle, $encoding); } 158 85 } 159 86 if (!function_exists('mb_strripos')) { 160 function mb_strripos($haystack, $needle, $offset = 0, $encoding = null) 161 { 162 return p\Mbstring::mb_strripos($haystack, $needle, $offset, $encoding); 163 } 87 function mb_strripos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_strripos($haystack, $needle, $offset, $encoding); } 164 88 } 165 89 if (!function_exists('mb_strrpos')) { 166 function mb_strrpos($haystack, $needle, $offset = 0, $encoding = null) 167 { 168 return p\Mbstring::mb_strrpos($haystack, $needle, $offset, $encoding); 169 } 90 function mb_strrpos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_strrpos($haystack, $needle, $offset, $encoding); } 170 91 } 171 92 if (!function_exists('mb_strstr')) { 172 function mb_strstr($haystack, $needle, $before_needle = false, $encoding = null) 173 { 174 return p\Mbstring::mb_strstr($haystack, $needle, $before_needle, $encoding); 175 } 93 function mb_strstr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_strstr($haystack, $needle, $before_needle, $encoding); } 176 94 } 177 95 if (!function_exists('mb_get_info')) { 178 function mb_get_info($type = 'all') 179 { 180 return p\Mbstring::mb_get_info($type); 181 } 96 function mb_get_info($type = 'all') { return p\Mbstring::mb_get_info($type); } 182 97 } 183 98 if (!function_exists('mb_http_output')) { 184 function mb_http_output($encoding = null) 185 { 186 return p\Mbstring::mb_http_output($encoding); 187 } 99 function mb_http_output($encoding = null) { return p\Mbstring::mb_http_output($encoding); } 188 100 } 189 101 if (!function_exists('mb_strwidth')) { 190 function mb_strwidth($string, $encoding = null) 191 { 192 return p\Mbstring::mb_strwidth($string, $encoding); 193 } 102 function mb_strwidth($string, $encoding = null) { return p\Mbstring::mb_strwidth($string, $encoding); } 194 103 } 195 104 if (!function_exists('mb_substr_count')) { 196 function mb_substr_count($haystack, $needle, $encoding = null) 197 { 198 return p\Mbstring::mb_substr_count($haystack, $needle, $encoding); 199 } 105 function mb_substr_count($haystack, $needle, $encoding = null) { return p\Mbstring::mb_substr_count($haystack, $needle, $encoding); } 200 106 } 201 107 if (!function_exists('mb_output_handler')) { 202 function mb_output_handler($string, $status) 203 { 204 return p\Mbstring::mb_output_handler($string, $status); 205 } 108 function mb_output_handler($string, $status) { return p\Mbstring::mb_output_handler($string, $status); } 206 109 } 207 110 if (!function_exists('mb_http_input')) { 208 function mb_http_input($type = null) 209 { 210 return p\Mbstring::mb_http_input($type); 211 } 111 function mb_http_input($type = null) { return p\Mbstring::mb_http_input($type); } 212 112 } 213 113 214 114 if (!function_exists('mb_convert_variables')) { 215 function mb_convert_variables($to_encoding, $from_encoding, &...$vars) 216 { 217 return p\Mbstring::mb_convert_variables($to_encoding, $from_encoding, ...$vars); 218 } 115 function mb_convert_variables($to_encoding, $from_encoding, &...$vars) { return p\Mbstring::mb_convert_variables($to_encoding, $from_encoding, ...$vars); } 219 116 } 220 117 221 118 if (!function_exists('mb_ord')) { 222 function mb_ord($string, $encoding = null) 223 { 224 return p\Mbstring::mb_ord($string, $encoding); 225 } 119 function mb_ord($string, $encoding = null) { return p\Mbstring::mb_ord($string, $encoding); } 226 120 } 227 121 if (!function_exists('mb_chr')) { 228 function mb_chr($codepoint, $encoding = null) 229 { 230 return p\Mbstring::mb_chr($codepoint, $encoding); 231 } 122 function mb_chr($codepoint, $encoding = null) { return p\Mbstring::mb_chr($codepoint, $encoding); } 232 123 } 233 124 if (!function_exists('mb_scrub')) { 234 function mb_scrub($string, $encoding = null) 235 { 236 $encoding = null === $encoding ? mb_internal_encoding() : $encoding; 237 return mb_convert_encoding($string, $encoding, $encoding); 238 } 125 function mb_scrub($string, $encoding = null) { $encoding = null === $encoding ? mb_internal_encoding() : $encoding; return mb_convert_encoding($string, $encoding, $encoding); } 239 126 } 240 127 if (!function_exists('mb_str_split')) { 241 function mb_str_split($string, $length = 1, $encoding = null) 242 { 243 return p\Mbstring::mb_str_split($string, $length, $encoding); 244 } 128 function mb_str_split($string, $length = 1, $encoding = null) { return p\Mbstring::mb_str_split($string, $length, $encoding); } 245 129 } 246 130 -
pxl-tools/trunk/README.md
r2691584 r2697405 61 61 Return a posts pagination 62 62 63 $pagination = \Pxl\Post::pagination($args = [], $per_page );63 $pagination = \Pxl\Post::pagination($args = [], $per_page = 6, $paginate_args = []); 64 64 65 65 - **\$args** see get_posts - https://developer.wordpress.org/reference/functions/get_posts/ 66 67 - **\$args** array $paginate_args https://developer.wordpress.org/reference/functions/paginate_links/ 66 68 67 69 #### get_posts_keys() -
pxl-tools/trunk/helpers/Post.php
r2691584 r2697405 62 62 * Get wordpress paginations links 63 63 * 64 * @param mixed $args https://developer.wordpress.org/reference/functions/get_posts/ args 65 * @param mixed $per_page results per page 64 * @param array $args https://developer.wordpress.org/reference/functions/get_posts/ args 65 * @param int $per_page results per page 66 * @param array $paginate_args https://developer.wordpress.org/reference/functions/paginate_links/ args 66 67 * @return array 67 68 */ 68 public static function pagination($args = [], $per_page )69 public static function pagination($args = [], $per_page = 4, $paginate_args = []) 69 70 { 70 71 71 $big = 999999999;72 72 $args['posts_per_page'] = -1; 73 73 unset($args['paged']); 74 74 75 $query = new \WP_Query($args); 75 76 $published_count = $query->found_posts; 76 77 78 $big = 999999999; 77 79 $total_posts = ceil($published_count / $per_page); 78 80 79 $ pagination = paginate_links([81 $default_paginate_args = [ 80 82 'base' => str_replace($big, '%#%', esc_url(get_pagenum_link($big))), 81 83 'format' => '?paged=%#%', … … 83 85 'total' => $total_posts, 84 86 'type' => 'array', 85 'mid_size' => 0,86 87 'prev_text' => '<<', 87 88 'next_text' => '>>', 88 ]); 89 ]; 90 91 $paginate_links_args = array_merge($default_paginate_args, $paginate_args); 92 93 $pagination = paginate_links($paginate_links_args); 89 94 90 95 return is_array($pagination) ? $pagination : []; -
pxl-tools/trunk/pxl-tools.php
r2691584 r2697405 10 10 * License: GPL-2.0 11 11 * License URI: https://opensource.org/licenses/GPL-2.0 12 * Version: 1.1.2 012 * Version: 1.1.21 13 13 * 14 14 * -
pxl-tools/trunk/readme.txt
r2691584 r2697405 7 7 License: https://opensource.org/licenses/GPL-2.0 8 8 License URI: https://opensource.org/licenses/GPL-2.0 9 Stable tag: 1.1.2 09 Stable tag: 1.1.21 10 10 A Toolbelt for Wordpress development 11 11 … … 13 13 Helpers, Functions and Shortcuts to Wordpress development 14 14 15 =1.1.21= 16 * Add paginate_links args in \Pxl\Post::pagination 17 * Enable webp upload 15 18 16 19 = 1.1.20 = -
pxl-tools/trunk/vendor/autoload.php
r2691584 r2697405 5 5 require_once __DIR__ . '/composer/autoload_real.php'; 6 6 7 return ComposerAutoloaderInit cfd64b7794319c2e56256ba8a9836ef5::getLoader();7 return ComposerAutoloaderInit9f710a513326c38d1f77df8cb4d18344::getLoader(); -
pxl-tools/trunk/vendor/composer/InstalledVersions.php
r2691584 r2697405 31 31 array ( 32 32 ), 33 'reference' => ' 6992f77bded268719d72f2bdf6f6fa7ce53fa49e',33 'reference' => '89d18178436ab03ef748ee1369cba34fd409485d', 34 34 'name' => 'communicatti/pxl', 35 35 ), … … 43 43 array ( 44 44 ), 45 'reference' => ' 6992f77bded268719d72f2bdf6f6fa7ce53fa49e',45 'reference' => '89d18178436ab03ef748ee1369cba34fd409485d', 46 46 ), 47 47 'doctrine/inflector' => -
pxl-tools/trunk/vendor/composer/autoload_real.php
r2691584 r2697405 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit cfd64b7794319c2e56256ba8a9836ef55 class ComposerAutoloaderInit9f710a513326c38d1f77df8cb4d18344 6 6 { 7 7 private static $loader; … … 25 25 require __DIR__ . '/platform_check.php'; 26 26 27 spl_autoload_register(array('ComposerAutoloaderInit cfd64b7794319c2e56256ba8a9836ef5', 'loadClassLoader'), true, true);27 spl_autoload_register(array('ComposerAutoloaderInit9f710a513326c38d1f77df8cb4d18344', 'loadClassLoader'), true, true); 28 28 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__))); 29 spl_autoload_unregister(array('ComposerAutoloaderInit cfd64b7794319c2e56256ba8a9836ef5', 'loadClassLoader'));29 spl_autoload_unregister(array('ComposerAutoloaderInit9f710a513326c38d1f77df8cb4d18344', 'loadClassLoader')); 30 30 31 31 $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); … … 33 33 require __DIR__ . '/autoload_static.php'; 34 34 35 call_user_func(\Composer\Autoload\ComposerStaticInit cfd64b7794319c2e56256ba8a9836ef5::getInitializer($loader));35 call_user_func(\Composer\Autoload\ComposerStaticInit9f710a513326c38d1f77df8cb4d18344::getInitializer($loader)); 36 36 } else { 37 37 $map = require __DIR__ . '/autoload_namespaces.php'; … … 54 54 55 55 if ($useStaticLoader) { 56 $includeFiles = Composer\Autoload\ComposerStaticInit cfd64b7794319c2e56256ba8a9836ef5::$files;56 $includeFiles = Composer\Autoload\ComposerStaticInit9f710a513326c38d1f77df8cb4d18344::$files; 57 57 } else { 58 58 $includeFiles = require __DIR__ . '/autoload_files.php'; 59 59 } 60 60 foreach ($includeFiles as $fileIdentifier => $file) { 61 composerRequire cfd64b7794319c2e56256ba8a9836ef5($fileIdentifier, $file);61 composerRequire9f710a513326c38d1f77df8cb4d18344($fileIdentifier, $file); 62 62 } 63 63 … … 66 66 } 67 67 68 function composerRequire cfd64b7794319c2e56256ba8a9836ef5($fileIdentifier, $file)68 function composerRequire9f710a513326c38d1f77df8cb4d18344($fileIdentifier, $file) 69 69 { 70 70 if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { -
pxl-tools/trunk/vendor/composer/autoload_static.php
r2691584 r2697405 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit cfd64b7794319c2e56256ba8a9836ef57 class ComposerStaticInit9f710a513326c38d1f77df8cb4d18344 8 8 { 9 9 public static $files = array ( … … 138 138 { 139 139 return \Closure::bind(function () use ($loader) { 140 $loader->prefixLengthsPsr4 = ComposerStaticInit cfd64b7794319c2e56256ba8a9836ef5::$prefixLengthsPsr4;141 $loader->prefixDirsPsr4 = ComposerStaticInit cfd64b7794319c2e56256ba8a9836ef5::$prefixDirsPsr4;142 $loader->classMap = ComposerStaticInit cfd64b7794319c2e56256ba8a9836ef5::$classMap;140 $loader->prefixLengthsPsr4 = ComposerStaticInit9f710a513326c38d1f77df8cb4d18344::$prefixLengthsPsr4; 141 $loader->prefixDirsPsr4 = ComposerStaticInit9f710a513326c38d1f77df8cb4d18344::$prefixDirsPsr4; 142 $loader->classMap = ComposerStaticInit9f710a513326c38d1f77df8cb4d18344::$classMap; 143 143 144 144 }, null, ClassLoader::class); -
pxl-tools/trunk/vendor/composer/installed.php
r2691584 r2697405 7 7 array ( 8 8 ), 9 'reference' => ' 6992f77bded268719d72f2bdf6f6fa7ce53fa49e',9 'reference' => '89d18178436ab03ef748ee1369cba34fd409485d', 10 10 'name' => 'communicatti/pxl', 11 11 ), … … 19 19 array ( 20 20 ), 21 'reference' => ' 6992f77bded268719d72f2bdf6f6fa7ce53fa49e',21 'reference' => '89d18178436ab03ef748ee1369cba34fd409485d', 22 22 ), 23 23 'doctrine/inflector' => -
pxl-tools/trunk/vendor/symfony/polyfill-mbstring/bootstrap.php
r2691584 r2697405 13 13 14 14 if (!function_exists('mb_convert_encoding')) { 15 function mb_convert_encoding($string, $to_encoding, $from_encoding = null) 16 { 17 return p\Mbstring::mb_convert_encoding($string, $to_encoding, $from_encoding); 18 } 15 function mb_convert_encoding($string, $to_encoding, $from_encoding = null) { return p\Mbstring::mb_convert_encoding($string, $to_encoding, $from_encoding); } 19 16 } 20 17 if (!function_exists('mb_decode_mimeheader')) { 21 function mb_decode_mimeheader($string) 22 { 23 return p\Mbstring::mb_decode_mimeheader($string); 24 } 18 function mb_decode_mimeheader($string) { return p\Mbstring::mb_decode_mimeheader($string); } 25 19 } 26 20 if (!function_exists('mb_encode_mimeheader')) { 27 function mb_encode_mimeheader($string, $charset = null, $transfer_encoding = null, $newline = "\r\n", $indent = 0) 28 { 29 return p\Mbstring::mb_encode_mimeheader($string, $charset, $transfer_encoding, $newline, $indent); 30 } 21 function mb_encode_mimeheader($string, $charset = null, $transfer_encoding = null, $newline = "\r\n", $indent = 0) { return p\Mbstring::mb_encode_mimeheader($string, $charset, $transfer_encoding, $newline, $indent); } 31 22 } 32 23 if (!function_exists('mb_decode_numericentity')) { 33 function mb_decode_numericentity($string, $map, $encoding = null) 34 { 35 return p\Mbstring::mb_decode_numericentity($string, $map, $encoding); 36 } 24 function mb_decode_numericentity($string, $map, $encoding = null) { return p\Mbstring::mb_decode_numericentity($string, $map, $encoding); } 37 25 } 38 26 if (!function_exists('mb_encode_numericentity')) { 39 function mb_encode_numericentity($string, $map, $encoding = null, $hex = false) 40 { 41 return p\Mbstring::mb_encode_numericentity($string, $map, $encoding, $hex); 42 } 27 function mb_encode_numericentity($string, $map, $encoding = null, $hex = false) { return p\Mbstring::mb_encode_numericentity($string, $map, $encoding, $hex); } 43 28 } 44 29 if (!function_exists('mb_convert_case')) { 45 function mb_convert_case($string, $mode, $encoding = null) 46 { 47 return p\Mbstring::mb_convert_case($string, $mode, $encoding); 48 } 30 function mb_convert_case($string, $mode, $encoding = null) { return p\Mbstring::mb_convert_case($string, $mode, $encoding); } 49 31 } 50 32 if (!function_exists('mb_internal_encoding')) { 51 function mb_internal_encoding($encoding = null) 52 { 53 return p\Mbstring::mb_internal_encoding($encoding); 54 } 33 function mb_internal_encoding($encoding = null) { return p\Mbstring::mb_internal_encoding($encoding); } 55 34 } 56 35 if (!function_exists('mb_language')) { 57 function mb_language($language = null) 58 { 59 return p\Mbstring::mb_language($language); 60 } 36 function mb_language($language = null) { return p\Mbstring::mb_language($language); } 61 37 } 62 38 if (!function_exists('mb_list_encodings')) { 63 function mb_list_encodings() 64 { 65 return p\Mbstring::mb_list_encodings(); 66 } 39 function mb_list_encodings() { return p\Mbstring::mb_list_encodings(); } 67 40 } 68 41 if (!function_exists('mb_encoding_aliases')) { 69 function mb_encoding_aliases($encoding) 70 { 71 return p\Mbstring::mb_encoding_aliases($encoding); 72 } 42 function mb_encoding_aliases($encoding) { return p\Mbstring::mb_encoding_aliases($encoding); } 73 43 } 74 44 if (!function_exists('mb_check_encoding')) { 75 function mb_check_encoding($value = null, $encoding = null) 76 { 77 return p\Mbstring::mb_check_encoding($value, $encoding); 78 } 45 function mb_check_encoding($value = null, $encoding = null) { return p\Mbstring::mb_check_encoding($value, $encoding); } 79 46 } 80 47 if (!function_exists('mb_detect_encoding')) { 81 function mb_detect_encoding($string, $encodings = null, $strict = false) 82 { 83 return p\Mbstring::mb_detect_encoding($string, $encodings, $strict); 84 } 48 function mb_detect_encoding($string, $encodings = null, $strict = false) { return p\Mbstring::mb_detect_encoding($string, $encodings, $strict); } 85 49 } 86 50 if (!function_exists('mb_detect_order')) { 87 function mb_detect_order($encoding = null) 88 { 89 return p\Mbstring::mb_detect_order($encoding); 90 } 51 function mb_detect_order($encoding = null) { return p\Mbstring::mb_detect_order($encoding); } 91 52 } 92 53 if (!function_exists('mb_parse_str')) { 93 function mb_parse_str($string, &$result = []) 94 { 95 parse_str($string, $result); 96 return (bool) $result; 97 } 54 function mb_parse_str($string, &$result = []) { parse_str($string, $result); return (bool) $result; } 98 55 } 99 56 if (!function_exists('mb_strlen')) { 100 function mb_strlen($string, $encoding = null) 101 { 102 return p\Mbstring::mb_strlen($string, $encoding); 103 } 57 function mb_strlen($string, $encoding = null) { return p\Mbstring::mb_strlen($string, $encoding); } 104 58 } 105 59 if (!function_exists('mb_strpos')) { 106 function mb_strpos($haystack, $needle, $offset = 0, $encoding = null) 107 { 108 return p\Mbstring::mb_strpos($haystack, $needle, $offset, $encoding); 109 } 60 function mb_strpos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_strpos($haystack, $needle, $offset, $encoding); } 110 61 } 111 62 if (!function_exists('mb_strtolower')) { 112 function mb_strtolower($string, $encoding = null) 113 { 114 return p\Mbstring::mb_strtolower($string, $encoding); 115 } 63 function mb_strtolower($string, $encoding = null) { return p\Mbstring::mb_strtolower($string, $encoding); } 116 64 } 117 65 if (!function_exists('mb_strtoupper')) { 118 function mb_strtoupper($string, $encoding = null) 119 { 120 return p\Mbstring::mb_strtoupper($string, $encoding); 121 } 66 function mb_strtoupper($string, $encoding = null) { return p\Mbstring::mb_strtoupper($string, $encoding); } 122 67 } 123 68 if (!function_exists('mb_substitute_character')) { 124 function mb_substitute_character($substitute_character = null) 125 { 126 return p\Mbstring::mb_substitute_character($substitute_character); 127 } 69 function mb_substitute_character($substitute_character = null) { return p\Mbstring::mb_substitute_character($substitute_character); } 128 70 } 129 71 if (!function_exists('mb_substr')) { 130 function mb_substr($string, $start, $length = 2147483647, $encoding = null) 131 { 132 return p\Mbstring::mb_substr($string, $start, $length, $encoding); 133 } 72 function mb_substr($string, $start, $length = 2147483647, $encoding = null) { return p\Mbstring::mb_substr($string, $start, $length, $encoding); } 134 73 } 135 74 if (!function_exists('mb_stripos')) { 136 function mb_stripos($haystack, $needle, $offset = 0, $encoding = null) 137 { 138 return p\Mbstring::mb_stripos($haystack, $needle, $offset, $encoding); 139 } 75 function mb_stripos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_stripos($haystack, $needle, $offset, $encoding); } 140 76 } 141 77 if (!function_exists('mb_stristr')) { 142 function mb_stristr($haystack, $needle, $before_needle = false, $encoding = null) 143 { 144 return p\Mbstring::mb_stristr($haystack, $needle, $before_needle, $encoding); 145 } 78 function mb_stristr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_stristr($haystack, $needle, $before_needle, $encoding); } 146 79 } 147 80 if (!function_exists('mb_strrchr')) { 148 function mb_strrchr($haystack, $needle, $before_needle = false, $encoding = null) 149 { 150 return p\Mbstring::mb_strrchr($haystack, $needle, $before_needle, $encoding); 151 } 81 function mb_strrchr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_strrchr($haystack, $needle, $before_needle, $encoding); } 152 82 } 153 83 if (!function_exists('mb_strrichr')) { 154 function mb_strrichr($haystack, $needle, $before_needle = false, $encoding = null) 155 { 156 return p\Mbstring::mb_strrichr($haystack, $needle, $before_needle, $encoding); 157 } 84 function mb_strrichr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_strrichr($haystack, $needle, $before_needle, $encoding); } 158 85 } 159 86 if (!function_exists('mb_strripos')) { 160 function mb_strripos($haystack, $needle, $offset = 0, $encoding = null) 161 { 162 return p\Mbstring::mb_strripos($haystack, $needle, $offset, $encoding); 163 } 87 function mb_strripos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_strripos($haystack, $needle, $offset, $encoding); } 164 88 } 165 89 if (!function_exists('mb_strrpos')) { 166 function mb_strrpos($haystack, $needle, $offset = 0, $encoding = null) 167 { 168 return p\Mbstring::mb_strrpos($haystack, $needle, $offset, $encoding); 169 } 90 function mb_strrpos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_strrpos($haystack, $needle, $offset, $encoding); } 170 91 } 171 92 if (!function_exists('mb_strstr')) { 172 function mb_strstr($haystack, $needle, $before_needle = false, $encoding = null) 173 { 174 return p\Mbstring::mb_strstr($haystack, $needle, $before_needle, $encoding); 175 } 93 function mb_strstr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_strstr($haystack, $needle, $before_needle, $encoding); } 176 94 } 177 95 if (!function_exists('mb_get_info')) { 178 function mb_get_info($type = 'all') 179 { 180 return p\Mbstring::mb_get_info($type); 181 } 96 function mb_get_info($type = 'all') { return p\Mbstring::mb_get_info($type); } 182 97 } 183 98 if (!function_exists('mb_http_output')) { 184 function mb_http_output($encoding = null) 185 { 186 return p\Mbstring::mb_http_output($encoding); 187 } 99 function mb_http_output($encoding = null) { return p\Mbstring::mb_http_output($encoding); } 188 100 } 189 101 if (!function_exists('mb_strwidth')) { 190 function mb_strwidth($string, $encoding = null) 191 { 192 return p\Mbstring::mb_strwidth($string, $encoding); 193 } 102 function mb_strwidth($string, $encoding = null) { return p\Mbstring::mb_strwidth($string, $encoding); } 194 103 } 195 104 if (!function_exists('mb_substr_count')) { 196 function mb_substr_count($haystack, $needle, $encoding = null) 197 { 198 return p\Mbstring::mb_substr_count($haystack, $needle, $encoding); 199 } 105 function mb_substr_count($haystack, $needle, $encoding = null) { return p\Mbstring::mb_substr_count($haystack, $needle, $encoding); } 200 106 } 201 107 if (!function_exists('mb_output_handler')) { 202 function mb_output_handler($string, $status) 203 { 204 return p\Mbstring::mb_output_handler($string, $status); 205 } 108 function mb_output_handler($string, $status) { return p\Mbstring::mb_output_handler($string, $status); } 206 109 } 207 110 if (!function_exists('mb_http_input')) { 208 function mb_http_input($type = null) 209 { 210 return p\Mbstring::mb_http_input($type); 211 } 111 function mb_http_input($type = null) { return p\Mbstring::mb_http_input($type); } 212 112 } 213 113 214 114 if (!function_exists('mb_convert_variables')) { 215 function mb_convert_variables($to_encoding, $from_encoding, &...$vars) 216 { 217 return p\Mbstring::mb_convert_variables($to_encoding, $from_encoding, ...$vars); 218 } 115 function mb_convert_variables($to_encoding, $from_encoding, &...$vars) { return p\Mbstring::mb_convert_variables($to_encoding, $from_encoding, ...$vars); } 219 116 } 220 117 221 118 if (!function_exists('mb_ord')) { 222 function mb_ord($string, $encoding = null) 223 { 224 return p\Mbstring::mb_ord($string, $encoding); 225 } 119 function mb_ord($string, $encoding = null) { return p\Mbstring::mb_ord($string, $encoding); } 226 120 } 227 121 if (!function_exists('mb_chr')) { 228 function mb_chr($codepoint, $encoding = null) 229 { 230 return p\Mbstring::mb_chr($codepoint, $encoding); 231 } 122 function mb_chr($codepoint, $encoding = null) { return p\Mbstring::mb_chr($codepoint, $encoding); } 232 123 } 233 124 if (!function_exists('mb_scrub')) { 234 function mb_scrub($string, $encoding = null) 235 { 236 $encoding = null === $encoding ? mb_internal_encoding() : $encoding; 237 return mb_convert_encoding($string, $encoding, $encoding); 238 } 125 function mb_scrub($string, $encoding = null) { $encoding = null === $encoding ? mb_internal_encoding() : $encoding; return mb_convert_encoding($string, $encoding, $encoding); } 239 126 } 240 127 if (!function_exists('mb_str_split')) { 241 function mb_str_split($string, $length = 1, $encoding = null) 242 { 243 return p\Mbstring::mb_str_split($string, $length, $encoding); 244 } 128 function mb_str_split($string, $length = 1, $encoding = null) { return p\Mbstring::mb_str_split($string, $length, $encoding); } 245 129 } 246 130
Note: See TracChangeset
for help on using the changeset viewer.