#WP REST API plugin
Explore tagged Tumblr posts
Text
Top 7 WordPress development tools for Developers (Free & Premium)

Gone are the days when WordPress was just a blogging platform. Today, it powers over 43% of all websites and supports everything from e-commerce to enterprise-grade web apps. With this evolution, the expectations from developers have also grown. This includes faster delivery, cleaner code, and seamless deployment.
Thatâs where the right WordPress development tools come in.
Whether youâre building high-performing themes, creating custom plugins, or delivering complete custom WordPress development service-based solutions, your toolkit determines your speed, accuracy, and stability. In this blog, weâve handpicked the top seven tools every developer must use to streamline workflows, minimize errors, and build modern custom WordPress website development projects confidently!
Why Choosing the Right Tools Matters?
Every experienced developer knows that writing code is just one part of the job. The tools you use directly impact your speed, efficiency, and code quality. In WordPress development, where tight deadlines and evolving client demands are common, choosing the right set of tools becomes non-negotiable.
Whether you're offering enterprise-grade WordPress development services or delivering lightweight custom WordPress solutions, the tools you choose can determine the long-term maintainability of the website.
Tool #1: WP-CLIâThe Command Line Powerhouse
For developers who prefer speed over clicks, WP-CLI is an essential tool. It allows you to manage WordPress installations directly from the command line, skipping the dashboard entirely. From installing plugins to creating users or updating the core, every action becomes faster and scriptable.
Agencies offering WordPress development services often use WP-CLI to automate setup processes across multiple projects. It shines in deployment pipelines and staging workflows where time and consistency are critical. You can even integrate it with shell scripts to perform bulk tasks like database search-replace or multisite management.
If efficiency is part of your coding DNA, WP-CLI deserves a permanent spot in your development toolkit.
Tool #2: Query MonitorâSee What WordPress Is Doing
When a WordPress site slows down or behaves unexpectedly, debugging without insight is like navigating in the dark. Query Monitor brings visibility into every layer of WordPress operations. It lets developers inspect database queries, PHP errors, REST API calls, and HTTP requests, all from within the admin dashboard.
This tool becomes indispensable when youâre troubleshooting performance issues, especially in large, data-heavy websites. Its real-time feedback helps you quickly trace the source of lag or failure, whether itâs a slow query or a plugin conflict.
Among all WordPress development tools, Query Monitor stands out for combining depth of analysis with ease of use. It turns guesswork into precision, which every serious developer needs.
Tool #3: Advanced Custom FieldsâAdd Power to Your Content Structure
Custom content demands flexibility beyond what the default WordPress setup offers. Advanced Custom Fields (ACF) empowers developers to create and manage complex field groups without touching the database directly. You can build structured layouts, custom post types, and unique backend interfaces tailored to specific project needs.
Whether you're building client dashboards, portfolio sites, or data-driven applications, ACF keeps your content structured and easy to manage. Its intuitive interface also bridges the gap between development and content teams.
Within the realm of WordPress development tools, ACF is often the first plugin developers install when they need to turn WordPress into something smarter and more adaptable than a blog engine.
Tool #4: Local WPâYour Instant Local Dev Environment
Setting up a development environment should never slow down the start of a project. Local WP makes local WordPress site creation a breeze with one-click installation, automatic SSL, and built-in tools for testing.
This desktop application is perfect for developers who want to prototype, experiment, or debug in isolation before pushing anything live. It supports PHP version switching, live link sharing for client previews, and seamless integration with deployment services like Flywheel and WP Engine.
Among all WordPress development tools, LocalWP is the most user-friendly for rapid environment setup. Whether youâre freelancing or managing dozens of projects, it ensures your development stays clean, fast, and risk-free.
Tool #5: Git & GitHubâVersion Control That Saves Projects
Version control is the foundation of any reliable development process. With Git and GitHub (or GitLab), you gain complete control over your codebase. You can track changes, revert mistakes, manage branches, and collaborate with ease.
For WordPress developers working on themes, plugins, or full-scale applications, Git ensures you never lose your progress. It also supports cleaner workflows, especially when multiple contributors are working on the same project.
Whether you're a solo developer or part of a distributed team, using Git alongside a repository hosting platform is more than a best practice. Itâs essential for professional-grade development and long-term maintainability.
Tool #6: Theme CheckâBuild Themes That Meet the Standard
Before a theme goes live or gets submitted to the WordPress repository, it must follow strict coding standards. Theme Check helps you validate your theme against those requirements without manually auditing every file.
This plugin runs automated tests to detect deprecated functions, security risks, and structural issues. It also checks for compliance with accessibility and internationalization guidelines, ensuring your theme is both inclusive and globally usable.
For developers serious about releasing production-grade themes or maintaining code quality across multiple projects, Theme Check is a must-have. It acts like a checklist that catches what human eyes often miss during manual reviews.
Tool #7: Elementor or Gutenberg SuiteâVisual Design, Coded Right
Not every client project requires hand-coded templates. In many cases, speed and flexibility are the priority, and thatâs where visual builders shine. Tools like Elementor or enhanced Gutenberg block libraries give developers the power to prototype quickly without compromising code structure.
These builders are especially useful during client reviews or MVP development. Instead of adjusting code after every round of feedback, you can make layout tweaks in real time.
Visual tools have earned their place in modern development workflows. When used correctly, they enhance delivery speed while still respecting performance and accessibility standards.
Bottomline
Every successful WordPress project is built on more than just code. It is built on decisions, and one of the most important decisions a developer makes is choosing the right tools. Whether you are building complex web applications, custom client dashboards, or high-converting landing pages, the efficiency of your workflow often defines the outcome.
The tools listed in this blog are not just helpful add-ons. They are essential building blocks for a reliable, scalable, and professional development environment. They support faster delivery, improve testing accuracy, reduce downtime, and elevate the entire quality of the build process.
Investing time to master these solutions is a strategic step forward for any developer or agency. With the right set of WordPress development toolsin place, you can focus more on solving real problems and less on repetitive setup, debugging, or deployment obstacles.
Source : https://medium.com/@elijah_williams_agc/top-7-wordpress-development-tools-for-custom-website-success-95c7c9838c11Â
#WordPress Development#Web Development Tools#Custom WordPress Solutions#Developer Productivity#Full-Stack WordPress
0 notes
Text
OriginSuite Review â All-in-One AI-Powered Marketing Suite
Welcome to my OriginSuite Review, If youâre in the online marketing space, youâve probably heard about Origins Suiteâa powerful software suite designed to help entrepreneurs, affiliate marketers, and content creators streamline their workflows and boost productivity. Thatâs where OriginSuite comes in.
OriginSuite claims to be the worldâs first truly âall-in-oneâ marketing suite that replaces popular platforms like GoHighLevel, ClickFunnels, Kajabi, WebinarJam, Calendly, Shopify, and moreâoffering a low, one-time fee and lifetime unlimited access to dozens of powerful tools.
This comprehensive OriginSuite review will cover its features, benefits, pricing, pros, cons, bonuses, and how it compares to other marketing platforms. By the end, youâll know whether this is the right tool for your business.
What Is OriginSuite?
OriginSuite is an all-in-one digital marketing and business automation platform that allows users to build websites, sales funnels, automate email/SMS/WhatsApp marketing, host webinars, manage customer relationships, create online courses and memberships, run eCommerce stores, book appointments, and more.
OriginSuite Review: Overview of Product
Product Creator:Â Seun Ogundele
Product:Â OriginSuite
Launch Date: 2025-Apr-06
Launch Time: 10:00 EDT
Front-End Price:Â $17Â One-Time Payment! (Limited-Time Access)
Official Site:Â Click Here To Visit Official Salespage
Product Type: Tools and Software
Support: Effective and Friendly Response
Recommended: Highly Recommended
Bonuses:Â YES, Huge Bonuses
Skill Level Required: All Levels
Discount Coupon: Use Code âOGS5OFFâ for $5 Off or code âOGS20OFFâ for 20% Off Full Funnel)
Refund: YES, 30 Days Money-Back Guarantee
OriginSuite Review: About Authors

