@@ -23,7 +23,7 @@ |
||
| 23 | 23 | */ |
| 24 | 24 | public function __construct() { |
| 25 | 25 | $this->label = esc_html__( 'Payment Status', 'gravityview' ); |
| 26 | - $this->description = esc_html__('The current payment status of the entry (ie "Processing", "Failed", "Cancelled", "Approved").', 'gravityview' ); |
|
| 26 | + $this->description = esc_html__( 'The current payment status of the entry (ie "Processing", "Failed", "Cancelled", "Approved").', 'gravityview' ); |
|
| 27 | 27 | parent::__construct(); |
| 28 | 28 | } |
| 29 | 29 | } |
@@ -37,8 +37,8 @@ |
||
| 37 | 37 | public function blacklist_field_types( $field_types = array(), $context = '' ) { |
| 38 | 38 | |
| 39 | 39 | // Allow Calculation field in Edit Entry |
| 40 | - if( 'edit' !== $context ) { |
|
| 41 | - $field_types[] = $this->name; |
|
| 40 | + if ( 'edit' !== $context ) { |
|
| 41 | + $field_types[ ] = $this->name; |
|
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | return $field_types; |
@@ -14,8 +14,8 @@ |
||
| 14 | 14 | <ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all"> |
| 15 | 15 | <?php |
| 16 | 16 | |
| 17 | - foreach( $metaboxes as $metabox ) { |
|
| 18 | - $class = !isset( $class ) ? 'nav-tab-active' : ''; |
|
| 17 | + foreach ( $metaboxes as $metabox ) { |
|
| 18 | + $class = ! isset( $class ) ? 'nav-tab-active' : ''; |
|
| 19 | 19 | ?> |
| 20 | 20 | <li class="ui-state-default"> |
| 21 | 21 | <a class="nav-tab ui-tabs-anchor <?php echo $class; ?>" href="#<?php echo esc_attr( $metabox->id ); ?>"> |
@@ -19,9 +19,9 @@ |
||
| 19 | 19 | * Loop through the array of registered metaboxes |
| 20 | 20 | * @var GravityView_Metabox_Tab $metabox |
| 21 | 21 | */ |
| 22 | - foreach( $metaboxes as $metabox ) { |
|
| 22 | + foreach ( $metaboxes as $metabox ) { |
|
| 23 | 23 | |
| 24 | - echo '<div id="'.esc_attr( $metabox->id ).'">'; |
|
| 24 | + echo '<div id="' . esc_attr( $metabox->id ) . '">'; |
|
| 25 | 25 | |
| 26 | 26 | $metabox->render( $post ); |
| 27 | 27 | |
@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | |
| 16 | 16 | function render_setting( $override_input = NULL ) { |
| 17 | 17 | |
| 18 | - if( $this->get_field_left_label() ) { ?> |
|
| 18 | + if ( $this->get_field_left_label() ) { ?> |
|
| 19 | 19 | |
| 20 | 20 | <td scope="row"> |
| 21 | 21 | <label for="<?php echo $this->get_field_id(); ?>"> |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | function render_input( $override_input = NULL ) { |
| 45 | - if( isset( $override_input ) ) { |
|
| 45 | + if ( isset( $override_input ) ) { |
|
| 46 | 46 | echo $override_input; |
| 47 | 47 | return; |
| 48 | 48 | } |
@@ -8,7 +8,7 @@ discard block |
||
| 8 | 8 | ?> |
| 9 | 9 | <label for="<?php echo $this->get_field_id(); ?>" class="<?php echo $this->get_label_class(); ?>"><?php |
| 10 | 10 | |
| 11 | - echo '<span class="gv-label">'.$this->get_field_label().'</span>'; |
|
| 11 | + echo '<span class="gv-label">' . $this->get_field_label() . '</span>'; |
|
| 12 | 12 | |
| 13 | 13 | echo $this->get_tooltip() . $this->get_field_desc(); |
| 14 | 14 | |
@@ -20,13 +20,13 @@ discard block |
||
| 20 | 20 | } |
| 21 | 21 | |
| 22 | 22 | function render_input( $override_input = null ) { |
| 23 | - if( isset( $override_input ) ) { |
|
| 23 | + if ( isset( $override_input ) ) { |
|
| 24 | 24 | echo $override_input; |
| 25 | 25 | return; |
| 26 | 26 | } |
| 27 | 27 | ?> |
| 28 | 28 | <select name="<?php echo esc_attr( $this->name ); ?>" id="<?php echo $this->get_field_id(); ?>"> |
| 29 | - <?php foreach( $this->field['options'] as $value => $label ) : ?> |
|
| 29 | + <?php foreach ( $this->field[ 'options' ] as $value => $label ) : ?> |
|
| 30 | 30 | <option value="<?php echo esc_attr( $value ); ?>" <?php selected( $value, $this->value, true ); ?>><?php echo esc_html( $label ); ?></option> |
| 31 | 31 | <?php endforeach; ?> |
| 32 | 32 | </select> |
@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | add_action( 'gform_entries_first_column_actions', array( $this, 'add_edit_link' ), 10, 5 ); |
| 12 | 12 | |
| 13 | 13 | // Add script to enable edit link |
| 14 | - add_action( 'admin_head-forms_page_gf_entries', array( $this, 'add_edit_script') ); |
|
| 14 | + add_action( 'admin_head-forms_page_gf_entries', array( $this, 'add_edit_script' ) ); |
|
| 15 | 15 | |
| 16 | 16 | } |
| 17 | 17 | |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | public function add_edit_script() { |
| 27 | 27 | |
| 28 | 28 | // We're on a single entry page, or at least not the Entries page. |
| 29 | - if( !empty( $_GET['view'] ) && $_GET['view'] !== 'entries' ) { return; } |
|
| 29 | + if ( ! empty( $_GET[ 'view' ] ) && $_GET[ 'view' ] !== 'entries' ) { return; } |
|
| 30 | 30 | ?> |
| 31 | 31 | <script> |
| 32 | 32 | jQuery( document ).ready( function( $ ) { |
@@ -56,14 +56,14 @@ discard block |
||
| 56 | 56 | 'page' => 'gf_entries', |
| 57 | 57 | 'view' => 'entry', |
| 58 | 58 | 'id' => (int)$form_id, |
| 59 | - 'lid' => (int)$lead["id"], |
|
| 59 | + 'lid' => (int)$lead[ "id" ], |
|
| 60 | 60 | 'screen_mode' => 'edit', |
| 61 | 61 | ); |
| 62 | 62 | ?> |
| 63 | 63 | |
| 64 | 64 | <span class="edit edit_entry"> |
| 65 | 65 | | |
| 66 | - <a title="<?php esc_attr_e( 'Edit this entry', 'gravityview'); ?>" href="<?php echo esc_url( add_query_arg( $params, admin_url( 'admin.php?page='.$query_string ) ) ); ?>"><?php esc_html_e( 'Edit', 'gravityview' ); ?></a> |
|
| 66 | + <a title="<?php esc_attr_e( 'Edit this entry', 'gravityview' ); ?>" href="<?php echo esc_url( add_query_arg( $params, admin_url( 'admin.php?page=' . $query_string ) ) ); ?>"><?php esc_html_e( 'Edit', 'gravityview' ); ?></a> |
|
| 67 | 67 | </span> |
| 68 | 68 | <?php |
| 69 | 69 | } |
@@ -6,17 +6,17 @@ |
||
| 6 | 6 | ?><script type="text/javascript"> |
| 7 | 7 | |
| 8 | 8 | function DeleteFile(leadId, fieldId, deleteButton){ |
| 9 | - if(confirm('<?php echo esc_js( __("Would you like to permanently delete this file? 'Cancel' to stop. 'OK' to delete", 'gravityview') ); ?>')){ |
|
| 9 | + if(confirm('<?php echo esc_js( __( "Would you like to permanently delete this file? 'Cancel' to stop. 'OK' to delete", 'gravityview' ) ); ?>')){ |
|
| 10 | 10 | var fileIndex = jQuery(deleteButton).parent().index(); |
| 11 | - var mysack = new sack("<?php echo admin_url("admin-ajax.php")?>"); |
|
| 11 | + var mysack = new sack("<?php echo admin_url( "admin-ajax.php" )?>"); |
|
| 12 | 12 | mysack.execute = 1; |
| 13 | 13 | mysack.method = 'POST'; |
| 14 | 14 | mysack.setVar( "action", "rg_delete_file" ); |
| 15 | - mysack.setVar( "rg_delete_file", "<?php echo wp_create_nonce("rg_delete_file") ?>" ); |
|
| 15 | + mysack.setVar( "rg_delete_file", "<?php echo wp_create_nonce( "rg_delete_file" ) ?>" ); |
|
| 16 | 16 | mysack.setVar( "lead_id", leadId ); |
| 17 | 17 | mysack.setVar( "field_id", fieldId ); |
| 18 | 18 | mysack.setVar( "file_index", fileIndex ); |
| 19 | - mysack.onError = function() { alert('<?php echo esc_js(__('Ajax error while deleting field.', 'gravityview')) ?>' )}; |
|
| 19 | + mysack.onError = function() { alert('<?php echo esc_js( __( 'Ajax error while deleting field.', 'gravityview' ) ) ?>' )}; |
|
| 20 | 20 | mysack.runAJAX(); |
| 21 | 21 | |
| 22 | 22 | return true; |
@@ -7,13 +7,13 @@ |
||
| 7 | 7 | extract( $gravityview_view->getCurrentField() ); |
| 8 | 8 | |
| 9 | 9 | // Only show the link to logged-in users. |
| 10 | -if( !GravityView_Edit_Entry::check_user_cap_edit_entry( $entry ) ) { |
|
| 10 | +if ( ! GravityView_Edit_Entry::check_user_cap_edit_entry( $entry ) ) { |
|
| 11 | 11 | return; |
| 12 | 12 | } |
| 13 | 13 | |
| 14 | -$link_text = empty( $field_settings['edit_link'] ) ? __('Edit Entry', 'gravityview') : $field_settings['edit_link']; |
|
| 14 | +$link_text = empty( $field_settings[ 'edit_link' ] ) ? __( 'Edit Entry', 'gravityview' ) : $field_settings[ 'edit_link' ]; |
|
| 15 | 15 | |
| 16 | -$link_atts = empty( $field_settings['new_window'] ) ? '' : 'target="_blank"'; |
|
| 16 | +$link_atts = empty( $field_settings[ 'new_window' ] ) ? '' : 'target="_blank"'; |
|
| 17 | 17 | |
| 18 | 18 | $output = apply_filters( 'gravityview_entry_link', GravityView_API::replace_variables( $link_text, $form, $entry ) ); |
| 19 | 19 | |