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 | |
/** | |
* @param = multi-dimensionnal array with dups | |
* @return = unique multi-dimensional array | |
*/ | |
function make_arrays_unique( $array ) | |
{ | |
array_map("unserialize", array_unique(array_map("serialize", $arras))); | |
} |
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 | |
namespace Classes; | |
/*////////////////////////////////////////////////////////////////////////////// | |
================================================================================ | |
Ajax_Controller | |
- registers, enqueues, localizes ajax js file | |
- passes method and params to Ajax_Function_Suite(); | |
- returns $ajax_function_suite->respond() as JSON | |
- don't forget nonce |
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 | |
//* the the default upload path to work in normal WP structure | |
add_filter("gform_upload_path", "change_upload_path", 20, 2); | |
function change_upload_path($path_info, $form_id){ | |
$wp_upload_path = wp_upload_dir(); | |
$path_info["path"] = $wp_upload_path['path'] . '/'; | |
$path_info["url"] = $wp_upload_path['url'] . '/'; | |
return $path_info; |
NewerOlder