Meet Seun Ogundele, the brilliant inventor of OriginSuite. Seunâs innovative spirit and forward-thinking attitude to technology have transformed the area of software development with his pioneering work. Seun has created a sophisticated platform that enables users to easily builds high profitable essential business tools using the power of artificial intelligence.
Check out some of his previous successful projects, including AI Toker, AzonKDP, Qai App, HeyBooks, AI Gigz Hub, GamPAL, WP Genie, Artisia, AvaTalk, RoboCHAT, ZapAI, Kustomizee, GoBuildr, FlowCart, AI Assist, SendALL, ScribAI, and SwipeFunnel, and many others.
OriginSuite Review: Key Features of OriginSuite
AI builds your entire funnel in 60 seconds just tell it what you sell, and it does the rest.
Auto-write email, SMS, and WhatsApp campaigns that get opened, clicked, and convert on autopilot.
Smart CRM tags, scores, and follows up with leads so you close more without lifting a finger.
Host courses, webinars, and memberships inside one dashboard no Kajabi or Teachable needed.
Book appointments, send reminders, and collect payments without needing Calendly or third-party tools.
Run unlimited live and evergreen webinars with built-in polls, chat, and mid-webinar offers.
AI monitors, tests, and optimizes your funnels 24/7 so performance keeps getting better even while you sleep.
Manage your entire business from a single tab no switching tools, no plugin crashes, no API issues.
Drag-and-drop automation flows connect everything no Zapier, no coding, no downtime.
No Complicated Setup â Get Up And Running In 2 Minutes.
30-Day Money-Back Guarantee: Test OriginSuite risk-free. If youâre not thrilled, weâll refund every penny no questions asked.
Never pay monthly for any other services ever again, pay once, and use forever.
Agency License Included: Offer OriginSuite as a service to clients, and keep 100%.
OriginSuite Review: How Does It Work?
Build, Run, AND Automate Your Entire Business From One Single Tab In 3 Simple Clicks
Step #1: Create Your OriginSuite Account
Get instant access to the full all-in-one platform funnels, CRM, email, webinars, appointments, automation, and more.
Step #2: Choose What You Want To Launch
Pick your goal, and OriginSuiteâs AI builds everything for youâŠPages, automations, emails, upsells, and even scheduling.
Step #3: Launch and Scale
Run your entire business from one dashboard. Sell courses, host webinars, send emails, create funnels, automate growth and never pay for another tool again.
OriginSuite Review: Benefits of OriginSuite
âBuild Funnels That Write Themselves
OriginSuite uses AI to create your entire sales funnel in 60 seconds. Just tell it what you sell, and it builds every page, headline, and button automatically. Youâll go from âno idea what to doâ to âready to launchâ without touching a single line of code
âClone Any Page With a Screenshot
Take a screenshot of any landing page, upload it, and OriginSuite rebuilds it for you better, faster, and branded as your own. No design skills needed. This is the fastest way to steal whatâs working and make it yours
âEmail & SMS Campaigns That Write Themselves
OriginSuite asks what you want to sell, then writes the perfect emails and texts that make people click and buy. No copywriting. No spam triggers. Just sales messages that feel human and hit hard.
âDrag-and-Drop Automation That Feels Like Magic
Set up powerful automations just by dragging things around. Want to send a discount 3 hours after someone watches your webinar? Done. Itâs like building dominoes that make money while you sleep.
âLive & Evergreen Webinars Without Zoom
Host your own webinars right inside OriginSuite no extra software, no confusion. Go live or set it on autopilot. You can pitch, sell, and engage⊠all from one place
âSell Courses Without Kajabi
Turn your videos and PDFs into full-blown courses with one click. Drip lessons over time, build a member community, and charge one-time or subscriptions. Youâll look like a pro course creator in minutes
âBuilt-In Appointment Booking That Closes Deals
Clients can book calls, pick times, and get reminders all built into your site. No Calendly, no email chains, no no-shows. Itâs like having a smart assistant who works 24/7
âCRM That Actually Helps You Close
OriginSuite keeps track of every lead, shows you whoâs hot, and reminds you to follow up at the right time. Youâll never lose a sale just because you forgot to reply.
âAI That Learns What Converts and Fixes It For You
The more you use OriginSuite, the smarter it gets. It tests your pages, emails, and funnels then tweaks whatâs not working. You keep getting better results without doing anything.
âLaunch Entire Businesses in a Weekend
Website? Funnel? Email? Course? Webinar? Appointment booking? You can launch them all by Sunday. Itâs not a dream itâs OriginSuite. One app, everything ready to go
âZero Monthly Fees. Use It Forever.
Stop paying $297/month to a bunch of tools that barely work together. Pay once and get everything, forever. No surprises, no hidden fees, no limits.
âAgency Mode Included (No Extra Charge)
Use OriginSuite for clients, not just yourself. Give them their own dashboards, charge what you want, and keep 100%. Youâll look like a SaaS company without writing a single line of code
âAI Campaign Builder That Knows What to Say
Just tell OriginSuite your offer, and it writes the entire campaign from landing pages to emails to upsells. It sounds like you⊠only smarter. Youâll never stare at a blank screen again.
âSmart Split Testing That Runs Itself
OriginSuite automatically tests headlines, buttons, layouts, and offersâŠÂ then picks the winner. Itâs like having a marketing genius fine-tuning everything behind the scenes while you focus on results
âWhatsApp Marketing That Actually Gets Replies
Send automated WhatsApp messages that donât feel like spam. OriginSuite times each message perfectly, so it lands when people are ready to act. Say goodbye to cold DMs and hello to booked calls.
âAI Lead Scoring That Tells You Whoâs Ready to Buy
OriginSuite watches every click, scroll, and video view then scores your leads by intent. Youâll know exactly whoâs hot, whoâs cold, and when to strike
âTrigger-Based Automations That Sell While You Sleep
Set up automations that fire when users open an email, click a button, or visit a page. No tech skills needed. Just drag, drop, and watch your pipeline run on autopilot.
âSurveys That Turn Into Sales
Build surveys that segment, qualify, and sell all at the same time. Ask the right questions and instantly show the perfect offer. Itâs like a smart quiz that sells for you.
âBuilt-In Hosting Thatâs Lightning Fast
No need to pay for web hosting. Everything you launch lives on OriginSuiteâs cloud, loads instantly, and never crashes. Your site stays up, fast, and ready to convert always
âUnlimited Pages, Funnels & Automations (No Caps Ever)
Other tools charge more the bigger you grow. OriginSuite doesnât. Build 1 funnel or 1,000 itâs all included. No limits, no throttling, no âproâ tier.
âPayment Integrations That Just Work
Connect Stripe, PayPal, or whatever you use and start taking payments in minutes. One-time, subscription, or pay-what-you-want itâs all built in and plug-and-play.
âCustom Client Portals with Full Control
Give each client their own login, branding, and dashboard. Youâre not just a freelancer youâre a full SaaS platform now. No devs. No stress.
âAI Copy Analyzer That Fixes Weak Copy in Real-Time
Write something and watch OriginSuite improve it instantly. Better headlines, stronger calls to action, cleaner formatting done with a click.
âNo Monthly Fees â One Payment, Lifetime Access
Unlike other tools that charge you every month, OriginSuite is a one-time investment that lets you grow your empire forever with zero extra costs
OriginSuite Review: Who Should Use It?
Beginners â Just click a few buttons and launch your first funnel, course, or offer.
Freelancers â Book clients, send invoices, automate follow-ups, and close more sales.
Coaches & Consultants â Host webinars, sell programs, and manage clients all from one place.
Course Creators â Upload your videos and go live instantly with paywalls and membership access.
Ecom Sellers â Build product funnels, automate emails, and recover abandoned carts with ease.
Agencies â Give clients their own dashboard, charge high-ticket, and manage everything under your brand.
OriginSuite Review: OTOâs And Pricing
Add My Bundle Coupon Code âOGS20OFFâłÂ â For 20% Off Any Funnel OTO Below
Front End Price:Â OriginSuite ($17)
OTO1:Â OriginSuite Unlimited ($67)
OTO2:Â OriginSuite Done For You ($297)
OTO3:Â OriginSuite Automation ($47)
OTO4:Â OriginSuite Income Maximizer ($47)
OTO5:Â OriginSuite Limitless Buyer Traffic ($97)
OTO6:Â OriginSuite Cloned Affiliate profits ($67)
OTO7:Â OriginSuite Mobile Payday ($47)
OTO8:Â OriginSuite Reseller ($197)
OTO9:Â OriginSuite DFY Profit Site ($47)
OriginSuite Review: Money Back Guarantee
Try Our 30 Days Iron Clad Money Back Guarantee
We trust our app blindly. Users have seen the system succeed throughout its one-year operation although multiple people benefit from its implementation. Please understand my perspective because you may not know me yet you remain doubtful which is perfectly fine. Sceptical views help maintain awareness in our lives.
You can access OriginSuite now while enjoying all its features until you decide it lacks value whereupon we will provide a full refund. We will provide your full payment back to you by simply sending a message to our team through 24/7 customer support. You can ask us no questions but if you become an OriginSuite user without making any profits we will give you a full refund of your payment.
OriginSuite Review: Pros and Cons
Pros:
One-time Payment â No recurring monthly charges.
Truly All-in-One â Eliminates the need for multiple platforms.
Unlimited Access â No usage caps on funnels, emails, contacts, etc.
User-Friendly Interface â Drag-and-drop builder, templates, and automation flows.
Agency & White-label Ready â Manage multiple client projects easily.
Highly Scalable â Grows with your business without raising your costs.
Cons:
Requires a one-time investment
To use this product, you must have internet access.
Nothing wrong with it, it works perfectly!
My Own Customized Exclusive VIP Bonus Bundle
***How To Claim These Bonuses***
Step #1:
Complete your purchase of the OriginSuite: My Special Unique Bonus Bundle will be visible on your access page as an Affiliate Bonus Button on WarriorPlus immediately after purchase. And before ending my honest OriginSuite Review, I told you that I would give you my very own unique PFTSES formula for Free.

