This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Necessary function, which can be used in making of theme | |
* for client or ThemeForest or helper plugin for page builder. | |
*/ | |
/** | |
* Those two functions are for set and get attribute for html tag. | |
* Example:- for set attribute |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// This example will add a custom "select" drop down & "switcher" to the "testimonial" section | |
// and add custom "color" to the "testimonial style" section | |
add_action('elementor/element/before_section_end', 'add_control_in_existing_widget', 10, 3 ); | |
function add_control_in_existing_widget( $section, $section_id, $args ) { | |
if( $section->get_name() == 'testimonial' && $section_id == 'section_testimonial' ){ | |
// we are at the end of the "section_testimonial" area of the "testimonial" | |
$section->add_control( | |
'testimonial_name_title_pos' , | |
[ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function ($) { | |
"use strict"; | |
function dgm_reset_position($current, $item){ | |
if( $current.length === 0 ) | |
return; | |
var $item = $current.next('.dgm_product_item'); | |
var tipX = $current.outerWidth(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
*Example Follw:-https://code.tutsplus.com/tutorials/build-a-custom-wordpress-user-flow-part-3-password-reset--cms-23811 | |
*/ | |
// Create the custom pages at plugin activation | |
register_activation_hook( __FILE__, 'dgm_plugin_activated' ); | |
function dgm_plugin_activated() { | |
// Information needed for creating the plugin's pages | |
$page_definitions = array( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
---------------------------------------------------------------------------------- | |
This is only for windows operator. | |
You have to edit two file on xampp folder to setup SMTP mail on local server | |
and some setup on your gmail account.There are 3 steps which are:- | |
1. php.ini file from this folder location ==> C:\xampp\php\php.ini | |
2. sendmail.ini file from this flder location ==> C:\xampp\sendmail\sendmail.ini | |
3. Go to this link https://support.google.com/accounts/answer/6010255 | |
---------------------------------------------------------------------------------- | |
/** | |
* 1st step.... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ( !class_exists( 'DGM_Reset_PassWord' ) ) { | |
/** | |
* | |
* Forgot password form | |
* Reset password form | |
* | |
*/ | |
class DGM_Reset_PassWord { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- search for special one post type --> | |
<div class="search-form"> | |
<form role="search" method="get" class="search-form mc-form bottom" action="<?php echo esc_url( home_url( '/' ) ); ?>"> | |
<input type="search" class="search-field" placeholder="<?php esc_html_e( 'Enter your keyword', 'text-domain' ) ?>" value="<?php echo esc_attr( get_search_query() ); ?>" name="s" /> | |
<input type="hidden" name="post_type" value="product"> | |
<button type="submit" class="search-submit"><span class="ti ti-search"></span></button> | |
</form> | |
</div> | |
<!-- search for special two or more post type --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="search-form"> | |
<form role="search" method="get" class="search-form mc-form bottom" action="<?php echo esc_url( home_url( '/' ) ); ?>"> | |
<input type="search" id="" class="search-field" placeholder="<?php esc_html_e( 'Enter your keyword', 'digimart' ) ?>" value="<?php echo esc_attr( get_search_query() ); ?>" name="s" /> | |
<button type="submit" class="search-submit"><span class="ti ti-search"></span></button> | |
</form> | |
</div> | |
<script> | |
$(document).ready(function () { | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* To externally insert jQuery on that webpage from your browser’s console | |
* all you need to do is to copy-paste and run the following code in the console. | |
*/ | |
var script = document.createElement("script"); | |
script.setAttribute("src", "https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"); | |
script.addEventListener('load', function() { | |
var script = document.createElement("script"); | |
document.body.appendChild(script); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Run all following codes in a browser console panel | |
var cls_array = []; //array declaration (or var cls_array = new Array()) | |
console.log(typeof cls_array); //type var type check | |
var icon_tags = $('.icons i'); //variable declaration for icon tag. you set your class name whatever you need | |
console.log(icon_tags.length); | |
icon_tags.each(function () { | |
var $self = $(this), |
OlderNewer