wget https://github.com/mailhog/MailHog/releases/download/v1.0.0/MailHog_linux_amd64
mv MailHog_linux_amd64 mailhog
chmod +x mailhog
sudo vi /etc/systemd/system/mailhog.service
| SELECT * FROM `<wp_prefix_>postmeta` WHERE `meta_key` LIKE '_wp_page_template' AND `meta_value` LIKE '<page-tempate.php>' |
| <?php | |
| /** | |
| * @2x image sizes | |
| */ | |
| function make_it_retina($file, $width, $height, $crop = false) { | |
| if ($width || $height) { | |
| $resized_file = wp_get_image_editor($file); | |
| if (!is_wp_error($resized_file)) { | |
| $resized_file->resize($width * 2, $height * 2, $crop); |
| <?php | |
| // W3 Total Cache Integration with Beaver Builder | |
| add_filter( 'fl_builder_render_css', __NAMESPACE__ . '\bb_plugin_cdn_url' ); | |
| function bb_plugin_cdn_url( $css ) { | |
| // Based on wp-content/plugins/w3-total-cache/extensions/WordPressSEO.php | |
| if ( class_exists( 'W3_Plugin_CdnCommon' ) ) { | |
| $site_url = wp_upload_dir(); |
| <?php | |
| function ak_convert_hex2rgba($color, $opacity = false) { | |
| $default = 'rgb(0,0,0)'; | |
| if (empty($color)) | |
| return $default; | |
| if ($color[0] == '#') | |
| $color = substr($color, 1); | |