Skip to content

Instantly share code, notes, and snippets.

View elias1435's full-sized avatar
🕋
Working from home

Md. Elias elias1435

🕋
Working from home
View GitHub Profile
@hasinhayder
hasinhayder / qr_code.liquid
Created December 14, 2023 13:50
QR Code Block
{% assign full_url = request.host | append: request.path %}
<div style="position: fixed; bottom: 0; right: 0">
{% comment %} {{ "thumbs-up.png" | asset_url | img_tag }} {% endcomment %}
<img width="150" height="150" src="https://chart.googleapis.com/chart?chs=150x150&cht=qr&chl={{ full_url }}" alt=""/>
</div>
{% schema %}
{
"name": "App Embed",
"target": "body",
"settings": []
@elias1435
elias1435 / package.json
Created December 11, 2023 15:59 — forked from hasinhayder/package.json
Shopify App Extension with Local Script
{
"name": "faq-laravel",
"private": true,
"license": "UNLICENSED",
"scripts": {
"shopify": "shopify",
"build": "shopify app build",
"dev": "shopify app dev",
"info": "shopify app info",
"scaffold": "shopify app generate extension",
@hasinhayder
hasinhayder / package.json
Last active January 13, 2024 16:31
Shopify App Extension with Local Script
{
"name": "faq-laravel",
"private": true,
"license": "UNLICENSED",
"scripts": {
"shopify": "shopify",
"build": "shopify app build",
"dev": "shopify app dev",
"info": "shopify app info",
"scaffold": "shopify app generate extension",
@wtmujeebu
wtmujeebu / functions.php
Created May 28, 2021 04:31
Add href to links - CookieYes GDPR Cookie Consent
<?php
add_action('wp_footer', 'wt_cli_add_href_to_links');
function wt_cli_add_href_to_links() {
if (class_exists('Cookie_Law_Info')) {
?>
<script>
jQuery(function($) {
wt_cli_links = $('#cookie-law-info-bar a, #cliSettingsPopup a');
wt_cli_links.each(function() {
<?php /* Template Name: Tutor Advanced Course Filter */?>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.3/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/all.min.css">
<style>
:root{--tutor-major-color:#008CC9;--tutor-hover-color:#006fa0;--tutor-heading-color:#2A3235;--tutor-text-color:#6F7F86;--tutor-success-button-color:var(--tutor-major-color)}.tutor-sidebar-filter .single-filter{margin-bottom:25px;color:var(--tutor-heading-color)}.tutor-sidebar-filter .single-filter:last-child{margin-bottom:0}.tutor-course-col .tutor-course .tutor-loop-rating-wrap.no-rating .tutor-star-rating-group{color:#ddd}.tutor-sidebar-filter .single-filter label{display:block;cursor:pointer;transition:.3s}.tutor-sidebar-filter .single-filter label:hover{color:var(--tutor-major-color)}.tutor-sidebar-filter .single-filter label input{display:none}.tutor-sidebar-filter .single-filter label .filter-checkbox{height:17px;width:
@champsupertramp
champsupertramp / Ultimate Member 2.0 - Add Profile Photo in Register Form
Created June 2, 2019 13:15
Ultimate Member 2.0 - Add Profile Photo in Register Form
/**
* Add new predefined field "Profile Photo" in UM Form Builder.
*/
add_filter("um_predefined_fields_hook","um_predefined_fields_hook_profile_photo", 99999, 1 );
function um_predefined_fields_hook_profile_photo( $arr ){
$arr['profile_photo'] = array(
'title' => __('Profile Photo','ultimate-member'),
'metakey' => 'profile_photo',
@ideadude
ideadude / my_pmpro_registration_checks_restrict_email_addresses.php
Last active September 27, 2024 13:31 — forked from strangerstudios/my_pmpro_checkout_restrict_email_domain.php
Restrict Membership Signup by Email Domain (Useful for Education, Corporate, or Association Memberships)
<?php
/**
* Restrict Membership Signup by Email Domain
* Make sure to edit the $valid_domains array defined further below
* to include only the domains you'd like to allow.
*
* Add this code to a custom plugin. More info: https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
function my_pmpro_registration_checks_restrict_email_addresses( $value ) {
$email = $_REQUEST['bemail'];
@travislima
travislima / pmpro_rh_step3.php
Last active March 16, 2022 13:10
Step 3 - Register Helper: A step-by-step guide on creating custom fields.
<?php //Do not copy this tag.
/**
* Add custom fields to Paid Memberships Pro checkout page.
* Must have PMPro & Register Helper Add On installed and activated to work.
* Add this code to a PMPro Customizations Plugin or Code Snippets plugin.
*/
function pmpro_add_fields_to_checkout(){
//don't break if Register Helper is not loaded
@rifkyfu32
rifkyfu32 / Allow everyone to upload profile registration pages.txt
Last active November 30, 2021 22:03
Customization allow everyone to upload profile on registration pages - Ultimate Member 2.0 +
1.Copy the bellow code in your theme's function.php file. Should be in public_html/wp-content/themes/your-themes-name/function.php
/**
* Ultimate Member 2.0 - Customization
* Description: Allow everyone to upload profile registration pages.
*/
add_filter("um_user_pre_updating_files_array","um_custom_user_pre_updating_files_array", 10, 1);
function um_custom_user_pre_updating_files_array( $arr_files ){
if( is_array( $arr_files ) ){
@FranciscoG
FranciscoG / acf_repeater_shortcode.php
Last active October 28, 2024 06:16
An Advanced Custom Fields shortcode that allows to loop through a field with a repeater. This only handles simple cases, it can't handle nested repeater fields
<?php
/**
* ACF Pro repeater field shortcode
*
* I created this shortcode function because it didn't exist and it was being requested by others
* I originally posted it here: https://support.advancedcustomfields.com/forums/topic/repeater-field-shortcode/
*
* @attr {string} field - (Required) the name of the field that contains a repeater sub group
* @attr {string} sub_fields - (Required) a comma separated list of sub field names that are part of the field repeater group
* @attr {string} post_id - (Optional) Specific post ID where your value was entered. Defaults to current post ID (not required). This can also be options / taxonomies / users / etc