View install.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
<?php | |
$ch = curl_init(); | |
$source = "https://wordpress.org/latest.zip"; | |
curl_setopt( $ch, CURLOPT_URL, $source ); | |
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 ); | |
$data = curl_exec ( $ch ); | |
curl_close ( $ch ); | |
/* save as wordpress.zip */ |
View velvet-blues-update-urls.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
<?php | |
/* | |
Plugin Name: Velvet Blues Update URLs | |
Plugin URI: http://www.velvetblues.com/web-development-blog/wordpress-plugin-update-urls/ | |
Description: This plugin <strong>updates all urls in your website</strong> by replacing old urls with new urls. To get started: 1) Click the "Activate" link to the left of this description, and 2) Go to your <a href="tools.php?page=velvet-blues-update-urls.php">Update URLs</a> page to use it. | |
Author: VelvetBlues.com | |
Author URI: http://www.velvetblues.com/ | |
Author Email: info@velvetblues.com | |
Version: 3.2.7 | |
License: GPLv2 or later |
View Fix
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
<?php | |
global $wpdb; | |
$wpdb->query( "UPDATE {$wpdb->postmeta} SET meta_value = Replace( meta_value, \"\n\", '' ) WHERE meta_key = '_themify_builder_settings_json'" ); |
View Builder https redirect
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 custom_post_row_actions_https( $actions ) { | |
if( isset( $actions['themify-builder'] ) ) { | |
$actions['themify-builder'] = str_replace( 'http://', 'https://', $actions['themify-builder'] ); | |
} | |
return $actions; | |
} | |
add_filter( 'post_row_actions', 'custom_post_row_actions_https', 100 ); | |
add_filter( 'page_row_actions', 'custom_post_row_actions_https', 100 ); |
View Conditional loading of builder-styles.css
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 tf_start_buffer() { | |
ob_start(); | |
} | |
add_action( 'wp_head', 'tf_start_buffer', 1 ); | |
function tf_end_buffer() { | |
$output = ob_get_clean(); | |
if( preg_match( '/class=\"themify_builder_row/', $output ) ) { | |
$output = str_replace( | |
'<meta name="builder-styles-css" content="" id="builder-styles-css">', |
View themify_audio_player_module
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 themify_audio_player_module() { | |
/** | |
* Category list | |
* @var array | |
*/ | |
$categories = array_merge( | |
array( | |
'off' => array( | |
'name' => __( 'Disable Audio Player', 'themify' ), |
View functions.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
<?php | |
function custom_enqueue_scripts() { | |
wp_deregister_style( 'google-fonts' ); | |
wp_enqueue_style( 'google-fonts', themify_https_esc('http://fonts.googleapis.com/css'). '?family=Crete+Round|Vidaloka|Alice'); | |
} | |
add_action( 'wp_enqueue_scripts', 'custom_enqueue_scripts', 12 ); |
View module-plain-text.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
<?php | |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly | |
/** | |
* Module Name: Plain Text | |
* Description: Display plain text | |
*/ | |
class TB_Plain_Text_Module extends Themify_Builder_Module { | |
function __construct() { | |
parent::__construct(array( | |
'name' => __('Plain Text', 'themify'), |
View gist:af82edb3870b36cce3f0
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
<?php | |
/* | |
Plugin Name: WP Jalali and Polylang Compatibility | |
Description: Disables WP Jalali when Farsi is not the current language. | |
*/ | |
function wp_jalali_polylang_compat() { | |
if( ! function_exists( 'pll_current_language' ) || pll_current_language() == 'fa' ) | |
return; |
View gist:6b9c6442eab67eb13196
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
<?php | |
/* | |
Plugin Name: Themify WPTouch Compatibility | |
Description: This plugin makes Builder in Themify framework compatible with the WPTouch plugin. | |
*/ | |
function themify_wptouch_compat() { | |
$theme_root = wp_get_theme()->get_template_directory(); | |
if( ! is_admin() | |
&& wptouch_is_mobile_theme_showing() |
NewerOlder