Saturday, December 31, 2016

Here's What Happened on Instagram in 2016 (infographic)

2016 was a big year for Instagram, as it achieved new milestones and released several new features. And, to sum all those events here's an infographic-timeline, which comes courtesy of Robert Katai. Key takeaways: There are more than 600 million monthly active users on Instagram. Instagram...

[ This is a content summary only. Visit our website http://ift.tt/1b4YgHQ for full links, other content, and more! ]

by Irfan Ahmad via Digital Information World

Periscope Live 360 Video: This Week in Social Media

Welcome to our weekly edition of what’s hot in social media news. To help you stay up to date with social media, here are some of the news items that caught our attention. What’s New This Week Periscope Rolls Out Support for Live 360 Video: Periscope launched its own Live 360 video experience this week. [...]

This post Periscope Live 360 Video: This Week in Social Media first appeared on .
- Your Guide to the Social Media Jungle


by Grace Duffy via

Window Wonderland

Take a walk through New York’s iconic holiday window tradition, exploring 18 different stores and their magical displays.
by via Awwwards - Sites of the day

Friday, December 30, 2016

14 Best Online Marketplaces for Graphic Design

Are you a graphic designer looking for a platform where you could show and sell your work? Or perhaps you're a marketer in need of quality graphic design and other creative services? Graphic design marketplaces are platforms which specialize in showcasing the work of talented graphic designers...

[ This is a content summary only. Visit our website http://ift.tt/1b4YgHQ for full links, other content, and more! ]

by Web Desk via Digital Information World

Fajax – Lightweight jQuery Plugin for Ajaxifying Forms

Fajax is a lightweight jQuery plugin for ajaxifying forms with file support. It's wrapper of $.ajax function.


by via jQuery-Plugins.net RSS Feed

Cirro

Minimal One Pager with a hint of Brutalism for design and development studio, Cirro. When you take a second glance you'll notice the project thumbnails are actually embedded working websites.

by Rob Hope via One Page Love

How to Build Raving Fans in Unconventional Ways

Do you want enthusiastic fans? Looking for unique ways to engage your audience? To discover how he grew a large and thriving fan base, I interview Pat Flynn. More About This Show The Social Media Marketing podcast is an on-demand talk radio show from Social Media Examiner. It’s designed to help busy marketers and business owners discover [...]

This post How to Build Raving Fans in Unconventional Ways first appeared on .
- Your Guide to the Social Media Jungle


by Michael Stelzner via

Get Started With a React Native Template in 60 Seconds

UNIEL ltd.

Corporate website for UNIEL ltd. - a design company working in the fields of both digital and analog branding.
by via Awwwards - Sites of the day

Thursday, December 29, 2016

LinkedIn: Best Practices for Marketing Professionals (infographic)

"The medium is the message" - Marshall McLuhan introduced the world to this phrase in 1964. Since the emergence of social media, the phrase has become a critical guiding factor for those who want to leverage social channels for business benefits. Your message is as important as the medium...

[ This is a content summary only. Visit our website http://ift.tt/1b4YgHQ for full links, other content, and more! ]

by Web Desk via Digital Information World

VisitorParser.js – User Agent & IP Geo Location Parser with Javascript

VisitorParser.js is a lightweight javascript-based to analyze visitors with user-agent & ip geo location parser.


by via jQuery-Plugins.net RSS Feed

Building Your Startup: Ajax for Meeting Times and Places

Daily

The Daily Project aims to encourage spirited writing and curated exploration through daily writing prompts and our 10-things blog.


by csreladm via CSSREEL | CSS Website Awards | World best websites | website design awards | CSS Gallery

Redixel

Redixel was firstly founded in 2013 in Singapore and offers ONLY products at international level, which involved User Experience, Website Creation, Mobile Development, Content Management and Digital Marketing for clients across the world.


by csreladm via CSSREEL | CSS Website Awards | World best websites | website design awards | CSS Gallery

Goodricke Tea

Goodricke Limited is synonymous with its gardens that are heralded the world over for more reasons than one. A cup of Goodricke tea is a rare combination of fine taste, unbeatable flavor and generous doses of mystique and history.


by csreladm via CSSREEL | CSS Website Awards | World best websites | website design awards | CSS Gallery

welspunindia

At Welspun, we don’t just weave the best textiles in the world. We weave innovation with people to create stories


by csreladm via CSSREEL | CSS Website Awards | World best websites | website design awards | CSS Gallery

Romain Richard Portfolio

I’m Romain Richard, a graphic and web designer junior, currently working for French Spirit in Shanghai and student in second year at MMI Bordeaux.


by csreladm via CSSREEL | CSS Website Awards | World best websites | website design awards | CSS Gallery

Sending Data With Retrofit 2 HTTP Client for Android

Residente

We collaborated with musical artist Residente to document his travels around the world. The site features an interactive map where we are all connected to each other.
by via Awwwards - Sites of the day

Conversational Interface

One Pager hosting a free 'Conversational Interface' UI Kit (by DesignCue) for both Illustrator and Sketch.

by Rob Hope via One Page Love

Creating a Custom WordPress Messaging System, Part 4

In this series, we've taken a look at how we can implement a system that allows us to programmatically define custom messages that display on a given administration page in the WordPress back end.

If you've followed along with the series thus far, then you know:

  • We've laid the groundwork for the plugin that's used throughout this series, and even developed it a bit further.
  • We've defined and used a custom hook that we can use to render the settings messages.
  • We've added support for success, warning, and error messages that can be rendered at the top of a given settings page.

As mentioned in the previous tutorial:

But if you've read any of my previous tutorials, you know that I'm not a fan of having duplicated code. Nor am I fan of having one class do many things. And, unfortunately, that's exactly that we're doing here.

And we're going to address that in this final tutorial. By the end, we'll have a complete refactored solution that uses some intermediate object-oriented principles like inheritance. We'll also have a few methods that we can use programmatically or that can be registered with the WordPress hook system.

Getting Started at the End

At this point you should know exactly what you need in your local development environment. Specifically, you should have the following:

  • PHP 5.6.25 and MySQL 5.6.28
  • Apache or Nginx
  • WordPress 4.6.1
  • Your preferred IDE or editor

I also recommend the most recent version of the source code as it will allow you to walk through all of the changes that we're going to make. If you don't have it, that's okay, but I recommend reading back over the previous tutorials before going any further.

In the Previous Tutorial

As you may recall (or have ascertained from the comment above), the previous tutorial left us with a single class that was doing too much work.

One way to know this is that if you were to describe what the class was doing, you wouldn't be able to give a single answer. Instead, you'd have to say that it was responsible for handling success messages, warning messages, error messages, and rendering all of them independently of one another.

And though you might make the case that it was "managing custom messages," you wouldn't necessarily be describing just how verbose the class was. That's what we hope to resolve in this tutorial.

In the Final Tutorial

Specifically, we're going to be looking at doing the following:

  • removing the old settings messenger class
  • adding a new, more generic settings message class
  • adding a settings messenger class with which to communicate
  • introducing methods that we can use independent of WordPress
  • streamlining how WordPress renders the messages

We have our work cut out for us, so let's go ahead and get started with all of the above.

Refactoring Our Work

When it comes to refactoring our work, it helps to know exactly what it is that we want to do. In our case, we recognize that we have a lot of duplicate code that could be condensed. 

Furthermore, we have three different types of messages managed in exactly the same way save for how they are rendered. And in that instance, it's an issue of the HTML class attributes.

Thus, we can generalize that code to focus on a specific type, and we can consolidate a lot of the methods for adding success messages or retrieving error messages by generalizing a method to recognize said type

Ultimately, we will do that. But first, some housekeeping.

1. Remove the Old Settings Messenger

In the previous tutorials, we've been working with a class called Settings_Messenger. Up to this point, it has served its purpose, but we're going to be refactoring this class throughout the remainder of this tutorial.

When it comes to this type of refactoring, it's easy to want to simply delete the class and start over. There are times in which this is appropriate, but this is not one of them. Instead, we're going to take that class and refactor what's already there.

All of that to say, don't delete the file and get started with a new one. Instead, track with what we're doing throughout this tutorial.

2. A New Setting Message Class

First, let's introduce a Settings_Message class. This represents any type of settings message with which we're going to write. That is, it will manage success messages, error messages, and warning messages.

To do this, we'll define the class, introduce a single property, and then we'll instantiate it in the constructor. Check out this code, and I'll explain a bit more below:

Notice that we've created a private attribute, $messages. When the class is instantiated, we create a multidimensional array. Each index, identified either by success, error, or warning, refers to its own array in which we'll be storing the corresponding messages.

Next, we need to be able to add a message, get a message, and get all of the messages. I'll discuss each of these in more detail momentarily.

Adding Messages

First, let's look at how we're adding messages:

This message first takes the incoming string and sanitizes the data. Then it checks to see if it already exists in the success messages. If so, it simply returns. After all, we don't want duplicate messages.

Otherwise, it adds the message to the collection.

Getting Messages

Retrieving messages comes in two forms:

  1. rendering individual messages by type
  2. rendering the messages in the display of the administration page (complete with HTML sanitization, etc.)

Remember, there are times where we may only want to display warning messages. Other times, we may want to display all of the messages. Since there are two ways of doing this, we can leverage one and then take advantage of it in other another function.

Sound confusing? Hang with me and I'll explain all of it. The first part we're going to focus on is how to render messages by type (think success, error, or warning). Here's the code for doing that (and it should look familiar):

Notice here that we're using much of the same code from the previous tutorial; however, we've generalized it so that it looks at the incoming $type and dynamically applies it to the markup. 

This allows us to have a single function for rendering our messages. This isn't all, though. What about the times we want to get all messages? This could be to render on a page or to grab them programmatically for some other processing.

To do this, we can introduce another function:

This message should be easy enough to understand. It simply loops through all of the messages we have in our collection and calls the get_messages function we outlined above.

It still renders them all together (which we'll see one use of them in our implementation of a custom hook momentarily). If you wanted to use them for another purpose, you could append the result into a string and return it to the caller, or perform some other programmatic function.

This is but one implementation.

3. The Settings Messenger

That does it for the actual Settings_Message class. But how do we communicate with it? Sure, we can talk to it directly, but if there's an intermediate class, we have some control over what's returned to us without adding more responsibility to the Settings_Message class, right?

Enter the Settings_Messenger. This class is responsible for allows us to read and write settings messages. I think a case could be made that you could split this up into two classes by its responsibility because it both reads and writes but, like a messenger who sends and receives, that's the purpose of this class.

The initial setup of the class is straightforward.

  • The constructor creates an instance of the Settings_Message class that we can use to send and receive messages.
  • It associates a method with our custom tutsplus_settings_messages hook we defined in a previous tutorial.

Take a look at the first couple of methods:

Remember from earlier in this tutorial, we have the hook defined in our view which can be found in settings.php. For the sake of completeness, it's listed here:

Notice, however, that this particular hook takes advantage of the get_all_messages method we'll review in a moment. It doesn't have to use this method. Instead, it could be used to simply render success messages or any other methods that you want to use.

Adding Messages

Creating the functions to add messages is simple as these functions require a type and the message itself. Remember, the Settings_Message takes care of sanitizing the information so we can simply pass in the incoming messages.

See below where we're adding success, warning, and error messages:

It's easy, isn't it?

Getting Messages

Retrieving messages isn't much different except we just need to provide the type of messages we want to retrieve:

Done and done, right?

But Did You Catch That?

Notice that the messages above all refer to two other methods we haven't actually covered yet. These are private messages that help us simplify the calls above. 

Check out the following private methods both responsible for adding and retrieving messages straight from the Settings_Message instance maintained on the messenger object:

And that wraps up the new Settings_Messenger class. All of this is much simpler, isn't it?

Starting the Plugin

It does raise the question, though: How do we start the plugin now that we've had all of these changes?

See the entire function below:

And that's it.

A few points to note:

  • If you don't call init on the Settings_Messenger, then you don't have to worry about displaying any messages in on your settings page.
  • The code adds messages to the Settings_Messenger, but it doesn't actually retrieve any because I am using the init method.
  • If you want to retrieve the messages then you can use the methods we've outlined above.

That's all for the refactoring. This won't work exactly out of the box as there is still some code needed to load all of the PHP files required to get the plugin working; however, the code above focuses on the refactoring which is the point of this entire tutorial.

Conclusion

For a full working version of this tutorial and complete source code that does work out of the box, please download the source code attached to this post on the right sidebar.

I hope that over the course of this material you picked up a number of new skills and ways to approach WordPress development. When looking over the series, we've covered a lot:

  • custom menus
  • introducing administration pages
  • the various message types
  • defining and leveraging custom hooks
  • and refactoring object-oriented code

As usual, I'm also always happy to answer questions via the comments, and you can also check out my blog and follow me on Twitter. I usually talk all about software development within WordPress and tangential topics, as well. If you're interested in more WordPress development, don't forget to check out my previous series and tutorials, and the other WordPress material we have here on Envato Tuts+.

Resources


by Tom McFarlin via Envato Tuts+ Code

How to Create a Pinterest Showcase for Your Business

Looking for a new way to show off your best pins? Want to try Pinterest Showcase? Pinterest showcases allow businesses to rotate select pins at the top of their profiles. In this article, you’ll discover how to build a Pinterest showcase for your business profile. Why Build a Pinterest Showcase? Think of the Showcase feature [...]

This post How to Create a Pinterest Showcase for Your Business first appeared on .
- Your Guide to the Social Media Jungle


by Kristi Hines via

Wednesday, December 28, 2016

How The Internet Revolutionized Offline Retail - infographic

Year after year, the command of retail continues to interest customers. Although numerous consumers are now taking advantage of online deals, the experience a shopper has when they have the product in person is still highly influential. Studies show that 25% of consumers purchase a product or...

[ This is a content summary only. Visit our website http://ift.tt/1b4YgHQ for full links, other content, and more! ]

by Irfan Ahmad via Digital Information World

vDrop – jQuery Plugin for Custom Select Dropdowns

vDrop is a minimalistic and customisable jQuery plugin to replace standard HTML select dropdowns.


by via jQuery-Plugins.net RSS Feed

Nau Digital Creative Studio

We deliver experiences on mobile application and website that make life easier, help brand growing, and transform business to growth within digital world.


by csreladm via CSSREEL | CSS Website Awards | World best websites | website design awards | CSS Gallery

Mindvalley

We design learning experiences and publish teachings by the best authors in transformational education for 3 million students worldwide.


by csreladm via CSSREEL | CSS Website Awards | World best websites | website design awards | CSS Gallery

MEDELA – regeneration center

A new creative web site for MEDELA – regeneration center created by ARM DESIGN


by csreladm via CSSREEL | CSS Website Awards | World best websites | website design awards | CSS Gallery

In-App Purchases in iOS With Swift 3

Building Your First Web Scraper, Part 3

Pedro Duarte

Minimal approach to a One Page portfolio for front end dev, Pedro Duarte, featuring a simple scrollable list of projects in the right panel. Lovely touch with the full screen left-to-right load transition of the right panel.

by Rob Hope via One Page Love

Uber | Where To?

Uber and MediaMonks created a site to prime riders for the launch of a new app experience. In the the first two weeks, the site had 19 million views and an average time on site of 1:18.
by via Awwwards - Sites of the day

How to Use Instagram Live

Interested in adding live video to your Instagram stories? Looking for a guide to get you started? The latest update to the Instagram app includes Live video, a new feature that lets you connect with your Instagram audience in real time. In this article, you’ll discover how to use Instagram Live video within Instagram Stories. [...]

This post How to Use Instagram Live first appeared on .
- Your Guide to the Social Media Jungle


by Kristi Hines via

Tuesday, December 27, 2016

8 Powerful Components to Boost Content Marketing Success

A successful content marketing campaign can be an integral part of your digital marketing strategy and yield many benefits for your brand. The power of content marketing uses to generate inbound traffic for more audience with relevant information. It increases engagement with targeted audiences who...

[ This is a content summary only. Visit our website http://ift.tt/1b4YgHQ for full links, other content, and more! ]

by Web Desk via Digital Information World

Trionn Design

Trionn Design is one of India’s leading and trusted outsource web design & development agencies, located in Rajkot, Gujarat. Our agency creates Web Interfaces, Brands, IOS application designs, game design & custom Web, CMS & e-commerce development.


by csreladm via CSSREEL | CSS Website Awards | World best websites | website design awards | CSS Gallery

Lets Travel WordPress Theme

Let’s Travel is a responsive multi-purpose travel booking WordPress theme that is an ideal fit for a travel agency, tour operator, hotel, airline, car service, cruise and more.


by csreladm via CSSREEL | CSS Website Awards | World best websites | website design awards | CSS Gallery

Intrusive Thoughts

Intrusive Thoughts is an educational hub for the OCD community that seeks to empower sufferers to lead healthier lives. After 20 years of living with undiagnosed OCD, founder Aaron Harvey turned to the internet for help. In his search for answers, he


by csreladm via CSSREEL | CSS Website Awards | World best websites | website design awards | CSS Gallery

Texas Thread Republic

Texas Inspired Graphic Tee Shirts


by csreladm via CSSREEL | CSS Website Awards | World best websites | website design awards | CSS Gallery

number-divider.js – jQuery Number Divider Plugin

number-divider.js is a jQuery plugin to divide numbers. You can divide numbers in inputs and simple HTML tags. If you wish use it in form then formatted values will be auto replaced on original values.


by via jQuery-Plugins.net RSS Feed

What's New in Swift 3?

Books on graphic design

Minimal One Page collaboration by brothers Theo and Michell van Beurden, who have curated a list of books on graphic design (and typography). What at lovely touch how the thickness of each book (which is outputted by a CMS) is illustrated dynamically based on the book's number of pages.

by Rob Hope via One Page Love

Programming With Yii2: Helpers

How to Better Serve Customers With Twitter Direct Messages

Looking for ways to improve customer care on Twitter? Do your customers tweet you for support? Moving customer service discussions to private Twitter Direct Message (DM) threads can help your support team quickly resolve issues. In this article, you’ll discover how to use the latest Twitter Direct Message features to improve your customer service. Why [...]

This post How to Better Serve Customers With Twitter Direct Messages first appeared on .
- Your Guide to the Social Media Jungle


by Kristi Hines via

Telekom: Magic Advent Calendar

To fully express the magic of Christmas we created interactive advent calendar. From the 1st to the 24th of Dec a different scene will be unlocked, shaping a magical Christmas story.
by via Awwwards - Sites of the day