Skip to content

Instantly share code, notes, and snippets.

View dragipostolovski's full-sized avatar
🏠
Working from home

Dragi Postolovski dragipostolovski

🏠
Working from home
View GitHub Profile
<?php
/**
* PE_Elementor class.
*
* @category Class
* @package PEElementor
* @subpackage WordPress
* @author Dragi Postolovski <contact@projectsengine.com>
* @copyright 2021 Dragi Postolovski
<?php
/**
* Projects Engine
*
* @copyright Copyright (C) 2021-2021, Projects Engine - contact@projectsengine.com
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License, version 3 or higher
*
* @wordpress-plugin
* Plugin Name: Projects Engine
* Version: 1.9.2
<?php
// Wrap two adjacent elements in a containing div using jQuery.
function pe_load_js() {
?>
<script type='text/javascript'>
jQuery(document).ready(function ($) {
$("#billing_customer_age_field span input").each(function(index) {
<?php
function pe_custom_post_product() {
$labels = array(
'name' => _x( 'Products', 'post type general name' ),
'singular_name' => _x( 'Product', 'post type singular name' ),
'add_new' => _x( 'Add New', 'book' ),
'add_new_item' => __( 'Add New Product' ),
'edit_item' => __( 'Edit Product' ),
'new_item' => __( 'New Product' ),
@dragipostolovski
dragipostolovski / widget-random-post.php
Last active March 22, 2021 10:29
How to Create a WordPress Custom Widget
<?php
class PE_Random_Post extends WP_Widget {
public function __construct() {
// actual widget processes
parent::__construct(
'pe_random_post', // Base ID
'Random Post', // Name
array( 'description' => __( 'Display random post in sidebar widget.', 'projectsengine' ), ) // Args