Skip to content

Instantly share code, notes, and snippets.

View ahmedeshaan's full-sized avatar

Ahmed Eshaan ahmedeshaan

View GitHub Profile
<?php
function my_shortcode_function_from_main_theme(){
return "okey";
}
//add a custom shortcode
add_action( 'init', 'my_add_shortcodes' );
<?php
add_filter('woocommerce_get_availability', 'availability_filter_func');
function availability_filter_func($availability)
{
$availability['availability'] = str_ireplace('Out of stock', 'Available soon', $availability['availability']);
return $availability;
}
div.product-small .z-top {
z-index: 2;
}
function my_shortcode_function_from_main_theme_for_dots($atts, $content = null, $tag) {
extract(shortcode_atts(array(
"_id" => 'row-'.rand(),
'style' => '',
'class' => '',
// Layout
"columns" => '4',
"columns__sm" => '1',
<?php
/*
Template name: WooCommerce - My Account
This templates add My account to the sidebar.
*/
get_header(); ?>
<?php do_action( 'flatsome_before_page' ); ?>
<script type="text/javascript">
jQuery( document ).ready(function() {
jQuery(".product-categories .cat-parent").addClass( "active");
});
</script>
<?php
defined( 'ABSPATH' ) or die( 'Keep Silent' );
?><!DOCTYPE html>
<html <?php language_attributes(); ?> class="no-js">
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="profile" href="http://gmpg.org/xfn/11">
<?php if ( is_singular() && pings_open( get_queried_object() ) ) : ?>
function my_shortcode_to_remove_nofollow_from_flatsome_share($atts, $content = null) {
extract(shortcode_atts(array(
'title' => '',
'size' => '',
'align' => '',
'scale' => '',
'style' => '',
), $atts));
function my_shortcode_to_remove_blank_from_email($atts, $content = null) {
$sliderrandomid = rand();
extract(shortcode_atts(array(
'title' => '',
'style' => 'outline',
'align' => '',
'scale' => '',
'defaults' => '',
'twitter' => '',
'facebook' => '',
<?php
// Disable Admin Bar for everyone but administrators
if (!function_exists('df_disable_admin_bar')) {
function df_disable_admin_bar() {
if (!current_user_can('manage_options')) {
// for the admin page