Changeset 3487622
- Timestamp:
- 03/21/2026 06:32:53 AM (2 weeks ago)
- Location:
- indesign-random-quotes
- Files:
-
- 7 edited
-
assets/banner-1544x500-rtl.png (modified) (previous)
-
assets/banner-1544x500.png (modified) (previous)
-
assets/banner-772x250-rtl.png (modified) (previous)
-
assets/banner-772x250.png (modified) (previous)
-
trunk/css/style.css (modified) (3 diffs)
-
trunk/idquotes.php (modified) (21 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
indesign-random-quotes/trunk/css/style.css
r3487390 r3487622 10 10 text-align: right; 11 11 } 12 .idquotes-donner-name::before { 13 content: '- '; 14 } 12 15 13 16 14 /* Modern layout */ … … 38 36 letter-spacing: 1px; 39 37 } 40 .idquotes-modern-author::before { 41 content: '\2014 \0020'; 42 } 38 43 39 44 40 /* Minimal layout */ … … 201 197 display: block; 202 198 } 199 200 /* Elegant Serif layout */ 201 .idquotes-layout-elegant-serif { 202 font-family: 'Playfair Display', Georgia, serif; 203 background: #fffafa; 204 border: 1px solid #e5e5e5; 205 padding: 30px; 206 margin: 20px 0; 207 text-align: center; 208 position: relative; 209 border-radius: 8px; 210 } 211 .idquotes-elegant-serif-quote { 212 font-size: 1.4rem; 213 color: #2c3e50; 214 line-height: 1.6; 215 display: block; 216 margin-bottom: 20px; 217 } 218 .idquotes-elegant-serif-quote::before { 219 content: '\201C'; 220 font-size: 3rem; 221 color: #e2e8f0; 222 position: absolute; 223 top: 5px; 224 left: 20px; 225 } 226 .idquotes-elegant-serif-author { 227 font-size: 0.9rem; 228 color: #7f8c8d; 229 text-transform: uppercase; 230 letter-spacing: 2px; 231 } 232 233 /* Neon Glow layout */ 234 .idquotes-layout-neon-glow { 235 background: #000; 236 color: #fff; 237 padding: 30px; 238 border-radius: 10px; 239 margin: 20px 0; 240 box-shadow: 0 0 10px #0ff, 0 0 20px #0ff, inset 0 0 15px #0ff; 241 border: 1px solid #0ff; 242 } 243 .idquotes-neon-glow-quote { 244 font-size: 1.3rem; 245 text-shadow: 0 0 5px #0ff, 0 0 10px #0ff; 246 display: block; 247 margin-bottom: 15px; 248 } 249 .idquotes-neon-glow-author { 250 font-size: 1rem; 251 text-align: right; 252 display: block; 253 color: #f0f; 254 text-shadow: 0 0 5px #f0f; 255 } 256 257 /* Paper Note layout */ 258 .idquotes-layout-paper-note { 259 background: #fdf5e6; 260 padding: 25px 30px; 261 margin: 20px 0; 262 position: relative; 263 box-shadow: 2px 3px 5px rgba(0,0,0,0.2); 264 font-family: 'Comic Sans MS', cursive, sans-serif; 265 transform: rotate(-1deg); 266 } 267 .idquotes-layout-paper-note::before { 268 content: ''; 269 position: absolute; 270 top: -10px; 271 left: 50%; 272 transform: translateX(-50%); 273 width: 60px; 274 height: 25px; 275 background: rgba(255, 255, 255, 0.4); 276 box-shadow: 0 1px 3px rgba(0,0,0,0.1); 277 } 278 .idquotes-paper-note-quote { 279 font-size: 1.2rem; 280 color: #4a4a4a; 281 display: block; 282 margin-bottom: 15px; 283 } 284 .idquotes-paper-note-author { 285 font-size: 1rem; 286 color: #d35400; 287 font-weight: bold; 288 } 289 290 /* Brutalist layout */ 291 .idquotes-layout-brutalist { 292 background: #fff; 293 border: 4px solid #000; 294 padding: 25px; 295 margin: 20px 0; 296 box-shadow: 8px 8px 0px #000; 297 font-family: monospace; 298 } 299 .idquotes-brutalist-quote { 300 font-size: 1.4rem; 301 font-weight: 900; 302 color: #000; 303 text-transform: uppercase; 304 display: block; 305 margin-bottom: 20px; 306 } 307 .idquotes-brutalist-author { 308 background: #000; 309 color: #fff; 310 padding: 5px 10px; 311 display: inline-block; 312 } 313 314 /* Typewriter layout */ 315 .idquotes-layout-typewriter { 316 background: #f4f4f0; 317 border-left: 3px solid #dcdcdc; 318 padding: 20px 30px; 319 margin: 20px 0; 320 font-family: 'Courier New', Courier, monospace; 321 } 322 .idquotes-typewriter-quote { 323 font-size: 1.1rem; 324 color: #333; 325 display: block; 326 margin-bottom: 10px; 327 } 328 .idquotes-typewriter-author { 329 font-size: 0.9rem; 330 color: #666; 331 display: block; 332 } 333 334 335 /* Floating Shadow layout */ 336 .idquotes-layout-floating-shadow { 337 background: #ffffff; 338 padding: 30px; 339 border-radius: 15px; 340 margin: 30px 0; 341 box-shadow: 0 15px 30px -10px rgba(0,0,0,0.2); 342 transition: transform 0.3s ease; 343 } 344 .idquotes-layout-floating-shadow:hover { 345 transform: translateY(-5px); 346 } 347 .idquotes-floating-shadow-quote { 348 font-size: 1.25rem; 349 color: #34495e; 350 font-weight: 500; 351 display: block; 352 margin-bottom: 15px; 353 } 354 .idquotes-floating-shadow-author { 355 font-size: 0.95rem; 356 color: #3498db; 357 font-weight: bold; 358 } 359 360 /* Cyber Punk layout */ 361 .idquotes-layout-cyber-punk { 362 background: #2b213a; 363 color: #05d9e8; 364 padding: 25px; 365 margin: 20px 0; 366 border-right: 5px solid #ff003c; 367 border-bottom: 5px solid #ff003c; 368 font-family: 'Courier New', Courier, monospace; 369 position: relative; 370 clip-path: polygon(0 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%); 371 } 372 .idquotes-cyber-punk-quote { 373 font-size: 1.3rem; 374 text-transform: uppercase; 375 display: block; 376 margin-bottom: 15px; 377 letter-spacing: 1px; 378 } 379 .idquotes-cyber-punk-author { 380 color: #ff003c; 381 background: #01012b; 382 padding: 2px 8px; 383 display: inline-block; 384 } 385 386 /* Retro Wave layout */ 387 .idquotes-layout-retro-wave { 388 background: linear-gradient(180deg, #241734 0%, #2b213a 50%, #150e1f 100%); 389 padding: 35px 25px; 390 border-radius: 5px; 391 border-top: 3px solid #f3e600; 392 border-bottom: 3px solid #ff007f; 393 margin: 20px 0; 394 text-align: center; 395 } 396 .idquotes-retro-wave-quote { 397 font-size: 1.4rem; 398 color: #00ffff; 399 text-shadow: 2px 2px #ff007f; 400 display: block; 401 margin-bottom: 20px; 402 font-weight: bold; 403 } 404 .idquotes-retro-wave-author { 405 color: #f3e600; 406 font-size: 1.1rem; 407 letter-spacing: 2px; 408 } -
indesign-random-quotes/trunk/idquotes.php
r3487390 r3487622 2 2 /* 3 3 Plugin Name: InDesign Random Quotes 4 Description: Random popular quotes use shortcode [id_popular_quotes]5 Version: 1. 24 Description: Random popular quotes with 16 gorgeous templates! Use shortcode [id_popular_quotes] or [id_popular_quotes_carousel] 5 Version: 1.3 6 6 Author: InDesign Media 7 7 Author's URI: https://indesignmedia.net … … 26 26 add_action('admin_enqueue_scripts', 'idquotes_admin_scripts'); 27 27 28 function idquotes_shortcode($atts) 29 { 30 $atts = shortcode_atts( 31 array( 32 'layout' => 'classic', 33 ), 34 $atts, 35 'id_popular_quotes' 36 ); 37 28 function idquotes_get_structured_quotes() { 38 29 $mode = get_option('idquotes_mode', 'manual'); 39 30 $custom_quotes = get_option('idquotes_list', ''); … … 41 32 if ($mode === 'universal' || empty(trim($custom_quotes))) { 42 33 $quotes = array( 34 "Be the change that you wish to see in the world.#Mahatma Gandhi", 35 "The only way to do great work is to love what you do.#Steve Jobs", 36 "In the end, it's not the years in your life that count. It's the life in your years.#Abraham Lincoln", 37 "The greatest glory in living lies not in never falling, but in rising every time we fall.#Nelson Mandela", 38 "Life is what happens when you're busy making other plans.#John Lennon", 39 "The future belongs to those who believe in the beauty of their dreams.#Eleanor Roosevelt", 40 "Darkness cannot drive out darkness; only light can do that. Hate cannot drive out hate; only love can do that.#Martin Luther King Jr.", 41 "Do not go where the path may lead, go instead where there is no path and leave a trail.#Ralph Waldo Emerson", 42 "It is during our darkest moments that we must focus to see the light.#Aristotle", 43 "You will face many defeats in life, but never let yourself be defeated.#Maya Angelou", 44 "Only a life lived for others is a life worthwhile.#Albert Einstein", 45 "Never let the fear of striking out keep you from playing the game.#Babe Ruth", 46 "The only impossible journey is the one you never begin.#Tony Robbins", 47 "Success is not final, failure is not fatal: it is the courage to continue that counts.#Winston Churchill", 48 "I have not failed. I've just found 10,000 ways that won't work.#Thomas A. Edison", 49 "A person who never made a mistake never tried anything new.#Albert Einstein", 50 "To be yourself in a world that is constantly trying to make you something else is the greatest accomplishment.#Ralph Waldo Emerson", 51 "It does not matter how slowly you go as long as you do not stop.#Confucius", 52 "If you look at what you have in life, you'll always have more.#Oprah Winfrey", 53 "Twenty years from now you will be more disappointed by the things that you didn't do than by the ones you did do.#Mark Twain", 43 54 "When the people fear their government, there is tyranny; when the government fears the people, there is liberty.#Thomas Jefferson", 44 "The problem is never how to get new, innovative thoughts into your mind, but how to get old ones out.#Dee Hock", 45 "If you're not making mistakes, then you're not doing anything. I'm positive that a doer makes mistakes.#John Wooden", 46 "Vision without action is a daydream. Action without vision is a nightmare.#Japanese saying", 47 "Remember your biggest obstacle to success is the absence of execution.#Andrew Young", 48 "If you deliberately plan on being less than you are capable of being, then I warn you that you'll be unhappy for the rest of your life.#Abraham Maslow", 49 "If you don't quit, and don't cheat, and don't run home when trouble arrives, you can only win.#Shelley Long", 50 "Just because you can ... doesn't mean you should.#Anon", 51 "Anything unattempted is impossible.#Andrew Young", 52 "If you have always done it that way, it is probably wrong.#Charles Kettering", 53 "Faced with the choice between changing one's mind and proving that there is no need to do so, almost everybody gets busy on the proof.#John Kenneth Galbraith", 54 "If you are not working on your ideas each day, you're working on someone else's.#Marjorie Blanchard", 55 "If nothing changes ... nothing changes.#Justin Herald", 56 "The best car safety device is a rear-view mirror with a cop in it.#Dudley Moore", 57 "Anybody who wants the presidency so much that he'll spend two years organizing and campaigning for it is not to be trusted with the office.#David Broder", 58 "From the moment I picked up your book until I laid it down, I was convulsed with laughter. Some day I intend reading it.#Groucho Marx", 59 "This is not a novel to be tossed aside lightly. It should be thrown with great force.#Dorothy Parker", 60 "No one can make you feel inferior without your consent.#Eleanor Roosevelt", 61 "A vacuum is a hell of a lot better than some of the stuff that nature replaces it with.#Tennessee Williams", 62 "I don't necessarily agree with everything I say.#Marshall McLuhan", 63 "The first step to getting the things you want out of life is this: Decide what you want.#Ben Stein", 64 "To err is human, but to really foul things up requires a computer.#Anon", 65 "There will be only one of you for all time. Fearlessly be yourself.#Anon", 66 "Faith is believing what God said about you, not what you think about yourself.#Robb Thompson", 67 "Do your duty in all things. You cannot do more, you should never wish to do less.#General Robert E. Lee", 68 "I cannot trust a man to control others who cannot control himself.#General Robert E. Lee", 69 "Whiskey - I like it, I always did, and that is the reason I never use it.#General Robert E. Lee", 70 "My chief concern is to try to be an humble, earnest Christian.#General Robert E. Lee", 71 "Obedience to lawful authority is the foundation of manly character.#General Robert E. Lee", 72 "It is well that war is so terrible - lest we should grow too fond of it.#General Robert E. Lee", 73 "The education of a man is never completed until he dies.#General Robert E. Lee", 74 "You can have anything you want - if you want it badly enough. You can be anything you want to be, have anything you desire, accomplish anything you set out to accomplish - if you will hold to that desire with singleness of purpose.#General Robert E. Lee", 75 "Get correct views of life, and learn to see the world in its true light. It will enable you to live pleasantly, to do good, and, when summoned away, to leave without regret.#General Robert E. Lee", 76 "Never do a wrong thing to make a friend or keep one.#General Robert E. Lee", 77 "You cannot be a true man until you learn to obey.#General Robert E. Lee", 78 "My trust is in the mercy and wisdom of a kind Providence, who ordereth all things for our good.#General Robert E. Lee", 79 "And in the end it's not the years in your life that count. It's the life in your years.#Abraham Lincoln", 80 "Am I not destroying my enemies when I make friends of them?#Abraham Lincoln", 81 "Be sure you put your feet in the right place, then stand firm.#Abraham Lincoln", 82 "Better to remain silent and be thought a fool than to speak out and remove all doubt.#Abraham Lincoln", 83 "He has a right to criticize, who has a heart to help.#Abraham Lincoln", 84 "I have always found that mercy bears richer fruits than strict justice.#Abraham Lincoln", 85 "I never had a policy; I have just tried to do my very best each and every day.#Abraham Lincoln", 86 "I walk slowly, but I never walk backward.#Abraham Lincoln", 87 "If this is coffee, please bring me some tea; but if this is tea, please bring me some coffee.#Abraham Lincoln", 88 "If we could first know where we are, and whither we are tending, we could then better judge what to do, and how to do it.#Abraham Lincoln", 89 "If you look for the bad in people expecting to find it, you surely will.#Abraham Lincoln", 90 "Most folks are as happy as they make up their minds to be.#Abraham Lincoln", 91 "Nearly all men can stand adversity, but if you want to test a man's character, give him power.#Abraham Lincoln", 92 "No man has a good enough memory to be a successful liar.#Abraham Lincoln", 93 "No man is good enough to govern another man without that other's consent.#Abraham Lincoln", 94 "No matter how much cats fight, there always seem to be plenty of kittens.#Abraham Lincoln", 95 "Sir, my concern is not whether God is on our side; my greatest concern is to be on God's side, for God is always right.#Abraham Lincoln", 96 "Those who deny freedom to others deserve it not for themselves.#Abraham Lincoln", 97 "You can fool all the people some of the time, and some of the people all the time, but you cannot fool all the people all the time.#Abraham Lincoln", 98 "You cannot escape the responsibility of tomorrow by evading it today.#Abraham Lincoln", 99 "You cannot help men permanently by doing for them what they could and should do for themselves.#Abraham Lincoln", 100 "Captain, my religious belief teaches me to feel as safe in battle as in bed. God has fixed the time for my death. I do not concern myself about that, but to be always ready, no matter when it may overtake me.#General Stonewall Jackson", 101 "You may be whatever you resolve to be.#General Stonewall Jackson", 102 "Never take counsel of your fears.#General Stonewall Jackson", 103 "Duty is ours; consequences are God's.#General Stonewall Jackson", 104 "If it weren't for Philo T. Farnsworth, inventor of television, we'd still be eating frozen radio dinners.#Johnny Carson", 105 "You cannot multiply wealth by dividing it.#Adrian Rogers, 1931" 55 "The way to get started is to quit talking and begin doing.#Walt Disney", 56 "If life were predictable it would cease to be life, and be without flavor.#Eleanor Roosevelt", 57 "Everything you've ever wanted is on the other side of fear.#George Addair", 58 "Life itself is the most wonderful fairy tale.#Hans Christian Andersen", 59 "Whether you think you can or you think you can't, you're right.#Henry Ford", 60 "I attribute my success to this: I never gave or took any excuse.#Florence Nightingale", 61 "I miss 100% of the shots I don't take.#Wayne Gretzky", 62 "The most difficult thing is the decision to act, the rest is merely tenacity.#Amelia Earhart", 63 "Every strike brings me closer to the next home run.#Babe Ruth", 64 "Definiteness of purpose is the starting point of all achievement.#W. Clement Stone", 65 "We must balance conspicuous consumption with conscious capitalism.#Kevin Kruse", 66 "Life is 10% what happens to me and 90% of how I react to it.#Charles Swindoll", 67 "The most common way people give up their power is by thinking they don't have any.#Alice Walker", 68 "The mind is everything. What you think you become.#Buddha", 69 "The best time to plant a tree was 20 years ago. The second best time is now.#Chinese Proverb", 70 "An unexamined life is not worth living.#Socrates", 71 "Eighty percent of success is showing up.#Woody Allen", 72 "Your time is limited, so don't waste it living someone else's life.#Steve Jobs", 73 "Winning isn't everything, but wanting to win is.#Vince Lombardi", 74 "I am not a product of my circumstances. I am a product of my decisions.#Stephen Covey", 75 "Every child is an artist. The problem is how to remain an artist once he grows up.#Pablo Picasso", 76 "You can never cross the ocean until you have the courage to lose sight of the shore.#Christopher Columbus", 77 "I've learned that people will forget what you said, people will forget what you did, but people will never forget how you made them feel.#Maya Angelou", 78 "Either you run the day, or the day runs you.#Jim Rohn", 79 "The two most important days in your life are the day you are born and the day you find out why.#Mark Twain", 80 "Whatever you can do, or dream you can, begin it. Boldness has genius, power and magic in it.#Johann Wolfgang von Goethe", 81 "The best revenge is massive success.#Frank Sinatra", 82 "People often say that motivation doesn't last. Well, neither does bathing. That's why we recommend it daily.#Zig Ziglar", 83 "Life shrinks or expands in proportion to one's courage.#Anais Nin", 84 "If you hear a voice within you say 'you cannot paint,' then by all means paint and that voice will be silenced.#Vincent Van Gogh", 85 "There is only one way to avoid criticism: do nothing, say nothing, and be nothing.#Aristotle", 86 "Ask and it will be given to you; search, and you will find; knock and the door will be opened for you.#Jesus", 87 "The only person you are destined to become is the person you decide to be.#Ralph Waldo Emerson", 88 "Go confidently in the direction of your dreams. Live the life you have imagined.#Henry David Thoreau", 89 "Certain things catch your eye, but pursue only those that capture the heart.#Ancient Indian Proverb", 90 "Believe you can and you're halfway there.#Theodore Roosevelt", 91 "Everything you can imagine is real.#Pablo Picasso", 92 "Do what you can, where you are, with what you have.#Teddy Roosevelt", 93 "Fallback down seven times, stand up eight.#Japanese Proverb", 94 "There are no traffic jams along the extra mile.#Roger Staubach", 95 "Dream big and dare to fail.#Norman Vaughan", 96 "You must be the change you wish to see in the world.#Mahatma Gandhi", 97 "It's not what happens to you, but how you react to it that matters.#Epictetus", 98 "To live is the rarest thing in the world. Most people exist, that is all.#Oscar Wilde", 99 "That it will never come again is what makes life so sweet.#Emily Dickinson", 100 "It is never too late to be what you might have been.#George Eliot", 101 "Pain is inevitable. Suffering is optional.#Haruki Murakami", 102 "All the world's a stage, and all the men and women merely players.#William Shakespeare", 103 "Be kind, for everyone you meet is fighting a hard battle.#Plato", 104 "If you tell the truth, you don't have to remember anything.#Mark Twain", 105 "A room without books is like a body without a soul.#Marcus Tullius Cicero", 106 "You only live once, but if you do it right, once is enough.#Mae West", 107 "Be yourself; everyone else is already taken.#Oscar Wilde", 108 "Well done is better than well said.#Benjamin Franklin", 109 "It always seems impossible until it's done.#Nelson Mandela", 110 "Don't judge each day by the harvest you reap but by the seeds that you plant.#Robert Louis Stevenson", 111 "Write it on your heart that every day is the best day in the year.#Ralph Waldo Emerson", 112 "Every moment is a fresh beginning.#T.S. Eliot", 113 "Never regret anything that made you smile.#Mark Twain", 114 "Everything has beauty, but not everyone sees it.#Confucius", 115 "Simplicity is the ultimate sophistication.#Leonardo da Vinci", 116 "Whatever you are, be a good one.#Abraham Lincoln", 117 "If you want to be happy, be.#Leo Tolstoy", 118 "The time is always right to do what is right.#Martin Luther King, Jr.", 119 "May you live every day of your life.#Jonathan Swift", 120 "Change the world by being yourself.#Amy Poehler", 121 "Tough times never last but tough people do.#Robert H. Schuller", 122 "No pressure, no diamonds.#Thomas Carlyle", 123 "Don't wait. The time will never be just right.#Napoleon Hill", 124 "If you dream it, you can do it.#Walt Disney", 125 "Wherever you go, go with all your heart.#Confucius", 126 "Turn your wounds into wisdom.#Oprah Winfrey", 127 "Do what is right, not what is easy nor what is popular.#Roy T. Bennett", 128 "Dream without fear, love without limits.#Dilip Bathija", 129 "Hope is a waking dream.#Aristotle", 130 "There is no substitute for hard work.#Thomas Edison", 131 "Normality is a paved road: It's comfortable to walk, but no flowers grow on it.#Vincent van Gogh", 132 "What we think, we become.#Buddha", 133 "Let the beauty of what you love be what you do.#Rumi" 106 134 ); 107 135 } else { … … 109 137 $quotes = array_values($quotes); 110 138 } 111 112 if (empty($quotes)) { 113 return ''; 114 } 115 116 $picked = $quotes[rand(0, count($quotes) - 1)]; 117 $picked_parts = explode('#', $picked); 118 119 $quote_text = isset($picked_parts[0]) ? trim($picked_parts[0]) : ''; 120 $quote_author = isset($picked_parts[1]) ? trim($picked_parts[1]) : 'Unknown'; 121 139 return $quotes; 140 } 141 142 function idquotes_render_single_quote($quote_text, $quote_author, $layout) { 122 143 $output = ''; 123 124 switch ($atts['layout']) { 144 switch ($layout) { 125 145 case 'modern': 126 146 $output .= '<div class="idquotes-layout-modern">'; … … 133 153 $output .= '<div class="idquotes-layout-minimal">'; 134 154 $output .= '<span class="idquotes-minimal-quote">“' . esc_html($quote_text) . '”</span>'; 135 $output .= '<span class="idquotes-minimal-author"> —' . esc_html($quote_author) . '</span>';155 $output .= '<span class="idquotes-minimal-author">' . esc_html($quote_author) . '</span>'; 136 156 $output .= '</div>'; 137 157 break; … … 140 160 $output .= '<div class="idquotes-layout-card">'; 141 161 $output .= '<div class="idquotes-card-content">' . esc_html($quote_text) . '</div>'; 142 $output .= '<div class="idquotes-card-author"> ∼' . esc_html($quote_author) . '</div>';162 $output .= '<div class="idquotes-card-author">' . esc_html($quote_author) . '</div>'; 143 163 $output .= '</div>'; 144 164 break; … … 173 193 break; 174 194 195 case 'elegant-serif': 196 $output .= '<div class="idquotes-layout-elegant-serif">'; 197 $output .= '<span class="idquotes-elegant-serif-quote">' . esc_html($quote_text) . '</span>'; 198 $output .= '<span class="idquotes-elegant-serif-author">' . esc_html($quote_author) . '</span>'; 199 $output .= '</div>'; 200 break; 201 202 case 'neon-glow': 203 $output .= '<div class="idquotes-layout-neon-glow">'; 204 $output .= '<span class="idquotes-neon-glow-quote">' . esc_html($quote_text) . '</span>'; 205 $output .= '<span class="idquotes-neon-glow-author">' . esc_html($quote_author) . '</span>'; 206 $output .= '</div>'; 207 break; 208 209 case 'paper-note': 210 $output .= '<div class="idquotes-layout-paper-note">'; 211 $output .= '<span class="idquotes-paper-note-quote">' . esc_html($quote_text) . '</span>'; 212 $output .= '<span class="idquotes-paper-note-author">' . esc_html($quote_author) . '</span>'; 213 $output .= '</div>'; 214 break; 215 216 case 'brutalist': 217 $output .= '<div class="idquotes-layout-brutalist">'; 218 $output .= '<span class="idquotes-brutalist-quote">' . esc_html($quote_text) . '</span>'; 219 $output .= '<span class="idquotes-brutalist-author">' . esc_html($quote_author) . '</span>'; 220 $output .= '</div>'; 221 break; 222 223 case 'typewriter': 224 $output .= '<div class="idquotes-layout-typewriter">'; 225 $output .= '<span class="idquotes-typewriter-quote">' . esc_html($quote_text) . '</span>'; 226 $output .= '<span class="idquotes-typewriter-author">' . esc_html($quote_author) . '</span>'; 227 $output .= '</div>'; 228 break; 229 230 case 'floating-shadow': 231 $output .= '<div class="idquotes-layout-floating-shadow">'; 232 $output .= '<span class="idquotes-floating-shadow-quote">' . esc_html($quote_text) . '</span>'; 233 $output .= '<span class="idquotes-floating-shadow-author">' . esc_html($quote_author) . '</span>'; 234 $output .= '</div>'; 235 break; 236 237 case 'cyber-punk': 238 $output .= '<div class="idquotes-layout-cyber-punk">'; 239 $output .= '<span class="idquotes-cyber-punk-quote">' . esc_html($quote_text) . '</span>'; 240 $output .= '<span class="idquotes-cyber-punk-author">' . esc_html($quote_author) . '</span>'; 241 $output .= '</div>'; 242 break; 243 244 case 'retro-wave': 245 $output .= '<div class="idquotes-layout-retro-wave">'; 246 $output .= '<span class="idquotes-retro-wave-quote">' . esc_html($quote_text) . '</span>'; 247 $output .= '<span class="idquotes-retro-wave-author">' . esc_html($quote_author) . '</span>'; 248 $output .= '</div>'; 249 break; 250 175 251 default: // classic 176 252 $output .= '<div class="idquotes-warp">'; … … 180 256 break; 181 257 } 182 183 258 return $output; 184 259 } 260 261 function idquotes_shortcode($atts) { 262 $atts = shortcode_atts( 263 array('layout' => 'classic'), 264 $atts, 265 'id_popular_quotes' 266 ); 267 268 $quotes = idquotes_get_structured_quotes(); 269 if (empty($quotes)) return ''; 270 271 $picked = $quotes[rand(0, count($quotes) - 1)]; 272 $picked_parts = explode('#', $picked); 273 274 $quote_text = isset($picked_parts[0]) ? trim($picked_parts[0]) : ''; 275 $quote_author = isset($picked_parts[1]) ? trim($picked_parts[1]) : 'Unknown'; 276 277 return idquotes_render_single_quote($quote_text, $quote_author, $atts['layout']); 278 } 185 279 add_shortcode('id_popular_quotes', 'idquotes_shortcode'); 280 281 function idquotes_carousel_shortcode($atts) { 282 $atts = shortcode_atts( 283 array('layout' => 'classic', 'speed' => '10'), 284 $atts, 285 'id_popular_quotes_carousel' 286 ); 287 288 $quotes = idquotes_get_structured_quotes(); 289 if (empty($quotes)) return ''; 290 291 shuffle($quotes); 292 $max_quotes = count($quotes); 293 294 $carousel_id = 'idq-carousel-' . wp_rand(1000, 9999); 295 $speed_ms = intval($atts['speed']) * 1000; 296 if ($speed_ms < 2000) $speed_ms = 10000; 297 298 $output = '<div id="' . esc_attr($carousel_id) . '" class="idq-carousel-container">'; 299 300 for ($i = 0; $i < $max_quotes; $i++) { 301 $picked_parts = explode('#', $quotes[$i]); 302 $quote_text = isset($picked_parts[0]) ? trim($picked_parts[0]) : ''; 303 $quote_author = isset($picked_parts[1]) ? trim($picked_parts[1]) : 'Unknown'; 304 305 $active_class = $i === 0 ? ' idq-carousel-active' : ''; 306 $output .= '<div class="idq-carousel-slide' . $active_class . '">'; 307 $output .= idquotes_render_single_quote($quote_text, $quote_author, $atts['layout']); 308 $output .= '</div>'; 309 } 310 311 $output .= '</div>'; 312 313 $output .= '<style> 314 #' . $carousel_id . ' { display: grid; align-items: center; } 315 #' . $carousel_id . ' .idq-carousel-slide { 316 grid-area: 1 / 1; 317 opacity: 0; 318 visibility: hidden; 319 transition: opacity 1.5s ease-in-out, visibility 1.5s ease-in-out; 320 pointer-events: none; 321 z-index: 1; 322 } 323 #' . $carousel_id . ' .idq-carousel-slide.idq-carousel-active { 324 opacity: 1; 325 visibility: visible; 326 pointer-events: auto; 327 z-index: 2; 328 } 329 </style>'; 330 331 $output .= '<script> 332 document.addEventListener("DOMContentLoaded", function() { 333 var container = document.getElementById("' . $carousel_id . '"); 334 if(!container) return; 335 var slides = container.querySelectorAll(".idq-carousel-slide"); 336 if(slides.length <= 1) return; 337 var current = 0; 338 setInterval(function() { 339 slides[current].classList.remove("idq-carousel-active"); 340 current = (current + 1) % slides.length; 341 slides[current].classList.add("idq-carousel-active"); 342 }, ' . $speed_ms . '); 343 }); 344 </script>'; 345 346 return $output; 347 } 348 add_shortcode('id_popular_quotes_carousel', 'idquotes_carousel_shortcode'); 186 349 187 350 // --- ADMIN SETTINGS PAGE --- … … 230 393 .idq-dashboard { 231 394 display: grid; 232 grid-template-columns: 1fr 420px;395 grid-template-columns: 420px 1fr; 233 396 gap: 30px; 234 max-width: 1 400px;397 max-width: 1500px; 235 398 } 236 399 … … 320 483 .idq-quick-add { 321 484 display: grid; 322 grid-template-columns: 1fr 200px 140px; 323 gap: 15px; 324 background: #f8fafc; 325 padding: 20px; 326 border-radius: 16px; 327 border: 1px solid #e2e8f0; 485 grid-template-columns: 1fr; 486 gap: 16px; 487 background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%); 488 padding: 24px; 489 border-radius: 20px; 490 border: 1px solid rgba(255, 255, 255, 0.8); 491 box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), inset 0 0 0 1px rgba(226, 232, 240, 0.5); 328 492 margin-bottom: 25px; 329 } 330 331 @media (max-width: 600px) { 332 .idq-quick-add { grid-template-columns: 1fr; } 493 position: relative; 494 overflow: hidden; 495 } 496 .idq-quick-add::before { 497 content: ''; 498 position: absolute; 499 top: 0; left: 0; width: 100%; height: 4px; 500 background: linear-gradient(90deg, #8b5cf6, #ec4899); 333 501 } 334 502 335 503 .idq-input { 336 504 width: 100%; 337 border: 2px solid #e2e8f0; 505 background: #ffffff; 506 border: 2px solid transparent; 338 507 border-radius: 12px; 339 padding: 1 2px 16px;508 padding: 14px 18px; 340 509 font-size: 15px; 341 510 outline: none; 342 transition: border-color 0.2s; 343 } 344 .idq-input:focus { border-color: #8b5cf6; } 511 box-shadow: 0 2px 5px rgba(0,0,0,0.02), inset 0 0 0 1px #e2e8f0; 512 transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 513 } 514 .idq-input:focus { 515 border-color: transparent; 516 box-shadow: 0 4px 12px rgba(139, 92, 246, 0.15), inset 0 0 0 2px #8b5cf6; 517 transform: translateY(-1px); 518 } 519 .idq-input::placeholder { color: #94a3b8; } 345 520 346 521 .idq-add-btn { 347 background: #8b5cf6;522 background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%); 348 523 color: white; 349 524 border: none; 350 525 border-radius: 12px; 526 padding: 14px; 527 font-size: 15px; 351 528 font-weight: 600; 352 529 cursor: pointer; 353 transition: transform 0.2s, background 0.2s; 354 } 355 .idq-add-btn:hover { background: #7c3aed; transform: translateY(-1px); } 530 box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3); 531 transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 532 } 533 .idq-add-btn:hover { 534 transform: translateY(-2px); 535 box-shadow: 0 8px 16px rgba(124, 58, 237, 0.4); 536 background: linear-gradient(135deg, #9333ea 0%, #6d28d9 100%); 537 } 538 .idq-add-btn:active { transform: translateY(0); box-shadow: 0 2px 4px rgba(124, 58, 237, 0.3); } 356 539 357 540 /* Form Table & Textarea */ 358 541 .idq-textarea { 359 542 width: 100%; 360 border: 2px solid #e2e8f0;361 border-radius: 16px;362 padding: 2 0px;543 border: 2px solid transparent; 544 border-radius: 20px; 545 padding: 24px; 363 546 font-size: 15px; 364 font-family: ui-monospace, monospace; 365 background-color: #f8fafc; 547 font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; 548 background-color: #ffffff; 549 color: #334155; 366 550 resize: vertical; 367 min-height: 200px; 368 transition: all 0.3s; 369 } 370 .idq-textarea:focus { border-color: #8b5cf6; background: white; } 551 min-height: 250px; 552 box-shadow: 0 10px 25px -5px rgba(0,0,0,0.05), inset 0 0 0 1px #e2e8f0; 553 transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 554 line-height: 1.6; 555 } 556 .idq-textarea:focus { 557 border-color: transparent; 558 box-shadow: 0 8px 16px rgba(139, 92, 246, 0.1), inset 0 0 0 2px #8b5cf6; 559 outline: none; 560 } 371 561 372 562 /* Layout Previews */ 373 563 .idq-preview-grid { 564 display: grid; 565 grid-template-columns: repeat(2, 1fr); 566 gap: 35px; 567 } 568 569 @media (max-width: 800px) { 570 .idq-preview-grid { 571 grid-template-columns: 1fr; 572 } 573 } 574 575 .idq-preview-item { 576 border: 1px solid #e2e8f0; 577 border-radius: 12px; 578 padding: 20px; 579 background: #ffffff; 580 box-shadow: 0 2px 4px rgba(0,0,0,0.02); 581 transition: border-color 0.2s, box-shadow 0.2s; 582 } 583 584 .idq-preview-item:hover { 585 border-color: #cbd5e1; 586 box-shadow: 0 4px 6px rgba(0,0,0,0.04); 587 } 588 589 .idq-preview-header { 374 590 display: flex; 375 591 flex-direction: column; 376 gap: 20px; 377 } 378 379 .idq-preview-header { 380 display: flex; 381 justify-content: space-between; 382 align-items: center; 383 margin-bottom: 10px; 592 align-items: flex-start; 593 gap: 12px; 594 margin-bottom: 15px; 384 595 border-bottom: 1px solid #f1f5f9; 385 padding-bottom: 8px;596 padding-bottom: 15px; 386 597 } 387 598 … … 400 611 position: relative; 401 612 } 613 white-space: nowrap; 402 614 403 615 .idq-copy-shortcode:hover { … … 560 772 561 773 <div class="idq-shortcode-preview" style="background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 12px; padding: 15px; text-align: center; margin-bottom: 25px;"> 562 <span class="idq-copy-shortcode" style="font-size: 15px; padding: 8px 15px;">[id_popular_quotes]</span> 563 <p style="margin: 8px 0 0 0; font-size: 12px; color: #64748b;">Generic shortcode (uses default layout)</p> 564 </div> 774 <div style="display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 12px;"> 775 <div style="display: flex; align-items: center; gap: 8px; flex-wrap: wrap;"><span style="font-size: 11px; color: #64748b; font-weight: 600; text-transform: uppercase; white-space: nowrap;">Random Quote:</span><span class="idq-copy-shortcode" style="font-size: 12px; padding: 5px 10px;" title="Standard random quote">[id_popular_quotes]</span></div> 776 <div style="display: flex; align-items: center; gap: 8px; flex-wrap: wrap;"><span style="font-size: 11px; color: #64748b; font-weight: 600; text-transform: uppercase; white-space: nowrap;">Carousel Quote:</span><span class="idq-copy-shortcode" style="font-size: 12px; padding: 5px 10px;" title="Auto-fading carousel">[id_popular_quotes_carousel]</span></div> 777 </div> 778 <p style="margin: 0; font-size: 13px; color: #64748b;">Click a shortcode above to copy it to your clipboard.</p> 779 </div> 565 780 566 781 <div class="idq-preview-grid"> … … 568 783 <div class="idq-preview-header"> 569 784 <strong>Classic</strong> 570 <span class="idq-copy-shortcode">[id_popular_quotes layout="classic"]</span> 785 <div style="display: flex; flex-direction: column; gap: 6px; align-items: flex-start;"> 786 <div style="display: flex; align-items: center; gap: 8px; flex-wrap: wrap;"> 787 <span style="font-size: 11px; color: #64748b; font-weight: 600; text-transform: uppercase; white-space: nowrap;">Random Quote:</span> 788 <span class="idq-copy-shortcode" style="font-size: 11.5px; padding: 4px 8px;" title="Copy Standard Quote">[id_popular_quotes layout="classic"]</span> 789 </div> 790 <div style="display: flex; align-items: center; gap: 8px; flex-wrap: wrap;"> 791 <span style="font-size: 11px; color: #64748b; font-weight: 600; text-transform: uppercase; white-space: nowrap;">Carousel Quote:</span> 792 <span class="idq-copy-shortcode" style="font-size: 11.5px; padding: 4px 8px;" title="Copy Fade Carousel">[id_popular_quotes_carousel layout="classic"]</span> 793 </div> 794 </div> 571 795 </div> 572 796 <div class="idq-preview-box"> … … 581 805 <div class="idq-preview-header"> 582 806 <strong>Modern Blockquote</strong> 583 <span class="idq-copy-shortcode">[id_popular_quotes layout="modern"]</span> 807 <div style="display: flex; flex-direction: column; gap: 6px; align-items: flex-start;"> 808 <div style="display: flex; align-items: center; gap: 8px; flex-wrap: wrap;"> 809 <span style="font-size: 11px; color: #64748b; font-weight: 600; text-transform: uppercase; white-space: nowrap;">Random Quote:</span> 810 <span class="idq-copy-shortcode" style="font-size: 11.5px; padding: 4px 8px;" title="Copy Standard Quote">[id_popular_quotes layout="modern"]</span> 811 </div> 812 <div style="display: flex; align-items: center; gap: 8px; flex-wrap: wrap;"> 813 <span style="font-size: 11px; color: #64748b; font-weight: 600; text-transform: uppercase; white-space: nowrap;">Carousel Quote:</span> 814 <span class="idq-copy-shortcode" style="font-size: 11.5px; padding: 4px 8px;" title="Copy Fade Carousel">[id_popular_quotes_carousel layout="modern"]</span> 815 </div> 816 </div> 584 817 </div> 585 818 <div class="idq-preview-box"> … … 594 827 <div class="idq-preview-header"> 595 828 <strong>Minimalist</strong> 596 <span class="idq-copy-shortcode">[id_popular_quotes layout="minimal"]</span> 829 <div style="display: flex; flex-direction: column; gap: 6px; align-items: flex-start;"> 830 <div style="display: flex; align-items: center; gap: 8px; flex-wrap: wrap;"> 831 <span style="font-size: 11px; color: #64748b; font-weight: 600; text-transform: uppercase; white-space: nowrap;">Random Quote:</span> 832 <span class="idq-copy-shortcode" style="font-size: 11.5px; padding: 4px 8px;" title="Copy Standard Quote">[id_popular_quotes layout="minimal"]</span> 833 </div> 834 <div style="display: flex; align-items: center; gap: 8px; flex-wrap: wrap;"> 835 <span style="font-size: 11px; color: #64748b; font-weight: 600; text-transform: uppercase; white-space: nowrap;">Carousel Quote:</span> 836 <span class="idq-copy-shortcode" style="font-size: 11.5px; padding: 4px 8px;" title="Copy Fade Carousel">[id_popular_quotes_carousel layout="minimal"]</span> 837 </div> 838 </div> 597 839 </div> 598 840 <div class="idq-preview-box"> 599 841 <div class="idquotes-layout-minimal"> 600 842 <span class="idquotes-minimal-quote">“<?php echo esc_html($sample_quote); ?>”</span> 601 <span class="idquotes-minimal-author"> —<?php echo esc_html($sample_author); ?></span>843 <span class="idquotes-minimal-author"><?php echo esc_html($sample_author); ?></span> 602 844 </div> 603 845 </div> … … 607 849 <div class="idq-preview-header"> 608 850 <strong>Vibrant Card</strong> 609 <span class="idq-copy-shortcode">[id_popular_quotes layout="card"]</span> 851 <div style="display: flex; flex-direction: column; gap: 6px; align-items: flex-start;"> 852 <div style="display: flex; align-items: center; gap: 8px; flex-wrap: wrap;"> 853 <span style="font-size: 11px; color: #64748b; font-weight: 600; text-transform: uppercase; white-space: nowrap;">Random Quote:</span> 854 <span class="idq-copy-shortcode" style="font-size: 11.5px; padding: 4px 8px;" title="Copy Standard Quote">[id_popular_quotes layout="card"]</span> 855 </div> 856 <div style="display: flex; align-items: center; gap: 8px; flex-wrap: wrap;"> 857 <span style="font-size: 11px; color: #64748b; font-weight: 600; text-transform: uppercase; white-space: nowrap;">Carousel Quote:</span> 858 <span class="idq-copy-shortcode" style="font-size: 11.5px; padding: 4px 8px;" title="Copy Fade Carousel">[id_popular_quotes_carousel layout="card"]</span> 859 </div> 860 </div> 610 861 </div> 611 862 <div class="idq-preview-box"> 612 863 <div class="idquotes-layout-card"> 613 864 <div class="idquotes-card-content"><?php echo esc_html($sample_quote); ?></div> 614 <div class="idquotes-card-author"> ∼<?php echo esc_html($sample_author); ?></div>865 <div class="idquotes-card-author"><?php echo esc_html($sample_author); ?></div> 615 866 </div> 616 867 </div> … … 620 871 <div class="idq-preview-header"> 621 872 <strong>Glassmorphism</strong> 622 <span class="idq-copy-shortcode">[id_popular_quotes layout="glass"]</span> 873 <div style="display: flex; flex-direction: column; gap: 6px; align-items: flex-start;"> 874 <div style="display: flex; align-items: center; gap: 8px; flex-wrap: wrap;"> 875 <span style="font-size: 11px; color: #64748b; font-weight: 600; text-transform: uppercase; white-space: nowrap;">Random Quote:</span> 876 <span class="idq-copy-shortcode" style="font-size: 11.5px; padding: 4px 8px;" title="Copy Standard Quote">[id_popular_quotes layout="glass"]</span> 877 </div> 878 <div style="display: flex; align-items: center; gap: 8px; flex-wrap: wrap;"> 879 <span style="font-size: 11px; color: #64748b; font-weight: 600; text-transform: uppercase; white-space: nowrap;">Carousel Quote:</span> 880 <span class="idq-copy-shortcode" style="font-size: 11.5px; padding: 4px 8px;" title="Copy Fade Carousel">[id_popular_quotes_carousel layout="glass"]</span> 881 </div> 882 </div> 623 883 </div> 624 884 <div class="idq-preview-box"> … … 633 893 <div class="idq-preview-header"> 634 894 <strong>Gradient Border</strong> 635 <span class="idq-copy-shortcode">[id_popular_quotes layout="gradient-border"]</span> 895 <div style="display: flex; flex-direction: column; gap: 6px; align-items: flex-start;"> 896 <div style="display: flex; align-items: center; gap: 8px; flex-wrap: wrap;"> 897 <span style="font-size: 11px; color: #64748b; font-weight: 600; text-transform: uppercase; white-space: nowrap;">Random Quote:</span> 898 <span class="idq-copy-shortcode" style="font-size: 11.5px; padding: 4px 8px;" title="Copy Standard Quote">[id_popular_quotes layout="gradient-border"]</span> 899 </div> 900 <div style="display: flex; align-items: center; gap: 8px; flex-wrap: wrap;"> 901 <span style="font-size: 11px; color: #64748b; font-weight: 600; text-transform: uppercase; white-space: nowrap;">Carousel Quote:</span> 902 <span class="idq-copy-shortcode" style="font-size: 11.5px; padding: 4px 8px;" title="Copy Fade Carousel">[id_popular_quotes_carousel layout="gradient-border"]</span> 903 </div> 904 </div> 636 905 </div> 637 906 <div class="idq-preview-box"> … … 648 917 <div class="idq-preview-header"> 649 918 <strong>Dark Sleek</strong> 650 <span class="idq-copy-shortcode">[id_popular_quotes layout="dark-sleek"]</span> 919 <div style="display: flex; flex-direction: column; gap: 6px; align-items: flex-start;"> 920 <div style="display: flex; align-items: center; gap: 8px; flex-wrap: wrap;"> 921 <span style="font-size: 11px; color: #64748b; font-weight: 600; text-transform: uppercase; white-space: nowrap;">Random Quote:</span> 922 <span class="idq-copy-shortcode" style="font-size: 11.5px; padding: 4px 8px;" title="Copy Standard Quote">[id_popular_quotes layout="dark-sleek"]</span> 923 </div> 924 <div style="display: flex; align-items: center; gap: 8px; flex-wrap: wrap;"> 925 <span style="font-size: 11px; color: #64748b; font-weight: 600; text-transform: uppercase; white-space: nowrap;">Carousel Quote:</span> 926 <span class="idq-copy-shortcode" style="font-size: 11.5px; padding: 4px 8px;" title="Copy Fade Carousel">[id_popular_quotes_carousel layout="dark-sleek"]</span> 927 </div> 928 </div> 651 929 </div> 652 930 <div class="idq-preview-box"> … … 661 939 <div class="idq-preview-header"> 662 940 <strong>Quote Bubble</strong> 663 <span class="idq-copy-shortcode">[id_popular_quotes layout="bubble"]</span> 941 <div style="display: flex; flex-direction: column; gap: 6px; align-items: flex-start;"> 942 <div style="display: flex; align-items: center; gap: 8px; flex-wrap: wrap;"> 943 <span style="font-size: 11px; color: #64748b; font-weight: 600; text-transform: uppercase; white-space: nowrap;">Random Quote:</span> 944 <span class="idq-copy-shortcode" style="font-size: 11.5px; padding: 4px 8px;" title="Copy Standard Quote">[id_popular_quotes layout="bubble"]</span> 945 </div> 946 <div style="display: flex; align-items: center; gap: 8px; flex-wrap: wrap;"> 947 <span style="font-size: 11px; color: #64748b; font-weight: 600; text-transform: uppercase; white-space: nowrap;">Carousel Quote:</span> 948 <span class="idq-copy-shortcode" style="font-size: 11.5px; padding: 4px 8px;" title="Copy Fade Carousel">[id_popular_quotes_carousel layout="bubble"]</span> 949 </div> 950 </div> 664 951 </div> 665 952 <div class="idq-preview-box"> … … 667 954 <span class="idquotes-bubble-quote"><?php echo esc_html($sample_quote); ?></span> 668 955 <span class="idquotes-bubble-author"><?php echo esc_html($sample_author); ?></span> 956 </div> 957 </div> 958 </div> 959 960 <div class="idq-preview-item"> 961 <div class="idq-preview-header"> 962 <strong>Elegant Serif</strong> 963 <div style="display: flex; flex-direction: column; gap: 6px; align-items: flex-start;"> 964 <div style="display: flex; align-items: center; gap: 8px; flex-wrap: wrap;"> 965 <span style="font-size: 11px; color: #64748b; font-weight: 600; text-transform: uppercase; white-space: nowrap;">Random Quote:</span> 966 <span class="idq-copy-shortcode" style="font-size: 11.5px; padding: 4px 8px;" title="Copy Standard Quote">[id_popular_quotes layout="elegant-serif"]</span> 967 </div> 968 <div style="display: flex; align-items: center; gap: 8px; flex-wrap: wrap;"> 969 <span style="font-size: 11px; color: #64748b; font-weight: 600; text-transform: uppercase; white-space: nowrap;">Carousel Quote:</span> 970 <span class="idq-copy-shortcode" style="font-size: 11.5px; padding: 4px 8px;" title="Copy Fade Carousel">[id_popular_quotes_carousel layout="elegant-serif"]</span> 971 </div> 972 </div> 973 </div> 974 <div class="idq-preview-box"> 975 <div class="idquotes-layout-elegant-serif"> 976 <span class="idquotes-elegant-serif-quote"><?php echo esc_html($sample_quote); ?></span> 977 <span class="idquotes-elegant-serif-author"><?php echo esc_html($sample_author); ?></span> 978 </div> 979 </div> 980 </div> 981 982 <div class="idq-preview-item"> 983 <div class="idq-preview-header"> 984 <strong>Neon Glow</strong> 985 <div style="display: flex; flex-direction: column; gap: 6px; align-items: flex-start;"> 986 <div style="display: flex; align-items: center; gap: 8px; flex-wrap: wrap;"> 987 <span style="font-size: 11px; color: #64748b; font-weight: 600; text-transform: uppercase; white-space: nowrap;">Random Quote:</span> 988 <span class="idq-copy-shortcode" style="font-size: 11.5px; padding: 4px 8px;" title="Copy Standard Quote">[id_popular_quotes layout="neon-glow"]</span> 989 </div> 990 <div style="display: flex; align-items: center; gap: 8px; flex-wrap: wrap;"> 991 <span style="font-size: 11px; color: #64748b; font-weight: 600; text-transform: uppercase; white-space: nowrap;">Carousel Quote:</span> 992 <span class="idq-copy-shortcode" style="font-size: 11.5px; padding: 4px 8px;" title="Copy Fade Carousel">[id_popular_quotes_carousel layout="neon-glow"]</span> 993 </div> 994 </div> 995 </div> 996 <div class="idq-preview-box"> 997 <div class="idquotes-layout-neon-glow"> 998 <span class="idquotes-neon-glow-quote"><?php echo esc_html($sample_quote); ?></span> 999 <span class="idquotes-neon-glow-author"><?php echo esc_html($sample_author); ?></span> 1000 </div> 1001 </div> 1002 </div> 1003 1004 <div class="idq-preview-item"> 1005 <div class="idq-preview-header"> 1006 <strong>Paper Note</strong> 1007 <div style="display: flex; flex-direction: column; gap: 6px; align-items: flex-start;"> 1008 <div style="display: flex; align-items: center; gap: 8px; flex-wrap: wrap;"> 1009 <span style="font-size: 11px; color: #64748b; font-weight: 600; text-transform: uppercase; white-space: nowrap;">Random Quote:</span> 1010 <span class="idq-copy-shortcode" style="font-size: 11.5px; padding: 4px 8px;" title="Copy Standard Quote">[id_popular_quotes layout="paper-note"]</span> 1011 </div> 1012 <div style="display: flex; align-items: center; gap: 8px; flex-wrap: wrap;"> 1013 <span style="font-size: 11px; color: #64748b; font-weight: 600; text-transform: uppercase; white-space: nowrap;">Carousel Quote:</span> 1014 <span class="idq-copy-shortcode" style="font-size: 11.5px; padding: 4px 8px;" title="Copy Fade Carousel">[id_popular_quotes_carousel layout="paper-note"]</span> 1015 </div> 1016 </div> 1017 </div> 1018 <div class="idq-preview-box"> 1019 <div class="idquotes-layout-paper-note"> 1020 <span class="idquotes-paper-note-quote"><?php echo esc_html($sample_quote); ?></span> 1021 <span class="idquotes-paper-note-author"><?php echo esc_html($sample_author); ?></span> 1022 </div> 1023 </div> 1024 </div> 1025 1026 <div class="idq-preview-item"> 1027 <div class="idq-preview-header"> 1028 <strong>Brutalist</strong> 1029 <div style="display: flex; flex-direction: column; gap: 6px; align-items: flex-start;"> 1030 <div style="display: flex; align-items: center; gap: 8px; flex-wrap: wrap;"> 1031 <span style="font-size: 11px; color: #64748b; font-weight: 600; text-transform: uppercase; white-space: nowrap;">Random Quote:</span> 1032 <span class="idq-copy-shortcode" style="font-size: 11.5px; padding: 4px 8px;" title="Copy Standard Quote">[id_popular_quotes layout="brutalist"]</span> 1033 </div> 1034 <div style="display: flex; align-items: center; gap: 8px; flex-wrap: wrap;"> 1035 <span style="font-size: 11px; color: #64748b; font-weight: 600; text-transform: uppercase; white-space: nowrap;">Carousel Quote:</span> 1036 <span class="idq-copy-shortcode" style="font-size: 11.5px; padding: 4px 8px;" title="Copy Fade Carousel">[id_popular_quotes_carousel layout="brutalist"]</span> 1037 </div> 1038 </div> 1039 </div> 1040 <div class="idq-preview-box"> 1041 <div class="idquotes-layout-brutalist"> 1042 <span class="idquotes-brutalist-quote"><?php echo esc_html($sample_quote); ?></span> 1043 <span class="idquotes-brutalist-author"><?php echo esc_html($sample_author); ?></span> 1044 </div> 1045 </div> 1046 </div> 1047 1048 <div class="idq-preview-item"> 1049 <div class="idq-preview-header"> 1050 <strong>Typewriter</strong> 1051 <div style="display: flex; flex-direction: column; gap: 6px; align-items: flex-start;"> 1052 <div style="display: flex; align-items: center; gap: 8px; flex-wrap: wrap;"> 1053 <span style="font-size: 11px; color: #64748b; font-weight: 600; text-transform: uppercase; white-space: nowrap;">Random Quote:</span> 1054 <span class="idq-copy-shortcode" style="font-size: 11.5px; padding: 4px 8px;" title="Copy Standard Quote">[id_popular_quotes layout="typewriter"]</span> 1055 </div> 1056 <div style="display: flex; align-items: center; gap: 8px; flex-wrap: wrap;"> 1057 <span style="font-size: 11px; color: #64748b; font-weight: 600; text-transform: uppercase; white-space: nowrap;">Carousel Quote:</span> 1058 <span class="idq-copy-shortcode" style="font-size: 11.5px; padding: 4px 8px;" title="Copy Fade Carousel">[id_popular_quotes_carousel layout="typewriter"]</span> 1059 </div> 1060 </div> 1061 </div> 1062 <div class="idq-preview-box"> 1063 <div class="idquotes-layout-typewriter"> 1064 <span class="idquotes-typewriter-quote"><?php echo esc_html($sample_quote); ?></span> 1065 <span class="idquotes-typewriter-author"><?php echo esc_html($sample_author); ?></span> 1066 </div> 1067 </div> 1068 </div> 1069 1070 <div class="idq-preview-item"> 1071 <div class="idq-preview-header"> 1072 <strong>Floating Shadow</strong> 1073 <div style="display: flex; flex-direction: column; gap: 6px; align-items: flex-start;"> 1074 <div style="display: flex; align-items: center; gap: 8px; flex-wrap: wrap;"> 1075 <span style="font-size: 11px; color: #64748b; font-weight: 600; text-transform: uppercase; white-space: nowrap;">Random Quote:</span> 1076 <span class="idq-copy-shortcode" style="font-size: 11.5px; padding: 4px 8px;" title="Copy Standard Quote">[id_popular_quotes layout="floating-shadow"]</span> 1077 </div> 1078 <div style="display: flex; align-items: center; gap: 8px; flex-wrap: wrap;"> 1079 <span style="font-size: 11px; color: #64748b; font-weight: 600; text-transform: uppercase; white-space: nowrap;">Carousel Quote:</span> 1080 <span class="idq-copy-shortcode" style="font-size: 11.5px; padding: 4px 8px;" title="Copy Fade Carousel">[id_popular_quotes_carousel layout="floating-shadow"]</span> 1081 </div> 1082 </div> 1083 </div> 1084 <div class="idq-preview-box"> 1085 <div class="idquotes-layout-floating-shadow"> 1086 <span class="idquotes-floating-shadow-quote"><?php echo esc_html($sample_quote); ?></span> 1087 <span class="idquotes-floating-shadow-author"><?php echo esc_html($sample_author); ?></span> 1088 </div> 1089 </div> 1090 </div> 1091 1092 <div class="idq-preview-item"> 1093 <div class="idq-preview-header"> 1094 <strong>Cyber Punk</strong> 1095 <div style="display: flex; flex-direction: column; gap: 6px; align-items: flex-start;"> 1096 <div style="display: flex; align-items: center; gap: 8px; flex-wrap: wrap;"> 1097 <span style="font-size: 11px; color: #64748b; font-weight: 600; text-transform: uppercase; white-space: nowrap;">Random Quote:</span> 1098 <span class="idq-copy-shortcode" style="font-size: 11.5px; padding: 4px 8px;" title="Copy Standard Quote">[id_popular_quotes layout="cyber-punk"]</span> 1099 </div> 1100 <div style="display: flex; align-items: center; gap: 8px; flex-wrap: wrap;"> 1101 <span style="font-size: 11px; color: #64748b; font-weight: 600; text-transform: uppercase; white-space: nowrap;">Carousel Quote:</span> 1102 <span class="idq-copy-shortcode" style="font-size: 11.5px; padding: 4px 8px;" title="Copy Fade Carousel">[id_popular_quotes_carousel layout="cyber-punk"]</span> 1103 </div> 1104 </div> 1105 </div> 1106 <div class="idq-preview-box"> 1107 <div class="idquotes-layout-cyber-punk"> 1108 <span class="idquotes-cyber-punk-quote"><?php echo esc_html($sample_quote); ?></span> 1109 <span class="idquotes-cyber-punk-author"><?php echo esc_html($sample_author); ?></span> 1110 </div> 1111 </div> 1112 </div> 1113 1114 <div class="idq-preview-item"> 1115 <div class="idq-preview-header"> 1116 <strong>Retro Wave</strong> 1117 <div style="display: flex; flex-direction: column; gap: 6px; align-items: flex-start;"> 1118 <div style="display: flex; align-items: center; gap: 8px; flex-wrap: wrap;"> 1119 <span style="font-size: 11px; color: #64748b; font-weight: 600; text-transform: uppercase; white-space: nowrap;">Random Quote:</span> 1120 <span class="idq-copy-shortcode" style="font-size: 11.5px; padding: 4px 8px;" title="Copy Standard Quote">[id_popular_quotes layout="retro-wave"]</span> 1121 </div> 1122 <div style="display: flex; align-items: center; gap: 8px; flex-wrap: wrap;"> 1123 <span style="font-size: 11px; color: #64748b; font-weight: 600; text-transform: uppercase; white-space: nowrap;">Carousel Quote:</span> 1124 <span class="idq-copy-shortcode" style="font-size: 11.5px; padding: 4px 8px;" title="Copy Fade Carousel">[id_popular_quotes_carousel layout="retro-wave"]</span> 1125 </div> 1126 </div> 1127 </div> 1128 <div class="idq-preview-box"> 1129 <div class="idquotes-layout-retro-wave"> 1130 <span class="idquotes-retro-wave-quote"><?php echo esc_html($sample_quote); ?></span> 1131 <span class="idquotes-retro-wave-author"><?php echo esc_html($sample_author); ?></span> 669 1132 </div> 670 1133 </div> -
indesign-random-quotes/trunk/readme.txt
r3487390 r3487622 2 2 Contributors: indesignmedia 3 3 Donate link: https://indesignmedia.net/ 4 Tags: random, quote, quotes, random quotes, quote layout5 Requires at least: 1.04 Tags: random, quote, quotes, random quotes, quote carousel 5 Requires at least: 5.0 6 6 Tested up to: 6.9.4 7 7 Requires PHP: 7.3 8 Stable tag: 1. 28 Stable tag: 1.3 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html 11 11 12 A simple shortcode to display random quotes on your WordPress site, now with multiple layouts and a custom quotes manager!12 A beautiful shortcode toolkit to display random quotes or auto-fading carousels. Features 16 stunning design layouts and a custom Quote Studio! 13 13 14 14 == Description == 15 15 16 InDesign Random Quotes displays a random quote each time your site is loaded. 17 You can create and maintain the list of quotes directly from the new **ID Quotes** item in the main WordPress admin menu. If you don't add your own quotes, it defaults to a popular selection of quotes from around the globe. 16 InDesign Random Quotes allows you to effortlessly display beautiful, engaging quotes anywhere on your site. Choose between a vast, curated "Universal" collection of 100 popular global quotes or easily build your own "Manual" custom list using the Quote Studio dashboard. 18 17 19 It's easily installed and you just use a shortcode to display it randomly anywhere on your site.18 Whether you want to show a simple, elegant random quote that changes on every page load, or a modern, auto-fading slideshow carousel that cycles through your collection dynamically, this plugin has you covered with 16 stunning, professional design templates ready to use via simple shortcodes. 20 19 21 = Features:=20 = Key Features = 22 21 23 * Easy user install and display just by shortcode. 24 * **NEW:** Manage your own quotes natively from the dedicated **ID Quotes** menu in WordPress. 25 * **NEW:** Four built-in design layouts: Classic (default), Modern, Minimal, and Card. 22 * **16 Stunning Design Templates:** Choose from Classic, Modern Blockquote, Minimalist, Gradient Card, Glassmorphism, Gradient Border, Dark Sleek, Quote Bubble, Elegant Serif, Neon Glow, Paper Note, Brutalist, Typewriter, Floating Shadow, Cyber Punk, and Retro Wave. 23 * **Auto-Fading Carousel Module:** Display all of your quotes in a dynamic, smooth-fading slideshow cycle, perfectly embedded in any of the 16 layout themes! Customize the fade speed in seconds. 24 * **Random Quote Loader:** Simple and fast shortcode to pull and display a single random quote on every page load. 25 * **Dedicated Quote Studio Dashboard:** A beautiful new "ID Quotes" top-level admin menu lets you toggle between Universal and Manual modes, and view live, styling-accurate previews of all 16 layouts. 26 * **"Quick Add" Form:** Manually entering quotes is a breeze with our aesthetic, user-friendly "Quick Add" input fields for the quote text and author. 27 * **1-Click Shortcode Copy:** Instantly copy perfectly formatted shortcodes for any layout directly from the admin dashboard's live preview grid. 28 * **Clean Formatting:** Total control over author prefixes. Display your authors exactly how you type them without forced dashes or symbols. 29 30 = Standard Layout Usage = 31 32 You can customize the exact look and feel of your random quote using the `layout` attribute: 33 34 * **Classic (Default):** `[id_popular_quotes layout="classic"]` 35 * **Modern Blockquote:** `[id_popular_quotes layout="modern"]` 36 * **Minimalist:** `[id_popular_quotes layout="minimal"]` 37 * **Gradient Card:** `[id_popular_quotes layout="card"]` 38 * **Glassmorphism:** `[id_popular_quotes layout="glass"]` 39 * **Gradient Border:** `[id_popular_quotes layout="gradient-border"]` 40 * **Dark Sleek:** `[id_popular_quotes layout="dark-sleek"]` 41 * **Quote Bubble:** `[id_popular_quotes layout="bubble"]` 42 * **Elegant Serif:** `[id_popular_quotes layout="elegant-serif"]` 43 * **Neon Glow:** `[id_popular_quotes layout="neon-glow"]` 44 * **Paper Note:** `[id_popular_quotes layout="paper-note"]` 45 * **Brutalist:** `[id_popular_quotes layout="brutalist"]` 46 * **Typewriter:** `[id_popular_quotes layout="typewriter"]` 47 * **Floating Shadow:** `[id_popular_quotes layout="floating-shadow"]` 48 * **Cyber Punk:** `[id_popular_quotes layout="cyber-punk"]` 49 * **Retro Wave:** `[id_popular_quotes layout="retro-wave"]` 50 51 = Fade Carousel Usage = 52 53 Display your quotes in a beautiful auto-fading carousel using the new **[id_popular_quotes_carousel]** shortcode! The carousel randomly shuffles your entire quote collection and smoothly transitions between them. 54 55 * **Basic Carousel:** `[id_popular_quotes_carousel]` 56 * **Custom Speed:** Change the fade speed in seconds (default is 10). Example: `[id_popular_quotes_carousel layout="neon-glow" speed="15"]` 57 58 You can customize the carousel to use any of the 16 layouts: 59 60 * **Classic (Default):** `[id_popular_quotes_carousel layout="classic"]` 61 * **Modern Blockquote:** `[id_popular_quotes_carousel layout="modern"]` 62 * **Minimalist:** `[id_popular_quotes_carousel layout="minimal"]` 63 * **Gradient Card:** `[id_popular_quotes_carousel layout="card"]` 64 * **Glassmorphism:** `[id_popular_quotes_carousel layout="glass"]` 65 * **Gradient Border:** `[id_popular_quotes_carousel layout="gradient-border"]` 66 * **Dark Sleek:** `[id_popular_quotes_carousel layout="dark-sleek"]` 67 * **Quote Bubble:** `[id_popular_quotes_carousel layout="bubble"]` 68 * **Elegant Serif:** `[id_popular_quotes_carousel layout="elegant-serif"]` 69 * **Neon Glow:** `[id_popular_quotes_carousel layout="neon-glow"]` 70 * **Paper Note:** `[id_popular_quotes_carousel layout="paper-note"]` 71 * **Brutalist:** `[id_popular_quotes_carousel layout="brutalist"]` 72 * **Typewriter:** `[id_popular_quotes_carousel layout="typewriter"]` 73 * **Floating Shadow:** `[id_popular_quotes_carousel layout="floating-shadow"]` 74 * **Cyber Punk:** `[id_popular_quotes_carousel layout="cyber-punk"]` 75 * **Retro Wave:** `[id_popular_quotes_carousel layout="retro-wave"]` 26 76 27 77 == Installation == 28 78 29 Now requires PHP Version 7.3+30 31 = Installing the Plugin =32 79 1. Upload the folder `idquotes` to the `/wp-content/plugins` directory. 33 80 2. Activate the plugin through the 'Plugins' menu in WordPress. 34 81 3. Manage your custom quotes from the new **ID Quotes** item in the main admin menu. 35 4. Add the shortcode `[id_popular_quotes]` to any post, page, or widget to display a quote. 36 37 = Layout Usage = 38 You can customize the look and feel using the `layout` attribute: 39 40 * **Classic (Default):** `[id_popular_quotes]` or `[id_popular_quotes layout="classic"]` 41 * **Modern Blockquote:** `[id_popular_quotes layout="modern"]` 42 * **Minimalist:** `[id_popular_quotes layout="minimal"]` 43 * **Gradient Card:** `[id_popular_quotes layout="card"]` 82 4. Add the shortcode `[id_popular_quotes]` to display a single random quote, or use `[id_popular_quotes_carousel]` to display a fading slideshow of your quotes. 44 83 45 84 == Frequently Asked Questions == … … 50 89 == Screenshots == 51 90 52 1. Screenshot showing plugin directory 53 2. Screenshot showing shortcode usage with layouts 91 1. Screenshot showing plugin directory. 92 2. Screenshot showing shortcode usage with layouts. 54 93 55 94 == Changelog == 95 96 = 1.3 = 97 * **Feature:** Doubled the number of available layouts from 8 to 16, including gorgeous new themes like Elegant Serif, Cyber Punk, Floating Shadow, Neon Glow, and Retro Wave. 98 * **Feature:** Added the powerful all-new `[id_popular_quotes_carousel]` shortcode module to display an auto-fading, timed carousel cycle of your quotes using any layout! 99 * **Enhancement:** Major aesthetic upgrade to the Quote Studio dashboard with premium UI styling, responsive two-column grid, and stacked live preview items. 100 * **Enhancement:** Dedicated "1-Click Copy" shortcode variants for both Random and Carousel quotes directly on all 16 layouts in the Dashboard. 101 * **Enhancement:** "Quick Add" form UI for easy custom quote ingestion. 102 * **Enhancement:** Upgraded the built-in Universal Quotes collection to feature exactly 100 of the most powerful, globally recognized historical quotes. 103 * **Fix:** Completely eliminated forced hardcoded author name dashes across all CSS and PHP themes. 56 104 57 105 = 1.2 = 58 106 * **Enhancement:** Moved the ID Quotes settings panel to a dedicated top-level main menu item for quicker access. 59 107 * **Security:** Added text sanitization callbacks for settings storage, adhering strictly to WordPress security standards. 60 * **Compatibility:** Tested and confirmed fully compatible with WordPress 6.9.4.61 108 62 109 = 1.1 = 63 110 * **Feature:** Added a dedicated Admin Page (**ID Quotes** in the main menu) to easily manage and add custom quotes. 64 * **Feature:** Added new `layout` attributes to the shortcode to support multiple design styles : `classic`, `modern`, `minimal`, and `card`.111 * **Feature:** Added new `layout` attributes to the shortcode to support multiple design styles. 65 112 * **Fix/Improvement:** Updated shortcode to properly return output instead of echoing it, adhering to WordPress standards. 66 * **Backward Compatibility:** Ensured existing shortcode usage without layouts falls back to the exact classic design and works seamlessly.67 113 68 114 = 1.0 = 69 * Initial release 115 * Initial release. 70 116 71 117 == Upgrade Notice == 118 119 = 1.3 = 120 This is a massive feature drop! We've added 8 beautiful new layouts (bringing the total to 16), an upgraded built-in global collection of exactly 100 powerful quotes, a sleek overhauled UI "Quote Studio", and the highly anticipated auto-fading Carousel shortcode module! 72 121 73 122 = 1.2 = 74 The ID Quotes settings have moved! You will now find "ID Quotes" as a top-level menu item in your WordPress dashboard sidebar instead of nested under Settings.123 The ID Quotes settings have moved! You will now find "ID Quotes" as a top-level menu item in your WordPress dashboard. 75 124 76 125 = 1.1 = 77 Huge update! You can now manage your own quotes from the dedicated ID Quotes admin menu, and choose from multiple fresh, modern layouts using shortcode attributes. Updating to 1.1 is fully backward compatible with your current pages. 78 79 = 1.0 = 80 This is initial release of plugin for show popular random quotes 126 Huge update! You can now manage your own quotes from the dedicated ID Quotes admin menu, and choose from multiple fresh, modern layouts using shortcode attributes.
Note: See TracChangeset
for help on using the changeset viewer.