Create WordPress Plugin Fun Hahaha

Frequently Asked Questions

How long will the review process take?

This is in the Developer FAQ. It takes anywhere between 1 and 10 days. We attempt to review all plugins within 5 business days of submission, but the process takes as long as it takes, depending on the complexity of your plugin.

WordPress plugins are like magical enhancements for your website. They can turn a basic site into a feature-rich powerhouse. But let’s be honest: sometimes the process of creating one can feel more like a grueling task than a fun adventure. Fear not! In this article, we’re going to inject some humor into the process and turn plugin development into a playful experience.

Step 1: The Idea – Fun Starts Here!

First things first: you need an idea for your plugin. It could be anything from a quirky feature to a tool that solves a peculiar problem. Remember, the more fun the idea, the more fun the development will be!

Example: How about a plugin that adds a “Punny Comment of the Day” widget to your site? Imagine visitors chuckling at puns every time they check your blog!

Step 2: Setting Up Your Plugin – The Easy Part

Let’s get started by setting up your plugin’s basic structure. Don’t worry; it’s easier than it sounds.

  1. Create a Plugin Folder: Go to your WordPress installation directory, navigate to wp-content/plugins/, and create a new folder for your plugin. Name it something fun, like punny-comment-widget.
  2. Create the Main Plugin File: Inside your plugin folder, create a file named punny-comment-widget.php. This will be the main file for your plugin.
  3. Add Plugin Header Information: Open punny-comment-widget.php and add the following code at the top:

Step 3: Writing the Code – Let’s Have Some Fun!

Here’s where the magic happens. We’ll create a simple widget that displays a random pun each day.

  1. Register the Widget

Step 4: Testing Your Plugin – Time for Some Giggles

Activate your plugin from the WordPress admin panel (Plugins > Installed Plugins) and then add the widget to your sidebar (Appearance > Widgets). You should see your “Punny Comment Widget” in action. Refresh your site and enjoy the chuckles!

Step 5: Debugging and Refining – Keep the Fun Alive

While your plugin might work perfectly on the first try, don’t be surprised if you encounter some bugs. The key is to approach debugging with a sense of humor. Remember, even the best coders make mistakes.

  1. Check Error Logs: WordPress will often log errors to wp-content/debug.log if you have debugging enabled.
  2. Ask for Help: Don’t be afraid to reach out to the WordPress community for support.

Step 6: Share and Enjoy – Spread the Laughter

Once you’re satisfied with your plugin, share it with the world. You can even create a fun promo video showcasing your plugin’s features. The more you share, the more people will enjoy your playful addition to the WordPress ecosystem.

Conclusion

Creating a WordPress plugin doesn’t have to be a dry, technical task. With a pinch of creativity and a dash of humor, you can turn plugin development into a fun and rewarding experience. So, grab your favorite pun and get coding!

Happy plugin-ing, and remember: in the world of WordPress, there’s always room for a good laugh!

CLORTHAX QUEST – Steam 3000 SUMMER SALE – 10 Solution Answer Keys

CLORTHAX QUEST

YOUR FIRST CLUE IS:

CLUE 1

You’ll find riches in rhythm, and fame in six strings
But beware the tax burden axe mastery brings

ANSWER

Under Arcade & Rhythm games, the Guitar Billionaire game will appear completely random.

The only way to locate the game is via the trial and error method. (!don’t be confused, can be any of categories!)

Keep clicking on different games categories until you find Guitar Billionaire game.


YOUR NEXT CLUE IS:

CLUE 2

You’ve settled a city and put down your roots
But now can you settle small legal disputes?

ANSWER

Step 1: First Click on “Go Find It” Button Below the Clue 2

Step 2: Then Under City & Settlement Builder, Tap on “City Builder Category“. (!don’t be confused, can be any of categories!)

Step 3: After that scroll down and Go to Casual.

Step 4: Now, swipe right or left and you will find Custard Castle Small Claims Court and click on it.


YOUR NEXT CLUE IS:

CLUE 3

Sport is the angle
The bait the allure
Success the disease
And you are the cure

