Cache a large array: JSON, serialize or var_export?
http://techblog.procurios.nl/k/n618/news/view/34972/14863/cache-a-large-array-json-serialize-or-var_export.html
Life runs on code
http://techblog.procurios.nl/k/n618/news/view/34972/14863/cache-a-large-array-json-serialize-or-var_export.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters Show hidden characters <?php global $wpdb; if ( is_array( …
https://www.tollmanz.com/wp-kses-performance/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters Show hidden characters WP_PATH="/var/www/site_path" for SITE_URL in = $(wp …
Install AWS cli #Download cli script curl “https://s3.amazonaws.com/aws-cli/awscli-bundle.zip” -o “awscli-bundle.zip” #unzip unzip awscli-bundle.zip #install ./awscli-bundle/install -b ~/bin/aws Create crontab script file : sync-s3.sh #/bin/bash export AWS_CONFIG_FILE=”/root/.aws/config” #change it as per user export AWS_ACCESS_KEY_ID=XXXXXXXXXXXXXXXXXHRQ export AWS_SECRET_ACCESS_KEY=XXXXXXXfHyR /usr/local/bin/aws s3 sync /var/www/testsite.com/htdocs/wp-content/uploads s3://my-imagestore/ –acl=public-read –debug Add crontab to …
New template file added In WordPress 4.3 relaease
To display user avatar in buddypress notification-loop (You can find it in members / single / notifications / notifications-loop.php ) Below snippet will return user id of that activity ( BuddyPress stored it as secondary_item ) $bp = buddypress(); $user_id = $bp->notifications->query_loop->notification->secondary_item_id; To echo avatar from user id …
Most web developers are familiar with the IE conditional comments that allow you to load a stylesheet only in Internet Explorer. <!– [if lt IE 9]> <link href=”ie.css” rel=”stylesheet” type=”text/css”> <![endif]–> Many new WordPress developers tend to just hardcode these conditional comments directly into their …
After automatic update of child theme to parent theme, During update we just update code of theme, but what about WordPress, WordPress still assuming current theme as child theme. When you activate child theme, there are mainly two site options template and stylesheet who store …