Step #2:
Send the proof of purchase to my e-mail â[email protected]â (Then Iâll manually Deliver it for you in 24 HOURS).
OriginSuite Free Premium Bonuses
Frequently Asked Questions (FAQâs)
Q. Do I need any experience to get started?
None, all you need is just an internet connection. And youâre good to go.
Q. Is there any monthly cost?
Depends, if you act now, NONE. But if you wait, you might end up paying $997/mo itâs up to you.
Q. How long does it take to make money?
Our average member made their first sale the same day they got access to OriginSuite.
Q. Do I need to purchase anything else for it to work?
Nop, OriginSuite is the complete thing. You get everything you need to make it work. Nothing is left behind.
Q. What if I failed?
While that is unlikely, we removed all the risk for you. If you tried OriginSuite and failed, we will refund you every cent you paid.
Q. How can I get started?
Awesome, I like your excitement, all you have to do is click any of the buy buttons on the page, and secure your copy of OriginSuite at a one-time fee.
My Recommendation
OriginSuite is more than just another marketing toolâitâs a complete business solution for entrepreneurs who want to streamline operations, save money, and scale faster. By replacing multiple platforms with a single, easy-to-use dashboard and offering unlimited access for a one-time fee, it delivers unmatched value. Whether youâre a coach, marketer, agency, or eCommerce seller, OriginSuite is a smart investment in your businessâs future. Donât miss this limited-time dealâget lifetime access today!
đ Donât miss out guys and start your journey with OriginSuite today!
>>> Click Here to Visit OriginSuite and Get Access Now <<<
Check Out My Previous Reviews: BotSocial AI Review, Lexi AI Review, AIDigiMaker Review, Stratos App Review, and WebHub AI Review.
Thank for reading my honest âOriginSuite Reviewâ till the end. Hope it will help you to make purchase decision perfectly.
#originsuite#originsuitereview#originsuitediscount#originsuitecoupon#originsuitereviews2025#originsuiteappreview2025#originsuitebonusses#originsuiteproduct#originsuiteprice#originsuiteotos#originsuiteoffers#originsuitebonus#originsuitebuy#originsuiteWebsite#originsuitesite#originsuiteapp#originsuitehonestreviews#originsuitelatestreviews#originsuiteusersexperience#originsuiteusersreview#originsuitedemo#originsuitetutorial#originsuitepurchaseonline#originsuitelegit#ai#aiapp#aitool#aisoftware#sidehustle#makemoneyonline
0 notes
Text
WordPress Interview Preparation đ
Prepare for your WordPress interview with confidence! đ»
Master key topics like theme and plugin development, hooks, filters, custom post types, WP REST API, security, and performance optimization.
Be ready to discuss database structure, WordPress lifecycle, and troubleshooting.
đ Useful links: https://bit.ly/3Fxfk4P
Familiarize yourself with popular plugins like Yoast SEO or WooCommerce.
Stay updated with the latest WordPress trends! đ
0 notes
Text
WP Socializer v7.9 Release
WP Socializer v7.9 is now available. This is a maintenance release that includes a number of enhancements and bug fixes. It is now available for both free and PRO versions.
Please find the changelog below. You can also follow us on Twitter for latest updates @aakashweb
âš Changelog
New: Support for Bluesky icon.
New: Support for Podcast icon.
Fix: Social profile links in follow bar are set with rel=âmeâ value.
Fix: Handle follow icons editor crash when Elegant page builder is installed.
Fix: Theme customize page is misaligned.
Fix: Disable share buttons in REST API output.
Fix: null check when current page URL is not available.
Getting the update
You can update the plugin directly from your WordPress administration page by navigating to Dashboard > Updates. This applies to both free and PRO versions of the plugin.
You can also download the free version of the plugin from WordPress.org and upload it manually. For the PRO version you can follow the documentation. If you havenât got the PRO version yet, you can get it here.
-----
This article was originally posted on Aakash Web
0 notes
Text
WordPress Multi-Multisite: A Case Study
New Post has been published on https://thedigitalinsider.com/wordpress-multi-multisite-a-case-study/
WordPress Multi-Multisite: A Case Study
The mission: Provide a dashboard within the WordPress admin area for browsing Google Analytics data for all your blogs.
The catch? Youâve got about 900 live blogs, spread across about 25 WordPress multisite instances. Some instances have just one blog, others have as many as 250. In other words, what you need is to compress a data set that normally takes a very long time to compile into a single user-friendly screen.
The implementation details are entirely up to you, but the final result should look like this Figma comp:
Design courtesy of the incomparable Brian Biddle.
I want to walk you through my approach and some of the interesting challenges I faced coming up with it, as well as the occasional nitty-gritty detail in between. Iâll cover topics like the WordPress REST API, choosing between a JavaScript or PHP approach, rate/time limits in production web environments, security, custom database design â and even a touch of AI. But first, a little orientation.
Letâs define some terms
Weâre about to cover a lot of ground, so itâs worth spending a couple of moments reviewing some key terms weâll be using throughout this post.
What is WordPress multisite?
WordPress Multisite is a feature of WordPress core â no plugins required â whereby you can run multiple blogs (or websites, or stores, or what have you) from a single WordPress installation. All the blogs share the same WordPress core files, wp-content folder, and MySQL database. However, each blog gets its own folder within wp-content/uploads for its uploaded media, and its own set of database tables for its posts, categories, options, etc. Users can be members of some or all blogs within the multisite installation.
What is WordPress multi-multisite?
Itâs just a nickname for managing multiple instances of WordPress multisite. It can get messy to have different customers share one multisite instance, so I prefer to break it up so that each customer has their own multisite, but they can have many blogs within their multisite.
So thatâs different from a âNetwork of Networksâ?
Itâs apparently possible to run multiple instances of WordPress multisite against the same WordPress core installation. Iâve never looked into this, but I recall hearing about it over the years. Iâve heard the term âNetwork of Networksâ and I like it, but that is not the scenario Iâm covering in this article.
Why do you keep saying âblogsâ? Do people still blog?
You betcha! And people read them, too. Youâre reading one right now. Hence, the need for a robust analytics solution. But this article could just as easily be about any sort of WordPress site. I happen to be dealing with blogs, and the word âblogâ is a concise way to express âa subsite within a WordPress multisite instanceâ.
One more thing: In this article, Iâll use the term dashboard site to refer to the site from which I observe the compiled analytics data. Iâll use the term client sites to refer to the 25 multisites I pull data from.
My implementation
My strategy was to write one WordPress plugin that is installed on all 25 client sites, as well as on the dashboard site. The plugin serves two purposes:
Expose data at API endpoints of the client sites
Scrape the data from the client sites from the dashboard site, cache it in the database, and display it in a dashboard.
The WordPress REST API is the Backbone
The WordPress REST API is my favorite part of WordPress. Out of the box, WordPress exposes default WordPress stuff like posts, authors, comments, media files, etc., via the WordPress REST API. You can see an example of this by navigating to /wp-json from any WordPress site, including CSS-Tricks. Hereâs the REST API root for the WordPress Developer Resources site:
The root URL for the WordPress REST API exposes structured JSON data, such as this example from the WordPress Developer Resources website.
Whatâs so great about this? WordPress ships with everything developers need to extend the WordPress REST API and publish custom endpoints. Exposing data via an API endpoint is a fantastic way to share it with other websites that need to consume it, and thatâs exactly what I did:
Open the code
<?php [...] function register(WP_REST_Server $server) $endpoints = $this->get(); foreach ($endpoints as $endpoint_slug => $endpoint) register_rest_route( $endpoint['namespace'], $endpoint['route'], $endpoint['args'] ); function get() $version = 'v1'; return array( 'empty_db' => array( 'namespace' => 'LXB_DBA/' . $version, 'route' => '/empty_db', 'args' => array( 'methods' => array( 'DELETE' ), 'callback' => array($this, 'empty_db_cb'), 'permission_callback' => array( $this, 'is_admin' ), ), ), 'get_blogs' => array( 'namespace' => 'LXB_DBA/' . $version, 'route' => '/get_blogs', 'args' => array( 'methods' => array('GET', 'OPTIONS'), 'callback' => array($this, 'get_blogs_cb'), 'permission_callback' => array($this, 'is_dba'), ), ), 'insert_blogs' => array( 'namespace' => 'LXB_DBA/' . $version, 'route' => '/insert_blogs', 'args' => array( 'methods' => array( 'POST' ), 'callback' => array($this, 'insert_blogs_cb'), 'permission_callback' => array( $this, 'is_admin' ), ), ), 'get_blogs_from_db' => array( 'namespace' => 'LXB_DBA/' . $version, 'route' => '/get_blogs_from_db', 'args' => array( 'methods' => array( 'GET' ), 'callback' => array($this, 'get_blogs_from_db_cb'), 'permission_callback' => array($this, 'is_admin'), ), ), 'get_blog_details' => array( 'namespace' => 'LXB_DBA/' . $version, 'route' => '/get_blog_details', 'args' => array( 'methods' => array( 'GET' ), 'callback' => array($this, 'get_blog_details_cb'), 'permission_callback' => array($this, 'is_dba'), ), ), 'update_blogs' => array( 'namespace' => 'LXB_DBA/' . $version, 'route' => '/update_blogs', 'args' => array( 'methods' => array( 'PATCH' ), 'callback' => array($this, 'update_blogs_cb'), 'permission_callback' => array($this, 'is_admin'), ), ), );
We donât need to get into every endpointâs details, but I want to highlight one thing. First, I provided a function that returns all my endpoints in an array. Next, I wrote a function to loop through the array and register each array member as a WordPress REST API endpoint. Rather than doing both steps in one function, this decoupling allows me to easily retrieve the array of endpoints in other parts of my plugin to do other interesting things with them, such as exposing them to JavaScript. More on that shortly.
Once registered, the custom API endpoints are observable in an ordinary web browser like in the example above, or via purpose-built tools for API work, such as Postman:
PHP vs. JavaScript
I tend to prefer writing applications in PHP whenever possible, as opposed to JavaScript, and executing logic on the server, as nature intended, rather than in the browser. So, what would that look like on this project?
On the dashboard site, upon some event, such as the user clicking a ârefresh dataâ button or perhaps a cron job, the server would make an HTTP request to each of the 25 multisite installs.
Each multisite install would query all of its blogs and consolidate its analytics data into one response per multisite.
Unfortunately, this strategy falls apart for a couple of reasons:
PHP operates synchronously, meaning you wait for one line of code to execute before moving to the next. This means that weâd be waiting for all 25 multisites to respond in series. Thatâs sub-optimal.
My production environment has a max execution limit of 60 seconds, and some of my multisites contain hundreds of blogs. Querying their analytics data takes a second or two per blog.
Damn. I had no choice but to swallow hard and commit to writing the application logic in JavaScript. Not my favorite, but an eerily elegant solution for this case:
Due to the asynchronous nature of JavaScript, it pings all 25 Multisites at once.
The endpoint on each Multisite returns a list of all the blogs on that Multisite.
The JavaScript compiles that list of blogs and (sort of) pings all 900 at once.
All 900 blogs take about one-to-two seconds to respond concurrently.
Holy cow, it just went from this:
( 1 second per Multisite * 25 installs ) + ( 1 second per blog * 900 blogs ) = roughly 925 seconds to scrape all the data.
To this:
1 second for all the Multisites at once + 1 second for all 900 blogs at once = roughly 2 seconds to scrape all the data.
That is, in theory. In practice, two factors enforce a delay:
Browsers have a limit as to how many concurrent HTTP requests they will allow, both per domain and regardless of domain. Iâm having trouble finding documentation on what those limits are. Based on observing the network panel in Chrome while working on this, Iâd say itâs about 50-100.
Web hosts have a limit on how many requests they can handle within a given period, both per IP address and overall. I was frequently getting a â429; Too Many Requestsâ response from my production environment, so I introduced a delay of 150 milliseconds between requests. They still operate concurrently, itâs just that theyâre forced to wait 150ms per blog. Maybe âstaggerâ is a better word than âwaitâ in this context:
Open the code
async function getBlogsDetails(blogs) let promises = []; // Iterate and set timeouts to stagger requests by 100ms each blogs.forEach((blog, index) => if (typeof blog.url === 'undefined') return; let id = blog.id; const url = blog.url + '/' + blogDetailsEnpointPath + '?uncache=' + getRandomInt(); // Create a promise that resolves after 150ms delay per blog index const delayedPromise = new Promise(resolve => setTimeout(async () => try const blogResult = await fetchBlogDetails(url, id); if( typeof blogResult.urls == 'undefined' ) console.error( url, id, blogResult ); else if( ! blogResult.urls ) console.error( blogResult ); else if( blogResult.urls.length == 0 ) console.error( blogResult ); else console.log( blogResult ); resolve(blogResult); catch (error) console.error(`Error fetching details for blog ID $id:`, error); resolve(null); // Resolve with null to handle errors gracefully , index * 150); // Offset each request by 100ms ); promises.push(delayedPromise); ); // Wait for all requests to complete const blogsResults = await Promise.all(promises); // Filter out any null results in case of caught errors return blogsResults.filter(result => result !== null);
With these limitations factored in, I found that it takes about 170 seconds to scrape all 900 blogs. This is acceptable because I cache the results, meaning the user only has to wait once at the start of each work session.
The result of all this madness â this incredible barrage of Ajax calls, is just plain fun to watch:
PHP and JavaScript: Connecting the dots
I registered my endpoints in PHP and called them in JavaScript. Merging these two worlds is often an annoying and bug-prone part of any project. To make it as easy as possible, I use wp_localize_script():
<?php [...] class Enqueue function __construct() add_action( 'admin_enqueue_scripts', array( $this, 'lexblog_network_analytics_script' ), 10 ); add_action( 'admin_enqueue_scripts', array( $this, 'lexblog_network_analytics_localize' ), 11 ); function lexblog_network_analytics_script() wp_register_script( 'lexblog_network_analytics_script', LXB_DBA_URL . '/js/lexblog_network_analytics.js', array( 'jquery', 'jquery-ui-autocomplete' ), false, false ); function lexblog_network_analytics_localize() $a = new LexblogNetworkAnalytics; $data = $a -> get_localization_data(); $slug = $a -> get_slug(); wp_localize_script( 'lexblog_network_analytics_script', $slug, $data ); // etc.
In that script, Iâm telling WordPress two things:
Load my JavaScript file.
When you do, take my endpoint URLs, bundle them up as JSON, and inject them into the HTML document as a global variable for my JavaScript to read. This is leveraging the point I noted earlier where I took care to provide a convenient function for defining the endpoint URLs, which other functions can then invoke without fear of causing any side effects.
Hereâs how that ended up looking:
The JSON and its associated JavaScript file, where I pass information from PHP to JavaScript using wp_localize_script().
Auth: Fort Knox or Sandbox?
We need to talk about authentication. To what degree do these endpoints need to be protected by server-side logic? Although exposing analytics data is not nearly as sensitive as, say, user passwords, Iâd prefer to keep things reasonably locked up. Also, since some of these endpoints perform a lot of database queries and Google Analytics API calls, itâd be weird to sit here and be vulnerable to weirdos who might want to overload my database or Google Analytics rate limits.
Thatâs why I registered an application password on each of the 25 client sites. Using an app password in php is quite simple. You can authenticate the HTTP requests just like any basic authentication scheme.
Iâm using JavaScript, so I had to localize them first, as described in the previous section. With that in place, I was able to append these credentials when making an Ajax call:
async function fetchBlogsOfInstall(url, id) let install = lexblog_network_analytics.installs[id]; let pw = install.pw; let user = install.user; // Create a Basic Auth token let token = btoa(`$user:$pw`); let auth = 'Authorization': `Basic $token` ; try let data = await $.ajax( url: url, method: 'GET', dataType: 'json', headers: auth ); return data; catch (error) console.error('Request failed:', error); return [];
That file uses this cool function called btoa() for turning the raw username and password combo into basic authentication.
The part where we say, âOh Right, CORS.â
Whenever I have a project where Ajax calls are flying around all over the place, working reasonably well in my local environment, I always have a brief moment of panic when I try it on a real website, only to get errors like this:
Oh. Right. CORS. Most reasonably secure websites do not allow other websites to make arbitrary Ajax requests. In this project, I absolutely do need the Dashboard Site to make many Ajax calls to the 25 client sites, so I have to tell the client sites to allow CORS:
<?php // ... function __construct() add_action( 'rest_api_init', array( $this, 'maybe_add_cors_headers' ), 10 ); function maybe_add_cors_headers() // Only allow CORS for the endpoints that pertain to this plugin. if( $this->is_dba() ) add_filter( 'rest_pre_serve_request', array( $this, 'send_cors_headers' ), 10, 2 ); function is_dba() $url = $this->get_current_url(); $ep_urls = $this->get_endpoint_urls(); $out = in_array( $url, $ep_urls ); return $out; function send_cors_headers( $served, $result ) // Only allow CORS from the dashboard site. $dashboard_site_url = $this->get_dashboard_site_url(); header( "Access-Control-Allow-Origin: $dashboard_site_url" ); header( 'Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept, Authorization' ); header( 'Access-Control-Allow-Methods: GET, OPTIONS' ); return $served; [...] }
Youâll note that Iâm following the principle of least privilege by taking steps to only allow CORS where itâs necessary.
Auth, Part 2: Iâve been known to auth myself
I authenticated an Ajax call from the dashboard site to the client sites. I registered some logic on all the client sites to allow the request to pass CORS. But then, back on the dashboard site, I had to get that response from the browser to the server.
The answer, again, was to make an Ajax call to the WordPress REST API endpoint for storing the data. But since this was an actual database write, not merely a read, it was more important than ever to authenticate. I did this by requiring that the current user be logged into WordPress and possess sufficient privileges. But how would the browser know about this?
In PHP, when registering our endpoints, we provide a permissions callback to make sure the current user is an admin:
<?php // ... function get() $version = 'v1'; return array( 'update_blogs' => array( 'namespace' => 'LXB_DBA/' . $version, 'route' => '/update_blogs', 'args' => array( 'methods' => array( 'PATCH' ), 'callback' => array( $this, 'update_blogs_cb' ), 'permission_callback' => array( $this, 'is_admin' ), ), ), // ... ); function is_admin() $out = current_user_can( 'update_core' ); return $out;
JavaScript can use this â itâs able to identify the current user â because, once again, that data is localized. The current user is represented by their nonce:
async function insertBlog( data ) let url = lexblog_network_analytics.endpoint_urls.insert_blog; try await $.ajax( url: url, method: 'POST', dataType: 'json', data: data, headers: 'X-WP-Nonce': getNonce() ); catch (error) console.error('Failed to store blogs:', error); function getNonce() if( typeof wpApiSettings.nonce == 'undefined' ) return false; return wpApiSettings.nonce;
The wpApiSettings.nonce global variable is automatically present in all WordPress admin screens. I didnât have to localize that. WordPress core did it for me.
Cache is King
Compressing the Google Analytics data from 900 domains into a three-minute loading .gif is decent, but it would be totally unacceptable to have to wait for that long multiple times per work session. Therefore I cache the results of all 25 client sites in the database of the dashboard site.
Iâve written before about using the WordPress Transients API for caching data, and I could have used it on this project. However, something about the tremendous volume of data and the complexity implied within the Figma design made me consider a different approach. I like the saying, âThe wider the base, the higher the peak,â and it applies here. Given that the user needs to query and sort the data by date, author, and metadata, I think stashing everything into a single database cell â which is what a transient is â would feel a little claustrophobic. Instead, I dialed up E.F. Codd and used a relational database model via custom tables:
In the Dashboard Site, I created seven custom database tables, including one relational table, to cache the data from the 25 client sites, as shown in the image.
Itâs been years since Iâve paged through Larry Ullmanâs career-defining (as in, my career) books on database design, but I came into this project with a general idea of what a good architecture would look like. As for the specific details â things like column types â I foresaw a lot of Stack Overflow time in my future. Fortunately, LLMs love MySQL and I was able to scaffold out my requirements using DocBlocks and let Sam Altman fill in the blanks:
Open the code
<?php /** * Provides the SQL code for creating the Blogs table. It has columns for: * - ID: The ID for the blog. This should just autoincrement and is the primary key. * - name: The name of the blog. Required. * - slug: A machine-friendly version of the blog name. Required. * - url: The url of the blog. Required. * - mapped_domain: The vanity domain name of the blog. Optional. * - install: The name of the Multisite install where this blog was scraped from. Required. * - registered: The date on which this blog began publishing posts. Optional. * - firm_id: The ID of the firm that publishes this blog. This will be used as a foreign key to relate to the Firms table. Optional. * - practice_area_id: The ID of the firm that publishes this blog. This will be used as a foreign key to relate to the PracticeAreas table. Optional. * - amlaw: Either a 0 or a 1, to indicate if the blog comes from an AmLaw firm. Required. * - subscriber_count: The number of email subscribers for this blog. Optional. * - day_view_count: The number of views for this blog today. Optional. * - week_view_count: The number of views for this blog this week. Optional. * - month_view_count: The number of views for this blog this month. Optional. * - year_view_count: The number of views for this blog this year. Optional. * * @return string The SQL for generating the blogs table. */ function get_blogs_table_sql() $slug = 'blogs'; $out = "CREATE TABLE $this->get_prefix()_$slug ( id BIGINT NOT NULL AUTO_INCREMENT, slug VARCHAR(255) NOT NULL, name VARCHAR(255) NOT NULL, url VARCHAR(255) NOT NULL UNIQUE, /* adding unique constraint */ mapped_domain VARCHAR(255) UNIQUE, install VARCHAR(255) NOT NULL, registered DATE DEFAULT NULL, firm_id BIGINT, practice_area_id BIGINT, amlaw TINYINT NOT NULL, subscriber_count BIGINT, day_view_count BIGINT, week_view_count BIGINT, month_view_count BIGINT, year_view_count BIGINT, PRIMARY KEY (id), FOREIGN KEY (firm_id) REFERENCES $this->get_prefix()_firms(id), FOREIGN KEY (practice_area_id) REFERENCES $this->get_prefix()_practice_areas(id) ) DEFAULT CHARSET=utf8mb4;"; return $out;
In that file, I quickly wrote a DocBlock for each function, and let the OpenAI playground spit out the SQL. I tested the result and suggested some rigorous type-checking for values that should always be formatted as numbers or dates, but that was the only adjustment I had to make. I think thatâs the correct use of AI at this moment: You come in with a strong idea of what the result should be, AI fills in the details, and you debate with it until the details reflect what you mostly already knew.
How itâs going
Iâve implemented most of the user stories now. Certainly enough to release an MVP and begin gathering whatever insights this data might have for us:
Itâs working!
One interesting data point thus far: Although all the blogs are on the topic of legal matters (they are lawyer blogs, after all), blogs that cover topics with a more general appeal seem to drive more traffic. Blogs about the law as it pertains to food, cruise ships, germs, and cannabis, for example. Furthermore, the largest law firms on our network donât seem to have much of a foothold there. Smaller firms are doing a better job of connecting with a wider audience. Iâm positive that other insights will emerge as we work more deeply with this.
Regrets? Iâve had a few.
This project probably would have been a nice opportunity to apply a modern JavaScript framework, or just no framework at all. I like React and I can imagine how cool it would be to have this application be driven by the various changes in state rather than⊠drumroll⊠a couple thousand lines of jQuery!
I like jQueryâs ajax() method, and I like the jQueryUI autocomplete component. Also, thereâs less of a performance concern here than on a public-facing front-end. Since this screen is in the WordPress admin area, Iâm not concerned about Google admonishing me for using an extra library. And Iâm just faster with jQuery. Use whatever you want.
I also think it would be interesting to put AWS to work here and see what could be done through Lambda functions. Maybe I could get Lambda to make all 25 plus 900 requests concurrently with no worries about browser limitations. Heck, maybe I could get it to cycle through IP addresses and sidestep the 429 rate limit as well.
And what about cron? Cron could do a lot of work for us here. It could compile the data on each of the 25 client sites ahead of time, meaning that the initial three-minute refresh time goes away. Writing an application in cron, initially, I think is fine. Coming back six months later to debug something is another matter. Not my favorite. I might revisit this later on, but for now, the cron-free implementation meets the MVP goal.
I have not provided a line-by-line tutorial here, or even a working repo for you to download, and that level of detail was never my intention. I wanted to share high-level strategy decisions that might be of interest to fellow Multi-Multisite people. Have you faced a similar challenge? Iâd love to hear about it in the comments!
#250#admin#ai#Analytics#API#app#applications#approach#architecture#Article#Articles#authentication#author#autocomplete#AWS#Blog#Books#box#browser#bug#bundle#cache#cannabis#career#cell#challenge#chrome#code#columns#complexity
0 notes
Text
Top 5 Headless WordPress Plugins for Websites | Islandwizards
Headless WordPress is rapidly becoming the go-to solution for developers who want a flexible, scalable content management system. It decouples the front-end and back-end, allowing you to deliver content across multiple platforms while maintaining fast, high-performing websites. For those looking to enhance their blogging experience with headless WordPress, plugins play a crucial role in streamlining workflows and expanding functionality.
At Island Wizards, we specialize in developing headless WordPress solutions that are tailored to meet your business needs. Here are the top 5 headless WordPress plugins you need to know about for effective blog posting and content management.
1. WPGraphQL
WPGraphQL is an essential plugin for headless WordPress development. It turns your WordPress data into a GraphQL API, enabling seamless integration between WordPress and your front-end frameworks, such as React or Vue.js. For blog posting, this plugin provides fast, efficient queries that pull only the data you need. The flexibility of GraphQL means you can create custom queries, making it easier to manage blog content across multiple platforms.
2. ACF to REST API
Advanced Custom Fields (ACF) is a popular WordPress plugin that allows you to add custom fields to your WordPress content. By installing the ACF to REST API plugin, you can expose your custom fields via the WordPress REST API, making it easier to manage rich content in your headless environment. This plugin is perfect for adding unique custom fields to blog posts, improving the overall content creation experience.
3. Headless Mode
If you're running a completely decoupled website, Headless Mode is a must-have plugin. It disables the default WordPress front-end so your headless setup can rely entirely on a front-end framework like Gatsby or Next.js. For bloggers using a headless CMS, this plugin ensures that only the content management functionalities of WordPress are accessible, while leaving the front-end entirely to your chosen JavaScript framework.
4. WP REST API Menus
For those building headless WordPress websites, managing navigation menus can be a challenge. The WP REST API Menus plugin solves this problem by exposing WordPress menus via the REST API, making it easier to create and manage dynamic menus in a headless environment. This is particularly helpful for blog-heavy websites where navigation and user experience are key to driving traffic and engagement.
5. Yoast SEO for Headless
Yoast SEO is one of the most trusted plugins for optimizing WordPress content for search engines. By pairing it with a headless WordPress setup, you can still take advantage of its powerful SEO tools. The Yoast SEO REST API plugin exposes all SEO-related data via the REST API, ensuring that even in a headless configuration, your blog content remains optimized for search engine rankings.
Conclusion
Choosing the right plugins is crucial for any headless WordPress setup, particularly when it comes to managing and posting blogs. At Island Wizards, we help businesses build and optimize their headless WordPress platforms, ensuring that they run efficiently and deliver top-notch performance across all channels. Whether youâre looking to streamline blog content management, improve SEO, or enhance user navigation, these plugins will help you get the most out of your headless WordPress site. Explore more about Islandwizards⊠https://islandwizards.com/blogs/difference-between-webflow-and-wordpre.. https://islandwizards.com/blogs/tag/ecommerce/
#shopify#wordpress#headless wordpress development services#island wizards#island wizards uk'#seo#shopify partner program
1 note
·
View note
Text
AffiliateWP â REST API Extended Addon Free Download - Version Pro/Premium | Plugin WP 2024 miá»
n phĂ 100% táșŁi vá» khĂŽng giá»i háșĄn. BáșŁn quyá»n chĂnh thức từ tĂĄc giáșŁ. #premiumwp #freedownload
0 notes
Text
Un million de sites contrĂŽlĂ©s Ă distance La vulnĂ©rabilitĂ© dâun plugin WordPress a ouvert un million de sites Ă une prise de contrĂŽle Ă distance. Cette faille permet Ă toute personne non identifiĂ©e dâaccĂ©der aux informations sensibles Les chercheurs en sĂ©curitĂ© de Wordfence, une sociĂ©tĂ© spĂ©cialisĂ©e dans lâingĂ©nierie logicielle et la sĂ©curitĂ©, ont rĂ©vĂ©lĂ© que des vulnĂ©rabilitĂ©s dans OptinMonster, un plugin de marketing par courriel pour WordPress, ont exposĂ© un million de sites Ă une prise de contrĂŽle Ă distance. Les vulnĂ©rabilitĂ©s permettent Ă un cybercrinel dâaccĂ©der Ă des informations sensibles et dâajouter du code JavaScript malveillant aux sites WordPress. Des chercheurs ont dĂ©couvert que le modĂšle dâIA GPT-4 dâOpenAI est capable de pirater des sites web et de voler des informations dans des bases de donnĂ©es en ligne sans aide humaine Les pirates peuvent lire les conversations privĂ©es avec les assistants dâIA mĂȘme lorsquâelles sont chiffrĂ©es OptinMonster est un plugin conçu pour aider les propriĂ©taires de sites WordPress Ă gĂ©nĂ©rer des campagnes de marketing par courriel. LâĂ©quipe Wordfence Threat Intelligence aurait informĂ© les dĂ©veloppeurs de ce plugin de la faille le 28 septembre et une version entiĂšrement corrigĂ©e dâOptinMonster, la version 2.6.5, a Ă©tĂ© publiĂ©e le 7 octobre. Wordfence a publiĂ© le 27 octobre un avis de sĂ©curitĂ© dĂ©taillant ses conclusions. « Le 28 septembre 2021, lâĂ©quipe Wordfence Threat Intelligence a lancĂ© le processus de divulgation responsable pour plusieurs vulnĂ©rabilitĂ©s que nous avons dĂ©couvertes dans OptinMonster, un plugin WordPress installĂ© sur plus de 1 000 000 de sites. Ces failles permettaient Ă un cybercriminel non authentifiĂ©, câest-Ă -dire nâimporte quel visiteur du site, dâexporter des informations sensibles et dâajouter des JavaScript malveillants aux sites WordPress. Les utilisateurs de Wordfence Premium ont reçu le 28 septembre 2021 une rĂšgle de pare-feu pour se protĂ©ger contre tout exploit ciblant ces vulnĂ©rabilitĂ©s. Les sites utilisant encore la version gratuite de Wordfence recevront la mĂȘme protection le 28 octobre 2021 », a dĂ©clarĂ© Wordfence. OptinMonster est un plugin incroyablement intuitif et facile Ă utiliser, conçu pour crĂ©er des campagnes de vente sur des sites WordPress grĂące Ă lâutilisation de boĂźtes de dialogue. La grande majoritĂ© des fonctionnalitĂ©s du plugin ainsi que le site de lâapplication OptinMonster reposent sur lâutilisation de points de terminaison API pour permettre une intĂ©gration transparente et un processus de conception simplifiĂ©. Malheureusement, la majoritĂ© des points de terminaison REST-API nâont pas Ă©tĂ© implĂ©mentĂ©s de maniĂšre sĂ©curisĂ©e, ce qui permet Ă des attaquants non authentifiĂ©s dâaccĂ©der Ă de nombreux points de terminaison sur des sites utilisant une version vulnĂ©rable du plugin. Le plus critique des points de terminaison REST-API Ă©tait le point de terminaison /wp-json/omapp/v1/support, qui divulguait des donnĂ©es sensibles telles que le chemin complet du site sur le serveur, ainsi que la clĂ© API nĂ©cessaire pour effectuer des requĂȘtes sur le site OptinMonster. En accĂ©dant Ă la clĂ© API, un cybercriminel pouvait modifier toute campagne associĂ©e au compte OptinMonster connectĂ© Ă un site et ajouter un JavaScript malveillant qui sâexĂ©cuterait chaque fois quâune campagne serait affichĂ©e sur le site exploitĂ©. Cela signifie aussi que nâimporte quel attaquant non authentifiĂ© peut ajouter un JavaScript malveillant Ă un site exĂ©cutant OptinMonster, ce qui peut conduire Ă la redirection des visiteurs du site vers des domaines malveillants externes et Ă la prise de contrĂŽle totale des sites dans le cas oĂč un JavaScript est ajoutĂ© pour injecter de nouveaux comptes dâutilisateurs administratifs ou Ă©craser le code du plugin avec un webshell pour obtenir un accĂšs backdoor Ă un site. Heureusement, lâĂ©quipe dâOptinMonster a invalidĂ© toutes les clĂ©s API pour obliger les propriĂ©taires de sites Ă gĂ©nĂ©rer de nouvelles clĂ©s dans le cas oĂč une clĂ© aurait
Ă©tĂ© prĂ©cĂ©demment compromise, et a mis en place des restrictions qui empĂȘchent les clĂ©s API associĂ©es aux sites WordPress dâeffectuer des changements de campagne en utilisant lâapplication OptinMonster, ce qui empĂȘche lâexploitation de cette chaĂźne de vulnĂ©rabilitĂ©. Un million de sites contrĂŽlĂ©s Ă distance Nous avons des solutions pour solutionner vos problĂšmes de piratage. Le CMS WordPress alimente environ 41 % du Web y compris le site de la Maison Blanche WordPress est un systĂšme de gestion de contenu (SGC ou content management system (CMS) en anglais) gratuit, libre et open source. Ce logiciel Ă©crit en PHP repose sur une base de donnĂ©es MySQL et est distribuĂ© par la fondation WordPress.org. Les fonctionnalitĂ©s de WordPress lui permettent de crĂ©er et gĂ©rer diffĂ©rents types de sites Web : site vitrine, site de vente en ligne, site applicatif, blog, portfolio, site institutionnel, site dâenseignement, etc. Le baromĂštre W3Techs a indiquĂ© en fin dâannĂ©e derniĂšre que lâutilisation du CMS WordPress continue de croĂźtre : le CMS Ă©tait Ă cette date utilisĂ© sur 39,5 % des sites web et serait aujourdâhui utilisĂ© par un peu plus de 41 % des sites du Web. Les nouveaux locataires de la Maison blanche ont choisi de rester sur le CMS WordPress pour lancer le site de la Maison Blanche. Lâadministration prĂ©cĂ©dente est passĂ©e de Drupal Ă WordPress en 2017, et les dĂ©veloppeurs web travaillant avec lâadministration Biden ont dĂ©cidĂ© de sâen tenir au mĂȘme CMS. En 2016, WordPress a Ă©tĂ© le CMS le plus ciblĂ© par les cyberattaques, selon une Ă©tude menĂ©e par la sociĂ©tĂ© de sĂ©curitĂ© Sucuri. En 2018, le CMS a vu le nombre de vulnĂ©rabilitĂ©s qui lui sont liĂ©s tripler. Pour WordPress, le risque est encore plus Ă©levĂ© puisque le CMS propulse prĂšs de 41 % des sites du Web, un pourcentage de taille qui fait quâil existe un large nombre de victimes potentielles, un facteur important qui attire les hackers. Il est recommandĂ© aux utilisateurs du plugin OptinMonster de vĂ©rifier que le site a Ă©tĂ© mis Ă jour avec la derniĂšre version corrigĂ©e dâOptinMonster, qui est la 2.6.5.
0 notes
Text
WordPress Update Boosts Speed: Smart Script Loading
A number of sitesâ page load speeds and performance will be enhanced by improvements made in the most recent WordPress update, version 6.4, to the front end loading of scripts. WordPressâs core and packaged themes now have script loading techniques, which enhances the efficiency of loading scripts using defer and async properties. By instructing the browser to load scripts in the background (async) or after the rest of the page has loaded (defer), these features can drastically reduce the amount of time it takes for a page to become interactive.
Smart Script Handling for Quicker Page Loads
Before, JavaScript scripts contained in WordPress themes and plugins were loaded without having their asynchronous loading requirements specified. This meant that while they were being retrieved and processed, they blocked other downloads and delayed page display.
Pages containing WordPress content will load more quickly for website visitors following an upgrade, notably increasing the CWVâs first contentful paint (FCP) measure, which influences how quickly the page initially loads.
How WordPress Achieved This in the Background
When âdeferâ is enqueued, it is added to JavaScript files for blocks from WordPress.com such navigation menus and embedded media. Defer is now used by the wp-embed script to show embedded content.
The ability to add these features was not previously standardized. Developers now have a standardized method to manage when their scripts load thanks to the inclusion of a dedicated API in WordPress 6.3 and its full implementation in 6.4.
Also Read:Â WhatsApp Upcoming Feature: Enhanced Privacy with Hidden Locked Chats
Additionally, since they no longer obstruct rendering, the update places the most delayed scripts back into the head> section. This enhances speed by enabling the browser to find and cache them early.
A few scripts with lesser importance, such as the one for comment answers, will stay in the footer but will load asynchronously using the âasyncâ function so that other resources will also load concurrently.
Impacts In The Real World For Website Visitors
After being updated, pages with WordPress content will load more quickly for website visitors. After the page loads up for the first time, there will be less âjankâ or moving of page components.
These modifications set the stage for future improvements that will be even more effective.
Follow Digital Fox Media for latest technology news.
1 note
·
View note
Text
What Is WordPress API and How to Integrate It with Your Site?Â
WordPress API (Application Programming Connection point) is a bunch of conventions, tools, and schedules that permit developers to cooperate with and control WordPress data. It gives a way to outer applications and services to get to and use WordPress usefulness and data, making it a useful asset for integrating WordPress with different sites, applications, and services.Â
Integrating WordPress API with your site can give many advantages, including:Â
Improved Site Usefulness: By integrating WordPress API with your site, you can add strong highlights and usefulness, for example, constant data refreshes, social media integration, and then some.Â
Upgraded User Experience: WordPress API permits you to make custom UIs and connections, giving a seriously captivating and instinctive user experience for your site guests.Â
Better SEO: Integrating WordPress API with apparatuses like Google Investigation, Yoast Search engine optimization, and Google Search Control center can assist you with streamlining your site for better web index rankings and perceivability.Â
Improved Cooperation: Custom WordPress development services permits you to share data and team up with different sites, applications, and services, making it more straightforward to work with accomplices, users, and different partners.Â
To integrate WordPress API with your site, you'll have to follow these means:Â
Pick A WordPress API: WordPress gives a few APIs, including REST API, XML-RPC API, and JSON API. Pick the API that best suits your necessities and prerequisites.Â
Empower WordPress API: To empower WordPress API, you'll have to install and initiate a plugin, like WP REST API or Jetpack.Â
Validate API: Whenever you've empowered WordPress API, you'll have to verify it by creating a API key or token. This will permit you to get to and control WordPress dataÂ
Integrate API: Whenever you've validated WordPress API, you can begin integrating it with your site, utilizing apparatuses and conventions like AJAX, JSON, and XML.Â
ConclusionÂ
WordPress API is an incredible asset for WordPress API integration with different sites, applications, and services. By following these means, you can undoubtedly integrate WordPress API with your site, and partake in the many advantages it gives, including improved site usefulness, upgraded user experience, better Search engine optimization, and improved cooperation.Â
FACEBOOK â INSTAGRAM â TWITTER â LINKEDINÂ Â
#wordpress integration services#wordpress api integration#custom wordpress development services#website development using wordpress#wordpress
0 notes
Text
Develop Native Android App for WordPress Website with JSON API
We will Develop Native Android App for WordPress Website using this tutorial will be work for fetching your WordPress website data (posts & pages) to the android layout. Alternative like web view in android uses to display your website pages as it is in android app. The difference between web view and actual android app using JSON is that in web view the original website is opened like it isâŠ
View On WordPress
#android#Android App layouts#android json parsing example code#android parse#creating android app for WordPress Website#Creating WordPress Android App Project#developing android app#get image from json android#How to Make Android App for WordPress Website#MySQL database#plugin jsonapi#WordPress JSON plugin#wordpress mobile app#WordPress plugin#WordPress to Android App Tutorial#WordPress to Android App using JSON API Tutorial#wordpress to mobile app#WordPress Website Android App using JSON#WordPress website output in JSON format#WP REST API plugin
0 notes
Text
WordPress Interview Preparation đ
Prepare for your WordPress interview with confidence! đ»
Master key topics like theme and plugin development, hooks, filters, custom post types, WP REST API, security, and performance optimization.
Be ready to discuss database structure, WordPress lifecycle, and troubleshooting.
đ Useful links: https://bit.ly/3Fxfk4P
Familiarize yourself with popular plugins like Yoast SEO or WooCommerce.
Stay updated with the latest WordPress trends! đ
0 notes
Photo

