Skip to content

Instantly share code, notes, and snippets.

View morosmo's full-sized avatar
🎯
Focusing

D-E-V morosmo

🎯
Focusing
  • Morosoft
  • Rawalpindi
  • 21:42 (UTC +05:00)
View GitHub Profile
<?php
/*
Plugin Name: Hook Scanner Pro
Description: Scans plugin folders for WordPress PHP and JS hook usage and displays file, line, arguments, and example usage.
Version: 0.3
Author: ChatGPT
*/
if (isset($_GET['instrument']) && $_GET['instrument'] === 'scan') {
add_action('init', 'scan_plugin_for_hooks');
@morosmo
morosmo / languages-list-EN
Created March 17, 2025 14:59 — forked from rescueboy/languages-list-EN
Worldwide spoken languages lists ENGLISH, FRENCH
"Afrikaans",
"Arabic",
"Bengali",
"Bulgarian",
"Catalan",
"Cantonese",
"Croatian",
"Czech",
"Danish",
"Dutch",
@morosmo
morosmo / sshconnection.md
Created February 21, 2025 06:32
Connecting Github To Local Computer

Setting Up SSH Key for GitHub

To create an SSH key for GitHub, use the following commands:

ssh-keygen -t rsa -b 4096 (After running commang jsut press enter continously to get they keys)

The above command will genrrate ssh key at your user main folder.

@morosmo
morosmo / update-listing.js
Last active February 20, 2025 19:19
Refresh Lisitng Grid on Form Submit - Crocoblock Elementor
// This script listens for a successful form submission event from JetFormBuilder.
// When the form is successfully submitted, it waits for 2 seconds, logs a message,
// closes the popup, and refreshes the listing grids on the page.
jQuery(document).ready(function ($) {
$(document).on("jet-form-builder/ajax/on-success", function () {
setTimeout(function () {
console.log("Form Submitted Successfully");
$(".jet-popup__close-button").trigger("click");
refreshListingGrids();
/// PROBLEM ///
// Listing grid of a CPT.
// Each row has an EDIT button.
// The button opens a JetPopup with a form inside.
// After editing the fields, I cannot configure a REDIRECT action in the form, as it refreshes the page and the listing returns to the first page.
// If the edit occurred on page 10, it's a hassle to have to return to the page where you were before EDITING every time.
// 👉 Place inside an HTML widget on the page where the popup will open.
jQuery(document).ready(function ($) {
$(window).on("jet-popup/render-content/ajax/success", function (event, params) {
$(document).on("jet-form-builder/ajax/on-success", function () {
@morosmo
morosmo / allinonemigration.md
Created January 20, 2025 11:45 — forked from giovanni-d/allinonemigration.md
All-in-One WP Migration - Restore From Server (without PRO version) - Restore

All-in-One WP Migration Restore From Server (without pro version)

If you don't want to pay for the PRO version of this plugin, and you want to use the "Restore from Server" functionally that was present in the version 6.77, follow the instructions below:

  1. Open the js file: wp-content/plugins/all-in-one-wp-migration/lib/view/assets/javascript/backups.min.js
  2. On line 1208, replace the code below:
$('.ai1wm-backup-restore').click(function (e) {
@morosmo
morosmo / get-related.md
Created January 16, 2025 12:22 — forked from Crocoblock/get-related.md
Get JetEngine Related Items programmatically / Update related items / Get/Update relation meta