Skip to content

Instantly share code, notes, and snippets.

View prajwal-stha's full-sized avatar

Prajwal Shrestha prajwal-stha

View GitHub Profile
// Turn debugging on
define('WP_DEBUG', true);
// Tell WordPress to log everything to /wp-content/debug.log
define('WP_DEBUG_LOG', true);
// Turn off the display of error messages on your site
define('WP_DEBUG_DISPLAY', false);
// For good measure, you can also add the follow code, which will hide errors from being displayed on-screen
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
function danfe_create_icons()
{
$linea_icons = array(
'Arrows' => array(
array('icon icon-arrows-anticlockwise' => esc_html__('Anticlockwise', 'danfe')),
array('icon icon-arrows-anticlockwise-dashed' => esc_html__('Anticlockwise-Dashed', 'danfe')),
<?php
//vc_map_update( 'iconpicker', 'vc_iconpicker_type_linea');
if (!function_exists('vc_iconpicker_type_linea')) {
function vc_iconpicker_type_linea( $icons )
{
$linea_icons = array(
'Arrows' => array(
array('icon icon-arrows-anticlockwise' => esc_html__('Anticlockwise', 'danfe')),
<?php
function danfe_display_contact_info_fn()
{
vc_map(
array(
"name" => esc_html__('Contact Info', 'danfe'),
"base" => 'danfe_display_contact_info',
"category" => esc_html__('Danfe', 'danfe'),
"params" => array(
array(
vc_map(
array(
"name" => esc_html__('Contact Info', 'danfe'),
"base" => 'danfe_display_contact_info',
"category" => esc_html__('Danfe', 'danfe'),
"params" => array(
array(
'type' => 'iconpicker',
'heading' => esc_html__('Icons', 'danfe'),
'param_name' => 'icons',
vc_map( array(
"name" => esc_html__("Project Counter", 'danfe'),
"base" => "danfe_display_counter",
"category" => esc_html__('Danfe','danfe'),
"params" => array(
array(
'type' => 'textfield',
'heading' => esc_html__('Title', 'danfe'),
'param_name' => 'section_title',
'value' => '',
<?php
// This will occur when the comment is posted
function theme-slug_comment_post( $incoming_comment ) {
// convert everything in a comment to display literally
$incoming_comment['comment_content'] = htmlspecialchars($incoming_comment['comment_content']);
// the one exception is single quotes, which cannot be #039; because WordPress marks it as spam
$incoming_comment['comment_content'] = str_replace( "'", '&apos;', $incoming_comment['comment_content'] );
return( $incoming_comment );
}
// This will occur before a comment is displayed
# Change the memory for the php run
php -dmemory_limit=1G bin/magento setup:install
<Files xmlrpc.php>
Order Allow,Deny
Deny from all
</Files>
//Disable PHP Execution
<Files *.php>
Order Allow, Deny
Deny from all
</Files>