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
// License: GPLv2+ | |
var el = wp.element.createElement, | |
registerBlockType = wp.blocks.registerBlockType, | |
ServerSideRender = wp.components.ServerSideRender, | |
TextControl = wp.components.TextControl, | |
InspectorControls = wp.editor.InspectorControls; | |
/* | |
* Here's where we register the block in JavaScript. |
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
# Proxy uploads from production | |
location ~* \.(js|css|png|jpg|jpeg|gif|ico|mp3|mov|tif|tiff|swf|txt|html|svg)$ { | |
expires 24h; | |
log_not_found off; | |
try_files $uri $uri/ @production; | |
} | |
location @production { | |
resolver 8.8.8.8; | |
proxy_pass {prod_url}/$uri; | |
} |
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 | |
/** | |
* Get names from google search | |
* | |
* @param array $args | |
* @param array $assoc_args | |
*/ | |
public function get_names( $args = array(), $assoc_args = array() ) { | |
$names_json = '{ |
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
#!/bin/bash | |
# WordPress Plugin pre-commit hook | |
set -e | |
message="Checking staged changes..." | |
git_status_egrep='^[MARC].+' | |
for i; do | |
case "$i" |
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
// Put this script along with wp-load.php only | |
$curr_dir = getcwd(); | |
include_once( $curr_dir . '/wp-load.php' ); | |
if( defined( 'ABSPATH' ) ){ | |
remove_all_filters( 'wp_get_attachment_url' ); | |
remove_all_filters( 'get_attached_file' ); |
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
// function to get comment count of one media | |
function custom_get_rtmedia_media_comment_count( $id = false ){ | |
if( $id === false ){ | |
$id = rtmedia_media_id(); | |
} | |
$commentcount = wp_count_comments( $id ); | |
if ( isset( $commentcount->total_comments ) ){ | |
$commentcount = intval( $commentcount->total_comments ); | |
} else { | |
$commentcount = 0; |
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 | |
// array - repo names and local filesystem path and branch | |
$repos = array( | |
'plugin-slug' => array ( | |
'branch' => 'master', | |
'localpath' => '/var/www/example.com/htdocs/wp-content/plugins/plugin-slug' | |
), | |
); | |
hook_write_log( 'Hello at ' . date( 'D M j G:i:s T Y' ) ); |
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 | |
// array - repo names and local filesystem path and branch | |
$repos = array( | |
'bad-plugin' => array ( | |
'branch' => 'master', | |
'localpath' => '/var/www/example.com/htdocs/wp-content/plugins/bad-plugin' | |
) | |
); | |
rt_write_log("Hello at " . date("D M j G:i:s T Y") ); |
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
diff --git a/base.php b/base.php | |
index 9828b4c..b00b0f3 100644 | |
--- a/base.php | |
+++ b/base.php | |
@@ -1,33 +1,42 @@ | |
<?php get_template_part('templates/head'); ?> | |
-<body <?php body_class(); ?>> | |
+<?php | |
+ global $rt_ajax_request; | |
+ if ( isset( $rt_ajax_request ) && $rt_ajax_request ) { |
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
diff --git framework/theme-functions/template-engine.php framework/theme-functions/template-engine.php | |
index d4a5257..bdc9b73 100644 | |
--- framework/theme-functions/template-engine.php | |
+++ framework/theme-functions/template-engine.php | |
@@ -10,6 +10,13 @@ if ( ! function_exists( 'template_context' ) ) : | |
function template_context($template) { | |
global $context, $target_wp_template_file, $theme_design_loaded; | |
+ //** RTMEDIA FIX **// | |
+ global $rt_ajax_request; |
NewerOlder