mirror of
https://ghproxy.net/https://github.com/fairpm/fair-plugin.git
synced 2025-09-04 08:50:35 +08:00
add check to update transient for default icons check (#149)
This commit is contained in:
parent
6fcfc7f62b
commit
e677821d76
1 changed files with 4 additions and 0 deletions
|
@ -24,6 +24,10 @@ function bootstrap() {
|
||||||
* @return stdClass
|
* @return stdClass
|
||||||
*/
|
*/
|
||||||
function set_default_icon( $transient ) {
|
function set_default_icon( $transient ) {
|
||||||
|
if ( ! property_exists( $transient, 'response' ) ) {
|
||||||
|
return $transient;
|
||||||
|
}
|
||||||
|
|
||||||
foreach ( $transient->response as $updates ) {
|
foreach ( $transient->response as $updates ) {
|
||||||
$url = plugin_dir_url( PLUGIN_FILE ) . 'inc/icons/svg.php';
|
$url = plugin_dir_url( PLUGIN_FILE ) . 'inc/icons/svg.php';
|
||||||
$url = add_query_arg( 'color', set_random_color(), $url );
|
$url = add_query_arg( 'color', set_random_color(), $url );
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue