Skip to content

Instantly share code, notes, and snippets.

View anthonysbrown's full-sized avatar

Anthony Brown anthonysbrown

  • Worcester, MA USA
View GitHub Profile
<?php
if($return['player']['profile_pic'] == ''){
$profile_pic = 'something.jpg';
}else{
$profile_pic = $return['player']['profile_pic'];
}
echo $profile_pic
<br />
<b>Warning</b>: Illegal string offset 'ID' in <b>/home/aacncont/public_html/wp-content/plugins/pdf-bridge/lib/mpdf/classes/cssmgr.php</b> on line <b>1076</b><br />
<br />
<b>Warning</b>: Cannot assign an empty string to a string offset in <b>/home/aacncont/public_html/wp-content/plugins/pdf-bridge/lib/mpdf/classes/cssmgr.php</b> on line <b>1076</b><br />
<br />
<b>Warning</b>: Illegal string offset 'ID' in <b>/home/aacncont/public_html/wp-content/plugins/pdf-bridge/lib/mpdf/classes/cssmgr.php</b> on line <b>1152</b><br />
<br />
<b>Warning</b>: Illegal string offset 'ID' in <b>/home/aacncont/public_html/wp-content/plugins/pdf-bridge/lib/mpdf/classes/cssmgr.php</b> on line <b>1156</b><br />
<br />
<b>Warning</b>: Illegal string offset 'ID' in <b>/home/aacncont/public_html/wp-content/plugins/pdf-bridge/lib/mpdf/classes/cssmgr.php</b> on line <b>1360</b><br />
@anthonysbrown
anthonysbrown / function.php
Last active February 7, 2018 15:01
Client document manager - Add email settings and trigger email after download function.php
<?php
#trigger after a file has been downloaded
add_action('sp_download_file_after_query', '_custom_cdm_after_email');
#add a setting to to the emails tab
add_action('sp_cdm_settings_email','_custom_cdm_email_settings');
#Sends an email to the file owner when downloaded
<product product-id="13303">
<ean/>
<upc/>
<unit>each</unit>
<min-order-quantity>1</min-order-quantity>
<step-quantity>1</step-quantity>
<display-name xml:lang="x-default">Gray Leader Uniform Blouse - Small</display-name>
<store-force-price-flag>false</store-force-price-flag>
<store-non-inventory-flag>false</store-non-inventory-flag>
<store-non-revenue-flag>false</store-non-revenue-flag>
<product product-id="97276">
<ean/>
<upc/>
<unit>each</unit>
<min-order-quantity>1</min-order-quantity>
<step-quantity>1</step-quantity>
<display-name xml:lang="x-default">Organization Portfolio</display-name>
<short-description xml:lang="x-default">Keep yourself organized and look good doing it with this two-tone portfolio featuring the Awana corporate logo.&#13;
&#13;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</short-description>
<?php
$out = @fopen($temp_target_path , $chunk == 0 ? "wb" : "ab");
if ($out) {
$in = @fopen($_FILES['file']['tmp_name'], "rb");
if ($in) {
while ($buff = fread($in, 4096))
fwrite($out, $buff);
@anthonysbrown
anthonysbrown / functions.php
Created April 30, 2018 15:20
Over ride a css file in smarty pants plugins client document manager
<?php
add_action('wp_enqueue_scripts', 'my_custom_css');
function my_custom_css(){
wp_dequeue_style( 'cdm-windows-gui' )
wp_enqueue_style( 'cdm-windows-gui', get_stylesheet_directory_uri() . '/sp-client-document-manager/windows.css' );
}
@anthonysbrown
anthonysbrown / functions.php
Created April 30, 2018 15:23
adding to a css file
<?php
add_action('wp_enqueue_scripts', 'my_custom_css');
function my_custom_css(){
wp_enqueue_style( 'cdm-windows-gui-custom', get_stylesheet_directory_uri() . '/sp-client-document-manager/windows.css' ,array('cdm-windows-gui'));
}
?>
@anthonysbrown
anthonysbrown / functions.php
Created April 30, 2018 15:24
Add a custom cdm css file
<?php
function cdm_custom_styles() {
wp_enqueue_style( 'my-cdm-custom-styles', get_stylesheet_directory_uri().'cdm.css', array('cdm-style','cdm-premium-style') );
}
add_action( 'wp_enqueue_scripts', 'cdm_custom_styles' );
?>
@anthonysbrown
anthonysbrown / functions.php
Created May 17, 2018 00:11
Add Yoast SEO support for Optima Express
<?php
add_action('wpseo_title','optima_wpseo');
function optima_wpseo($title ){
global $post;
if ($post->ID == 0 && $post->post_author == 0 && $post->post_type == 'page') {