Web Design Weekly #90

Headlines Chrome DevTools Revolutions 2013 In this presentation Paul Irish explores new features like emulating mobile devices, remote debugging, Canvas and WebGL profiling, Sass preprocessor support, developing completely within Chrome using the new Workspaces support and 20 other features that are brand-new. (youtube.com) Articles Writing Testable JavaScript We’ve all been there: that bit of JavaScript functionality that started out as just a handful of lines grows to a dozen, then two dozen, then more. Along the way, a function picks up a few more arguments; a conditional picks up a…

How to display comments by logged in user and responses?

I want to create a profile page and display the logged in persons comments. And, also the responses to his/her comment. Like this: Post title Comment (by logged in user) —> Responses (replies) to his/her comment Any ideas how to do this? EDIT: This is what I got right now. I get the logged in persons’ comments with use of a shortcode on a page that I have. What I want to get is also the responses for each comment made by this logged in user. <?php /* Plugin Name:…

Send specific users an email when posts are published

I’ve got the following code, which is supposed to run when a new post is published for the first time, check if a custom field ‘specific_users’ has data (this uses Advanced Custom Fields), and if so, send an email to each of the selected users. /** * Send users a notification of new grower posts */ function notify_growers($post) { // Only notify for grower posts if ( $post->post_type != ‘grower_posts’ ) return; $post_id = $post->ID; // …run code once if ( !get_post_meta( $post_id, ’emailsent’, $single = true ) ) {…

forward domain name to particular page?

I;ve got a doman alias setup for one of my WordPress sites and i’m trying to forward that particular domain to a page. The 2 domains are – www.alias.com www.actual.com When people use the www.alias.com domain i want them to be forwarded to www.alias.com/content/ I’ve tried several things with the htaccess file but i think Worpdress may be ignoring the redirects or i’ve got it completely wrong! ie Redirect 301 www.alias.com http://www.alias.com/content/ # and RewriteCond %{HTTP_HOST} ^www.alias.com RewriteRule (.*)$ http://www.alias.com/content/ [R=301,L] best, Dc Source: https://wordpress.stackexchange.com/feeds

Chrome DevTools Revolutions 2013

https://developers.google.com/events/io/sessions/325206725 Paul Irish: As the complexity of the web apps you build keeps moving, so do the Chrome DevTools. We’ll give you the latest update on your favorite companion; explore new features like emulating mobile devices, remote debugging, Canvas and WebGL profiling, Sass preprocessor support, developing completely within Chrome using the new Workspaces support, and 20 other features that are brand-new to you and will hugely improve your development. Make time for this one if you use the dev tools. The future is bright! Source: web design weekly

get_attachment_link() adds a hashtag to URL

I’m using the get_attachment_link() function in a site I’m developing and it’s returning a really weird result. For some reason it adds #main at the end of every url. http://domain.com/post_title/attachment_title/#main Am I the only one getting this strange result? Any ideas? Source: https://wordpress.stackexchange.com/feeds

Web Design Weekly #89

Headlines New Layouts for the Multi-Device Web Designing for today’s Web means considering single-handed thumb use on smartphones, two handed touch interactions on tablets, mouse and keyboard input on traditional PCs, hybrid devices and more. Web layouts have to evolve to support this new reality. (lukew.com) Jank Busting With Daft Punk Addy Osmani noticed that the new Daft Punk web experience on Pitchfork felt quite janky. So, as a true developer does, he investigated. (addyosmani.com) Support this newsletter by becoming a member for the price of a coffee → Articles…

Check to check if wp_mail is working properly?

I’m trying to use wp_mail (testing on local machine) but no mail is received. The php.ini has smtp_port = 25 set and the php mail() is working so far. how can I check if wp_mail is working what can fail Here is the code of my mail function: function mv_optin_mail($id, $data){ $url = $id. »-« .mv_mail_token($id, $data[‘token’]); add_filter( ‘wp_mail_content_type’, ‘set_html_content_type’ ); add_filter( ‘wp_mail_charset’, ‘utf8’ ); $headers[] = ‘From: ‘.sender_signature.’ <‘.noreply_address.’>’; ob_start(); include(« optin-mail.php »); $html_mail = ob_get_contents(); ob_end_clean(); wp_mail( $data[’email’], ‘Some Subject’, $html_mail, $headers ); remove_filter( ‘wp_mail_content_type’, ‘set_html_content_type’ ); remove_filter( ‘wp_mail_charset’, ‘utf8’ ); }…

Handy Sass Mixins

Mixins are one of the most powerful features of Sass. Mixins allow for efficient and clean code repetitions as well as an easy way to adjust your code with ease. If you are using Sass in your development workflow, no doubt you are using some of the mixins that I have covered below but some might also be new and helpful. I have also added the mixins to GitHub. If you have any favourite mixins, thoughts, tweaks or modifications, be sure to submit a pull request or add them in…

Web Design Weekly #88

Headlines The CSS Zen Garden is 10 years old The Zen Garden has been one of the defining moments in the history of web design and has been extremely important to understand the state of CSS before and after its release. So for the tenth anniversary, the Zen Garden is open for business once more. (mezzoblue.com) Yes, Adobe is killing Fireworks (thenextweb.com) Support this newsletter by becoming a member for the price of a coffee → Articles Ready. Launch. Update! The ability to update a website based on current information…