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 | |
/** | |
* Displays the output of a view, assumed to be a block display. | |
* | |
* @param $view_name | |
* Machine name of the view. | |
* @param $display_name | |
* Machine name of the display within the view. | |
* @param $args | |
* (optional) Array of arguments for the view display. |
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 | |
function views_to_jqgrid_ajax_data($view_name){ | |
$result = array(); | |
$_GET['page'] = intval($_REQUEST['page']) > 0 | |
? intval($_REQUEST['page']) - 1 : intval($_REQUEST['page']); | |
$_GET['order'] = $_REQUEST['sidx']; | |
$_GET['sort'] = $_REQUEST['sord']; |
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 | |
foreach ($fields as $field_name) { | |
$field = field_info_field($field_name); | |
$instance = field_info_instance('node', $field_name, $field['bundles']['node'][0]); | |
$form_field = field_default_form('node', null, $field, $instance, LANGUAGE_NONE, array(), $form, $form_state); | |
$form += (array) $form_field; | |
} |
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 | |
/*********************** | |
*@author: Ritesh Agrawal | |
*@description: Identifies php files that contain leading or trailing spaces before or after PHP opening or closings tags | |
*@version: 1.0 | |
*@date: Nov 06, 2007 | |
@todo – check only *.PHP or *.CTP files rather than checking all of the files | |
– html based output | |
***********************/ | |
//Set Source Path |
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 | |
// CHECK REMOTE FILE EXISTS | |
function remote_file_exists( $url_file ) { | |
$url_file = trim( $url_file ); | |
if ( empty( $url_file ) ) | |
return FALSE; | |
$url_arr = parse_url( $url_file ); | |
if ( !is_array( $url_arr ) || empty( $url_arr ) ) | |
return FALSE; |
NewerOlder