ANSWER

Step 1: First Click on “Go Find It” Button Below the Clue 3

Step 2: Then Under Sports Games, Click on Casual tab. (!don’t be confused, can be any of categories!)

Step 3: After that scroll down and Go to Baseball.

Step 4: Now, swipe right or left and you will find Bass Ain’t Bitin’ 2022 and click on it.


YOUR NEXT CLUE IS:

CLUE 4

Maybe you managed to shut down your rivals
Your lucrative theme park’s still dead on arrival

ANSWER

Step 1: First Click on “Go Find It” Button Below the Clue 4

Step 2: Then Under Simulation, Click on Life & Immersive Sim tab.

Step 3: After that scroll down and Go to the Management. (!don’t be confused, can be any of categories!)

Step 4: Now, swipe right or left and you will find Dead Seagull Zoo Magnate and click on it.


YOUR NEXT CLUE IS:

CLUE 5

A know-it-all’s monstrous need to correct you
Will give you and your friends a lot to object to

ANSWER

Step 1: First Click on “Go Find It” Button Below the Clue 5.

Step 2: Then Under Co-operative Games, Click on Action tab. (!don’t be confused, can be any of categories!)

Step 3: After that scroll down and Go to the controller-friendly.

Step 4: Now, swipe right or left and you will find Actually… Frankenstein’s Monster Edition and click on it.


YOUR NEXT CLUE IS:

CLUE 6

No actions to take or choices to make
This passive adventure prefers that you wait

ANSWER

Step 1: First Click on “Go Find It” Button Below the Clue 6.

Step 2: Then Under Casual, Click on Word & Trivia tab. (!don’t be confused, can be any of categories!)

Step 3: After that scroll down and Go to the Open World.

Step 4: Now, You will find It’s Probably Fine and click on it.


YOUR NEXT CLUE IS:

CLUE 7

Your role in this realm
Is to guide your king true
To sit on his throne
Or mayhap on two

ANSWER

Step 1: First Click on “Go Find It” Button Below the Clue 7.

Step 2: Then Under Role-Playing Games, Click on Strategy RPG tab. (!don’t be confused, can be any of categories!)

Step 3: After that scroll down and Go to the ROGUELIKE.

Step 4: Now, swipe right or left and You will find Help Get The King To The Toilet and click on it. Congratulation!


YOUR NEXT CLUE IS:

CLUE 8

The horror the horror, pretentious explorers
This one’s the father of all arty snorers

ANSWER

Step 1: First Click on “Go Find It” Button Below the Clue 8.

Step 2: Then Under HORROR GAMES, Click on SURVIVAL tab. (!don’t be confused, can be any of categories!)

Step 3: After that scroll down and Go to the CONTROLLER-FRIENDLY.

Step 4: Now, swipe right or left and You will find The Consecration of Esthme and click on it. Congratulation!


YOUR NEXT CLUE IS:

CLUE 9

This virtual river has a full boat conveyed
Two princes that paddle with three little spades

ANSWER

Step 1: First Click on “Go Find It” Button Below the Clue 9.

Step 2: Then Under VIRTUAL REALITY TITLES, Click on CASUAL tab.

Step 3: After that scroll down and Go to the POPULAR TITLES.

Step 4: Now, swipe right or left and You will find Pro Poker Amateur and click on it. Congratulation!


YOUR NEXT CLUE IS:

CLUE 10

If your strategy is to keep me close, I’ll make you think. If your strategy is to let me go, I’ll make a stink.

ANSWER

Step 1: First Click on “Go Find It” Button Below the Clue 10.

Step 2: Then Under STRATEGY GAMES, Click on TOWER DEFENSE tab.

Step 3: After that scroll down and Go to the CO-OP.

Step 4: Now, swipe right or left and You will find Hold In Your Farts and click on it. Congratulation!


FINAL RESULT

Google Pay

This is how to make Buy with Google Pay. by only html code. Step by step you need to register the application first to google for the production side. Until February 2020 the google pay is still on Alpha Test.

1. This is the div button for the payment