Best Affiliate Manager Plugin for Wordpress
Afiliado:
Brought to you by Codex Infra, Afiliado is a full-featured affiliate WordPress plugin thatâs ideal if youâre looking for an affiliate supervision system that works right out of the box. It gives many other affiliate WordPress plugins, with tools that are great for sellers, online stores and membership sites.
 Letâs discover what the Afiliado WordPress plugin has to offer. To begin with, adding new affiliates is so easy, your affiliate program should make money within no time. And thanks to lots of integrations, you can hook this plugin to any wordpress and e-commerce platform that you have.
 Youâre allowed to track an unlimited number of affiliates, and traffic statistics allow you to put a finger on whatâs working. Just like the affiliate WordPress plugins in this list, Afiliado is easy to setup and use.
 Seeing as Afiliado is easy to customize and comes with an API, developers can bank on this plugin to build customized affiliate management programs, without any hassle. Can do, everything you need to run an affiliate program is already available in the plugin.
This awesome plugin does much more than that. Afiliado also includes options for manually adding affiliates and transformations.
If you opt for the premium add-on you can even add try affiliate referrals. You can setup transactions percentages, cookie length, affiliate pages and various other things easily. You can further integrate Afiliado with a group of awesome plugins such as Contact Form, WooCommerce, Easy Digital Downloads, MemberPress, PayPal Buttons, and so much more to push your affiliate program to greater extent.
Benefits of an Affiliate Marketing
·        Affiliate Program can quickly increase scale of your traffic.
·        Affiliate Program figures key relationships with high-volume affiliates.
·        Improves engagement on-site which leads to higher revenue for the business.
·        Affiliate Program generates more loyal customers.
What you get from Afiliado
·        Easy set-up. Install and activate the plugin in word press or CMS website. Add some user settings and you are ready.
·        Affiliate registration forms for users to list as them affiliates.
·        Afiliado can create their own referral links from the Affiliate Area with the built-in referral link generator.
·        Automatic and manual selections for affiliate approval
·        No cap on affiliates everyone can join the program and promote.
·        Full integration with popular WordPress and eCommerce platforms.
·        Offer unlimited creatives like visual resources, links, etc. for better understanding.
·        Accurate affiliate tracking, real-time broadcasting. Track affiliate-referred visits, referrals, earnings and affiliate registrations in real period of time.
·        Pay affiliates directly to their bank using the pluginâs committed payouts.
·        See your best earning affiliates, view affiliate reports, edit specific affiliate accounts, and modest affiliate registrations.
·        A dashboard for your affiliates to track their presentation, view pays, retrieve their referral URL, find creatives, etc.
·        You can Use coupon codes instead of affiliate links.
·        Offer different pay rates to different users and also based on product.
·        You can Control the duration of referral tracking cookies.
·        Adjustable emails â They provide a variety emails for admin notification, affiliate registration, endorsement, rejection, earning reports, etc.
·        Export data to excel file for predicting, accounting, and bookkeeping purposes.
·        Complete log of every expenses sent to affiliates from the Payouts screen.
·        Hooks and templates is to improve custom features and functionality.
·        Users can generate, view, update, and delete the data using the WP-CLI commands from Afiliado. Also, perform CRUD operations using RestFul API.
·        On the other hand, Affiliate For WooCommerce too full with features.
#web developing company#web development#wordpress#woocommerce#seo#digitalmarketing#make money online#affiliate-marketing-companies#affilate marketing
25 notes
·
View notes
Photo
How to Create Your Own AJAX WooCommerce Wishlist Plugin
In this tutorial we will create lightweight wishlist functionality for WooCommerce using AJAX, WordPress REST API, and SVG graphics. WooCommerce doesnât come with wishlist functionality as standard, so youâll always need to rely on an extension to do the work for you. Unless you build it yourself for complete control..
Wish Upon a Star
Wishlist functionality will allow users to mark certain products, adding them to a list for future reference. In some eCommerce stores (such as Amazon) multiple wishlists can be created, and these can be shared with others, which makes them ideal for birthdays or weddings. In our case, the WooCommerce wishlist weâre going to create will enable customers to easily revisit products theyâre considering.
Our wishlist functionality will add a heart icon to the product thumbs, which when clicked will add the product to a wishlist in a table.
Click the heart icon to add a product to the wishlist
Take a look at the demo for a proper idea of how it works.
1. Create the Plugin Structure
Letâs start by building our plugin. Create a folder with the name âwishlistâ and a PHP file with the same name. Add the following snippet to the PHP file:
/* Plugin Name: Woocommerce wishlist Plugin URI: https://www.enovathemes.com Description: Ajax wishlist for WooCommerce Author: Enovathemes Version: 1.0 Author URI: http://enovathemes.com */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly }
We wonât go into detail about the plugin creation process, but if you are new to plugin development I highly recommend this amazing new course by Rachel McCollin:
WordPress
Introduction to WordPress Plugin Development
Rachel McCollin
Add the Plugin Functions
Letâs sketch out our plan so we know what to build:
Add wishlist toggle to products in loop and single pages using WooCommerce hooks
Create wishlist table shortcode to hold the products added to the wishlist
Create wishlist custom option in the user profile
All the plugin code will go inside the init action for the plugin, as we first need to make sure that the WooCommerce plugin is active. So right after the plugin details add the following code:
add_action('init','plugin_init'); function plugin_init(){ if (class_exists("Woocommerce")) { // Code here } }
And now letâs enqueue our plugin scripts and styles.
Add the following code to the main plugin file:
function wishlist_plugin_scripts_styles(){ wp_enqueue_style( 'wishlist-style', plugins_url('/css/style.css', __FILE__ ), array(), '1.0.0' ); wp_enqueue_script( 'wishlist-main', plugins_url('/js/main.js', __FILE__ ), array('jquery'), '', true); wp_localize_script( 'main', 'opt', array( 'ajaxUrl' => admin_url('admin-ajax.php'), 'ajaxPost' => admin_url('admin-post.php'), 'restUrl' => rest_url('wp/v2/product'), 'shopName' => sanitize_title_with_dashes(sanitize_title_with_dashes(get_bloginfo('name'))), 'inWishlist' => esc_html__("Already in wishlist","text-domain"), 'removeWishlist' => esc_html__("Remove from wishlist","text-domain"), 'buttonText' => esc_html__("Details","text-domain"), 'error' => esc_html__("Something went wrong, could not add to wishlist","text-domain"), 'noWishlist' => esc_html__("No wishlist found","text-domain"), ) ); } add_action( 'wp_enqueue_scripts', 'wishlist_plugin_scripts_styles' );
Here we enqueue the main style.css file and the main.js file for the plugin, also we pass some parameters to the main.js file to work with:
ajaxUrl â required to fetch some data from WordPress, like current User ID
ajaxPost â required to update user wishlist
restUrl â required to list the wishlist items in the wishlist table
shopName â required to add wishlist items to the session storage for non-registered or non-logged-in users
And some strings instead of hardcoding them into the js file, in case they need to be translatable.
So for now create a css, and js folder and put the corresponding files inside those folders: style.css in the css folder and main.js in the js folder.
2. Hook the Wishlist Toggle
Right inside the init action add the following code:
// Add wishlist to product add_action('woocommerce_before_shop_loop_item_title','wishlist_toggle',15); add_action('woocommerce_single_product_summary','wishlist_toggle',25); function wishlist_toggle(){ global $product; echo '<span class="wishlist-title">'.esc_attr__("Add to wishlist","text-domain").'</span><a class="wishlist-toggle" data-product="'.esc_attr($product->get_id()).'" href="#" title="'.esc_attr__("Add to wishlist","text-domain").'">'.file_get_contents(plugins_url( 'images/icon.svg', __FILE__ )).'</a>'; }
Here we add a wishlist toggle to each product in the loop and to each single product layout, using the woocommerce_before_shop_loop_item_title and woocommerce_single_product_summary hooks.
Here I want to point out the data-product attribute that contains the product IDâthis is required to power the wishlist functionality. And also take a closer look at the SVG iconâthis is required to power the animation.Â
3. Add SVGÂ Icons
Now create an images folder in the plugin folder and put the following icon.svg in it:
<svg viewBox="0 0 471.701 471.701"> <path class="heart" d="M433.601,67.001c-24.7-24.7-57.4-38.2-92.3-38.2s-67.7,13.6-92.4,38.3l-12.9,12.9l-13.1-13.1 c-24.7-24.7-57.6-38.4-92.5-38.4c-34.8,0-67.6,13.6-92.2,38.2c-24.7,24.7-38.3,57.5-38.2,92.4c0,34.9,13.7,67.6,38.4,92.3 l187.8,187.8c2.6,2.6,6.1,4,9.5,4c3.4,0,6.9-1.3,9.5-3.9l188.2-187.5c24.7-24.7,38.3-57.5,38.3-92.4 C471.801,124.501,458.301,91.701,433.601,67.001z M414.401,232.701l-178.7,178l-178.3-178.3c-19.6-19.6-30.4-45.6-30.4-73.3 s10.7-53.7,30.3-73.2c19.5-19.5,45.5-30.3,73.1-30.3c27.7,0,53.8,10.8,73.4,30.4l22.6,22.6c5.3,5.3,13.8,5.3,19.1,0l22.4-22.4 c19.6-19.6,45.7-30.4,73.3-30.4c27.6,0,53.6,10.8,73.2,30.3c19.6,19.6,30.3,45.6,30.3,73.3 C444.801,187.101,434.001,213.101,414.401,232.701z"/> <g class="loading"> <path d="M409.6,0c-9.426,0-17.067,7.641-17.067,17.067v62.344C304.667-5.656,164.478-3.386,79.411,84.479 c-40.09,41.409-62.455,96.818-62.344,154.454c0,9.426,7.641,17.067,17.067,17.067S51.2,248.359,51.2,238.933 c0.021-103.682,84.088-187.717,187.771-187.696c52.657,0.01,102.888,22.135,138.442,60.976l-75.605,25.207 c-8.954,2.979-13.799,12.652-10.82,21.606s12.652,13.799,21.606,10.82l102.4-34.133c6.99-2.328,11.697-8.88,11.674-16.247v-102.4 C426.667,7.641,419.026,0,409.6,0z"/> <path d="M443.733,221.867c-9.426,0-17.067,7.641-17.067,17.067c-0.021,103.682-84.088,187.717-187.771,187.696 c-52.657-0.01-102.888-22.135-138.442-60.976l75.605-25.207c8.954-2.979,13.799-12.652,10.82-21.606 c-2.979-8.954-12.652-13.799-21.606-10.82l-102.4,34.133c-6.99,2.328-11.697,8.88-11.674,16.247v102.4 c0,9.426,7.641,17.067,17.067,17.067s17.067-7.641,17.067-17.067v-62.345c87.866,85.067,228.056,82.798,313.122-5.068 c40.09-41.409,62.455-96.818,62.344-154.454C460.8,229.508,453.159,221.867,443.733,221.867z"/> </g> <g class="check"> <path d="M238.933,0C106.974,0,0,106.974,0,238.933s106.974,238.933,238.933,238.933s238.933-106.974,238.933-238.933 C477.726,107.033,370.834,0.141,238.933,0z M238.933,443.733c-113.108,0-204.8-91.692-204.8-204.8s91.692-204.8,204.8-204.8 s204.8,91.692,204.8,204.8C443.611,351.991,351.991,443.611,238.933,443.733z"/> <path d="M370.046,141.534c-6.614-6.388-17.099-6.388-23.712,0v0L187.733,300.134l-56.201-56.201 c-6.548-6.78-17.353-6.967-24.132-0.419c-6.78,6.548-6.967,17.353-0.419,24.132c0.137,0.142,0.277,0.282,0.419,0.419 l68.267,68.267c6.664,6.663,17.468,6.663,24.132,0l170.667-170.667C377.014,158.886,376.826,148.082,370.046,141.534z"/> </g> </svg>
If you are new to working with SVGs I highly recommend you read these amazing tutorials on the subject:
SVG
How to Hand Code SVG
Kezz Bracey
SVG
SVG Viewport and viewBox (For Complete Beginners)
Kezz Bracey
Our SVG animation has 3 states:
Default: the heart path
Process: loading group (g tag)
End: check group (g tag)
If you now go to your shop page you will see the unstyled SVG icons piled on top of each other:
Letâs add some styling to fix this mess! Open the style.css file and paste the following code:
.wishlist-toggle { display: block; position: absolute; top: 16px; left: 16px; z-index: 5; width: 24px; height: 24px; outline: none; border:none; } .wishlist-title { display: none; } .entry-summary .wishlist-toggle { position: relative; top: 0; left: 0; display: inline-block; vertical-align: middle; margin-bottom: 8px; } .entry-summary .wishlist-title { display: inline-block; vertical-align: middle; margin-right: 8px; margin-bottom: 8px; } .wishlist-toggle:focus { outline: none; border:none; } .wishlist-toggle svg { fill:#bdbdbd; transition: all 200ms ease-out; } .wishlist-toggle:hover svg, .wishlist-toggle.active svg { fill:#000000; } .wishlist-toggle svg .loading, .wishlist-toggle svg .check { opacity: 0; } .wishlist-toggle.active svg .check { opacity: 1; } .wishlist-toggle.active svg .heart { opacity: 0; } .wishlist-toggle.loading svg .loading, .wishlist-table.loading:before { animation:loading 500ms 0ms infinite normal linear; transform-origin: center; opacity: 1; } .wishlist-toggle.loading svg .heart { opacity:0; } @keyframes loading { from {transform: rotate(0deg);} to {transform: rotate(360deg);} }
The logic here is as follows:Â
Initially we show the heart path of our SVG.
When the user clicks on it we will hide the heart path and show the loading path.
Once the loading finishes we will show the checkmark indicating that the product was successfully added to the wishlist.
We will toggle the loading state via JavaScript later; the loading animation is a simple transform rotate. So for now if you refresh the page (donât forget to clear the browser cache as sometimes old styles are cached) you will see a nice heart icon with each product.Â
This toggle currently does nothing, so weâll sort that out. But for now letâs keep with our plan.
4. Create Wishlist Table Shortcode
Add the following code in the init plugin action:
// Wishlist table shortcode add_shortcode('wishlist', 'wishlist'); function wishlist( $atts, $content = null ) { extract(shortcode_atts(array(), $atts)); return '<table class="wishlist-table loading"> <tr> <th><!-- Left for image --></th> <th>'.esc_html__("Name","text-domain").'</th> <th>'.esc_html__("Price","text-domain").'</th> <th>'.esc_html__("Stock","text-domain").'</th> <th><!-- Left for button --></th> </tr> </table>'; }
This is a very simple shortcode that you can add to any page, and the wishlist items will appear inside it. I wonât describe the shortcode creation process, but if you are new to this, I highly recommend reading this amazing tutorial:
Plugins
Getting Started With WordPress Shortcodes
Rohan Mehta
Make a Wishlist Page
Now from inside the WP admin create a page called âWishlistâ and put the [wishlist]Â shortcode inside it. Now if you go to the wishlist page you will see an empty table.
Did you notice the loading class on the table? We will remove the loading class with JavaScript later, once the wishlist items are ready to be appended to the table. But for now open the style.css and add the following code:
.wishlist-table { width:100%; position: relative; } .wishlist-table.loading:after { display: block; width: 100%; height: 100%; position: absolute; top: 0; left: 0; content: ""; background: #ffffff; opacity: 0.5; z-index: 5; } .wishlist-table.loading:before { display: block; width: 24px; height: 24px; position: absolute; top: 50%; left: 50%; margin-top:-12px; margin-left:-12px; content: ""; background-image: url('../images/loading.svg'); background-repeat: no-repeat; background-size: 100%; z-index: 6; } .wishlist-table td { position: relative; } .wishlist-table a.details { padding:4px 16px; background: #000000; color: #ffffff; text-align: center; border:none !important } .wishlist-table a.wishlist-remove { display: block; width: 24px; height: 24px; position: absolute; top: 50%; left: 50%; margin-top:-12px; margin-left:-12px; background-image: url('../images/remove.svg'); background-repeat: no-repeat; background-size: 100%; z-index: 6; border:none; opacity:0; } .wishlist-table td:hover > a.wishlist-remove { opacity:1; }
Add the loading.svg image to the images folder:
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 471.701 471.701"> <path d="M409.6,0c-9.426,0-17.067,7.641-17.067,17.067v62.344C304.667-5.656,164.478-3.386,79.411,84.479 c-40.09,41.409-62.455,96.818-62.344,154.454c0,9.426,7.641,17.067,17.067,17.067S51.2,248.359,51.2,238.933 c0.021-103.682,84.088-187.717,187.771-187.696c52.657,0.01,102.888,22.135,138.442,60.976l-75.605,25.207 c-8.954,2.979-13.799,12.652-10.82,21.606s12.652,13.799,21.606,10.82l102.4-34.133c6.99-2.328,11.697-8.88,11.674-16.247v-102.4 C426.667,7.641,419.026,0,409.6,0z"/> <path d="M443.733,221.867c-9.426,0-17.067,7.641-17.067,17.067c-0.021,103.682-84.088,187.717-187.771,187.696 c-52.657-0.01-102.888-22.135-138.442-60.976l75.605-25.207c8.954-2.979,13.799-12.652,10.82-21.606 c-2.979-8.954-12.652-13.799-21.606-10.82l-102.4,34.133c-6.99,2.328-11.697,8.88-11.674,16.247v102.4 c0,9.426,7.641,17.067,17.067,17.067s17.067-7.641,17.067-17.067v-62.345c87.866,85.067,228.056,82.798,313.122-5.068 c40.09-41.409,62.455-96.818,62.344-154.454C460.8,229.508,453.159,221.867,443.733,221.867z"/> </svg>
This is the same loading SVG separated from the main icon.svg. We could use SVG sprites, but I decided to stick with a separate loading SVG.
Now, if you go to the wishlist page and refresh it you will see an empty table with loading on it. Nice, letâs move further.
5. Wishlist Custom Option in the User Profile
Our wishlist functionality will work both for logged-in users and guest users. With logged-in users weâll store the wishlist information in the userâs metadata, and with guest users weâll store the wishlist in the session storage.Â
You can also store the guest usersâ wishlist in local storage, the difference being that session storage is destroyed when the user closes the tab or browser, and local storage is destroyed when the browser cache is cleared. It is up to you which option you use for guest users.
Now add the following code to the init action:
// Wishlist option in the user profile add_action( 'show_user_profile', 'wishlist_user_profile_field' ); add_action( 'edit_user_profile', 'wishlist_user_profile_field' ); function wishlist_user_profile_field( $user ) { ?> <table class="form-table wishlist-data"> <tr> <th><?php echo esc_attr__("Wishlist","text-domain"); ?></th> <td> <input type="text" name="wishlist" id="wishlist" value="<?php echo esc_attr( get_the_author_meta( 'wishlist', $user->ID ) ); ?>" class="regular-text" /> </td> </tr> </table> <?php } add_action( 'personal_options_update', 'save_wishlist_user_profile_field' ); add_action( 'edit_user_profile_update', 'save_wishlist_user_profile_field' ); function save_wishlist_user_profile_field( $user_id ) { if ( !current_user_can( 'edit_user', $user_id ) ) { return false; } update_user_meta( $user_id, 'wishlist', $_POST['wishlist'] ); }
Again, in order to remain within the scope of this tutorial, I wonât explain how to work with user metadata. If you are new to this I highly recommend reading this amazing tutorial:
WordPress
How to Work With WordPress User Metadata
Tom McFarlin
All we do here is create a text field input that will hold the wishlist items comma-separated IDs. With show_user_profile and edit_user_profile actions we add the structure of the input field, and with personal_options_update and edit_user_profile_update actions we power the save functionality.Â
So once the wishlist is updated it will save to the database. I you go to your profile page you will see a new text field added to it. Add whatever value you want and hit save to test if the update functionality works. With admin CSS you can hide this field if you donât want users to see it. I will leave it as is.
6. Turn it On!
Now we are ready to power everything up!
Open the main.js file and put the following code in it:
(function($){ "use strict"; })(jQuery);
All our code will go inside this function.
Now letâs gather the required data and create some variables:
var shopName = opt.shopName+'-wishlist', inWishlist = opt.inWishlist, restUrl = opt.restUrl, wishlist = new Array, ls = sessionStorage.getItem(shopName), loggedIn = ($('body').hasClass('logged-in')) ? true : false, userData = '';
As you might remember when we enqueued our main.js script we passed some parameters to it. Here, with JavaScript, we can collect these parameters.
Next, we will create an empty wishlist array that will contains wishlist items. We will need the session storage data with our shop name (the ls variable stands for local storage), and we will need to know if the user is guest or logged-in.
Let me explain the logic here: whenever the user visits the shop page we will need to know if he or she is logged-in or is a guest-user. If the user is logged-in we will need to check if he or she has wishlist items, and if so highlight these items. If not we need to see if there are any items in the session/local storage and highlight those.Â
Why this is done like this? Imagine, if the user first visits the website as a guest, adds items to the wishlist, and then decides to login. If the user does not have items registered in the profile wishlist, we will need to show the ones that he or she added before login, that are stored in the session/local storage.
So letâs do that step by step:
If User is Logged-in
Fetch current user data with AJAX
If success update the wishlist
Highlight the wishlist items
Remove the session/local storage
If fail show error message in the console for the developer
if(loggedIn) { // Fetch current user data $.ajax({ type: 'POST', url: opt.ajaxUrl, data: { 'action' : 'fetch_user_data', 'dataType': 'json' }, success:function(data) { userData = JSON.parse(data); if (typeof(userData['wishlist']) != 'undefined' && userData['wishlist'] != null && userData['wishlist'] != "") { var userWishlist = userData['wishlist']; userWishlist = userWishlist.split(','); if (wishlist.length) { wishlist = wishlist.concat(userWishlist); $.ajax({ type: 'POST', url:opt.ajaxPost, data:{ action:'user_wishlist_update', user_id :userData['user_id'], wishlist :wishlist.join(','), } }); } else { wishlist = userWishlist; } wishlist = wishlist.unique(); highlightWishlist(wishlist,inWishlist); sessionStorage.removeItem(shopName); } else { if (typeof(ls) != 'undefined' && ls != null) { ls = ls.split(','); ls = ls.unique(); wishlist = ls; } $.ajax({ type: 'POST', url:opt.ajaxPost, data:{ action:'user_wishlist_update', user_id :userData['user_id'], wishlist :wishlist.join(','), } }) .done(function(response) { highlightWishlist(wishlist,inWishlist); sessionStorage.removeItem(shopName); }); } }, error: function(){ console.log('No user data returned'); } }); }
If User is Guest
Fetch wishlist from the session/local storage
else { if (typeof(ls) != 'undefined' && ls != null) { ls = ls.split(','); ls = ls.unique(); wishlist = ls; } }
As you may have noticed here we have double-AJAX and some helper functions. So first letâs create the actions of the AJAX requests, and after that I will explain our helper functions. I wonât describe in detail the AJAX functionality in WordPress, but if you are new to AJAX and WordPress, I highly recommend reading this amazing tutorial on it:
Plugins
A Primer on Ajax in the WordPress Frontend: Understanding the Process
Tom McFarlin
Our first AJAX request gets the user id and the user wishlist data from WordPress. This is done with a custom AJAX action added to the plugin code file:
// Get current user data function fetch_user_data() { if (is_user_logged_in()){ $current_user = wp_get_current_user(); $current_user_wishlist = get_user_meta( $current_user->ID, 'wishlist',true); echo json_encode(array('user_id' => $current_user->ID,'wishlist' => $current_user_wishlist)); } die(); } add_action( 'wp_ajax_fetch_user_data', 'fetch_user_data' ); add_action( 'wp_ajax_nopriv_fetch_user_data', 'fetch_user_data' );
The most important part here is the action name (fetch_user_data)âmake sure it is the same for AJAX and for functions wp_ajax_fetch_user_data and wp_ajax_nopriv_fetch_user_data. Here weâre preparing JSON formatted data with user ID and user wishlist data.
Our next AJAX request updates the user wishlist if there were already wishlist items from session/local storage. Take a close look at the url optionâsee it is different.
The logic is the same as for the first actionâthe difference is that here we donât return or echo any data, but we update the wishlist option for the current user.
function update_wishlist_ajax(){ if (isset($_POST["user_id"]) && !empty($_POST["user_id"])) { $user_id = $_POST["user_id"]; $user_obj = get_user_by('id', $user_id); if (!is_wp_error($user_obj) && is_object($user_obj)) { update_user_meta( $user_id, 'wishlist', $_POST["wishlist"]); } } die(); } add_action('admin_post_nopriv_user_wishlist_update', 'update_wishlist_ajax'); add_action('admin_post_user_wishlist_update', 'update_wishlist_ajax');
And if our user is a guest we will need to check if there are any wishlist details in the session/local storage.
Helper Functions
Before we move to the events part I want to explain our helper functions
Array.prototype.unique = function() { return this.filter(function (value, index, self) { return self.indexOf(value) === index; }); } function isInArray(value, array) {return array.indexOf(value) > -1;} function onWishlistComplete(target, title){ setTimeout(function(){ target .removeClass('loading') .addClass('active') .attr('title',title); },800); } function highlightWishlist(wishlist,title){ $('.wishlist-toggle').each(function(){ var $this = $(this); var currentProduct = $this.data('product'); currentProduct = currentProduct.toString(); if (isInArray(currentProduct,wishlist)) { $this.addClass('active').attr('title',title); } }); }
The first helper function makes the array unique, by removing duplicates, the second one checks if the given value is present in the given array. The next function executes when an item is added to the wishlist and the last one shows items that are in the wishlist.
Add Toggle
Now letâs add a click event to the wishlist toggle to power the actual functionality. On each toggle click event the animation is triggered and if the user is logged-in the wishlist update action fires with AJAX. If the user is a guest the item is added to the session/local storage.Â
Now if you go to the shop page, refresh the browser, and click on any wishlist toggle you will see it is working!
$('.wishlist-toggle').each(function(){ var $this = $(this); var currentProduct = $this.data('product'); currentProduct = currentProduct.toString(); if (!loggedIn && isInArray(currentProduct,wishlist)) { $this.addClass('active').attr('title',inWishlist); } $(this).on('click',function(e){ e.preventDefault(); if (!$this.hasClass('active') && !$this.hasClass('loading')) { $this.addClass('loading'); wishlist.push(currentProduct); wishlist = wishlist.unique(); if (loggedIn) { // get user ID if (userData['user_id']) { $.ajax({ type: 'POST', url:opt.ajaxPost, data:{ action:'user_wishlist_update', user_id :userData['user_id'], wishlist :wishlist.join(','), } }) .done(function(response) { onWishlistComplete($this, inWishlist); }) .fail(function(data) { alert(opt.error); }); } } else { sessionStorage.setItem(shopName, wishlist.toString()); onWishlistComplete($this, inWishlist); } } }); });
7. List Items in Wishlist Table
Now it is time to list our wishlist items in the wishlist table we created earlier.
Add the following code into main.js at the very bottom of our wrapper function:
setTimeout(function(){ if (wishlist.length) { restUrl += '?include='+wishlist.join(','); restUrl += '&per_page='+wishlist.length; $.ajax({ dataType: 'json', url:restUrl }) .done(function(response){ $('.wishlist-table').each(function(){ var $this = $(this); $.each(response,function(index,object){ $this.append('<tr data-product="'+object.id+'"><td><a class="wishlist-remove" href="#" title="'+opt.removeWishlist+'"></a>'+object.image+'</td><td>'+object.title["rendered"]+'</td><td>'+object.price+'</td><td>'+object.stock+'</td><td><a class="details" href="'+object.link+'">'+opt.buttonText+'</a></td></tr>'); }); }); }) .fail(function(response){ alert(opt.noWishlist); }) .always(function(response){ $('.wishlist-table').each(function(){ $(this).removeClass('loading'); }); }); } else { $('.wishlist-table').each(function(){ $(this).removeClass('loading'); }); } },1000);
Here we are using the WordPress REST API to get the products by ID in the wishlist array.Â
For each of the products we get we are adding a table row with the required data to display. We need the product image, title, stock status, button and price.Â
Here we have two options for the REST API:Â
using the WordPress REST APIÂ
using the WooCommerce REST API.Â
The difference here is that product data is already present in the Woocommerce REST API, but an API key is required. With the default WordPress REST API product data is absent by default, but can be added, and no API key is required. For such a simple task as a wishlist I donât think that an API key is needed, so we will do it by extending the default WordPress REST API to return our product price, image code and the stock level.
Go to the main plugin file and at the very bottom add the following code:
// Extend REST API function rest_register_fields(){ register_rest_field('product', 'price', array( 'get_callback' => 'rest_price', 'update_callback' => null, 'schema' => null ) ); register_rest_field('product', 'stock', array( 'get_callback' => 'rest_stock', 'update_callback' => null, 'schema' => null ) ); register_rest_field('product', 'image', array( 'get_callback' => 'rest_img', 'update_callback' => null, 'schema' => null ) ); } add_action('rest_api_init','rest_register_fields'); function rest_price($object,$field_name,$request){ global $product; $id = $product->get_id(); if ($id == $object['id']) { return $product->get_price(); } } function rest_stock($object,$field_name,$request){ global $product; $id = $product->get_id(); if ($id == $object['id']) { return $product->get_stock_status(); } } function rest_img($object,$field_name,$request){ global $product; $id = $product->get_id(); if ($id == $object['id']) { return $product->get_image(); } } function maximum_api_filter($query_params) { $query_params['per_page']["maximum"]=100; return $query_params; } add_filter('rest_product_collection_params', 'maximum_api_filter');
All this does is create new fields for REST API and extends the maximum items limit per request. Again, if you are new to this subject I highly recommend reading this series.
For now, if you go to your wishlist table and refresh the page you will see the list of items that are added to your wishlist.Â
8. Removing Items From Wishlist
We are almost done; only the remove functionality remains. So letâs create that! Add the following code at the very bottom of the wrapper function in the main.js file
$(document).on('click', '.wishlist-remove', function(){ var $this = $(this); $this.closest('table').addClass('loading'); wishlist = []; $this.closest('table').find('tr').each(function(){ if ($(this).data('product') != $this.closest('tr').data('product')) { wishlist.push($(this).data('product')); if (loggedIn) { // get user ID if (userData['user_id']) { $.ajax({ type: 'POST', url:opt.ajaxPost, data:{ action:'user_wishlist_update', user_id :userData['user_id'], wishlist :wishlist.join(','), } }) .done(function(response) { $this.closest('table').removeClass('loading'); $this.closest('tr').remove(); }) .fail(function(data) { alert(opt.error); }); } } else { sessionStorage.setItem(shopName, wishlist.toString()); setTimeout(function(){ $this.closest('table').removeClass('loading'); $this.closest('tr').remove(); },500); } } }); });
Once the remove icon is clicked (make sure you have a remove.svg in the images folder, you can use whatever icon you want), we need to check if the user is logged-in. If so, we then remove the item ID from the wishlist using AJAX with the user_wishlist_update action. If the user is a guest we need to remove the item ID from the session/local storage.
Now go to your wishlist and refresh the page. Once you click on the remove icon your item will be removed from the wishlist.
Conclusion
That was quite a project! A simple, but comprehensive wishlist feature for your WooCommerce stores. You are free to use this plugin in any project; you can extend, modify it and make suggestions. I hope you liked it. Here is the link to the source files on GitHub. And here is the demo.
Learn More WooCommerce Theme Development
At Tuts+ we have a great collection of tutorials and courses to learn WooCommerce development. Check out these four great courses to get started!
WooCommerce
Up and Running With WooCommerce
Rachel McCollin
WordPress
Developing a WooCommerce Theme
Rachel McCollin
WordPress
Go Further With WooCommerce Themes
Rachel McCollin
WordPress
How to Make Your Theme WooCommerce Compatible
Rachel McCollin
by Karen Pogosyan via Envato Tuts+ Code https://ift.tt/2WTWfiG
1 note
·
View note
Text
ZSUITE REVIEW â BECOME A PRO FROM SCRATCH
Generally, zSuite OTO is a 4-in-1design app containing Youzign, Gifzign, Mockzign and Logozign that enables anybody to create engaging and stunning Graphics, InfoGraphics, Logo, Gif, Mockup, many more... from scratch. Since zSuite is niche-independent so it's going to provide you with unlimited choices for marketing campaigns, introducing a new product or promoting new.

Another fantastic part is, the industrial License included enables you to be a real freelancer by supply professional design service and charge hundreds dollars. Such a possible land, is not it?
So, what's inside these 4 design apps that make zSuite stick out? Go on reading and you'll know.
Martin Crumlish is the name behind this product. His name is really famous for showing up on leaderboard so frequently. Apart from being a gifted digital marketer, Martin also specializes in creating software helping people deal with traffic generation, designing website,... Some of his previous products that made thousands of sales: Social Mobi Surveys, Social Mobi App, WP Dollar, SocialNeos,...
ZSuite was born after 4 years exploring and generating by Martin with his partners Magnus and Bertand. It passed through several tests through the years and perfected.
Besides including 4 strong design apps, zSuite is filled with other awesome benefits. Let's dig into these 4 software first then I will show you the rest.
App 1: YOUZIGN
Use Youzign in form of:
Youzign online platform
Youzign Desktop app
Youzign WordPress Plugin
Youzign Android and iOS mobile programs
Features inside Youzign:
Unmatched drag n drop interface
Borders and shadows
60 design formats and preset sizes
Huge pool of templates, never battle for inspiration again
Supports any languages on Earth
Share designs with any other user
Smart guides that will assist you maintain straight lines and design properly
100s of built-in high resolution images and icons sorted in categories, such as arrows, backgrounds, patterns, buttons, play buttons for videos, mascot characters, and much more we are adding graphics every day.
One-click wallpapers, tee-shirt designer
Background removal
Instant preview technology
Create from scratch or start with a picture
Free access to Youzign market, easily sell your designs
All design formats constantly monitored and updated
Integrated into 50+ top marketing programs
Organise your designs in folders, create unlimited folders
Save designs as templates and re-use unlimited times
Millions of integrated copy-right free pictures
Retrieve your designs on your favourite apps with Youzign API
App 2: GIFZIGN
Gifzign is a Desktop app for PC and Mac that helps you to:
Turn any video on Youtube, Vimeo or your personal computer to a GIF in just a few seconds
Record a video from your camera or screen and turn it into a GIF
Customize your GIFs with text and graphics
Add other special effects like looping, instagram-like filters, and more
Produce cinemagraph with any uploaded, cloud video or recorded video
Select different GIF Player styles with dynamic behaviors
Select different frame mockups
App 3: MOCKZIGN
Mockzign is a Desktop app for PC and Mac that helps you to:
Simultaneously create 100+ mockups using a single picture add
100+ different mockup templates
Create notebook mockups, apparel mockups, tablet mockups, desktop mockups, telephone mockups and more
Easily edit and edit your mockup pictures; resize, crop or rotate to fit your display
Upload an image from your computer or beam from any place on the internet with one click
Produce mockup that are prepared for printing and also optimised for the internet
App 4: LOGOZIGN
Logozign is a Desktop app for PC and Mac that helps you to:
Create unlimited logos on your own and clients the easy way
Layout with No specific skills needed
Immediate real-time downloadable logo mockups
Monogram features included
Mascot features included
Modern icon library with millions of icons
Use different logo styles and containers
Choose Modern design criteria
Upload and use your own fonts
Save your logo project and continue editing later
Upload SVG files and continue editing them with Logozign to Improve your logos
Last but not the least, in order to offer you a decent with experience, the team will bring you some other amenities
Commercial license is included so that you can sell your designs and keep 100% profits
YOUSTART Video Training Course: Everything you need to know about getting started with Youzign, visual advertising and launch your brand online even if you have zero design skills.
24/6 Support: there should be some time you battle hard to manage a couple of tasks, then don't hesitate to contact for support
30-day money back guarantee
Weekly training webinars: Join the zSuite for one hour of free training each Friday. Plus instant access to nearly 2 years (100+ webinars) value of recorded training.
Now, let's take a look at some people's opinion about these 4 apps:
Prior to coming to zSuite, perhaps you must use these 4 software instead. All take you monthly recurring fee, at $73 a month! Oops! This price is not certainly profitable for business owners who has low-budget, a newbie or a startup. That's why you should seriously think about getting zSuite, meaning using a access to 4 design apps with the same outstanding features and the cost is really affordable. $67 one time payment for forever using.
The second reason is, you know Upwork -- the most significant labor market for freelancer?
Companies, Organizations, Entrepreneurs are hungry for these kinds of designing service. The demand keeps growing all of the time. For people who don't need to do dead-end job , you can try getting a professional designer working at home. Since zSuite has all types of necessary, niche-independent templates and design together with complete customization, it enables you to develop your imagination from zero and make money from it.
HOW TO GET IT TO WORK?
You need to be curious how it performs in action. So, please listen to my next illustration on a few basic design
Building a LOGO WITH LOGOZIGN
There are 4 sections You Need to notice when creating a Logo: Name, Slogan, Symbol and Container
Step 1: Name your own Logo, and make a Slogan
Step 2: Upload SVC in Symbol segment and make some adjustments
A few alterations on text: Size; Font, Spacing, Color
You have a stunning Logo like below:
Step 3: Save and Download
You may also save Transparent version when clicking on it in Container section.
Here is the main DASHBOARD
Step 1: After you log in, hit the"NEW DESIGN" button to begin create a new one
As you can see, apart from Facebook, you have the ability to create impressive cover for virtually all of the social platforms such as Twitter, Youtube, Instagram, Pinterest,...
Step 2: Designing procedure
There are 4 sections: Background, Graphics, Text, Filter, Upload
Search Graphics on Pixabay based on key word
After adding text and correct it, you can also insert your designed logo on the cover
Step 4: Save and Download
Building a GIF AD USING GIFZIGN
Step 1: Choose from the GIF library or decide to upload your own/ record a new one
Step 2: Make a few adjustments
Upload your intended logo
Adjust the length of the GIF
Go to Filters if you want to test what kind of color is suitable
Step 3: Save the GIF and it will appear on the dashboard so that we can preview it
Step 1: Choose a kind of mug you would like to design
Step 2: Click on"PLUS" button that I highlight on the step 1 picture to upload your intended logo
Step 3: Hit download on the right corner
Above all, zSuite also instructs carefully on how to upload all these logos, covers or GIF in your Facebook or other social media network. A summary video for you to recap everything you can do with
To be clearer, please watch the DEMO VIDEO under:
youtube
https://uprafficoto.com/
1 note
·
View note