The default method for communicating to the reader that a phrase preceding a noun is a single entity modifying that noun is to hyphenate the word string together: “They agreed that a plug-and-play functionality was most desirable.”
Depending on the exact wording, the relationship of words preceding a noun to that noun is more or less transparent, but in this sentence, for example, omission of hyphens (“They agreed that a plug and play functionality was most desirable”) might lead a reader to comprehend that the sentence means “They agreed that a plug was desirable, and play functionality was desirable, too.” (But why, then, the reader asks, is there a singular verb? Confusion ensues.)
Regardless of the variable clarity from one sentence to another, the hyphenated phrasal adjective is the default setting. Hyphenation, however, is only one of several strategies for linking an extended phrasal adjective; several special cases exist. Here are some other approaches depending on those variables:
The key phrase in “Her ‘Do you think I’m stupid?’ glare stopped him in his tracks,” for example, could be expressed as a hyphenated string of words (“Her do-you-think-I’m-stupid? glare stopped him in his tracks”), but this strategy fails to exploit the narrative power of prompting the reader to imagine the woman voicing her indignant comment.
On a more mechanical note, because the question mark applies to the entire phrase, not just to stupid, the question mark tacked on to the last word of the hyphenated string is awkward. But don’t hyphenate between stupid and the question mark, either; omit hyphens and use quotation marks to link the phrase.
Use your judgment with this approach, though: The simple phrasal adjective in “She shot him a come-hither look,” for instance, should not be enhanced by quotation marks, because a person is unlikely to actually use those words.
2. Composition Titles
An italicized composition title used to modify a noun needs no other treatment to indicate that it is all of a piece: “I bought the How the Grinch Stole Christmas gift pack.” (If the phrasal adjective refers to a component of a composition, such as an episode or a chapter, which requires quotation marks, these marks similarly serve to group the elements of the component title: “The ‘Ocean Deep’ episode of Planet Earth is my favorite part.”)
If, however, the title is further modified, as in “The Wuthering Heights-like plot is too transparently derivative,” the additional element should be attached to the title with an en dash — or with a simple hyphen, if the site (like this one) or the print publication employs hyphens for this usage instead.
Enclose signage wording or text on similar displays in quotation marks, using title case, when employing it as a phrasal adjective: “The protestor caught breaking a window at the Nike store was wearing a ‘Just Do It’ T-shirt.”
4. Foreign Phrases
When using a foreign phrase not adopted into English (and therefore not appearing in the dictionary) as a phrasal adjective, just as with italicized composition titles, no further treatment is necessary: “Their grand monde pretensions amused him.” If the phrase has been naturalized, it still needs no hyphenation or other treatment, because it’s a standing phrase: “She knew the mea culpa moment was coming.”
5. Proper Names
Proper names used as adjectives require no hyphenation or quotation marks; capitalization in common signals their unity: “The Occupy Wall Street protest has gone nationwide.” But if an additional modifying word is associated with such a construction, connect it to the proper name: “Analysis of other Occupy Wall Street-type movements is instructive.” (See section 2 above about hyphenating such constructions.)