Skip to content

Instantly share code, notes, and snippets.

View dexit's full-sized avatar
🎯
Focusing

Rihards Mantejs dexit

🎯
Focusing
View GitHub Profile
@dexit
dexit / class.php
Created March 25, 2026 17:19 — forked from hlashbrooke/class.php
A complete, versatile options page class for any WordPress plugin
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
class WordPress_Plugin_Template_Settings {
private $dir;
private $file;
private $assets_dir;
private $assets_url;
private $settings_base;
@dexit
dexit / wp-list-table-custom.php
Created March 25, 2026 17:09 — forked from faiyazalam/wp-list-table-custom.php
WP_List_Table - Custom
<?php
/*
Plugin Name: WordPress - WP_List_Table - Custom
*/
add_action( 'admin_menu','register_my_custom_menu_page');
function register_my_custom_menu_page(){
global $new_menu_page;
// creating admin menu
@dexit
dexit / edit.js
Created March 25, 2026 14:39 — forked from carlodaniele/edit.js
A custom Gutenberg block to add and manage custom meta fields in WordPress
/**
* Retrieves the translation of text.
*
* @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-i18n/
*/
import { __ } from '@wordpress/i18n';
/**
* React hook that is used to mark the block wrapper element.
* It provides all the necessary props like the class name.
@dexit
dexit / registration.php
Created December 17, 2025 13:23 — forked from Asikur22/registration.php
Create a User Registration Form in Elementor
/*
* Create new user from Elementor form
*/
add_action( 'elementor_pro/forms/new_record', 'gl_elementor_form_create_new_user', 99, 2 );
function gl_elementor_form_create_new_user( $record, $ajax_handler ) {
$form_id = $record->get_form_settings( 'id' );
if ( 'register_form' !== $form_id ) {
return;
}
@dexit
dexit / registration.php
Created December 17, 2025 13:23 — forked from Asikur22/registration.php
Create a User Registration Form in Elementor
/*
* Create new user from Elementor form
*/
add_action( 'elementor_pro/forms/new_record', 'gl_elementor_form_create_new_user', 99, 2 );
function gl_elementor_form_create_new_user( $record, $ajax_handler ) {
$form_id = $record->get_form_settings( 'id' );
if ( 'register_form' !== $form_id ) {
return;
}
@dexit
dexit / elementor-form-hcaptcha-handler.php
Created December 17, 2025 12:57 — forked from DavePodosyan/elementor-form-hcaptcha-handler.php
hCaptcha Integration for Elementor Forms
<?php
/**
*
* A simple integration of hCaptcha with Elementor Forms, following Elementor’s pattern for reCAPTCHA.
*
* Instructions:
* 1. Add this file to your WordPress theme directory.
* 2. Include the file in your theme's `functions.php` file using:
*
@dexit
dexit / elementor-form-turnstile-handler.php
Created December 17, 2025 12:56 — forked from DavePodosyan/elementor-form-turnstile-handler.php
Cloudflare Turnstile Integration for Elementor Forms
<?php
/**
*
* A simple integration of Cloudflare Turnstile with Elementor Forms, following Elementor’s pattern for reCAPTCHA.
*
* Instructions:
* 1. Add this file to your WordPress theme directory.
* 2. Include the file in your theme's `functions.php` file using:
*
@dexit
dexit / form
Created December 17, 2025 12:54 — forked from bugnumber9/form
add_action( 'elementor_pro/forms/validation', function( $form_record, $ajax_handler ) {
if ( 'Test Form 1' !== $form_record->get_form_settings( 'form_name' ) ) {
return;
}
$fields = $form_record->get('fields');
$email = $fields['email']['value'];
if ( email_exists( $email ) ) {
<?php
/**
* List Table API: WP_Posts_List_Table class
*
* @package WordPress
* @subpackage Administration
* @since 3.1.0
*/
/**
@dexit
dexit / Wordpress old version function.php
Created December 12, 2025 13:37 — forked from JusTruetice/Wordpress old version function.php
Wordpress old version function.php main
<?php
/**
* Theme functions and definitions
*
* @package HelloElementor
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}