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
$animations = array( | |
'bounce' => 'bounce', | |
'flash' => 'flash', | |
'pulse' => 'pulse', | |
'rubberBand' => 'rubberBand', | |
'shake' => 'shake', | |
'swing' => 'swing', | |
'tada' => 'tada', | |
'wobble' => 'wobble', | |
'jello' => 'jello', |
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
Global should not use outside function. It's a bad practice | |
Use a unique prefix like themename or framework name | |
use wp_site_icon | |
Data validation - esc_html() esc_html__() etc | |
Page break <!--nextpage--> should work in posts | |
Latest versions of used plugins | |
Check theme errors by using - Theme check plugin | |
Post layout/functionality - sticky post, etc | |
Use filters body_class, post_class, to add classes |
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
upload_max_filesize = 128M | |
post_max_size = 64M | |
memory_limit = 300M | |
file_uploads = On | |
max_execution_time = 180 |
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
// Markup for HTML | |
// We will use a class called "custom-spacing" and give some data attributes as we need. | |
<div class="custom-spacing" data-height="20px" data-padding-left="50px" data-padding-right="50px"></div> | |
## THE MAGIC PART | |
// The jQuery code for doing the magic. | |
// We will loop through all the "custom-spacing" classes and grab there data attributes and set CSS property and value according to it. |
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="form-group"> | |
[text* name class:form-control placeholder "Your name"] | |
<div class="form-grad-border"></div> | |
</div> | |
<div class="form-group"> | |
[email* email class:form-control placeholder "Your email"] | |
<div class="form-grad-border"></div> | |
</div> | |
<div class="form-group"> | |
[text* subject class:form-control placeholder "Subject"] |
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 | |
add_action('elementor/element/before_section_end', function( $section, $section_id, $args ) { | |
if( $section->get_name() == 'section' && $section_id == 'section_layout' ){ | |
$section->add_control( | |
'wpb_section_padding', | |
[ | |
'label' => _x( 'Section Padding (top & bottom)', 'Section Control', 'wpb-plugins' ), | |
'type' => Elementor\Controls_Manager::SELECT, | |
'options' => [ | |
'default' => _x( 'Default', 'Section Control', 'wpb-plugins' ), |
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
add_action( 'template_redirect', function(){ | |
ob_start( function( $buffer ){ | |
$buffer = str_replace( array( 'type="text/javascript"', "type='text/javascript'" ), '', $buffer ); | |
// Also works with other attributes... | |
$buffer = str_replace( array( 'type="text/css"', "type='text/css'" ), '', $buffer ); | |
$buffer = str_replace( array( 'frameborder="0"', "frameborder='0'" ), '', $buffer ); | |
$buffer = str_replace( array( 'scrolling="no"', "scrolling='no'" ), '', $buffer ); |
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 to get the client IP address | |
function get_client_ip() { | |
$ipaddress = ''; | |
if (isset($_SERVER['HTTP_CLIENT_IP'])) | |
$ipaddress = $_SERVER['HTTP_CLIENT_IP']; | |
else if(isset($_SERVER['HTTP_X_FORWARDED_FOR'])) | |
$ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR']; | |
else if(isset($_SERVER['HTTP_X_FORWARDED'])) | |
$ipaddress = $_SERVER['HTTP_X_FORWARDED']; | |
else if(isset($_SERVER['HTTP_FORWARDED_FOR'])) |
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 | |
namespace xPiderTS\Widgets; | |
use Elementor\Widget_Base; | |
use Elementor\Controls_Manager; | |
use Elementor\Group_Control_Typography; | |
use Elementor\Group_Control_Background; | |
use Elementor\Scheme_Typography; | |
use Elementor\Scheme_Color; | |
use Elementor\Utils; |
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
// Assume $map looks like this: | |
$map = array( | |
array( 'name' => 'Name 1', 'something else' => 'whatever' ), | |
array( 'name' => 'Name 2', 'something else' => 'whatever' ), | |
array( 'name' => 'Name 3', 'something else' => 'whatever' ), | |
array( 'name' => 'Name 4', 'something else' => 'whatever' ), | |
array( 'name' => 'Name 5', 'something else' => 'whatever' ), | |
array( 'name' => 'Name 6', 'something else' => 'whatever' ), | |
array( 'name' => 'Name 7', 'something else' => 'whatever' ), | |
array( 'name' => 'Name 8', 'something else' => 'whatever' ), |
OlderNewer