This file contains 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 theme_preprocess_node(&$variables) { | |
if ($type == 'node') { | |
// current user role | |
$currentuserId = \Drupal::currentUser()->id(); | |
// Load licenses associated with the current user. | |
$license_ids = \Drupal::entityQuery('commerce_license') | |
->condition('uid', $currentuserId) |
This file contains 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
+ set -o errexit nounset pipefail | |
+ rm -f /tmp/healthy | |
+ DDEV_PHP_VERSION=7.4 | |
+ DDEV_WEBSERVER_TYPE=nginx-fpm | |
+ '[' -n 7.4 ']' | |
+ update-alternatives --set php /usr/bin/php7.4 | |
update-alternatives: using /usr/bin/php7.4 to provide /usr/bin/php (php) in manual mode | |
update-alternatives: warning: skip creation of /usr/share/man/man1/php.1.gz because associated file /usr/share/man/man1/php7.4.1.gz (of link group php) doesn't exist | |
+ ln -sf /usr/sbin/php-fpm7.4 /usr/sbin/php-fpm | |
+ export PHP_INI=/etc/php/7.4/fpm/php.ini |
This file contains 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
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> | |
<div class="form-group"> | |
<label for="aadhaar_number" class="col-lg-5 control-label">Aadhaar Number <span style="color: red">*</span></label> | |
<div class="col-lg-7 "> | |
<input maxlength="12" type="number" class="form-control" id="aadhaar_number" name="aadhaar_no" placeholder="Aadhaar Number" required=""> | |
<p id="aadhaar_number_op"></p> | |
</div> | |
</div> | |
<script> |
This file contains 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
Remove missing module | |
drush cdel core.extension module.MYMODULE | |
remove config by drush | |
drush config:delete commerce_shipping.commerce_shipment_type.default |
This file contains 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
Follow the below steps to access the website without domain name assigned using server IP address. | |
Open the “hosts” file in a text editor such as Notepad or Wordpad. The location of the “hosts” file will different for | |
different operation system. | |
Windows: C:\Windows\System32\drivers\etc | |
Linux or Ubuntu: /etc/hosts | |
Mac OS X: /private/etc/hosts |
This file contains 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.php ---------------------------------- | |
/** | |
* Add Custom theme settings | |
*/ | |
// create admin page | |
if( is_admin() ){ | |
include_once(get_template_directory() . '/admin/settings/add_menu.php'); | |
} |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset='utf-8'> | |
<meta http-equiv='X-UA-Compatible' content='IE=edge'> | |
<title>JS table filter</title> | |
<meta name='viewport' content='width=device-width, initial-scale=1'> | |
</head> | |
<body> | |
<input type="search" placeholder="Search Codes" class="form-control search-input" data-table="customers-list"> |
This file contains 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
************************create a template | |
<?php | |
/** | |
* Template Name: Pure Modules Template | |
* | |
* @Description:This is the template that only modules. | |
* | |
*/ | |
get_header(); |
This file contains 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
/** | |
* Attribute | |
*/ | |
oncontextmenu="return false" | |
<body oncontextmenu="return false"> | |
<select oncontextmenu="return false"> |
This file contains 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
var meta = document.createElement('meta'); | |
meta.httpEquiv = "refresh"; | |
meta.content = "10;"+ window.location.href; | |
document.getElementsByTagName('head')[0].appendChild(meta); |
NewerOlder