Skip to content

Instantly share code, notes, and snippets.

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

Mira temsool

🏠
Working from home
View GitHub Profile
@temsool
temsool / config.php
Last active March 1, 2019 02:32
Widgetkit custom slider-2 elementor plugin
<?php
use Elementor\Widget_Base;
use Elementor\Controls_Manager;
use Elementor\Repeater;
use Elementor\Group_Control_Typography;
use Elementor\Scheme_Typography;
use Elementor\Group_Control_Border;
@temsool
temsool / disable accordion
Created October 14, 2018 11:26
disable/enable accordion widget functionality by JS ELEMENTOR
$( '.elementor-tab-title' ).prop('onfocus', null).off( 'focus' );
@temsool
temsool / wpautop.php
Created October 15, 2018 19:34
Enable wpautop wordpress elementor
<?php
add_action( 'elementor/widget/render_content', function( $content, $widget ) {
if ( 'text-editor' === $widget->get_name() ) {
$content =wpautop($content);
}
return $content;
}, 10, 2 );
@temsool
temsool / elementor-portfolio.php
Created October 30, 2018 14:37
portfolio dynamic hover caption post title
<?php
add_action('elementor/widget/render_content', function( $content, $widget ) {
$settings = $widget->get_settings();
if (strpos($settings['_css_classes'], "portfolio-image") !== false) {
$caption = get_the_title(get_the_ID());
$link=get_permalink(get_the_ID());
$content .= '<a class="portfolio-hover" target="_blank" href="'.$link.'">' . $caption . '</a>';
}
return $content;
@temsool
temsool / gist:4f871ef2cb3a3bb7b051ac75d3e56fe1
Created November 1, 2018 11:23
is logged in user admin? wordpress
<?php if( current_user_can('editor') || current_user_can('administrator') ) { ?>
// stuff here for admins or editors
<?php } ?>
@temsool
temsool / elementor-plugins
Last active November 26, 2018 01:28
Elementor Plugins
DynamicConditions
https://wordpress.org/plugins/dynamicconditions/
----------------------
Elementor Custom Skin
https://wordpress.org/plugins/ele-custom-skin/
----------------------
Elementor Google Map Extended
https://wordpress.org/plugins/extended-google-map-for-elementor/
----------------------
Lenix Elementor Leads addon
#target Illustrator
/*
Revision-1
Author: Shivendra Agarwal
Year: 2017
Title: Script to scale-up artwork and artboard above 15 Mpixel
*/
if ( app.documents.length > 0 )
alert("ERROR: \n Close all documents before running this script." );
@temsool
temsool / _spacing-helpers.scss
Created March 18, 2019 08:02 — forked from jacurtis/_spacing-helpers.scss
SASS Margin and Padding Helpers Loop. Generates .m-t-10 type helper classes.
/*
This .scss loop will create "margin helpers" and "padding helpers" for use in your web projects.
It will generate several classes such as:
.m-r-10 which gives margin-right 10 pixels.
.m-r-15 gives MARGIN to the RIGHT 15 pixels.
.m-t-15 gives MARGIN to the TOP 15 pixels and so on.
.p-b-5 gives PADDING to the BOTTOM of 5 pixels
.p-l-40 gives PADDING to the LEFT of 40 pixels
@temsool
temsool / gist:85bfcb78e124c94bae660648b3c4a841
Created March 18, 2019 08:58
Bootstrap 4 Rem calculator scss function
At the begin:
@function rem-calc($size) { $remSize: $size / 16; @return #{$remSize}rem; }
then use it for example like this:
.navbar { height: rem-calc(90); }
@temsool
temsool / gist:442f095f73b5ae11b905ce467f472435
Created April 11, 2019 10:47
php site ssl fix htaccess
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
RewriteEngine On
RewriteCond %{HTTPS} !on
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]