Skip to content

Instantly share code, notes, and snippets.

View viruthagiri's full-sized avatar

Viruthagiri Thirumavalavan viruthagiri

  • Bangalore, India
View GitHub Profile
<?php
function fetch_remote_file($url)
{
// extract the file name and extension from the url
require_once(ABSPATH . 'wp-includes/pluggable.php');
$file_name = basename($url);
if (strpos($file_name, '?') !== false) {
list($file_name) = explode('?', $file_name);
}
$dummy = false;
string(35) "http://wpgeo.directory/dummy/a1.jpg"
string(35) "http://wpgeo.directory/dummy/a2.jpg"
string(35) "http://wpgeo.directory/dummy/a3.jpg"
string(35) "http://wpgeo.directory/dummy/a4.jpg"
string(35) "http://wpgeo.directory/dummy/a5.jpg"
string(35) "http://wpgeo.directory/dummy/a6.jpg"
string(35) "http://wpgeo.directory/dummy/a7.jpg"
string(35) "http://wpgeo.directory/dummy/a8.jpg"
string(35) "http://wpgeo.directory/dummy/a9.jpg"
string(36) "http://wpgeo.directory/dummy/a10.jpg"
<?php
function whoop_event_detail_add_tag() {
global $post, $preview;
?>
<dl>
<dt><?php echo __('Tags:', GEODIRECTORY_FRAMEWORK); ?></dt>
<dd><?php
$taxonomies = array();
$post_type = 'gd_event';
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
</whitelist>
<whitelist addUncoveredFilesFromWhitelist="true">
<directory suffix=".php">./tests/</directory>
</whitelist>
</filter>
<filter>
<whitelist>
<directory suffix=".php">./</directory>
<exclude>
<directory suffix=".php">./tests</directory>
<directory suffix=".php">./vendor</directory>
</exclude>
</whitelist>
</filter>
<?php
remove_action( 'geodir_after_claim_form_field', 'geodir_claim_after_claim_form_field', 0);
add_action( 'geodir_after_claim_form_field', 'geodir_claim_after_claim_form_field', 1, 1);
add_action( 'geodir_after_claim_form_field', 'claim_listing_package_list_before', 0, 1 );
function claim_listing_package_list_before($field = '') {
if ( $field == 'geodir_user_comments' && geodir_claim_force_upgrade() ) {
$gd_post_types = geodir_get_posttypes();
$post_id = isset( $_REQUEST['post_id'] ) ? $_REQUEST['post_id'] : '';
$post_type = get_post_type( $post_id );
if ( $post_type != '' && in_array( $post_type, $gd_post_types ) ) {
<?php
function bp_comp_content_make_clickable($content) {
$content = make_clickable($content);
return $content;
}
add_filter('bp_comp_message', 'bp_comp_content_make_clickable');
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query
* Source: http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/query.php
*/
$args = array(
--
-- Table structure for table `wp_bp_compliments`
--
CREATE TABLE IF NOT EXISTS `wp_bp_compliments` (
`id` bigint(20) NOT NULL,
`term_id` int(10) NOT NULL,
`post_id` int(10) DEFAULT NULL,
`receiver_id` bigint(20) NOT NULL,
`sender_id` bigint(20) NOT NULL,