Follow the steps below to integrate the Katheeb Instacart App with your Salla store theme.
From your component settings page in Salla:
INITIALISATION | |
============== | |
load wp-config.php | |
set up default constants | |
load wp-content/advanced-cache.php if it exists | |
load wp-content/db.php if it exists | |
connect to mysql, select db | |
load object cache (object-cache.php if it exists, or wp-include/cache.php if not) | |
load wp-content/sunrise.php if it exists (multisite only) |
/* Append the Custom Styles */ | |
var css = '.banner{display:none !important}.comment__header{margin-bottom:1em!important}.comment__header small{clear:both!important;display:block!important}.comment__meta{padding-top:5px!important;}.headerstrip .is-hidden-tablet-and-below{padding:0!important;}.headerstrip__content--desktop{height:60px!important;padding-top:0!important;}.item-grid>li{width:139px!important;}.theme-label-Jannah{background:#00b8ff!important;}.theme-label-Jarida{background:#c70000!important;}.theme-label-Sahifa{background:orange!important;}.theme-label-name{float:right!important;font-size:16px!important;margin-left:10px!important;padding:8px 10px!important}.user-info-header__user-details{overflow:hidden!important}', | |
head = document.head || document.getElementsByTagName('head')[0], | |
style = document.createElement('style'); | |
head.appendChild(style); | |
style.appendChild(document.createTextNode(css)); | |
/* */ | |
jQuery('.comment__initial').each(function() { |
<?php | |
/*-----------------------------------------------------------------------------------*/ | |
/* Admin CSS */ | |
/*-----------------------------------------------------------------------------------*/ | |
if(!function_exists('ct_admin_css')) { | |
function ct_admin_css() { | |
echo '<style>'; | |
echo 'tr[data-slug="slider-revolution"] + .plugin-update-tr, .vc_license-activation-notice, .rs-update-notice-wrap, tr.plugin-update-tr.active#js_composer-update { display: none !important;}'; |
<?php | |
/** | |
* Plugin Name: Fix infinite redirect on static front page | |
* Description: Use this simple plugin to Fix infinite redirect on static front page with some WordPress versions | |
* Plugin URI: https://tielabs.com/ | |
* Author: TieLabs | |
* Author URI: https://tielabs.com | |
* Version: 0.1.0 | |
* License: GPLv2 or later | |
*/ |
<?php | |
$google_fonts = array( | |
'ABeeZee', | |
'Abel', | |
'Abril+Fatface', | |
'Aclonica', | |
'Acme', | |
'Actor', | |
'Adamina', |
{ | |
"kind": "webfonts#webfontList", | |
"items": [ | |
{ | |
"kind": "webfonts#webfont", | |
"family": "ABeeZee", | |
"category": "sans-serif", | |
"variants": [ | |
"regular", | |
"italic" |
<?php | |
add_action( 'wp_head', 'tie_add_mce_button'); | |
add_action( 'wp_enqueue_scripts', 'tie_admin_register2' ); | |
add_action( 'wp_enqueue_scripts', 'tie_shortcodes_mce_css' ); | |
function tie_admin_register2(){ | |
wp_register_script( 'tie-admin-main', get_template_directory_uri() . '/framework/admin/assets/js/tie.js', array( 'jquery' ) , false , false ); | |
wp_register_style( 'tie-style', get_template_directory_uri().'/framework/admin/assets/style.css', array(), '', 'all' ); | |
wp_enqueue_script( 'tie-admin-main' ); |
function tie_addWidgetToSidebar($sidebarSlug, $widgetSlug, $countMod, $widgetSettings = array()){ | |
$sidebarOptions = get_option('sidebars_widgets'); | |
if(!isset($sidebarOptions[$sidebarSlug])){ | |
$sidebarOptions[$sidebarSlug] = array('_multiwidget' => 1); | |
} | |
$newWidget = get_option('widget_'.$widgetSlug); | |
if(!is_array($newWidget))$newWidget = array(); | |
$count = count($newWidget)+1+$countMod; | |
$sidebarOptions[$sidebarSlug][] = $widgetSlug.'-'.$count; |
<?php | |
// Removing the automatic <p> and <br> WordPress Shortcodes | |
// By Fouad Badawy | tielabs.com | |
function tie_fix_shortcodes($content){ | |
$array = array ( | |
'[raw]' => '', | |
'[/raw]' => '', | |
'<p>[raw]' => '', | |
'[/raw]</p>' => '', |