<div id="container"></div>
<script async
  src="https://pay.google.com/gp/p/js/pay.js"
  onload="onGooglePayLoaded()"></script>

2. Javascript file or embeded below the html div code.

<script>
/**
 * Define the version of the Google Pay API referenced when creating your
 * configuration
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#PaymentDataRequest|apiVersion in PaymentDataRequest}
 */
const baseRequest = {
  apiVersion: 2,
  apiVersionMinor: 0
};

/**
 * Card networks supported by your site and your gateway
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#CardParameters|CardParameters}
 * @todo confirm card networks supported by your site and gateway
 */
const allowedCardNetworks = ["AMEX", "DISCOVER", "INTERAC", "JCB", "MASTERCARD", "VISA"];

/**
 * Card authentication methods supported by your site and your gateway
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#CardParameters|CardParameters}
 * @todo confirm your processor supports Android device tokens for your
 * supported card networks
 */
const allowedCardAuthMethods = ["PAN_ONLY", "CRYPTOGRAM_3DS"];

/**
 * Identify your gateway and your site's gateway merchant identifier
 *
 * The Google Pay API response will return an encrypted payment method capable
 * of being charged by a supported gateway after payer authorization
 *
 * @todo check with your gateway on the parameters to pass
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#gateway|PaymentMethodTokenizationSpecification}
 */
const tokenizationSpecification = {
  type: 'PAYMENT_GATEWAY',
  parameters: {
    'gateway': 'example',
    'gatewayMerchantId': 'exampleGatewayMerchantId'
  }
};

/**
 * Describe your site's support for the CARD payment method and its required
 * fields
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#CardParameters|CardParameters}
 */
const baseCardPaymentMethod = {
  type: 'CARD',
  parameters: {
    allowedAuthMethods: allowedCardAuthMethods,
    allowedCardNetworks: allowedCardNetworks
  }
};

/**
 * Describe your site's support for the CARD payment method including optional
 * fields
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#CardParameters|CardParameters}
 */
const cardPaymentMethod = Object.assign(
  {},
  baseCardPaymentMethod,
  {
    tokenizationSpecification: tokenizationSpecification
  }
);

/**
 * An initialized google.payments.api.PaymentsClient object or null if not yet set
 *
 * @see {@link getGooglePaymentsClient}
 */
let paymentsClient = null;

/**
 * Configure your site's support for payment methods supported by the Google Pay
 * API.
 *
 * Each member of allowedPaymentMethods should contain only the required fields,
 * allowing reuse of this base request when determining a viewer's ability
 * to pay and later requesting a supported payment method
 *
 * @returns {object} Google Pay API version, payment methods supported by the site
 */
function getGoogleIsReadyToPayRequest() {
  return Object.assign(
      {},
      baseRequest,
      {
        allowedPaymentMethods: [baseCardPaymentMethod]
      }
  );
}

/**
 * Configure support for the Google Pay API
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#PaymentDataRequest|PaymentDataRequest}
 * @returns {object} PaymentDataRequest fields
 */
function getGooglePaymentDataRequest() {
  const paymentDataRequest = Object.assign({}, baseRequest);
  paymentDataRequest.allowedPaymentMethods = [cardPaymentMethod];
  paymentDataRequest.transactionInfo = getGoogleTransactionInfo();
  paymentDataRequest.merchantInfo = {
    // @todo a merchant ID is available for a production environment after approval by Google
    // See {@link https://developers.google.com/pay/api/web/guides/test-and-deploy/integration-checklist|Integration checklist}
    // merchantId: '01234567890123456789',
    merchantName: 'Example Merchant'
  };

  paymentDataRequest.callbackIntents = ["PAYMENT_AUTHORIZATION"];

  return paymentDataRequest;
}

/**
 * Return an active PaymentsClient or initialize
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/client#PaymentsClient|PaymentsClient constructor}
 * @returns {google.payments.api.PaymentsClient} Google Pay API client
 */
