This file contains hidden or 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
/* Required files */ | |
global $pagenow; | |
if (($pagenow == 'edit-tags.php' || $pagenow == 'term.php') && isset($_GET['taxonomy']) && $_GET['taxonomy'] == 'service_type') { | |
require_once ( THM_DIR_PATH . '/inc/category-media.php' ); | |
} |
This file contains hidden or 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
img{ | |
image-rendering: -moz-crisp-edges; | |
image-rendering: -o-crisp-edges; | |
image-rendering: -webkit-optimize-contrast; | |
image-rendering: crisp-edges; | |
-ms-interpolation-mode: nearest-neighbor; | |
} |
This file contains hidden or 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> | |
// Adding Required classes into all sidebar boxes except text widget | |
jQuery(document).ready(function(){ | |
// $('body').fontResize(); | |
$('#primary .widget-container:not(.widget_text)').addClass('varnav'); | |
$('#primary .widget-container:not(.widget_text) ul').addClass('ml30 mb5'); | |
$('#primary .widget-container:not(.widget_text) ul li a').addClass('bullettext'); | |
$('#primary .widget-container:not(.widget_text)').append('<div class="varnavFooter"></div>'); | |
$('#secondary .widget-container:not(.widget_text)').addClass('rightbox2'); |
This file contains hidden or 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
<?php | |
/* Disable auto paragraph - sometimes issue while content formatting with wordpress/ck-editor */ | |
remove_filter ('the_content', 'wpautop'); | |
// remove_filter ('the_content', 'wptexturize'); | |
?> |
This file contains hidden or 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
<?php | |
/* By default, WordPress cache feed or rather the cached feed has a lifetime of 43200 seconds, equivalent to 12 hours. */ | |
/* Starts: Change the default feed cache recreation period to 1800 seconds/30 minutes */ | |
function return_cache_recreation( $seconds ) | |
{ | |
return 1800; | |
} | |
add_filter( 'wp_feed_cache_transient_lifetime' , 'return_cache_recreation' ); | |
/* Ends: Change the default feed cache recreation period */ |
This file contains hidden or 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
<?php | |
/* To allow unfiltered html for admin and editor */ | |
function um_unfilter_roles() { | |
// Makes sure $wp_roles is initialized | |
get_role( 'administrator' ); | |
global $wp_roles; | |
// Dont use get_role() wrapper, it doesn't work as a one off. | |
// (get_role does not properly return as reference) | |
$wp_roles->role_objects['administrator']->add_cap( 'unfiltered_html' ); | |
$wp_roles->role_objects['editor']->add_cap( 'unfiltered_html' ); |
This file contains hidden or 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
<?php | |
/* When we search without string/word, it redirects to homepage. Fix it by checking this empty case and set query variable with space " " */ | |
function empty_search_filter( $query_vars ) { | |
if( isset( $_GET['s'] ) && empty( $_GET['s'] ) ) { | |
$query_vars['s'] = " "; | |
} | |
return $query_vars; | |
} | |
add_filter( 'request', 'empty_search_filter' ); | |
?> |
This file contains hidden or 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
Web services | |
A Web service, in very broad terms, is a method of communication between two applications or electronic devices over the World Wide Web (WWW). Web services are of two kinds: Simple Object Access Protocol (SOAP) and Representational State Transfer (REST). | |
SOAP | |
SOAP defines a standard communication protocol (set of rules) specification for XML-based message exchange. SOAP uses different transport protocols, such as HTTP and SMTP. The standard protocol HTTP makes it easier for SOAP model to tunnel across firewalls and proxies without any modifications to the SOAP protocol. | |
The Web Services Description Language (WSDL) contains and describes the common set of rules to define the messages, bindings, operations and location of the Web service. WSDL is a sort of formal contract to define the interface that the Web service offers. | |
REST | |
REST is protocol independent. REST-based implementation is simple compared to SOAP. The service producer and service consumer need to have a common understanding of the |
NewerOlder