function getGooglePaymentsClient() {
  if ( paymentsClient === null ) {
    paymentsClient = new google.payments.api.PaymentsClient({
        environment: 'TEST',
      paymentDataCallbacks: {
        onPaymentAuthorized: onPaymentAuthorized
      }
    });
  }
  return paymentsClient;
}

/**
 * Handles authorize payments callback intents.
 *
 * @param {object} paymentData response from Google Pay API after a payer approves payment through user gesture.
 * @see {@link https://developers.google.com/pay/api/web/reference/response-objects#PaymentData object reference}
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/response-objects#PaymentAuthorizationResult}
 * @returns Promise<{object}> Promise of PaymentAuthorizationResult object to acknowledge the payment authorization status.
 */
function onPaymentAuthorized(paymentData) {
  return new Promise(function(resolve, reject){
    // handle the response
    processPayment(paymentData)
      .then(function() {
        resolve({transactionState: 'SUCCESS'});
      })
      .catch(function() {
        resolve({
          transactionState: 'ERROR',
          error: {
            intent: 'PAYMENT_AUTHORIZATION',
            message: 'Insufficient funds, try again. Next attempt should work.',
            reason: 'PAYMENT_DATA_INVALID'
          }
        });
	    });
  });
}

/**
 * Initialize Google PaymentsClient after Google-hosted JavaScript has loaded
 *
 * Display a Google Pay payment button after confirmation of the viewer's
 * ability to pay.
 */
function onGooglePayLoaded() {
  const paymentsClient = getGooglePaymentsClient();
  paymentsClient.isReadyToPay(getGoogleIsReadyToPayRequest())
    .then(function(response) {
      if (response.result) {
        addGooglePayButton();
      }
    })
    .catch(function(err) {
      // show error in developer console for debugging
      console.error(err);
    });
}

/**
 * Add a Google Pay purchase button alongside an existing checkout button
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#ButtonOptions|Button options}
 * @see {@link https://developers.google.com/pay/api/web/guides/brand-guidelines|Google Pay brand guidelines}
 */
function addGooglePayButton() {
  const paymentsClient = getGooglePaymentsClient();
  const button =
      paymentsClient.createButton({onClick: onGooglePaymentButtonClicked});
  document.getElementById('container').appendChild(button);
}

/**
 * Provide Google Pay API with a payment amount, currency, and amount status
 *
 * @see {@link https://developers.google.com/pay/api/web/reference/request-objects#TransactionInfo|TransactionInfo}
 * @returns {object} transaction info, suitable for use as transactionInfo property of PaymentDataRequest
 */
function getGoogleTransactionInfo() {
  return {
        displayItems: [
        {
          label: "Subtotal",
          type: "SUBTOTAL",
          price: "11.00",
        },
      {
          label: "Tax",
          type: "TAX",
          price: "1.00",
        }
    ],
    countryCode: 'US',
    currencyCode: "USD",
    totalPriceStatus: "FINAL",
    totalPrice: "12.00",
    totalPriceLabel: "Total"
  };
}


/**
 * Show Google Pay payment sheet when Google Pay payment button is clicked
 */
function onGooglePaymentButtonClicked() {
  const paymentDataRequest = getGooglePaymentDataRequest();
  paymentDataRequest.transactionInfo = getGoogleTransactionInfo();

  const paymentsClient = getGooglePaymentsClient();
  paymentsClient.loadPaymentData(paymentDataRequest);
}

let attempts = 0;
/**
 * Process payment data returned by the Google Pay API
 *
 * @param {object} paymentData response from Google Pay API after user approves payment
 * @see {@link https://developers.google.com/pay/api/web/reference/response-objects#PaymentData|PaymentData object reference}
 */
function processPayment(paymentData) {
  return new Promise(function(resolve, reject) {
    setTimeout(function() {
      // @todo pass payment token to your gateway to process payment
      paymentToken = paymentData.paymentMethodData.tokenizationData.token;

			if (attempts++ % 2 == 0) {
	      reject(new Error('Every other attempt fails, next one should succeed'));      
      } else {
	      resolve({});      
      }
    }, 500);
  });
}
</script>
Exit mobile version