@@ -85,7 +85,7 @@ |
||
| 85 | 85 | */ |
| 86 | 86 | require GRAVITYVIEW_DIR . 'future/loader.php'; |
| 87 | 87 | |
| 88 | -add_action( 'plugins_loaded', function () { |
|
| 88 | +add_action( 'plugins_loaded', function() { |
|
| 89 | 89 | /** |
| 90 | 90 | * GravityView_Plugin is only used by the legacy class-gravityview-extension.php that's shipped with extensions. |
| 91 | 91 | * |
@@ -35,8 +35,8 @@ discard block |
||
| 35 | 35 | public function __construct() { |
| 36 | 36 | add_action( 'gk/foundation/initialized', array( $this, 'admin_menus' ) ); |
| 37 | 37 | add_action( 'admin_head', array( $this, 'admin_head' ) ); |
| 38 | - add_action( 'admin_init', array( $this, 'welcome' ) ); |
|
| 39 | - add_filter( 'gravityview_is_admin_page', array( $this, 'is_dashboard_page'), 10, 2 ); |
|
| 38 | + add_action( 'admin_init', array( $this, 'welcome' ) ); |
|
| 39 | + add_filter( 'gravityview_is_admin_page', array( $this, 'is_dashboard_page' ), 10, 2 ); |
|
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | /** |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | public function is_dashboard_page( $is_page = false, $hook = NULL ) { |
| 97 | 97 | global $pagenow; |
| 98 | 98 | |
| 99 | - if ( empty( $_GET['page'] ) ) { |
|
| 99 | + if ( empty( $_GET[ 'page' ] ) ) { |
|
| 100 | 100 | return $is_page; |
| 101 | 101 | } |
| 102 | 102 | |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | return $is_page; |
| 105 | 105 | } |
| 106 | 106 | |
| 107 | - return 'admin.php' === $pagenow && in_array( $_GET['page'], array( 'gv-changelog', 'gv-credits', 'gv-getting-started' ), true ); |
|
| 107 | + return 'admin.php' === $pagenow && in_array( $_GET[ 'page' ], array( 'gv-changelog', 'gv-credits', 'gv-getting-started' ), true ); |
|
| 108 | 108 | } |
| 109 | 109 | |
| 110 | 110 | /** |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | $admin_menu::remove_submenu_item( 'gv-credits' ); |
| 122 | 122 | $admin_menu::remove_submenu_item( 'gv-changelog' ); |
| 123 | 123 | |
| 124 | - if( ! $this->is_dashboard_page() ) { |
|
| 124 | + if ( ! $this->is_dashboard_page() ) { |
|
| 125 | 125 | return; |
| 126 | 126 | } |
| 127 | 127 | |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | // Don't fetch -beta, etc. |
| 145 | 145 | list( $display_version ) = explode( '-', GV_PLUGIN_VERSION ); |
| 146 | 146 | |
| 147 | - $selected = !empty( $plugin_page ) ? $plugin_page : 'gv-getting-started'; |
|
| 147 | + $selected = ! empty( $plugin_page ) ? $plugin_page : 'gv-getting-started'; |
|
| 148 | 148 | |
| 149 | 149 | echo gravityview_get_floaty( 132 ); |
| 150 | 150 | ?> |
@@ -193,7 +193,7 @@ discard block |
||
| 193 | 193 | <h3>Create a View</h3> |
| 194 | 194 | |
| 195 | 195 | <ol class="ol-decimal"> |
| 196 | - <li>Go to the GravityKit menu and click on <a href="<?php echo admin_url('post-new.php?post_type=gravityview'); ?>">New View</a></li> |
|
| 196 | + <li>Go to the GravityKit menu and click on <a href="<?php echo admin_url( 'post-new.php?post_type=gravityview' ); ?>">New View</a></li> |
|
| 197 | 197 | <li>If you want to <strong>create a new form</strong>, click the "Use a Form Preset" button</li> |
| 198 | 198 | <li>If you want to <strong>use an existing form’s entries</strong>, select from the dropdown.</li> |
| 199 | 199 | <li>Select the type of View you would like to create. There are two core types of Views: <strong>Table</strong> and <strong>Listing</strong>. |
@@ -783,7 +783,7 @@ discard block |
||
| 783 | 783 | </ul> |
| 784 | 784 | |
| 785 | 785 | <h3><?php esc_attr_e( 'Want to contribute?', 'gk-gravityview' ); ?></h3> |
| 786 | - <p><?php echo sprintf( esc_attr__( 'If you want to contribute to the code, %syou can on Github%s. If your contributions are accepted, you will be thanked here.', 'gk-gravityview'), '<a href="https://github.com/gravityview/GravityView">', '</a>' ); ?></p> |
|
| 786 | + <p><?php echo sprintf( esc_attr__( 'If you want to contribute to the code, %syou can on Github%s. If your contributions are accepted, you will be thanked here.', 'gk-gravityview' ), '<a href="https://github.com/gravityview/GravityView">', '</a>' ); ?></p> |
|
| 787 | 787 | </div> |
| 788 | 788 | |
| 789 | 789 | <hr class="clear" /> |
@@ -824,7 +824,7 @@ discard block |
||
| 824 | 824 | global $plugin_page; |
| 825 | 825 | |
| 826 | 826 | // Bail if we're just editing the plugin |
| 827 | - if( $plugin_page === 'plugin-editor.php' ) { return; } |
|
| 827 | + if ( $plugin_page === 'plugin-editor.php' ) { return; } |
|
| 828 | 828 | |
| 829 | 829 | // Bail if no activation redirect |
| 830 | 830 | if ( ! get_transient( '_gv_activation_redirect' ) ) { return; } |
@@ -835,7 +835,7 @@ discard block |
||
| 835 | 835 | $upgrade = get_option( 'gv_version_upgraded_from' ); |
| 836 | 836 | |
| 837 | 837 | // Don't do anything if they've already seen the new version info |
| 838 | - if( $upgrade === GV_PLUGIN_VERSION ) { |
|
| 838 | + if ( $upgrade === GV_PLUGIN_VERSION ) { |
|
| 839 | 839 | return; |
| 840 | 840 | } |
| 841 | 841 | |
@@ -843,10 +843,10 @@ discard block |
||
| 843 | 843 | update_option( 'gv_version_upgraded_from', GV_PLUGIN_VERSION ); |
| 844 | 844 | |
| 845 | 845 | // Bail if activating from network, or bulk |
| 846 | - if ( is_network_admin() || isset( $_GET['activate-multi'] ) ) { return; } |
|
| 846 | + if ( is_network_admin() || isset( $_GET[ 'activate-multi' ] ) ) { return; } |
|
| 847 | 847 | |
| 848 | 848 | // First time install |
| 849 | - if( ! $upgrade ) { |
|
| 849 | + if ( ! $upgrade ) { |
|
| 850 | 850 | wp_safe_redirect( admin_url( 'admin.php?page=gv-getting-started' ) ); exit; |
| 851 | 851 | } |
| 852 | 852 | // Update |
@@ -1,219 +1,219 @@ |
||
| 1 | 1 | <?php return array( |
| 2 | - 'root' => array( |
|
| 3 | - 'name' => 'gravityview/gravityview', |
|
| 4 | - 'pretty_version' => 'dev-main', |
|
| 5 | - 'version' => 'dev-main', |
|
| 6 | - 'reference' => '3a2e792ccb10784dbd33fd6dfd2d3b48f850ca67', |
|
| 7 | - 'type' => 'wordpress-plugin', |
|
| 8 | - 'install_path' => __DIR__ . '/../../', |
|
| 9 | - 'aliases' => array(), |
|
| 10 | - 'dev' => false, |
|
| 11 | - ), |
|
| 12 | - 'versions' => array( |
|
| 13 | - 'doctrine/inflector' => array( |
|
| 14 | - 'pretty_version' => 'v1.1.0', |
|
| 15 | - 'version' => '1.1.0.0', |
|
| 16 | - 'reference' => '90b2128806bfde671b6952ab8bea493942c1fdae', |
|
| 17 | - 'type' => 'library', |
|
| 18 | - 'install_path' => __DIR__ . '/../doctrine/inflector', |
|
| 19 | - 'aliases' => array(), |
|
| 20 | - 'dev_requirement' => false, |
|
| 21 | - ), |
|
| 22 | - 'gettext/gettext' => array( |
|
| 23 | - 'pretty_version' => 'v4.8.7', |
|
| 24 | - 'version' => '4.8.7.0', |
|
| 25 | - 'reference' => '3f7bc5ef23302a9059e64934f3d59e454516bec0', |
|
| 26 | - 'type' => 'library', |
|
| 27 | - 'install_path' => __DIR__ . '/../gettext/gettext', |
|
| 28 | - 'aliases' => array(), |
|
| 29 | - 'dev_requirement' => false, |
|
| 30 | - ), |
|
| 31 | - 'gettext/languages' => array( |
|
| 32 | - 'pretty_version' => '2.10.0', |
|
| 33 | - 'version' => '2.10.0.0', |
|
| 34 | - 'reference' => '4d61d67fe83a2ad85959fe6133d6d9ba7dddd1ab', |
|
| 35 | - 'type' => 'library', |
|
| 36 | - 'install_path' => __DIR__ . '/../gettext/languages', |
|
| 37 | - 'aliases' => array(), |
|
| 38 | - 'dev_requirement' => false, |
|
| 39 | - ), |
|
| 40 | - 'gravitykit/foundation' => array( |
|
| 41 | - 'pretty_version' => 'dev-main', |
|
| 42 | - 'version' => 'dev-main', |
|
| 43 | - 'reference' => '43b67f6dea7cd7002f7cfd53b2f5104d3d753c63', |
|
| 44 | - 'type' => 'library', |
|
| 45 | - 'install_path' => __DIR__ . '/../gravitykit/foundation', |
|
| 46 | - 'aliases' => array( |
|
| 47 | - 0 => '9999999-dev', |
|
| 48 | - ), |
|
| 49 | - 'dev_requirement' => false, |
|
| 50 | - ), |
|
| 51 | - 'gravityview/gravityview' => array( |
|
| 52 | - 'pretty_version' => 'dev-main', |
|
| 53 | - 'version' => 'dev-main', |
|
| 54 | - 'reference' => '3a2e792ccb10784dbd33fd6dfd2d3b48f850ca67', |
|
| 55 | - 'type' => 'wordpress-plugin', |
|
| 56 | - 'install_path' => __DIR__ . '/../../', |
|
| 57 | - 'aliases' => array(), |
|
| 58 | - 'dev_requirement' => false, |
|
| 59 | - ), |
|
| 60 | - 'illuminate/container' => array( |
|
| 61 | - 'pretty_version' => 'v5.4.36', |
|
| 62 | - 'version' => '5.4.36.0', |
|
| 63 | - 'reference' => 'c5b8a02a34a52c307f16922334c355c5eef725a6', |
|
| 64 | - 'type' => 'library', |
|
| 65 | - 'install_path' => __DIR__ . '/../illuminate/container', |
|
| 66 | - 'aliases' => array(), |
|
| 67 | - 'dev_requirement' => false, |
|
| 68 | - ), |
|
| 69 | - 'illuminate/contracts' => array( |
|
| 70 | - 'pretty_version' => 'v5.4.36', |
|
| 71 | - 'version' => '5.4.36.0', |
|
| 72 | - 'reference' => '67f642e018f3e95fb0b2ebffc206c3200391b1ab', |
|
| 73 | - 'type' => 'library', |
|
| 74 | - 'install_path' => __DIR__ . '/../illuminate/contracts', |
|
| 75 | - 'aliases' => array(), |
|
| 76 | - 'dev_requirement' => false, |
|
| 77 | - ), |
|
| 78 | - 'illuminate/filesystem' => array( |
|
| 79 | - 'pretty_version' => 'v5.4.36', |
|
| 80 | - 'version' => '5.4.36.0', |
|
| 81 | - 'reference' => 'b800a1423d06869ee5c2768eee123917f12b693e', |
|
| 82 | - 'type' => 'library', |
|
| 83 | - 'install_path' => __DIR__ . '/../illuminate/filesystem', |
|
| 84 | - 'aliases' => array(), |
|
| 85 | - 'dev_requirement' => false, |
|
| 86 | - ), |
|
| 87 | - 'illuminate/support' => array( |
|
| 88 | - 'pretty_version' => 'v5.4.36', |
|
| 89 | - 'version' => '5.4.36.0', |
|
| 90 | - 'reference' => 'feab1d1495fd6d38970bd6c83586ba2ace8f299a', |
|
| 91 | - 'type' => 'library', |
|
| 92 | - 'install_path' => __DIR__ . '/../illuminate/support', |
|
| 93 | - 'aliases' => array(), |
|
| 94 | - 'dev_requirement' => false, |
|
| 95 | - ), |
|
| 96 | - 'illuminate/translation' => array( |
|
| 97 | - 'pretty_version' => 'v5.4.36', |
|
| 98 | - 'version' => '5.4.36.0', |
|
| 99 | - 'reference' => 'b671ddf78cbee60b0b357ad5745eceda2df26082', |
|
| 100 | - 'type' => 'library', |
|
| 101 | - 'install_path' => __DIR__ . '/../illuminate/translation', |
|
| 102 | - 'aliases' => array(), |
|
| 103 | - 'dev_requirement' => false, |
|
| 104 | - ), |
|
| 105 | - 'illuminate/validation' => array( |
|
| 106 | - 'pretty_version' => 'v5.4.36', |
|
| 107 | - 'version' => '5.4.36.0', |
|
| 108 | - 'reference' => 'c9b7beedfb94e50becfbce1aa354e0851c519809', |
|
| 109 | - 'type' => 'library', |
|
| 110 | - 'install_path' => __DIR__ . '/../illuminate/validation', |
|
| 111 | - 'aliases' => array(), |
|
| 112 | - 'dev_requirement' => false, |
|
| 113 | - ), |
|
| 114 | - 'katzgrau/klogger' => array( |
|
| 115 | - 'pretty_version' => '1.2.2', |
|
| 116 | - 'version' => '1.2.2.0', |
|
| 117 | - 'reference' => '36481c69db9305169a2ceadead25c2acaabd567c', |
|
| 118 | - 'type' => 'library', |
|
| 119 | - 'install_path' => __DIR__ . '/../katzgrau/klogger', |
|
| 120 | - 'aliases' => array(), |
|
| 121 | - 'dev_requirement' => false, |
|
| 122 | - ), |
|
| 123 | - 'monolog/monolog' => array( |
|
| 124 | - 'pretty_version' => '1.27.1', |
|
| 125 | - 'version' => '1.27.1.0', |
|
| 126 | - 'reference' => '904713c5929655dc9b97288b69cfeedad610c9a1', |
|
| 127 | - 'type' => 'library', |
|
| 128 | - 'install_path' => __DIR__ . '/../monolog/monolog', |
|
| 129 | - 'aliases' => array(), |
|
| 130 | - 'dev_requirement' => false, |
|
| 131 | - ), |
|
| 132 | - 'paragonie/random_compat' => array( |
|
| 133 | - 'pretty_version' => 'v2.0.21', |
|
| 134 | - 'version' => '2.0.21.0', |
|
| 135 | - 'reference' => '96c132c7f2f7bc3230723b66e89f8f150b29d5ae', |
|
| 136 | - 'type' => 'library', |
|
| 137 | - 'install_path' => __DIR__ . '/../paragonie/random_compat', |
|
| 138 | - 'aliases' => array(), |
|
| 139 | - 'dev_requirement' => false, |
|
| 140 | - ), |
|
| 141 | - 'paragonie/sodium_compat' => array( |
|
| 142 | - 'pretty_version' => 'v1.19.0', |
|
| 143 | - 'version' => '1.19.0.0', |
|
| 144 | - 'reference' => 'cb15e403ecbe6a6cc515f855c310eb6b1872a933', |
|
| 145 | - 'type' => 'library', |
|
| 146 | - 'install_path' => __DIR__ . '/../paragonie/sodium_compat', |
|
| 147 | - 'aliases' => array(), |
|
| 148 | - 'dev_requirement' => false, |
|
| 149 | - ), |
|
| 150 | - 'psr/log' => array( |
|
| 151 | - 'pretty_version' => '1.1.4', |
|
| 152 | - 'version' => '1.1.4.0', |
|
| 153 | - 'reference' => 'd49695b909c3b7628b6289db5479a1c204601f11', |
|
| 154 | - 'type' => 'library', |
|
| 155 | - 'install_path' => __DIR__ . '/../psr/log', |
|
| 156 | - 'aliases' => array(), |
|
| 157 | - 'dev_requirement' => false, |
|
| 158 | - ), |
|
| 159 | - 'psr/log-implementation' => array( |
|
| 160 | - 'dev_requirement' => false, |
|
| 161 | - 'provided' => array( |
|
| 162 | - 0 => '1.0.0', |
|
| 163 | - ), |
|
| 164 | - ), |
|
| 165 | - 'symfony/finder' => array( |
|
| 166 | - 'pretty_version' => 'v3.4.47', |
|
| 167 | - 'version' => '3.4.47.0', |
|
| 168 | - 'reference' => 'b6b6ad3db3edb1b4b1c1896b1975fb684994de6e', |
|
| 169 | - 'type' => 'library', |
|
| 170 | - 'install_path' => __DIR__ . '/../symfony/finder', |
|
| 171 | - 'aliases' => array(), |
|
| 172 | - 'dev_requirement' => false, |
|
| 173 | - ), |
|
| 174 | - 'symfony/http-foundation' => array( |
|
| 175 | - 'pretty_version' => 'v3.4.47', |
|
| 176 | - 'version' => '3.4.47.0', |
|
| 177 | - 'reference' => 'b9885fcce6fe494201da4f70a9309770e9d13dc8', |
|
| 178 | - 'type' => 'library', |
|
| 179 | - 'install_path' => __DIR__ . '/../symfony/http-foundation', |
|
| 180 | - 'aliases' => array(), |
|
| 181 | - 'dev_requirement' => false, |
|
| 182 | - ), |
|
| 183 | - 'symfony/polyfill-mbstring' => array( |
|
| 184 | - 'pretty_version' => 'v1.26.0', |
|
| 185 | - 'version' => '1.26.0.0', |
|
| 186 | - 'reference' => '9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e', |
|
| 187 | - 'type' => 'library', |
|
| 188 | - 'install_path' => __DIR__ . '/../symfony/polyfill-mbstring', |
|
| 189 | - 'aliases' => array(), |
|
| 190 | - 'dev_requirement' => false, |
|
| 191 | - ), |
|
| 192 | - 'symfony/polyfill-php70' => array( |
|
| 193 | - 'pretty_version' => 'v1.20.0', |
|
| 194 | - 'version' => '1.20.0.0', |
|
| 195 | - 'reference' => '5f03a781d984aae42cebd18e7912fa80f02ee644', |
|
| 196 | - 'type' => 'metapackage', |
|
| 197 | - 'install_path' => NULL, |
|
| 198 | - 'aliases' => array(), |
|
| 199 | - 'dev_requirement' => false, |
|
| 200 | - ), |
|
| 201 | - 'tightenco/collect' => array( |
|
| 202 | - 'dev_requirement' => false, |
|
| 203 | - 'replaced' => array( |
|
| 204 | - 0 => 'v5.4.36', |
|
| 205 | - ), |
|
| 206 | - ), |
|
| 207 | - 'trustedlogin/client' => array( |
|
| 208 | - 'pretty_version' => 'dev-main', |
|
| 209 | - 'version' => 'dev-main', |
|
| 210 | - 'reference' => '4d75dfcc0dc2ea316a42137fd16269ad3eb2f7a0', |
|
| 211 | - 'type' => 'library', |
|
| 212 | - 'install_path' => __DIR__ . '/../trustedlogin/client', |
|
| 213 | - 'aliases' => array( |
|
| 214 | - 0 => '9999999-dev', |
|
| 215 | - ), |
|
| 216 | - 'dev_requirement' => false, |
|
| 217 | - ), |
|
| 218 | - ), |
|
| 2 | + 'root' => array( |
|
| 3 | + 'name' => 'gravityview/gravityview', |
|
| 4 | + 'pretty_version' => 'dev-main', |
|
| 5 | + 'version' => 'dev-main', |
|
| 6 | + 'reference' => '3a2e792ccb10784dbd33fd6dfd2d3b48f850ca67', |
|
| 7 | + 'type' => 'wordpress-plugin', |
|
| 8 | + 'install_path' => __DIR__ . '/../../', |
|
| 9 | + 'aliases' => array(), |
|
| 10 | + 'dev' => false, |
|
| 11 | + ), |
|
| 12 | + 'versions' => array( |
|
| 13 | + 'doctrine/inflector' => array( |
|
| 14 | + 'pretty_version' => 'v1.1.0', |
|
| 15 | + 'version' => '1.1.0.0', |
|
| 16 | + 'reference' => '90b2128806bfde671b6952ab8bea493942c1fdae', |
|
| 17 | + 'type' => 'library', |
|
| 18 | + 'install_path' => __DIR__ . '/../doctrine/inflector', |
|
| 19 | + 'aliases' => array(), |
|
| 20 | + 'dev_requirement' => false, |
|
| 21 | + ), |
|
| 22 | + 'gettext/gettext' => array( |
|
| 23 | + 'pretty_version' => 'v4.8.7', |
|
| 24 | + 'version' => '4.8.7.0', |
|
| 25 | + 'reference' => '3f7bc5ef23302a9059e64934f3d59e454516bec0', |
|
| 26 | + 'type' => 'library', |
|
| 27 | + 'install_path' => __DIR__ . '/../gettext/gettext', |
|
| 28 | + 'aliases' => array(), |
|
| 29 | + 'dev_requirement' => false, |
|
| 30 | + ), |
|
| 31 | + 'gettext/languages' => array( |
|
| 32 | + 'pretty_version' => '2.10.0', |
|
| 33 | + 'version' => '2.10.0.0', |
|
| 34 | + 'reference' => '4d61d67fe83a2ad85959fe6133d6d9ba7dddd1ab', |
|
| 35 | + 'type' => 'library', |
|
| 36 | + 'install_path' => __DIR__ . '/../gettext/languages', |
|
| 37 | + 'aliases' => array(), |
|
| 38 | + 'dev_requirement' => false, |
|
| 39 | + ), |
|
| 40 | + 'gravitykit/foundation' => array( |
|
| 41 | + 'pretty_version' => 'dev-main', |
|
| 42 | + 'version' => 'dev-main', |
|
| 43 | + 'reference' => '43b67f6dea7cd7002f7cfd53b2f5104d3d753c63', |
|
| 44 | + 'type' => 'library', |
|
| 45 | + 'install_path' => __DIR__ . '/../gravitykit/foundation', |
|
| 46 | + 'aliases' => array( |
|
| 47 | + 0 => '9999999-dev', |
|
| 48 | + ), |
|
| 49 | + 'dev_requirement' => false, |
|
| 50 | + ), |
|
| 51 | + 'gravityview/gravityview' => array( |
|
| 52 | + 'pretty_version' => 'dev-main', |
|
| 53 | + 'version' => 'dev-main', |
|
| 54 | + 'reference' => '3a2e792ccb10784dbd33fd6dfd2d3b48f850ca67', |
|
| 55 | + 'type' => 'wordpress-plugin', |
|
| 56 | + 'install_path' => __DIR__ . '/../../', |
|
| 57 | + 'aliases' => array(), |
|
| 58 | + 'dev_requirement' => false, |
|
| 59 | + ), |
|
| 60 | + 'illuminate/container' => array( |
|
| 61 | + 'pretty_version' => 'v5.4.36', |
|
| 62 | + 'version' => '5.4.36.0', |
|
| 63 | + 'reference' => 'c5b8a02a34a52c307f16922334c355c5eef725a6', |
|
| 64 | + 'type' => 'library', |
|
| 65 | + 'install_path' => __DIR__ . '/../illuminate/container', |
|
| 66 | + 'aliases' => array(), |
|
| 67 | + 'dev_requirement' => false, |
|
| 68 | + ), |
|
| 69 | + 'illuminate/contracts' => array( |
|
| 70 | + 'pretty_version' => 'v5.4.36', |
|
| 71 | + 'version' => '5.4.36.0', |
|
| 72 | + 'reference' => '67f642e018f3e95fb0b2ebffc206c3200391b1ab', |
|
| 73 | + 'type' => 'library', |
|
| 74 | + 'install_path' => __DIR__ . '/../illuminate/contracts', |
|
| 75 | + 'aliases' => array(), |
|
| 76 | + 'dev_requirement' => false, |
|
| 77 | + ), |
|
| 78 | + 'illuminate/filesystem' => array( |
|
| 79 | + 'pretty_version' => 'v5.4.36', |
|
| 80 | + 'version' => '5.4.36.0', |
|
| 81 | + 'reference' => 'b800a1423d06869ee5c2768eee123917f12b693e', |
|
| 82 | + 'type' => 'library', |
|
| 83 | + 'install_path' => __DIR__ . '/../illuminate/filesystem', |
|
| 84 | + 'aliases' => array(), |
|
| 85 | + 'dev_requirement' => false, |
|
| 86 | + ), |
|
| 87 | + 'illuminate/support' => array( |
|
| 88 | + 'pretty_version' => 'v5.4.36', |
|
| 89 | + 'version' => '5.4.36.0', |
|
| 90 | + 'reference' => 'feab1d1495fd6d38970bd6c83586ba2ace8f299a', |
|
| 91 | + 'type' => 'library', |
|
| 92 | + 'install_path' => __DIR__ . '/../illuminate/support', |
|
| 93 | + 'aliases' => array(), |
|
| 94 | + 'dev_requirement' => false, |
|
| 95 | + ), |
|
| 96 | + 'illuminate/translation' => array( |
|
| 97 | + 'pretty_version' => 'v5.4.36', |
|
| 98 | + 'version' => '5.4.36.0', |
|
| 99 | + 'reference' => 'b671ddf78cbee60b0b357ad5745eceda2df26082', |
|
| 100 | + 'type' => 'library', |
|
| 101 | + 'install_path' => __DIR__ . '/../illuminate/translation', |
|
| 102 | + 'aliases' => array(), |
|
| 103 | + 'dev_requirement' => false, |
|
| 104 | + ), |
|
| 105 | + 'illuminate/validation' => array( |
|
| 106 | + 'pretty_version' => 'v5.4.36', |
|
| 107 | + 'version' => '5.4.36.0', |
|
| 108 | + 'reference' => 'c9b7beedfb94e50becfbce1aa354e0851c519809', |
|
| 109 | + 'type' => 'library', |
|
| 110 | + 'install_path' => __DIR__ . '/../illuminate/validation', |
|
| 111 | + 'aliases' => array(), |
|
| 112 | + 'dev_requirement' => false, |
|
| 113 | + ), |
|
| 114 | + 'katzgrau/klogger' => array( |
|
| 115 | + 'pretty_version' => '1.2.2', |
|
| 116 | + 'version' => '1.2.2.0', |
|
| 117 | + 'reference' => '36481c69db9305169a2ceadead25c2acaabd567c', |
|
| 118 | + 'type' => 'library', |
|
| 119 | + 'install_path' => __DIR__ . '/../katzgrau/klogger', |
|
| 120 | + 'aliases' => array(), |
|
| 121 | + 'dev_requirement' => false, |
|
| 122 | + ), |
|
| 123 | + 'monolog/monolog' => array( |
|
| 124 | + 'pretty_version' => '1.27.1', |
|
| 125 | + 'version' => '1.27.1.0', |
|
| 126 | + 'reference' => '904713c5929655dc9b97288b69cfeedad610c9a1', |
|
| 127 | + 'type' => 'library', |
|
| 128 | + 'install_path' => __DIR__ . '/../monolog/monolog', |
|
| 129 | + 'aliases' => array(), |
|
| 130 | + 'dev_requirement' => false, |
|
| 131 | + ), |
|
| 132 | + 'paragonie/random_compat' => array( |
|
| 133 | + 'pretty_version' => 'v2.0.21', |
|
| 134 | + 'version' => '2.0.21.0', |
|
| 135 | + 'reference' => '96c132c7f2f7bc3230723b66e89f8f150b29d5ae', |
|
| 136 | + 'type' => 'library', |
|
| 137 | + 'install_path' => __DIR__ . '/../paragonie/random_compat', |
|
| 138 | + 'aliases' => array(), |
|
| 139 | + 'dev_requirement' => false, |
|
| 140 | + ), |
|
| 141 | + 'paragonie/sodium_compat' => array( |
|
| 142 | + 'pretty_version' => 'v1.19.0', |
|
| 143 | + 'version' => '1.19.0.0', |
|
| 144 | + 'reference' => 'cb15e403ecbe6a6cc515f855c310eb6b1872a933', |
|
| 145 | + 'type' => 'library', |
|
| 146 | + 'install_path' => __DIR__ . '/../paragonie/sodium_compat', |
|
| 147 | + 'aliases' => array(), |
|
| 148 | + 'dev_requirement' => false, |
|
| 149 | + ), |
|
| 150 | + 'psr/log' => array( |
|
| 151 | + 'pretty_version' => '1.1.4', |
|
| 152 | + 'version' => '1.1.4.0', |
|
| 153 | + 'reference' => 'd49695b909c3b7628b6289db5479a1c204601f11', |
|
| 154 | + 'type' => 'library', |
|
| 155 | + 'install_path' => __DIR__ . '/../psr/log', |
|
| 156 | + 'aliases' => array(), |
|
| 157 | + 'dev_requirement' => false, |
|
| 158 | + ), |
|
| 159 | + 'psr/log-implementation' => array( |
|
| 160 | + 'dev_requirement' => false, |
|
| 161 | + 'provided' => array( |
|
| 162 | + 0 => '1.0.0', |
|
| 163 | + ), |
|
| 164 | + ), |
|
| 165 | + 'symfony/finder' => array( |
|
| 166 | + 'pretty_version' => 'v3.4.47', |
|
| 167 | + 'version' => '3.4.47.0', |
|
| 168 | + 'reference' => 'b6b6ad3db3edb1b4b1c1896b1975fb684994de6e', |
|
| 169 | + 'type' => 'library', |
|
| 170 | + 'install_path' => __DIR__ . '/../symfony/finder', |
|
| 171 | + 'aliases' => array(), |
|
| 172 | + 'dev_requirement' => false, |
|
| 173 | + ), |
|
| 174 | + 'symfony/http-foundation' => array( |
|
| 175 | + 'pretty_version' => 'v3.4.47', |
|
| 176 | + 'version' => '3.4.47.0', |
|
| 177 | + 'reference' => 'b9885fcce6fe494201da4f70a9309770e9d13dc8', |
|
| 178 | + 'type' => 'library', |
|
| 179 | + 'install_path' => __DIR__ . '/../symfony/http-foundation', |
|
| 180 | + 'aliases' => array(), |
|
| 181 | + 'dev_requirement' => false, |
|
| 182 | + ), |
|
| 183 | + 'symfony/polyfill-mbstring' => array( |
|
| 184 | + 'pretty_version' => 'v1.26.0', |
|
| 185 | + 'version' => '1.26.0.0', |
|
| 186 | + 'reference' => '9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e', |
|
| 187 | + 'type' => 'library', |
|
| 188 | + 'install_path' => __DIR__ . '/../symfony/polyfill-mbstring', |
|
| 189 | + 'aliases' => array(), |
|
| 190 | + 'dev_requirement' => false, |
|
| 191 | + ), |
|
| 192 | + 'symfony/polyfill-php70' => array( |
|
| 193 | + 'pretty_version' => 'v1.20.0', |
|
| 194 | + 'version' => '1.20.0.0', |
|
| 195 | + 'reference' => '5f03a781d984aae42cebd18e7912fa80f02ee644', |
|
| 196 | + 'type' => 'metapackage', |
|
| 197 | + 'install_path' => NULL, |
|
| 198 | + 'aliases' => array(), |
|
| 199 | + 'dev_requirement' => false, |
|
| 200 | + ), |
|
| 201 | + 'tightenco/collect' => array( |
|
| 202 | + 'dev_requirement' => false, |
|
| 203 | + 'replaced' => array( |
|
| 204 | + 0 => 'v5.4.36', |
|
| 205 | + ), |
|
| 206 | + ), |
|
| 207 | + 'trustedlogin/client' => array( |
|
| 208 | + 'pretty_version' => 'dev-main', |
|
| 209 | + 'version' => 'dev-main', |
|
| 210 | + 'reference' => '4d75dfcc0dc2ea316a42137fd16269ad3eb2f7a0', |
|
| 211 | + 'type' => 'library', |
|
| 212 | + 'install_path' => __DIR__ . '/../trustedlogin/client', |
|
| 213 | + 'aliases' => array( |
|
| 214 | + 0 => '9999999-dev', |
|
| 215 | + ), |
|
| 216 | + 'dev_requirement' => false, |
|
| 217 | + ), |
|
| 218 | + ), |
|
| 219 | 219 | ); |
@@ -6,143 +6,143 @@ |
||
| 6 | 6 | |
| 7 | 7 | class ComposerStaticInit89d55c7e1138817ef1727de1a0354708 |
| 8 | 8 | { |
| 9 | - public static $files = array ( |
|
| 10 | - '5255c38a0faeba867671b61dfda6d864' => __DIR__ . '/..' . '/paragonie/random_compat/lib/random.php', |
|
| 11 | - '72579e7bd17821bb1321b87411366eae' => __DIR__ . '/..' . '/illuminate/support/helpers.php', |
|
| 12 | - '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php', |
|
| 13 | - '3109cb1a231dcd04bee1f9f620d46975' => __DIR__ . '/..' . '/paragonie/sodium_compat/autoload.php', |
|
| 14 | - ); |
|
| 9 | + public static $files = array ( |
|
| 10 | + '5255c38a0faeba867671b61dfda6d864' => __DIR__ . '/..' . '/paragonie/random_compat/lib/random.php', |
|
| 11 | + '72579e7bd17821bb1321b87411366eae' => __DIR__ . '/..' . '/illuminate/support/helpers.php', |
|
| 12 | + '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php', |
|
| 13 | + '3109cb1a231dcd04bee1f9f620d46975' => __DIR__ . '/..' . '/paragonie/sodium_compat/autoload.php', |
|
| 14 | + ); |
|
| 15 | 15 | |
| 16 | - public static $prefixLengthsPsr4 = array ( |
|
| 17 | - 'T' => |
|
| 18 | - array ( |
|
| 19 | - 'TrustedLogin\\' => 13, |
|
| 20 | - ), |
|
| 21 | - 'S' => |
|
| 22 | - array ( |
|
| 23 | - 'Symfony\\Polyfill\\Mbstring\\' => 26, |
|
| 24 | - 'Symfony\\Component\\HttpFoundation\\' => 33, |
|
| 25 | - 'Symfony\\Component\\Finder\\' => 25, |
|
| 26 | - ), |
|
| 27 | - 'P' => |
|
| 28 | - array ( |
|
| 29 | - 'Psr\\Log\\' => 8, |
|
| 30 | - ), |
|
| 31 | - 'M' => |
|
| 32 | - array ( |
|
| 33 | - 'Monolog\\' => 8, |
|
| 34 | - ), |
|
| 35 | - 'K' => |
|
| 36 | - array ( |
|
| 37 | - 'Katzgrau\\KLogger\\' => 17, |
|
| 38 | - ), |
|
| 39 | - 'I' => |
|
| 40 | - array ( |
|
| 41 | - 'Illuminate\\Validation\\' => 22, |
|
| 42 | - 'Illuminate\\Translation\\' => 23, |
|
| 43 | - 'Illuminate\\Support\\' => 19, |
|
| 44 | - 'Illuminate\\Filesystem\\' => 22, |
|
| 45 | - 'Illuminate\\Contracts\\' => 21, |
|
| 46 | - 'Illuminate\\Container\\' => 21, |
|
| 47 | - ), |
|
| 48 | - 'G' => |
|
| 49 | - array ( |
|
| 50 | - 'GravityKit\\Foundation\\' => 22, |
|
| 51 | - 'Gettext\\Languages\\' => 18, |
|
| 52 | - 'Gettext\\' => 8, |
|
| 53 | - ), |
|
| 54 | - ); |
|
| 16 | + public static $prefixLengthsPsr4 = array ( |
|
| 17 | + 'T' => |
|
| 18 | + array ( |
|
| 19 | + 'TrustedLogin\\' => 13, |
|
| 20 | + ), |
|
| 21 | + 'S' => |
|
| 22 | + array ( |
|
| 23 | + 'Symfony\\Polyfill\\Mbstring\\' => 26, |
|
| 24 | + 'Symfony\\Component\\HttpFoundation\\' => 33, |
|
| 25 | + 'Symfony\\Component\\Finder\\' => 25, |
|
| 26 | + ), |
|
| 27 | + 'P' => |
|
| 28 | + array ( |
|
| 29 | + 'Psr\\Log\\' => 8, |
|
| 30 | + ), |
|
| 31 | + 'M' => |
|
| 32 | + array ( |
|
| 33 | + 'Monolog\\' => 8, |
|
| 34 | + ), |
|
| 35 | + 'K' => |
|
| 36 | + array ( |
|
| 37 | + 'Katzgrau\\KLogger\\' => 17, |
|
| 38 | + ), |
|
| 39 | + 'I' => |
|
| 40 | + array ( |
|
| 41 | + 'Illuminate\\Validation\\' => 22, |
|
| 42 | + 'Illuminate\\Translation\\' => 23, |
|
| 43 | + 'Illuminate\\Support\\' => 19, |
|
| 44 | + 'Illuminate\\Filesystem\\' => 22, |
|
| 45 | + 'Illuminate\\Contracts\\' => 21, |
|
| 46 | + 'Illuminate\\Container\\' => 21, |
|
| 47 | + ), |
|
| 48 | + 'G' => |
|
| 49 | + array ( |
|
| 50 | + 'GravityKit\\Foundation\\' => 22, |
|
| 51 | + 'Gettext\\Languages\\' => 18, |
|
| 52 | + 'Gettext\\' => 8, |
|
| 53 | + ), |
|
| 54 | + ); |
|
| 55 | 55 | |
| 56 | - public static $prefixDirsPsr4 = array ( |
|
| 57 | - 'TrustedLogin\\' => |
|
| 58 | - array ( |
|
| 59 | - 0 => __DIR__ . '/..' . '/trustedlogin/client/src', |
|
| 60 | - ), |
|
| 61 | - 'Symfony\\Polyfill\\Mbstring\\' => |
|
| 62 | - array ( |
|
| 63 | - 0 => __DIR__ . '/..' . '/symfony/polyfill-mbstring', |
|
| 64 | - ), |
|
| 65 | - 'Symfony\\Component\\HttpFoundation\\' => |
|
| 66 | - array ( |
|
| 67 | - 0 => __DIR__ . '/..' . '/symfony/http-foundation', |
|
| 68 | - ), |
|
| 69 | - 'Symfony\\Component\\Finder\\' => |
|
| 70 | - array ( |
|
| 71 | - 0 => __DIR__ . '/..' . '/symfony/finder', |
|
| 72 | - ), |
|
| 73 | - 'Psr\\Log\\' => |
|
| 74 | - array ( |
|
| 75 | - 0 => __DIR__ . '/..' . '/psr/log/Psr/Log', |
|
| 76 | - ), |
|
| 77 | - 'Monolog\\' => |
|
| 78 | - array ( |
|
| 79 | - 0 => __DIR__ . '/..' . '/monolog/monolog/src/Monolog', |
|
| 80 | - ), |
|
| 81 | - 'Katzgrau\\KLogger\\' => |
|
| 82 | - array ( |
|
| 83 | - 0 => __DIR__ . '/..' . '/katzgrau/klogger/src', |
|
| 84 | - ), |
|
| 85 | - 'Illuminate\\Validation\\' => |
|
| 86 | - array ( |
|
| 87 | - 0 => __DIR__ . '/..' . '/illuminate/validation', |
|
| 88 | - ), |
|
| 89 | - 'Illuminate\\Translation\\' => |
|
| 90 | - array ( |
|
| 91 | - 0 => __DIR__ . '/..' . '/illuminate/translation', |
|
| 92 | - ), |
|
| 93 | - 'Illuminate\\Support\\' => |
|
| 94 | - array ( |
|
| 95 | - 0 => __DIR__ . '/..' . '/illuminate/support', |
|
| 96 | - ), |
|
| 97 | - 'Illuminate\\Filesystem\\' => |
|
| 98 | - array ( |
|
| 99 | - 0 => __DIR__ . '/..' . '/illuminate/filesystem', |
|
| 100 | - ), |
|
| 101 | - 'Illuminate\\Contracts\\' => |
|
| 102 | - array ( |
|
| 103 | - 0 => __DIR__ . '/..' . '/illuminate/contracts', |
|
| 104 | - ), |
|
| 105 | - 'Illuminate\\Container\\' => |
|
| 106 | - array ( |
|
| 107 | - 0 => __DIR__ . '/..' . '/illuminate/container', |
|
| 108 | - ), |
|
| 109 | - 'GravityKit\\Foundation\\' => |
|
| 110 | - array ( |
|
| 111 | - 0 => __DIR__ . '/..' . '/gravitykit/foundation/src', |
|
| 112 | - ), |
|
| 113 | - 'Gettext\\Languages\\' => |
|
| 114 | - array ( |
|
| 115 | - 0 => __DIR__ . '/..' . '/gettext/languages/src', |
|
| 116 | - ), |
|
| 117 | - 'Gettext\\' => |
|
| 118 | - array ( |
|
| 119 | - 0 => __DIR__ . '/..' . '/gettext/gettext/src', |
|
| 120 | - ), |
|
| 121 | - ); |
|
| 56 | + public static $prefixDirsPsr4 = array ( |
|
| 57 | + 'TrustedLogin\\' => |
|
| 58 | + array ( |
|
| 59 | + 0 => __DIR__ . '/..' . '/trustedlogin/client/src', |
|
| 60 | + ), |
|
| 61 | + 'Symfony\\Polyfill\\Mbstring\\' => |
|
| 62 | + array ( |
|
| 63 | + 0 => __DIR__ . '/..' . '/symfony/polyfill-mbstring', |
|
| 64 | + ), |
|
| 65 | + 'Symfony\\Component\\HttpFoundation\\' => |
|
| 66 | + array ( |
|
| 67 | + 0 => __DIR__ . '/..' . '/symfony/http-foundation', |
|
| 68 | + ), |
|
| 69 | + 'Symfony\\Component\\Finder\\' => |
|
| 70 | + array ( |
|
| 71 | + 0 => __DIR__ . '/..' . '/symfony/finder', |
|
| 72 | + ), |
|
| 73 | + 'Psr\\Log\\' => |
|
| 74 | + array ( |
|
| 75 | + 0 => __DIR__ . '/..' . '/psr/log/Psr/Log', |
|
| 76 | + ), |
|
| 77 | + 'Monolog\\' => |
|
| 78 | + array ( |
|
| 79 | + 0 => __DIR__ . '/..' . '/monolog/monolog/src/Monolog', |
|
| 80 | + ), |
|
| 81 | + 'Katzgrau\\KLogger\\' => |
|
| 82 | + array ( |
|
| 83 | + 0 => __DIR__ . '/..' . '/katzgrau/klogger/src', |
|
| 84 | + ), |
|
| 85 | + 'Illuminate\\Validation\\' => |
|
| 86 | + array ( |
|
| 87 | + 0 => __DIR__ . '/..' . '/illuminate/validation', |
|
| 88 | + ), |
|
| 89 | + 'Illuminate\\Translation\\' => |
|
| 90 | + array ( |
|
| 91 | + 0 => __DIR__ . '/..' . '/illuminate/translation', |
|
| 92 | + ), |
|
| 93 | + 'Illuminate\\Support\\' => |
|
| 94 | + array ( |
|
| 95 | + 0 => __DIR__ . '/..' . '/illuminate/support', |
|
| 96 | + ), |
|
| 97 | + 'Illuminate\\Filesystem\\' => |
|
| 98 | + array ( |
|
| 99 | + 0 => __DIR__ . '/..' . '/illuminate/filesystem', |
|
| 100 | + ), |
|
| 101 | + 'Illuminate\\Contracts\\' => |
|
| 102 | + array ( |
|
| 103 | + 0 => __DIR__ . '/..' . '/illuminate/contracts', |
|
| 104 | + ), |
|
| 105 | + 'Illuminate\\Container\\' => |
|
| 106 | + array ( |
|
| 107 | + 0 => __DIR__ . '/..' . '/illuminate/container', |
|
| 108 | + ), |
|
| 109 | + 'GravityKit\\Foundation\\' => |
|
| 110 | + array ( |
|
| 111 | + 0 => __DIR__ . '/..' . '/gravitykit/foundation/src', |
|
| 112 | + ), |
|
| 113 | + 'Gettext\\Languages\\' => |
|
| 114 | + array ( |
|
| 115 | + 0 => __DIR__ . '/..' . '/gettext/languages/src', |
|
| 116 | + ), |
|
| 117 | + 'Gettext\\' => |
|
| 118 | + array ( |
|
| 119 | + 0 => __DIR__ . '/..' . '/gettext/gettext/src', |
|
| 120 | + ), |
|
| 121 | + ); |
|
| 122 | 122 | |
| 123 | - public static $prefixesPsr0 = array ( |
|
| 124 | - 'D' => |
|
| 125 | - array ( |
|
| 126 | - 'Doctrine\\Common\\Inflector\\' => |
|
| 127 | - array ( |
|
| 128 | - 0 => __DIR__ . '/..' . '/doctrine/inflector/lib', |
|
| 129 | - ), |
|
| 130 | - ), |
|
| 131 | - ); |
|
| 123 | + public static $prefixesPsr0 = array ( |
|
| 124 | + 'D' => |
|
| 125 | + array ( |
|
| 126 | + 'Doctrine\\Common\\Inflector\\' => |
|
| 127 | + array ( |
|
| 128 | + 0 => __DIR__ . '/..' . '/doctrine/inflector/lib', |
|
| 129 | + ), |
|
| 130 | + ), |
|
| 131 | + ); |
|
| 132 | 132 | |
| 133 | - public static $classMap = array ( |
|
| 134 | - 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', |
|
| 135 | - 'Katzgrau\\KLogger\\Logger' => __DIR__ . '/..' . '/katzgrau/klogger/src/Logger.php', |
|
| 136 | - ); |
|
| 133 | + public static $classMap = array ( |
|
| 134 | + 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', |
|
| 135 | + 'Katzgrau\\KLogger\\Logger' => __DIR__ . '/..' . '/katzgrau/klogger/src/Logger.php', |
|
| 136 | + ); |
|
| 137 | 137 | |
| 138 | - public static function getInitializer(ClassLoader $loader) |
|
| 139 | - { |
|
| 140 | - return \Closure::bind(function () use ($loader) { |
|
| 141 | - $loader->prefixLengthsPsr4 = ComposerStaticInit89d55c7e1138817ef1727de1a0354708::$prefixLengthsPsr4; |
|
| 142 | - $loader->prefixDirsPsr4 = ComposerStaticInit89d55c7e1138817ef1727de1a0354708::$prefixDirsPsr4; |
|
| 143 | - $loader->prefixesPsr0 = ComposerStaticInit89d55c7e1138817ef1727de1a0354708::$prefixesPsr0; |
|
| 144 | - $loader->classMap = ComposerStaticInit89d55c7e1138817ef1727de1a0354708::$classMap; |
|
| 138 | + public static function getInitializer(ClassLoader $loader) |
|
| 139 | + { |
|
| 140 | + return \Closure::bind(function () use ($loader) { |
|
| 141 | + $loader->prefixLengthsPsr4 = ComposerStaticInit89d55c7e1138817ef1727de1a0354708::$prefixLengthsPsr4; |
|
| 142 | + $loader->prefixDirsPsr4 = ComposerStaticInit89d55c7e1138817ef1727de1a0354708::$prefixDirsPsr4; |
|
| 143 | + $loader->prefixesPsr0 = ComposerStaticInit89d55c7e1138817ef1727de1a0354708::$prefixesPsr0; |
|
| 144 | + $loader->classMap = ComposerStaticInit89d55c7e1138817ef1727de1a0354708::$classMap; |
|
| 145 | 145 | |
| 146 | - }, null, ClassLoader::class); |
|
| 147 | - } |
|
| 146 | + }, null, ClassLoader::class); |
|
| 147 | + } |
|
| 148 | 148 | } |
@@ -6,38 +6,38 @@ discard block |
||
| 6 | 6 | |
| 7 | 7 | class ComposerStaticInit89d55c7e1138817ef1727de1a0354708 |
| 8 | 8 | { |
| 9 | - public static $files = array ( |
|
| 9 | + public static $files = array( |
|
| 10 | 10 | '5255c38a0faeba867671b61dfda6d864' => __DIR__ . '/..' . '/paragonie/random_compat/lib/random.php', |
| 11 | 11 | '72579e7bd17821bb1321b87411366eae' => __DIR__ . '/..' . '/illuminate/support/helpers.php', |
| 12 | 12 | '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php', |
| 13 | 13 | '3109cb1a231dcd04bee1f9f620d46975' => __DIR__ . '/..' . '/paragonie/sodium_compat/autoload.php', |
| 14 | 14 | ); |
| 15 | 15 | |
| 16 | - public static $prefixLengthsPsr4 = array ( |
|
| 16 | + public static $prefixLengthsPsr4 = array( |
|
| 17 | 17 | 'T' => |
| 18 | - array ( |
|
| 18 | + array( |
|
| 19 | 19 | 'TrustedLogin\\' => 13, |
| 20 | 20 | ), |
| 21 | 21 | 'S' => |
| 22 | - array ( |
|
| 22 | + array( |
|
| 23 | 23 | 'Symfony\\Polyfill\\Mbstring\\' => 26, |
| 24 | 24 | 'Symfony\\Component\\HttpFoundation\\' => 33, |
| 25 | 25 | 'Symfony\\Component\\Finder\\' => 25, |
| 26 | 26 | ), |
| 27 | 27 | 'P' => |
| 28 | - array ( |
|
| 28 | + array( |
|
| 29 | 29 | 'Psr\\Log\\' => 8, |
| 30 | 30 | ), |
| 31 | 31 | 'M' => |
| 32 | - array ( |
|
| 32 | + array( |
|
| 33 | 33 | 'Monolog\\' => 8, |
| 34 | 34 | ), |
| 35 | 35 | 'K' => |
| 36 | - array ( |
|
| 36 | + array( |
|
| 37 | 37 | 'Katzgrau\\KLogger\\' => 17, |
| 38 | 38 | ), |
| 39 | 39 | 'I' => |
| 40 | - array ( |
|
| 40 | + array( |
|
| 41 | 41 | 'Illuminate\\Validation\\' => 22, |
| 42 | 42 | 'Illuminate\\Translation\\' => 23, |
| 43 | 43 | 'Illuminate\\Support\\' => 19, |
@@ -46,103 +46,103 @@ discard block |
||
| 46 | 46 | 'Illuminate\\Container\\' => 21, |
| 47 | 47 | ), |
| 48 | 48 | 'G' => |
| 49 | - array ( |
|
| 49 | + array( |
|
| 50 | 50 | 'GravityKit\\Foundation\\' => 22, |
| 51 | 51 | 'Gettext\\Languages\\' => 18, |
| 52 | 52 | 'Gettext\\' => 8, |
| 53 | 53 | ), |
| 54 | 54 | ); |
| 55 | 55 | |
| 56 | - public static $prefixDirsPsr4 = array ( |
|
| 56 | + public static $prefixDirsPsr4 = array( |
|
| 57 | 57 | 'TrustedLogin\\' => |
| 58 | - array ( |
|
| 58 | + array( |
|
| 59 | 59 | 0 => __DIR__ . '/..' . '/trustedlogin/client/src', |
| 60 | 60 | ), |
| 61 | 61 | 'Symfony\\Polyfill\\Mbstring\\' => |
| 62 | - array ( |
|
| 62 | + array( |
|
| 63 | 63 | 0 => __DIR__ . '/..' . '/symfony/polyfill-mbstring', |
| 64 | 64 | ), |
| 65 | 65 | 'Symfony\\Component\\HttpFoundation\\' => |
| 66 | - array ( |
|
| 66 | + array( |
|
| 67 | 67 | 0 => __DIR__ . '/..' . '/symfony/http-foundation', |
| 68 | 68 | ), |
| 69 | 69 | 'Symfony\\Component\\Finder\\' => |
| 70 | - array ( |
|
| 70 | + array( |
|
| 71 | 71 | 0 => __DIR__ . '/..' . '/symfony/finder', |
| 72 | 72 | ), |
| 73 | 73 | 'Psr\\Log\\' => |
| 74 | - array ( |
|
| 74 | + array( |
|
| 75 | 75 | 0 => __DIR__ . '/..' . '/psr/log/Psr/Log', |
| 76 | 76 | ), |
| 77 | 77 | 'Monolog\\' => |
| 78 | - array ( |
|
| 78 | + array( |
|
| 79 | 79 | 0 => __DIR__ . '/..' . '/monolog/monolog/src/Monolog', |
| 80 | 80 | ), |
| 81 | 81 | 'Katzgrau\\KLogger\\' => |
| 82 | - array ( |
|
| 82 | + array( |
|
| 83 | 83 | 0 => __DIR__ . '/..' . '/katzgrau/klogger/src', |
| 84 | 84 | ), |
| 85 | 85 | 'Illuminate\\Validation\\' => |
| 86 | - array ( |
|
| 86 | + array( |
|
| 87 | 87 | 0 => __DIR__ . '/..' . '/illuminate/validation', |
| 88 | 88 | ), |
| 89 | 89 | 'Illuminate\\Translation\\' => |
| 90 | - array ( |
|
| 90 | + array( |
|
| 91 | 91 | 0 => __DIR__ . '/..' . '/illuminate/translation', |
| 92 | 92 | ), |
| 93 | 93 | 'Illuminate\\Support\\' => |
| 94 | - array ( |
|
| 94 | + array( |
|
| 95 | 95 | 0 => __DIR__ . '/..' . '/illuminate/support', |
| 96 | 96 | ), |
| 97 | 97 | 'Illuminate\\Filesystem\\' => |
| 98 | - array ( |
|
| 98 | + array( |
|
| 99 | 99 | 0 => __DIR__ . '/..' . '/illuminate/filesystem', |
| 100 | 100 | ), |
| 101 | 101 | 'Illuminate\\Contracts\\' => |
| 102 | - array ( |
|
| 102 | + array( |
|
| 103 | 103 | 0 => __DIR__ . '/..' . '/illuminate/contracts', |
| 104 | 104 | ), |
| 105 | 105 | 'Illuminate\\Container\\' => |
| 106 | - array ( |
|
| 106 | + array( |
|
| 107 | 107 | 0 => __DIR__ . '/..' . '/illuminate/container', |
| 108 | 108 | ), |
| 109 | 109 | 'GravityKit\\Foundation\\' => |
| 110 | - array ( |
|
| 110 | + array( |
|
| 111 | 111 | 0 => __DIR__ . '/..' . '/gravitykit/foundation/src', |
| 112 | 112 | ), |
| 113 | 113 | 'Gettext\\Languages\\' => |
| 114 | - array ( |
|
| 114 | + array( |
|
| 115 | 115 | 0 => __DIR__ . '/..' . '/gettext/languages/src', |
| 116 | 116 | ), |
| 117 | 117 | 'Gettext\\' => |
| 118 | - array ( |
|
| 118 | + array( |
|
| 119 | 119 | 0 => __DIR__ . '/..' . '/gettext/gettext/src', |
| 120 | 120 | ), |
| 121 | 121 | ); |
| 122 | 122 | |
| 123 | - public static $prefixesPsr0 = array ( |
|
| 123 | + public static $prefixesPsr0 = array( |
|
| 124 | 124 | 'D' => |
| 125 | - array ( |
|
| 125 | + array( |
|
| 126 | 126 | 'Doctrine\\Common\\Inflector\\' => |
| 127 | - array ( |
|
| 127 | + array( |
|
| 128 | 128 | 0 => __DIR__ . '/..' . '/doctrine/inflector/lib', |
| 129 | 129 | ), |
| 130 | 130 | ), |
| 131 | 131 | ); |
| 132 | 132 | |
| 133 | - public static $classMap = array ( |
|
| 133 | + public static $classMap = array( |
|
| 134 | 134 | 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', |
| 135 | 135 | 'Katzgrau\\KLogger\\Logger' => __DIR__ . '/..' . '/katzgrau/klogger/src/Logger.php', |
| 136 | 136 | ); |
| 137 | 137 | |
| 138 | - public static function getInitializer(ClassLoader $loader) |
|
| 138 | + public static function getInitializer( ClassLoader $loader ) |
|
| 139 | 139 | { |
| 140 | - return \Closure::bind(function () use ($loader) { |
|
| 140 | + return \Closure::bind( function() use ( $loader ) { |
|
| 141 | 141 | $loader->prefixLengthsPsr4 = ComposerStaticInit89d55c7e1138817ef1727de1a0354708::$prefixLengthsPsr4; |
| 142 | 142 | $loader->prefixDirsPsr4 = ComposerStaticInit89d55c7e1138817ef1727de1a0354708::$prefixDirsPsr4; |
| 143 | 143 | $loader->prefixesPsr0 = ComposerStaticInit89d55c7e1138817ef1727de1a0354708::$prefixesPsr0; |
| 144 | 144 | $loader->classMap = ComposerStaticInit89d55c7e1138817ef1727de1a0354708::$classMap; |
| 145 | 145 | |
| 146 | - }, null, ClassLoader::class); |
|
| 146 | + }, null, ClassLoader::class ); |
|
| 147 | 147 | } |
| 148 | 148 | } |
@@ -4,8 +4,7 @@ discard block |
||
| 4 | 4 | |
| 5 | 5 | namespace Composer\Autoload; |
| 6 | 6 | |
| 7 | -class ComposerStaticInit89d55c7e1138817ef1727de1a0354708 |
|
| 8 | -{ |
|
| 7 | +class ComposerStaticInit89d55c7e1138817ef1727de1a0354708 { |
|
| 9 | 8 | public static $files = array ( |
| 10 | 9 | '5255c38a0faeba867671b61dfda6d864' => __DIR__ . '/..' . '/paragonie/random_compat/lib/random.php', |
| 11 | 10 | '72579e7bd17821bb1321b87411366eae' => __DIR__ . '/..' . '/illuminate/support/helpers.php', |
@@ -135,8 +134,7 @@ discard block |
||
| 135 | 134 | 'Katzgrau\\KLogger\\Logger' => __DIR__ . '/..' . '/katzgrau/klogger/src/Logger.php', |
| 136 | 135 | ); |
| 137 | 136 | |
| 138 | - public static function getInitializer(ClassLoader $loader) |
|
| 139 | - { |
|
| 137 | + public static function getInitializer(ClassLoader $loader) { |
|
| 140 | 138 | return \Closure::bind(function () use ($loader) { |
| 141 | 139 | $loader->prefixLengthsPsr4 = ComposerStaticInit89d55c7e1138817ef1727de1a0354708::$prefixLengthsPsr4; |
| 142 | 140 | $loader->prefixDirsPsr4 = ComposerStaticInit89d55c7e1138817ef1727de1a0354708::$prefixDirsPsr4; |
@@ -4,40 +4,40 @@ discard block |
||
| 4 | 4 | |
| 5 | 5 | class ComposerAutoloaderInit89d55c7e1138817ef1727de1a0354708 |
| 6 | 6 | { |
| 7 | - private static $loader; |
|
| 8 | - |
|
| 9 | - public static function loadClassLoader($class) |
|
| 10 | - { |
|
| 11 | - if ('Composer\Autoload\ClassLoader' === $class) { |
|
| 12 | - require __DIR__ . '/ClassLoader.php'; |
|
| 13 | - } |
|
| 14 | - } |
|
| 15 | - |
|
| 16 | - /** |
|
| 17 | - * @return \Composer\Autoload\ClassLoader |
|
| 18 | - */ |
|
| 19 | - public static function getLoader() |
|
| 20 | - { |
|
| 21 | - if (null !== self::$loader) { |
|
| 22 | - return self::$loader; |
|
| 23 | - } |
|
| 24 | - |
|
| 25 | - spl_autoload_register(array('ComposerAutoloaderInit89d55c7e1138817ef1727de1a0354708', 'loadClassLoader'), true, true); |
|
| 26 | - self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); |
|
| 27 | - spl_autoload_unregister(array('ComposerAutoloaderInit89d55c7e1138817ef1727de1a0354708', 'loadClassLoader')); |
|
| 28 | - |
|
| 29 | - require __DIR__ . '/autoload_static.php'; |
|
| 30 | - call_user_func(\Composer\Autoload\ComposerStaticInit89d55c7e1138817ef1727de1a0354708::getInitializer($loader)); |
|
| 31 | - |
|
| 32 | - $loader->register(true); |
|
| 33 | - |
|
| 34 | - $includeFiles = \Composer\Autoload\ComposerStaticInit89d55c7e1138817ef1727de1a0354708::$files; |
|
| 35 | - foreach ($includeFiles as $fileIdentifier => $file) { |
|
| 36 | - composerRequire89d55c7e1138817ef1727de1a0354708($fileIdentifier, $file); |
|
| 37 | - } |
|
| 38 | - |
|
| 39 | - return $loader; |
|
| 40 | - } |
|
| 7 | + private static $loader; |
|
| 8 | + |
|
| 9 | + public static function loadClassLoader($class) |
|
| 10 | + { |
|
| 11 | + if ('Composer\Autoload\ClassLoader' === $class) { |
|
| 12 | + require __DIR__ . '/ClassLoader.php'; |
|
| 13 | + } |
|
| 14 | + } |
|
| 15 | + |
|
| 16 | + /** |
|
| 17 | + * @return \Composer\Autoload\ClassLoader |
|
| 18 | + */ |
|
| 19 | + public static function getLoader() |
|
| 20 | + { |
|
| 21 | + if (null !== self::$loader) { |
|
| 22 | + return self::$loader; |
|
| 23 | + } |
|
| 24 | + |
|
| 25 | + spl_autoload_register(array('ComposerAutoloaderInit89d55c7e1138817ef1727de1a0354708', 'loadClassLoader'), true, true); |
|
| 26 | + self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); |
|
| 27 | + spl_autoload_unregister(array('ComposerAutoloaderInit89d55c7e1138817ef1727de1a0354708', 'loadClassLoader')); |
|
| 28 | + |
|
| 29 | + require __DIR__ . '/autoload_static.php'; |
|
| 30 | + call_user_func(\Composer\Autoload\ComposerStaticInit89d55c7e1138817ef1727de1a0354708::getInitializer($loader)); |
|
| 31 | + |
|
| 32 | + $loader->register(true); |
|
| 33 | + |
|
| 34 | + $includeFiles = \Composer\Autoload\ComposerStaticInit89d55c7e1138817ef1727de1a0354708::$files; |
|
| 35 | + foreach ($includeFiles as $fileIdentifier => $file) { |
|
| 36 | + composerRequire89d55c7e1138817ef1727de1a0354708($fileIdentifier, $file); |
|
| 37 | + } |
|
| 38 | + |
|
| 39 | + return $loader; |
|
| 40 | + } |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | /** |
@@ -47,9 +47,9 @@ discard block |
||
| 47 | 47 | */ |
| 48 | 48 | function composerRequire89d55c7e1138817ef1727de1a0354708($fileIdentifier, $file) |
| 49 | 49 | { |
| 50 | - if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { |
|
| 51 | - $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; |
|
| 50 | + if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { |
|
| 51 | + $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; |
|
| 52 | 52 | |
| 53 | - require $file; |
|
| 54 | - } |
|
| 53 | + require $file; |
|
| 54 | + } |
|
| 55 | 55 | } |
@@ -6,9 +6,9 @@ discard block |
||
| 6 | 6 | { |
| 7 | 7 | private static $loader; |
| 8 | 8 | |
| 9 | - public static function loadClassLoader($class) |
|
| 9 | + public static function loadClassLoader( $class ) |
|
| 10 | 10 | { |
| 11 | - if ('Composer\Autoload\ClassLoader' === $class) { |
|
| 11 | + if ( 'Composer\Autoload\ClassLoader' === $class ) { |
|
| 12 | 12 | require __DIR__ . '/ClassLoader.php'; |
| 13 | 13 | } |
| 14 | 14 | } |
@@ -18,22 +18,22 @@ discard block |
||
| 18 | 18 | */ |
| 19 | 19 | public static function getLoader() |
| 20 | 20 | { |
| 21 | - if (null !== self::$loader) { |
|
| 21 | + if ( null !== self::$loader ) { |
|
| 22 | 22 | return self::$loader; |
| 23 | 23 | } |
| 24 | 24 | |
| 25 | - spl_autoload_register(array('ComposerAutoloaderInit89d55c7e1138817ef1727de1a0354708', 'loadClassLoader'), true, true); |
|
| 26 | - self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); |
|
| 27 | - spl_autoload_unregister(array('ComposerAutoloaderInit89d55c7e1138817ef1727de1a0354708', 'loadClassLoader')); |
|
| 25 | + spl_autoload_register( array( 'ComposerAutoloaderInit89d55c7e1138817ef1727de1a0354708', 'loadClassLoader' ), true, true ); |
|
| 26 | + self::$loader = $loader = new \Composer\Autoload\ClassLoader( \dirname( __DIR__ ) ); |
|
| 27 | + spl_autoload_unregister( array( 'ComposerAutoloaderInit89d55c7e1138817ef1727de1a0354708', 'loadClassLoader' ) ); |
|
| 28 | 28 | |
| 29 | 29 | require __DIR__ . '/autoload_static.php'; |
| 30 | - call_user_func(\Composer\Autoload\ComposerStaticInit89d55c7e1138817ef1727de1a0354708::getInitializer($loader)); |
|
| 30 | + call_user_func( \Composer\Autoload\ComposerStaticInit89d55c7e1138817ef1727de1a0354708::getInitializer( $loader ) ); |
|
| 31 | 31 | |
| 32 | - $loader->register(true); |
|
| 32 | + $loader->register( true ); |
|
| 33 | 33 | |
| 34 | 34 | $includeFiles = \Composer\Autoload\ComposerStaticInit89d55c7e1138817ef1727de1a0354708::$files; |
| 35 | - foreach ($includeFiles as $fileIdentifier => $file) { |
|
| 36 | - composerRequire89d55c7e1138817ef1727de1a0354708($fileIdentifier, $file); |
|
| 35 | + foreach ( $includeFiles as $fileIdentifier => $file ) { |
|
| 36 | + composerRequire89d55c7e1138817ef1727de1a0354708( $fileIdentifier, $file ); |
|
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | return $loader; |
@@ -45,10 +45,10 @@ discard block |
||
| 45 | 45 | * @param string $file |
| 46 | 46 | * @return void |
| 47 | 47 | */ |
| 48 | -function composerRequire89d55c7e1138817ef1727de1a0354708($fileIdentifier, $file) |
|
| 48 | +function composerRequire89d55c7e1138817ef1727de1a0354708( $fileIdentifier, $file ) |
|
| 49 | 49 | { |
| 50 | - if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { |
|
| 51 | - $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; |
|
| 50 | + if ( empty( $GLOBALS[ '__composer_autoload_files' ][ $fileIdentifier ] ) ) { |
|
| 51 | + $GLOBALS[ '__composer_autoload_files' ][ $fileIdentifier ] = true; |
|
| 52 | 52 | |
| 53 | 53 | require $file; |
| 54 | 54 | } |
@@ -2,12 +2,10 @@ discard block |
||
| 2 | 2 | |
| 3 | 3 | // autoload_real.php @generated by Composer |
| 4 | 4 | |
| 5 | -class ComposerAutoloaderInit89d55c7e1138817ef1727de1a0354708 |
|
| 6 | -{ |
|
| 5 | +class ComposerAutoloaderInit89d55c7e1138817ef1727de1a0354708 { |
|
| 7 | 6 | private static $loader; |
| 8 | 7 | |
| 9 | - public static function loadClassLoader($class) |
|
| 10 | - { |
|
| 8 | + public static function loadClassLoader($class) { |
|
| 11 | 9 | if ('Composer\Autoload\ClassLoader' === $class) { |
| 12 | 10 | require __DIR__ . '/ClassLoader.php'; |
| 13 | 11 | } |
@@ -16,8 +14,7 @@ discard block |
||
| 16 | 14 | /** |
| 17 | 15 | * @return \Composer\Autoload\ClassLoader |
| 18 | 16 | */ |
| 19 | - public static function getLoader() |
|
| 20 | - { |
|
| 17 | + public static function getLoader() { |
|
| 21 | 18 | if (null !== self::$loader) { |
| 22 | 19 | return self::$loader; |
| 23 | 20 | } |
@@ -45,8 +42,7 @@ discard block |
||
| 45 | 42 | * @param string $file |
| 46 | 43 | * @return void |
| 47 | 44 | */ |
| 48 | -function composerRequire89d55c7e1138817ef1727de1a0354708($fileIdentifier, $file) |
|
| 49 | -{ |
|
| 45 | +function composerRequire89d55c7e1138817ef1727de1a0354708($fileIdentifier, $file) { |
|
| 50 | 46 | if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { |
| 51 | 47 | $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; |
| 52 | 48 | |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | function load() { |
| 136 | 136 | |
| 137 | 137 | /** @define "GRAVITYVIEW_DIR" "../../../" */ |
| 138 | - include_once( GRAVITYVIEW_DIR .'includes/class-admin-approve-entries.php' ); |
|
| 138 | + include_once( GRAVITYVIEW_DIR . 'includes/class-admin-approve-entries.php' ); |
|
| 139 | 139 | |
| 140 | 140 | // Don't display an embedded form when editing an entry |
| 141 | 141 | add_action( 'wp_head', array( $this, 'prevent_render_form' ) ); |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | add_action( 'wp', array( $this, 'prevent_maybe_process_form' ), 8 ); |
| 146 | 146 | add_action( 'admin_init', array( $this, 'prevent_maybe_process_form' ), 8 ); |
| 147 | 147 | |
| 148 | - add_filter( 'gravityview_is_edit_entry', array( $this, 'is_edit_entry') ); |
|
| 148 | + add_filter( 'gravityview_is_edit_entry', array( $this, 'is_edit_entry' ) ); |
|
| 149 | 149 | |
| 150 | 150 | add_action( 'gravityview_edit_entry', array( $this, 'init' ), 10, 4 ); |
| 151 | 151 | |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | add_filter( 'gform_plupload_settings', array( $this, 'modify_fileupload_settings' ), 10, 3 ); |
| 157 | 157 | |
| 158 | 158 | // Add fields expected by GFFormDisplay::validate() |
| 159 | - add_filter( 'gform_pre_validation', array( $this, 'gform_pre_validation') ); |
|
| 159 | + add_filter( 'gform_pre_validation', array( $this, 'gform_pre_validation' ) ); |
|
| 160 | 160 | |
| 161 | 161 | // Fix multiselect value for GF 2.2 |
| 162 | 162 | add_filter( 'gravityview/edit_entry/field_value_multiselect', array( $this, 'fix_multiselect_value_serialization' ), 10, 3 ); |
@@ -173,8 +173,8 @@ discard block |
||
| 173 | 173 | * @return void |
| 174 | 174 | */ |
| 175 | 175 | public function prevent_render_form() { |
| 176 | - if( $this->is_edit_entry() ) { |
|
| 177 | - if( 'wp_head' === current_filter() ) { |
|
| 176 | + if ( $this->is_edit_entry() ) { |
|
| 177 | + if ( 'wp_head' === current_filter() ) { |
|
| 178 | 178 | add_filter( 'gform_shortcode_form', '__return_empty_string' ); |
| 179 | 179 | } else { |
| 180 | 180 | remove_filter( 'gform_shortcode_form', '__return_empty_string' ); |
@@ -189,17 +189,17 @@ discard block |
||
| 189 | 189 | */ |
| 190 | 190 | public function prevent_maybe_process_form() { |
| 191 | 191 | |
| 192 | - if( ! $this->is_edit_entry_submission() ) { |
|
| 192 | + if ( ! $this->is_edit_entry_submission() ) { |
|
| 193 | 193 | return; |
| 194 | 194 | } |
| 195 | 195 | |
| 196 | 196 | gravityview()->log->debug( 'GravityView_Edit_Entry[prevent_maybe_process_form] Removing GFForms::maybe_process_form() action.' ); |
| 197 | 197 | |
| 198 | - remove_action( 'wp', array( 'RGForms', 'maybe_process_form'), 9 ); |
|
| 199 | - remove_action( 'wp', array( 'GFForms', 'maybe_process_form'), 9 ); |
|
| 198 | + remove_action( 'wp', array( 'RGForms', 'maybe_process_form' ), 9 ); |
|
| 199 | + remove_action( 'wp', array( 'GFForms', 'maybe_process_form' ), 9 ); |
|
| 200 | 200 | |
| 201 | - remove_action( 'admin_init', array( 'GFForms', 'maybe_process_form'), 9 ); |
|
| 202 | - remove_action( 'admin_init', array( 'RGForms', 'maybe_process_form'), 9 ); |
|
| 201 | + remove_action( 'admin_init', array( 'GFForms', 'maybe_process_form' ), 9 ); |
|
| 202 | + remove_action( 'admin_init', array( 'RGForms', 'maybe_process_form' ), 9 ); |
|
| 203 | 203 | } |
| 204 | 204 | |
| 205 | 205 | /** |
@@ -210,7 +210,7 @@ discard block |
||
| 210 | 210 | |
| 211 | 211 | $is_edit_entry = |
| 212 | 212 | ( GravityView_frontend::is_single_entry() || gravityview()->request->is_entry() ) |
| 213 | - && ( ! empty( $_GET['edit'] ) ); |
|
| 213 | + && ( ! empty( $_GET[ 'edit' ] ) ); |
|
| 214 | 214 | |
| 215 | 215 | return ( $is_edit_entry || $this->is_edit_entry_submission() ); |
| 216 | 216 | } |
@@ -221,7 +221,7 @@ discard block |
||
| 221 | 221 | * @return boolean |
| 222 | 222 | */ |
| 223 | 223 | public function is_edit_entry_submission() { |
| 224 | - return !empty( $_POST[ self::$nonce_field ] ); |
|
| 224 | + return ! empty( $_POST[ self::$nonce_field ] ); |
|
| 225 | 225 | } |
| 226 | 226 | |
| 227 | 227 | /** |
@@ -243,20 +243,20 @@ discard block |
||
| 243 | 243 | } else { |
| 244 | 244 | $gravityview_view = GravityView_View::getInstance(); |
| 245 | 245 | $entries = $gravityview_view->getEntries(); |
| 246 | - self::$original_entry = $entries[0]; |
|
| 247 | - $this->entry = $entries[0]; |
|
| 246 | + self::$original_entry = $entries[ 0 ]; |
|
| 247 | + $this->entry = $entries[ 0 ]; |
|
| 248 | 248 | } |
| 249 | 249 | |
| 250 | - self::$original_form = GFAPI::get_form( $this->entry['form_id'] ); |
|
| 250 | + self::$original_form = GFAPI::get_form( $this->entry[ 'form_id' ] ); |
|
| 251 | 251 | $this->form = self::$original_form; |
| 252 | 252 | |
| 253 | - $this->form_id = $this->entry['form_id']; |
|
| 253 | + $this->form_id = $this->entry[ 'form_id' ]; |
|
| 254 | 254 | |
| 255 | 255 | $this->view_id = $view ? $view->ID : $gravityview_view->getViewId(); |
| 256 | 256 | |
| 257 | 257 | $this->post_id = \GV\Utils::get( $post, 'ID', null ); |
| 258 | 258 | |
| 259 | - self::$nonce_key = GravityView_Edit_Entry::get_nonce_key( $this->view_id, $this->form_id, $this->entry['id'] ); |
|
| 259 | + self::$nonce_key = GravityView_Edit_Entry::get_nonce_key( $this->view_id, $this->form_id, $this->entry[ 'id' ] ); |
|
| 260 | 260 | } |
| 261 | 261 | |
| 262 | 262 | /** |
@@ -318,15 +318,15 @@ discard block |
||
| 318 | 318 | private function print_scripts() { |
| 319 | 319 | $gravityview_view = GravityView_View::getInstance(); |
| 320 | 320 | |
| 321 | - wp_register_script( 'gform_gravityforms', GFCommon::get_base_url().'/js/gravityforms.js', array( 'jquery', 'gform_json', 'gform_placeholder', 'sack', 'plupload-all', 'gravityview-fe-view' ) ); |
|
| 321 | + wp_register_script( 'gform_gravityforms', GFCommon::get_base_url() . '/js/gravityforms.js', array( 'jquery', 'gform_json', 'gform_placeholder', 'sack', 'plupload-all', 'gravityview-fe-view' ) ); |
|
| 322 | 322 | |
| 323 | 323 | GFFormDisplay::enqueue_form_scripts( $this->form ? $this->form : $gravityview_view->getForm(), false ); |
| 324 | 324 | |
| 325 | 325 | wp_localize_script( 'gravityview-fe-view', 'gvGlobals', array( 'cookiepath' => COOKIEPATH ) ); |
| 326 | 326 | |
| 327 | - wp_enqueue_script( 'sack'); // Sack is required for images. |
|
| 328 | - wp_enqueue_script( 'gform_gravityforms'); |
|
| 329 | - wp_enqueue_script( 'gravityview-fe-view'); |
|
| 327 | + wp_enqueue_script( 'sack' ); // Sack is required for images. |
|
| 328 | + wp_enqueue_script( 'gform_gravityforms' ); |
|
| 329 | + wp_enqueue_script( 'gravityview-fe-view' ); |
|
| 330 | 330 | |
| 331 | 331 | // File download/delete icons |
| 332 | 332 | wp_enqueue_style( 'gform_admin_icons' ); |
@@ -340,19 +340,19 @@ discard block |
||
| 340 | 340 | */ |
| 341 | 341 | private function process_save( $gv_data ) { |
| 342 | 342 | |
| 343 | - if ( empty( $_POST ) || ! isset( $_POST['lid'] ) ) { |
|
| 343 | + if ( empty( $_POST ) || ! isset( $_POST[ 'lid' ] ) ) { |
|
| 344 | 344 | return; |
| 345 | 345 | } |
| 346 | 346 | |
| 347 | 347 | // Make sure the entry, view, and form IDs are all correct |
| 348 | 348 | $valid = $this->verify_nonce(); |
| 349 | 349 | |
| 350 | - if ( !$valid ) { |
|
| 350 | + if ( ! $valid ) { |
|
| 351 | 351 | gravityview()->log->error( 'Nonce validation failed.' ); |
| 352 | 352 | return; |
| 353 | 353 | } |
| 354 | 354 | |
| 355 | - if ( $this->entry['id'] !== $_POST['lid'] ) { |
|
| 355 | + if ( $this->entry[ 'id' ] !== $_POST[ 'lid' ] ) { |
|
| 356 | 356 | gravityview()->log->error( 'Entry ID did not match posted entry ID.' ); |
| 357 | 357 | return; |
| 358 | 358 | } |
@@ -363,7 +363,7 @@ discard block |
||
| 363 | 363 | |
| 364 | 364 | $this->validate(); |
| 365 | 365 | |
| 366 | - if( $this->is_valid ) { |
|
| 366 | + if ( $this->is_valid ) { |
|
| 367 | 367 | |
| 368 | 368 | gravityview()->log->debug( 'Submission is valid.' ); |
| 369 | 369 | |
@@ -375,7 +375,7 @@ discard block |
||
| 375 | 375 | /** |
| 376 | 376 | * @hack to avoid the capability validation of the method save_lead for GF 1.9+ |
| 377 | 377 | */ |
| 378 | - unset( $_GET['page'] ); |
|
| 378 | + unset( $_GET[ 'page' ] ); |
|
| 379 | 379 | |
| 380 | 380 | add_filter( 'gform_use_post_value_for_conditional_logic_save_entry', '__return_true' ); |
| 381 | 381 | |
@@ -387,7 +387,7 @@ discard block |
||
| 387 | 387 | * @param GravityView_Edit_Entry_Render $this This object |
| 388 | 388 | * @param GravityView_View_Data $gv_data The View data |
| 389 | 389 | */ |
| 390 | - do_action( 'gravityview/edit_entry/before_update', $form, $this->entry['id'], $this, $gv_data ); |
|
| 390 | + do_action( 'gravityview/edit_entry/before_update', $form, $this->entry[ 'id' ], $this, $gv_data ); |
|
| 391 | 391 | |
| 392 | 392 | GFFormsModel::save_lead( $form, $this->entry ); |
| 393 | 393 | |
@@ -417,7 +417,7 @@ discard block |
||
| 417 | 417 | * @param GravityView_Edit_Entry_Render $this This object |
| 418 | 418 | * @param GravityView_View_Data $gv_data The View data |
| 419 | 419 | */ |
| 420 | - do_action( 'gravityview/edit_entry/after_update', $this->form, $this->entry['id'], $this, $gv_data ); |
|
| 420 | + do_action( 'gravityview/edit_entry/after_update', $this->form, $this->entry[ 'id' ], $this, $gv_data ); |
|
| 421 | 421 | |
| 422 | 422 | } else { |
| 423 | 423 | gravityview()->log->error( 'Submission is NOT valid.', array( 'entry' => $this->entry ) ); |
@@ -453,10 +453,10 @@ discard block |
||
| 453 | 453 | |
| 454 | 454 | if ( version_compare( GravityView_GFFormsModel::get_database_version(), '2.3-dev-1', '>=' ) && method_exists( 'GFFormsModel', 'get_entry_meta_table_name' ) ) { |
| 455 | 455 | $entry_meta_table = GFFormsModel::get_entry_meta_table_name(); |
| 456 | - $current_fields = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $entry_meta_table WHERE entry_id=%d", $this->entry['id'] ) ); |
|
| 456 | + $current_fields = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $entry_meta_table WHERE entry_id=%d", $this->entry[ 'id' ] ) ); |
|
| 457 | 457 | } else { |
| 458 | 458 | $lead_detail_table = GFFormsModel::get_lead_details_table_name(); |
| 459 | - $current_fields = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $lead_detail_table WHERE lead_id=%d", $this->entry['id'] ) ); |
|
| 459 | + $current_fields = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $lead_detail_table WHERE lead_id=%d", $this->entry[ 'id' ] ) ); |
|
| 460 | 460 | } |
| 461 | 461 | |
| 462 | 462 | foreach ( $this->entry as $input_id => $field_value ) { |
@@ -474,11 +474,11 @@ discard block |
||
| 474 | 474 | |
| 475 | 475 | $empty_value = $field->get_value_save_entry( |
| 476 | 476 | is_array( $field->get_entry_inputs() ) ? array() : '', |
| 477 | - $this->form, '', $this->entry['id'], $this->entry |
|
| 477 | + $this->form, '', $this->entry[ 'id' ], $this->entry |
|
| 478 | 478 | ); |
| 479 | 479 | |
| 480 | 480 | if ( $field->has_calculation() ) { |
| 481 | - $this->unset_hidden_calculations[] = $field->id; // Unset |
|
| 481 | + $this->unset_hidden_calculations[ ] = $field->id; // Unset |
|
| 482 | 482 | $empty_value = ''; |
| 483 | 483 | } |
| 484 | 484 | |
@@ -507,7 +507,7 @@ discard block |
||
| 507 | 507 | private function preset_approval_fields() { |
| 508 | 508 | $has_approved_field = false; |
| 509 | 509 | |
| 510 | - foreach ( self::$original_form['fields'] as $field ) { |
|
| 510 | + foreach ( self::$original_form[ 'fields' ] as $field ) { |
|
| 511 | 511 | if ( $field->gravityview_approved ) { |
| 512 | 512 | $has_approved_field = true; |
| 513 | 513 | break; |
@@ -520,7 +520,7 @@ discard block |
||
| 520 | 520 | |
| 521 | 521 | $is_field_hidden = true; |
| 522 | 522 | |
| 523 | - foreach ( $this->form['fields'] as $field ) { |
|
| 523 | + foreach ( $this->form[ 'fields' ] as $field ) { |
|
| 524 | 524 | if ( $field->gravityview_approved ) { |
| 525 | 525 | $is_field_hidden = false; |
| 526 | 526 | break; |
@@ -545,7 +545,7 @@ discard block |
||
| 545 | 545 | |
| 546 | 546 | remove_filter( 'gravityview/approve_entries/update_unapproved_meta', array( $this, 'prevent_update_unapproved_meta' ), 9 ); |
| 547 | 547 | |
| 548 | - if ( ! $value = gform_get_meta( $entry['id'], 'is_approved' ) ) { |
|
| 548 | + if ( ! $value = gform_get_meta( $entry[ 'id' ], 'is_approved' ) ) { |
|
| 549 | 549 | |
| 550 | 550 | $value = GravityView_Entry_Approval_Status::UNAPPROVED; |
| 551 | 551 | |
@@ -610,7 +610,7 @@ discard block |
||
| 610 | 610 | } |
| 611 | 611 | |
| 612 | 612 | /** No file is being uploaded. */ |
| 613 | - if ( empty( $_FILES[ $input_name ]['name'] ) ) { |
|
| 613 | + if ( empty( $_FILES[ $input_name ][ 'name' ] ) ) { |
|
| 614 | 614 | /** So return the original upload, with $value as backup (it can be empty during edit form rendering) */ |
| 615 | 615 | return rgar( $entry, $input_id, $value ); |
| 616 | 616 | } |
@@ -628,11 +628,11 @@ discard block |
||
| 628 | 628 | * @return mixed |
| 629 | 629 | */ |
| 630 | 630 | public function modify_fileupload_settings( $plupload_init, $form_id, $instance ) { |
| 631 | - if( ! $this->is_edit_entry() ) { |
|
| 631 | + if ( ! $this->is_edit_entry() ) { |
|
| 632 | 632 | return $plupload_init; |
| 633 | 633 | } |
| 634 | 634 | |
| 635 | - $plupload_init['gf_vars']['max_files'] = 0; |
|
| 635 | + $plupload_init[ 'gf_vars' ][ 'max_files' ] = 0; |
|
| 636 | 636 | |
| 637 | 637 | return $plupload_init; |
| 638 | 638 | } |
@@ -647,26 +647,26 @@ discard block |
||
| 647 | 647 | $form = $this->filter_conditional_logic( $this->form ); |
| 648 | 648 | |
| 649 | 649 | /** @type GF_Field $field */ |
| 650 | - foreach( $form['fields'] as $k => &$field ) { |
|
| 650 | + foreach ( $form[ 'fields' ] as $k => &$field ) { |
|
| 651 | 651 | |
| 652 | 652 | /** |
| 653 | 653 | * Remove the fields with calculation formulas before save to avoid conflicts with GF logic |
| 654 | 654 | * @since 1.16.3 |
| 655 | 655 | */ |
| 656 | - if( $field->has_calculation() ) { |
|
| 657 | - unset( $form['fields'][ $k ] ); |
|
| 656 | + if ( $field->has_calculation() ) { |
|
| 657 | + unset( $form[ 'fields' ][ $k ] ); |
|
| 658 | 658 | } |
| 659 | 659 | |
| 660 | 660 | $field->adminOnly = false; |
| 661 | 661 | |
| 662 | - if( isset( $field->inputs ) && is_array( $field->inputs ) ) { |
|
| 663 | - foreach( $field->inputs as $key => $input ) { |
|
| 664 | - $field->inputs[ $key ][ 'id' ] = (string)$input['id']; |
|
| 662 | + if ( isset( $field->inputs ) && is_array( $field->inputs ) ) { |
|
| 663 | + foreach ( $field->inputs as $key => $input ) { |
|
| 664 | + $field->inputs[ $key ][ 'id' ] = (string)$input[ 'id' ]; |
|
| 665 | 665 | } |
| 666 | 666 | } |
| 667 | 667 | } |
| 668 | 668 | |
| 669 | - $form['fields'] = array_values( $form['fields'] ); |
|
| 669 | + $form[ 'fields' ] = array_values( $form[ 'fields' ] ); |
|
| 670 | 670 | |
| 671 | 671 | return $form; |
| 672 | 672 | } |
@@ -678,14 +678,14 @@ discard block |
||
| 678 | 678 | $update = false; |
| 679 | 679 | |
| 680 | 680 | // get the most up to date entry values |
| 681 | - $entry = GFAPI::get_entry( $this->entry['id'] ); |
|
| 681 | + $entry = GFAPI::get_entry( $this->entry[ 'id' ] ); |
|
| 682 | 682 | |
| 683 | 683 | if ( version_compare( GravityView_GFFormsModel::get_database_version(), '2.3-dev-1', '>=' ) && method_exists( 'GFFormsModel', 'get_entry_meta_table_name' ) ) { |
| 684 | 684 | $entry_meta_table = GFFormsModel::get_entry_meta_table_name(); |
| 685 | - $current_fields = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $entry_meta_table WHERE entry_id=%d", $entry['id'] ) ); |
|
| 685 | + $current_fields = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $entry_meta_table WHERE entry_id=%d", $entry[ 'id' ] ) ); |
|
| 686 | 686 | } else { |
| 687 | 687 | $lead_detail_table = GFFormsModel::get_lead_details_table_name(); |
| 688 | - $current_fields = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $lead_detail_table WHERE lead_id=%d", $entry['id'] ) ); |
|
| 688 | + $current_fields = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $lead_detail_table WHERE lead_id=%d", $entry[ 'id' ] ) ); |
|
| 689 | 689 | } |
| 690 | 690 | |
| 691 | 691 | |
@@ -702,24 +702,24 @@ discard block |
||
| 702 | 702 | $inputs = $field->get_entry_inputs(); |
| 703 | 703 | if ( is_array( $inputs ) ) { |
| 704 | 704 | foreach ( $inputs as $input ) { |
| 705 | - list( $field_id, $input_id ) = rgexplode( '.', $input['id'], 2 ); |
|
| 705 | + list( $field_id, $input_id ) = rgexplode( '.', $input[ 'id' ], 2 ); |
|
| 706 | 706 | |
| 707 | 707 | if ( 'product' === $field->type ) { |
| 708 | - $input_name = 'input_' . str_replace( '.', '_', $input['id'] ); |
|
| 708 | + $input_name = 'input_' . str_replace( '.', '_', $input[ 'id' ] ); |
|
| 709 | 709 | |
| 710 | 710 | // Only allow quantity to be set if it's allowed to be edited |
| 711 | 711 | if ( in_array( $field_id, $allowed_fields ) && $input_id == 3 ) { |
| 712 | 712 | } else { // otherwise set to what it previously was |
| 713 | - $_POST[ $input_name ] = $entry[ $input['id'] ]; |
|
| 713 | + $_POST[ $input_name ] = $entry[ $input[ 'id' ] ]; |
|
| 714 | 714 | } |
| 715 | 715 | } else { |
| 716 | 716 | // Set to what it previously was if it's not editable |
| 717 | 717 | if ( ! in_array( $field_id, $allowed_fields ) ) { |
| 718 | - $_POST[ $input_name ] = $entry[ $input['id'] ]; |
|
| 718 | + $_POST[ $input_name ] = $entry[ $input[ 'id' ] ]; |
|
| 719 | 719 | } |
| 720 | 720 | } |
| 721 | 721 | |
| 722 | - GFFormsModel::save_input( $form, $field, $entry, $current_fields, $input['id'] ); |
|
| 722 | + GFFormsModel::save_input( $form, $field, $entry, $current_fields, $input[ 'id' ] ); |
|
| 723 | 723 | } |
| 724 | 724 | } else { |
| 725 | 725 | // Set to what it previously was if it's not editable |
@@ -759,19 +759,19 @@ discard block |
||
| 759 | 759 | |
| 760 | 760 | $input_name = 'input_' . $field_id; |
| 761 | 761 | |
| 762 | - if ( !empty( $_FILES[ $input_name ]['name'] ) ) { |
|
| 762 | + if ( ! empty( $_FILES[ $input_name ][ 'name' ] ) ) { |
|
| 763 | 763 | |
| 764 | 764 | // We have a new image |
| 765 | 765 | |
| 766 | - $value = RGFormsModel::prepare_value( $form, $field, $value, $input_name, $entry['id'] ); |
|
| 766 | + $value = RGFormsModel::prepare_value( $form, $field, $value, $input_name, $entry[ 'id' ] ); |
|
| 767 | 767 | |
| 768 | 768 | $ary = ! empty( $value ) ? explode( '|:|', $value ) : array(); |
| 769 | 769 | $ary = stripslashes_deep( $ary ); |
| 770 | 770 | $img_url = \GV\Utils::get( $ary, 0 ); |
| 771 | 771 | |
| 772 | - $img_title = count( $ary ) > 1 ? $ary[1] : ''; |
|
| 773 | - $img_caption = count( $ary ) > 2 ? $ary[2] : ''; |
|
| 774 | - $img_description = count( $ary ) > 3 ? $ary[3] : ''; |
|
| 772 | + $img_title = count( $ary ) > 1 ? $ary[ 1 ] : ''; |
|
| 773 | + $img_caption = count( $ary ) > 2 ? $ary[ 2 ] : ''; |
|
| 774 | + $img_description = count( $ary ) > 3 ? $ary[ 3 ] : ''; |
|
| 775 | 775 | |
| 776 | 776 | $image_meta = array( |
| 777 | 777 | 'post_excerpt' => $img_caption, |
@@ -780,7 +780,7 @@ discard block |
||
| 780 | 780 | |
| 781 | 781 | //adding title only if it is not empty. It will default to the file name if it is not in the array |
| 782 | 782 | if ( ! empty( $img_title ) ) { |
| 783 | - $image_meta['post_title'] = $img_title; |
|
| 783 | + $image_meta[ 'post_title' ] = $img_title; |
|
| 784 | 784 | } |
| 785 | 785 | |
| 786 | 786 | /** |
@@ -838,15 +838,15 @@ discard block |
||
| 838 | 838 | */ |
| 839 | 839 | private function maybe_update_post_fields( $form ) { |
| 840 | 840 | |
| 841 | - if( empty( $this->entry['post_id'] ) ) { |
|
| 841 | + if ( empty( $this->entry[ 'post_id' ] ) ) { |
|
| 842 | 842 | gravityview()->log->debug( 'This entry has no post fields. Continuing...' ); |
| 843 | 843 | return; |
| 844 | 844 | } |
| 845 | 845 | |
| 846 | - $post_id = $this->entry['post_id']; |
|
| 846 | + $post_id = $this->entry[ 'post_id' ]; |
|
| 847 | 847 | |
| 848 | 848 | // Security check |
| 849 | - if( false === GVCommon::has_cap( 'edit_post', $post_id ) ) { |
|
| 849 | + if ( false === GVCommon::has_cap( 'edit_post', $post_id ) ) { |
|
| 850 | 850 | gravityview()->log->error( 'The current user does not have the ability to edit Post #{post_id}', array( 'post_id' => $post_id ) ); |
| 851 | 851 | return; |
| 852 | 852 | } |
@@ -859,25 +859,25 @@ discard block |
||
| 859 | 859 | |
| 860 | 860 | $field = RGFormsModel::get_field( $form, $field_id ); |
| 861 | 861 | |
| 862 | - if( ! $field ) { |
|
| 862 | + if ( ! $field ) { |
|
| 863 | 863 | continue; |
| 864 | 864 | } |
| 865 | 865 | |
| 866 | - if( GFCommon::is_post_field( $field ) && 'post_category' !== $field->type ) { |
|
| 866 | + if ( GFCommon::is_post_field( $field ) && 'post_category' !== $field->type ) { |
|
| 867 | 867 | |
| 868 | 868 | // Get the value of the field, including $_POSTed value |
| 869 | 869 | $value = RGFormsModel::get_field_value( $field ); |
| 870 | 870 | |
| 871 | 871 | // Use temporary entry variable, to make values available to fill_post_template() and update_post_image() |
| 872 | 872 | $entry_tmp = $this->entry; |
| 873 | - $entry_tmp["{$field_id}"] = $value; |
|
| 873 | + $entry_tmp[ "{$field_id}" ] = $value; |
|
| 874 | 874 | |
| 875 | - switch( $field->type ) { |
|
| 875 | + switch ( $field->type ) { |
|
| 876 | 876 | |
| 877 | 877 | case 'post_title': |
| 878 | 878 | $post_title = $value; |
| 879 | 879 | if ( \GV\Utils::get( $form, 'postTitleTemplateEnabled' ) ) { |
| 880 | - $post_title = $this->fill_post_template( $form['postTitleTemplate'], $form, $entry_tmp ); |
|
| 880 | + $post_title = $this->fill_post_template( $form[ 'postTitleTemplate' ], $form, $entry_tmp ); |
|
| 881 | 881 | } |
| 882 | 882 | $updated_post->post_title = $post_title; |
| 883 | 883 | $updated_post->post_name = $post_title; |
@@ -887,7 +887,7 @@ discard block |
||
| 887 | 887 | case 'post_content': |
| 888 | 888 | $post_content = $value; |
| 889 | 889 | if ( \GV\Utils::get( $form, 'postContentTemplateEnabled' ) ) { |
| 890 | - $post_content = $this->fill_post_template( $form['postContentTemplate'], $form, $entry_tmp, true ); |
|
| 890 | + $post_content = $this->fill_post_template( $form[ 'postContentTemplate' ], $form, $entry_tmp, true ); |
|
| 891 | 891 | } |
| 892 | 892 | $updated_post->post_content = $post_content; |
| 893 | 893 | unset( $post_content ); |
@@ -905,11 +905,11 @@ discard block |
||
| 905 | 905 | $value = $value[ $field_id ]; |
| 906 | 906 | } |
| 907 | 907 | |
| 908 | - if( ! empty( $field->customFieldTemplateEnabled ) ) { |
|
| 908 | + if ( ! empty( $field->customFieldTemplateEnabled ) ) { |
|
| 909 | 909 | $value = $this->fill_post_template( $field->customFieldTemplate, $form, $entry_tmp, true ); |
| 910 | 910 | } |
| 911 | 911 | |
| 912 | - $value = $field->get_value_save_entry( $value, $form, '', $this->entry['id'], $this->entry ); |
|
| 912 | + $value = $field->get_value_save_entry( $value, $form, '', $this->entry[ 'id' ], $this->entry ); |
|
| 913 | 913 | |
| 914 | 914 | update_post_meta( $post_id, $field->postCustomFieldName, $value ); |
| 915 | 915 | break; |
@@ -921,7 +921,7 @@ discard block |
||
| 921 | 921 | } |
| 922 | 922 | |
| 923 | 923 | // update entry after |
| 924 | - $this->entry["{$field_id}"] = $value; |
|
| 924 | + $this->entry[ "{$field_id}" ] = $value; |
|
| 925 | 925 | |
| 926 | 926 | $update_entry = true; |
| 927 | 927 | |
@@ -930,11 +930,11 @@ discard block |
||
| 930 | 930 | |
| 931 | 931 | } |
| 932 | 932 | |
| 933 | - if( $update_entry ) { |
|
| 933 | + if ( $update_entry ) { |
|
| 934 | 934 | |
| 935 | 935 | $return_entry = GFAPI::update_entry( $this->entry ); |
| 936 | 936 | |
| 937 | - if( is_wp_error( $return_entry ) ) { |
|
| 937 | + if ( is_wp_error( $return_entry ) ) { |
|
| 938 | 938 | gravityview()->log->error( 'Updating the entry post fields failed', array( 'data' => array( '$this->entry' => $this->entry, '$return_entry' => $return_entry ) ) ); |
| 939 | 939 | } else { |
| 940 | 940 | gravityview()->log->debug( 'Updating the entry post fields for post #{post_id} succeeded', array( 'post_id' => $post_id ) ); |
@@ -944,7 +944,7 @@ discard block |
||
| 944 | 944 | |
| 945 | 945 | $return_post = wp_update_post( $updated_post, true ); |
| 946 | 946 | |
| 947 | - if( is_wp_error( $return_post ) ) { |
|
| 947 | + if ( is_wp_error( $return_post ) ) { |
|
| 948 | 948 | $return_post->add_data( $updated_post, '$updated_post' ); |
| 949 | 949 | gravityview()->log->error( 'Updating the post content failed', array( 'data' => compact( 'updated_post', 'return_post' ) ) ); |
| 950 | 950 | } else { |
@@ -978,7 +978,7 @@ discard block |
||
| 978 | 978 | $output = GFCommon::replace_variables( $output, $form, $entry, false, false, false ); |
| 979 | 979 | |
| 980 | 980 | // replace conditional shortcodes |
| 981 | - if( $do_shortcode ) { |
|
| 981 | + if ( $do_shortcode ) { |
|
| 982 | 982 | $output = do_shortcode( $output ); |
| 983 | 983 | } |
| 984 | 984 | |
@@ -997,19 +997,19 @@ discard block |
||
| 997 | 997 | */ |
| 998 | 998 | private function after_update() { |
| 999 | 999 | |
| 1000 | - do_action( 'gform_after_update_entry', self::$original_form, $this->entry['id'], self::$original_entry ); |
|
| 1001 | - do_action( "gform_after_update_entry_{$this->form['id']}", self::$original_form, $this->entry['id'], self::$original_entry ); |
|
| 1000 | + do_action( 'gform_after_update_entry', self::$original_form, $this->entry[ 'id' ], self::$original_entry ); |
|
| 1001 | + do_action( "gform_after_update_entry_{$this->form[ 'id' ]}", self::$original_form, $this->entry[ 'id' ], self::$original_entry ); |
|
| 1002 | 1002 | |
| 1003 | 1003 | // Re-define the entry now that we've updated it. |
| 1004 | - $entry = RGFormsModel::get_lead( $this->entry['id'] ); |
|
| 1004 | + $entry = RGFormsModel::get_lead( $this->entry[ 'id' ] ); |
|
| 1005 | 1005 | |
| 1006 | 1006 | $entry = GFFormsModel::set_entry_meta( $entry, self::$original_form ); |
| 1007 | 1007 | |
| 1008 | 1008 | if ( version_compare( GFFormsModel::get_database_version(), '2.3-dev-1', '<' ) ) { |
| 1009 | 1009 | // We need to clear the cache because Gravity Forms caches the field values, which |
| 1010 | 1010 | // we have just updated. |
| 1011 | - foreach ($this->form['fields'] as $key => $field) { |
|
| 1012 | - GFFormsModel::refresh_lead_field_value( $entry['id'], $field->id ); |
|
| 1011 | + foreach ( $this->form[ 'fields' ] as $key => $field ) { |
|
| 1012 | + GFFormsModel::refresh_lead_field_value( $entry[ 'id' ], $field->id ); |
|
| 1013 | 1013 | } |
| 1014 | 1014 | } |
| 1015 | 1015 | |
@@ -1019,11 +1019,11 @@ discard block |
||
| 1019 | 1019 | * @since develop |
| 1020 | 1020 | */ |
| 1021 | 1021 | if ( $allowed_feeds = $this->view->settings->get( 'edit_feeds', array() ) ) { |
| 1022 | - $feeds = GFAPI::get_feeds( null, $entry['form_id'] ); |
|
| 1022 | + $feeds = GFAPI::get_feeds( null, $entry[ 'form_id' ] ); |
|
| 1023 | 1023 | if ( ! is_wp_error( $feeds ) ) { |
| 1024 | 1024 | $registered_feeds = array(); |
| 1025 | 1025 | foreach ( GFAddOn::get_registered_addons() as $registered_feed ) { |
| 1026 | - if ( is_subclass_of( $registered_feed, 'GFFeedAddOn' ) ) { |
|
| 1026 | + if ( is_subclass_of( $registered_feed, 'GFFeedAddOn' ) ) { |
|
| 1027 | 1027 | if ( method_exists( $registered_feed, 'get_instance' ) ) { |
| 1028 | 1028 | $registered_feed = call_user_func( array( $registered_feed, 'get_instance' ) ); |
| 1029 | 1029 | $registered_feeds[ $registered_feed->get_slug() ] = $registered_feed; |
@@ -1031,8 +1031,8 @@ discard block |
||
| 1031 | 1031 | } |
| 1032 | 1032 | } |
| 1033 | 1033 | foreach ( $feeds as $feed ) { |
| 1034 | - if ( in_array( $feed['id'], $allowed_feeds ) ) { |
|
| 1035 | - if ( $feed_object = \GV\Utils::get( $registered_feeds, $feed['addon_slug'] ) ) { |
|
| 1034 | + if ( in_array( $feed[ 'id' ], $allowed_feeds ) ) { |
|
| 1035 | + if ( $feed_object = \GV\Utils::get( $registered_feeds, $feed[ 'addon_slug' ] ) ) { |
|
| 1036 | 1036 | $returned_entry = $feed_object->process_feed( $feed, $entry, self::$original_form ); |
| 1037 | 1037 | if ( is_array( $returned_entry ) && rgar( $returned_entry, 'id' ) ) { |
| 1038 | 1038 | $entry = $returned_entry; |
@@ -1060,9 +1060,9 @@ discard block |
||
| 1060 | 1060 | |
| 1061 | 1061 | $view = \GV\View::by_id( $this->view_id ); |
| 1062 | 1062 | |
| 1063 | - if( $view->settings->get( 'edit_locking' ) ) { |
|
| 1063 | + if ( $view->settings->get( 'edit_locking' ) ) { |
|
| 1064 | 1064 | $locking = new GravityView_Edit_Entry_Locking(); |
| 1065 | - $locking->maybe_lock_object( $this->entry['id'] ); |
|
| 1065 | + $locking->maybe_lock_object( $this->entry[ 'id' ] ); |
|
| 1066 | 1066 | } |
| 1067 | 1067 | |
| 1068 | 1068 | ?> |
@@ -1075,7 +1075,7 @@ discard block |
||
| 1075 | 1075 | |
| 1076 | 1076 | <div class="gv-edit-entry-wrapper"><?php |
| 1077 | 1077 | |
| 1078 | - $javascript = gravityview_ob_include( GravityView_Edit_Entry::$file .'/partials/inline-javascript.php', $this ); |
|
| 1078 | + $javascript = gravityview_ob_include( GravityView_Edit_Entry::$file . '/partials/inline-javascript.php', $this ); |
|
| 1079 | 1079 | |
| 1080 | 1080 | /** |
| 1081 | 1081 | * Fixes weird wpautop() issue |
@@ -1091,7 +1091,7 @@ discard block |
||
| 1091 | 1091 | * @param string $edit_entry_title Modify the "Edit Entry" title |
| 1092 | 1092 | * @param GravityView_Edit_Entry_Render $this This object |
| 1093 | 1093 | */ |
| 1094 | - $edit_entry_title = apply_filters('gravityview_edit_entry_title', __('Edit Entry', 'gk-gravityview'), $this ); |
|
| 1094 | + $edit_entry_title = apply_filters( 'gravityview_edit_entry_title', __( 'Edit Entry', 'gk-gravityview' ), $this ); |
|
| 1095 | 1095 | |
| 1096 | 1096 | echo esc_attr( $edit_entry_title ); |
| 1097 | 1097 | ?></span> |
@@ -1168,18 +1168,18 @@ discard block |
||
| 1168 | 1168 | */ |
| 1169 | 1169 | $labels = apply_filters( 'gravityview/edit_entry/button_labels', $labels, $this->form, $this->entry, $this->view_id ); |
| 1170 | 1170 | |
| 1171 | - $this->is_paged_submitted = \GV\Utils::_POST( 'save' ) === $labels['submit']; |
|
| 1171 | + $this->is_paged_submitted = \GV\Utils::_POST( 'save' ) === $labels[ 'submit' ]; |
|
| 1172 | 1172 | } |
| 1173 | 1173 | |
| 1174 | 1174 | $back_link = remove_query_arg( array( 'page', 'view', 'edit', 'gvid' ) ); |
| 1175 | 1175 | |
| 1176 | - if( ! $this->is_valid ){ |
|
| 1176 | + if ( ! $this->is_valid ) { |
|
| 1177 | 1177 | |
| 1178 | 1178 | // Keeping this compatible with Gravity Forms. |
| 1179 | - $validation_message = "<div class='validation_error'>" . __('There was a problem with your submission.', 'gk-gravityview') . " " . __('Errors have been highlighted below.', 'gk-gravityview') . "</div>"; |
|
| 1180 | - $message = apply_filters("gform_validation_message_{$this->form['id']}", apply_filters("gform_validation_message", $validation_message, $this->form), $this->form); |
|
| 1179 | + $validation_message = "<div class='validation_error'>" . __( 'There was a problem with your submission.', 'gk-gravityview' ) . " " . __( 'Errors have been highlighted below.', 'gk-gravityview' ) . "</div>"; |
|
| 1180 | + $message = apply_filters( "gform_validation_message_{$this->form[ 'id' ]}", apply_filters( "gform_validation_message", $validation_message, $this->form ), $this->form ); |
|
| 1181 | 1181 | |
| 1182 | - echo GVCommon::generate_notice( $message , 'gv-error' ); |
|
| 1182 | + echo GVCommon::generate_notice( $message, 'gv-error' ); |
|
| 1183 | 1183 | |
| 1184 | 1184 | } elseif ( false === $this->is_paged_submitted ) { |
| 1185 | 1185 | // Paged form that hasn't been submitted on the last page yet |
@@ -1192,7 +1192,7 @@ discard block |
||
| 1192 | 1192 | * @param int $view_id View ID |
| 1193 | 1193 | * @param array $entry Gravity Forms entry array |
| 1194 | 1194 | */ |
| 1195 | - $message = apply_filters( 'gravityview/edit_entry/page/success', $entry_updated_message , $this->view_id, $this->entry ); |
|
| 1195 | + $message = apply_filters( 'gravityview/edit_entry/page/success', $entry_updated_message, $this->view_id, $this->entry ); |
|
| 1196 | 1196 | |
| 1197 | 1197 | echo GVCommon::generate_notice( $message ); |
| 1198 | 1198 | } else { |
@@ -1204,23 +1204,23 @@ discard block |
||
| 1204 | 1204 | |
| 1205 | 1205 | case '0': |
| 1206 | 1206 | $redirect_url = $back_link; |
| 1207 | - $entry_updated_message = sprintf( esc_attr_x('Entry Updated. %sReturning to Entry%s', 'Replacements are HTML', 'gk-gravityview'), '<a href="'. esc_url( $redirect_url ) .'">', '</a>' ); |
|
| 1207 | + $entry_updated_message = sprintf( esc_attr_x( 'Entry Updated. %sReturning to Entry%s', 'Replacements are HTML', 'gk-gravityview' ), '<a href="' . esc_url( $redirect_url ) . '">', '</a>' ); |
|
| 1208 | 1208 | break; |
| 1209 | 1209 | |
| 1210 | 1210 | case '1': |
| 1211 | 1211 | $redirect_url = $directory_link = GravityView_API::directory_link(); |
| 1212 | - $entry_updated_message = sprintf( esc_attr_x('Entry Updated. %sReturning to %s%s', 'Replacement 1 is HTML. Replacement 2 is the title of the page where the user will be taken. Replacement 3 is HTML.','gk-gravityview'), '<a href="'. esc_url( $redirect_url ) . '">', esc_html( $view->post_title ), '</a>' ); |
|
| 1212 | + $entry_updated_message = sprintf( esc_attr_x( 'Entry Updated. %sReturning to %s%s', 'Replacement 1 is HTML. Replacement 2 is the title of the page where the user will be taken. Replacement 3 is HTML.', 'gk-gravityview' ), '<a href="' . esc_url( $redirect_url ) . '">', esc_html( $view->post_title ), '</a>' ); |
|
| 1213 | 1213 | break; |
| 1214 | 1214 | |
| 1215 | 1215 | case '2': |
| 1216 | 1216 | $redirect_url = $edit_redirect_url; |
| 1217 | 1217 | $redirect_url = GFCommon::replace_variables( $redirect_url, $this->form, $this->entry, false, false, false, 'text' ); |
| 1218 | - $entry_updated_message = sprintf( esc_attr_x('Entry Updated. %sRedirecting to %s%s', 'Replacement 1 is HTML. Replacement 2 is the URL where the user will be taken. Replacement 3 is HTML.','gk-gravityview'), '<a href="'. esc_url( $redirect_url ) . '">', esc_html( $edit_redirect_url ), '</a>' ); |
|
| 1218 | + $entry_updated_message = sprintf( esc_attr_x( 'Entry Updated. %sRedirecting to %s%s', 'Replacement 1 is HTML. Replacement 2 is the URL where the user will be taken. Replacement 3 is HTML.', 'gk-gravityview' ), '<a href="' . esc_url( $redirect_url ) . '">', esc_html( $edit_redirect_url ), '</a>' ); |
|
| 1219 | 1219 | break; |
| 1220 | 1220 | |
| 1221 | 1221 | case '': |
| 1222 | 1222 | default: |
| 1223 | - $entry_updated_message = sprintf( esc_attr__('Entry Updated. %sReturn to Entry%s', 'gk-gravityview'), '<a href="'. esc_url( $back_link ) .'">', '</a>' ); |
|
| 1223 | + $entry_updated_message = sprintf( esc_attr__( 'Entry Updated. %sReturn to Entry%s', 'gk-gravityview' ), '<a href="' . esc_url( $back_link ) . '">', '</a>' ); |
|
| 1224 | 1224 | break; |
| 1225 | 1225 | } |
| 1226 | 1226 | |
@@ -1261,8 +1261,8 @@ discard block |
||
| 1261 | 1261 | */ |
| 1262 | 1262 | do_action( 'gravityview/edit-entry/render/before', $this ); |
| 1263 | 1263 | |
| 1264 | - add_filter( 'gform_pre_render', array( $this, 'filter_modify_form_fields'), 5000, 3 ); |
|
| 1265 | - add_filter( 'gform_submit_button', array( $this, 'render_form_buttons') ); |
|
| 1264 | + add_filter( 'gform_pre_render', array( $this, 'filter_modify_form_fields' ), 5000, 3 ); |
|
| 1265 | + add_filter( 'gform_submit_button', array( $this, 'render_form_buttons' ) ); |
|
| 1266 | 1266 | add_filter( 'gform_next_button', array( $this, 'render_form_buttons' ) ); |
| 1267 | 1267 | add_filter( 'gform_previous_button', array( $this, 'render_form_buttons' ) ); |
| 1268 | 1268 | add_filter( 'gform_disable_view_counter', '__return_true' ); |
@@ -1271,14 +1271,14 @@ discard block |
||
| 1271 | 1271 | add_filter( 'gform_field_input', array( $this, 'modify_edit_field_input' ), 10, 5 ); |
| 1272 | 1272 | |
| 1273 | 1273 | // We need to remove the fake $_GET['page'] arg to avoid rendering form as if in admin. |
| 1274 | - unset( $_GET['page'] ); |
|
| 1274 | + unset( $_GET[ 'page' ] ); |
|
| 1275 | 1275 | |
| 1276 | 1276 | $this->show_next_button = false; |
| 1277 | 1277 | $this->show_previous_button = false; |
| 1278 | 1278 | |
| 1279 | 1279 | // TODO: Verify multiple-page forms |
| 1280 | 1280 | if ( GFCommon::has_pages( $this->form ) && apply_filters( 'gravityview/features/paged-edit', false ) ) { |
| 1281 | - if ( intval( $page_number = \GV\Utils::_POST( 'gform_source_page_number_' . $this->form['id'], 0 ) ) ) { |
|
| 1281 | + if ( intval( $page_number = \GV\Utils::_POST( 'gform_source_page_number_' . $this->form[ 'id' ], 0 ) ) ) { |
|
| 1282 | 1282 | |
| 1283 | 1283 | $labels = array( |
| 1284 | 1284 | 'cancel' => __( 'Cancel', 'gk-gravityview' ), |
@@ -1297,20 +1297,20 @@ discard block |
||
| 1297 | 1297 | */ |
| 1298 | 1298 | $labels = apply_filters( 'gravityview/edit_entry/button_labels', $labels, $this->form, $this->entry, $this->view_id ); |
| 1299 | 1299 | |
| 1300 | - GFFormDisplay::$submission[ $this->form['id'] ][ 'form' ] = $this->form; |
|
| 1301 | - GFFormDisplay::$submission[ $this->form['id'] ][ 'is_valid' ] = true; |
|
| 1300 | + GFFormDisplay::$submission[ $this->form[ 'id' ] ][ 'form' ] = $this->form; |
|
| 1301 | + GFFormDisplay::$submission[ $this->form[ 'id' ] ][ 'is_valid' ] = true; |
|
| 1302 | 1302 | |
| 1303 | - if ( \GV\Utils::_POST( 'save' ) === $labels['next'] ) { |
|
| 1303 | + if ( \GV\Utils::_POST( 'save' ) === $labels[ 'next' ] ) { |
|
| 1304 | 1304 | $last_page = \GFFormDisplay::get_max_page_number( $this->form ); |
| 1305 | 1305 | |
| 1306 | 1306 | while ( ++$page_number < $last_page && RGFormsModel::is_page_hidden( $this->form, $page_number, \GV\Utils::_POST( 'gform_field_values' ) ) ) { |
| 1307 | 1307 | } // Advance to next visible page |
| 1308 | - } elseif ( \GV\Utils::_POST( 'save' ) === $labels['previous'] ) { |
|
| 1308 | + } elseif ( \GV\Utils::_POST( 'save' ) === $labels[ 'previous' ] ) { |
|
| 1309 | 1309 | while ( --$page_number > 1 && RGFormsModel::is_page_hidden( $this->form, $page_number, \GV\Utils::_POST( 'gform_field_values' ) ) ) { |
| 1310 | 1310 | } // Advance to next visible page |
| 1311 | 1311 | } |
| 1312 | 1312 | |
| 1313 | - GFFormDisplay::$submission[ $this->form['id'] ]['page_number'] = $page_number; |
|
| 1313 | + GFFormDisplay::$submission[ $this->form[ 'id' ] ][ 'page_number' ] = $page_number; |
|
| 1314 | 1314 | } |
| 1315 | 1315 | |
| 1316 | 1316 | if ( ( $page_number = intval( $page_number ) ) < 2 ) { |
@@ -1336,7 +1336,7 @@ discard block |
||
| 1336 | 1336 | |
| 1337 | 1337 | ob_start(); // Prevent PHP warnings possibly caused by prefilling list fields for conditional logic |
| 1338 | 1338 | |
| 1339 | - $html = GFFormDisplay::get_form( $this->form['id'], false, false, true, $this->entry ); |
|
| 1339 | + $html = GFFormDisplay::get_form( $this->form[ 'id' ], false, false, true, $this->entry ); |
|
| 1340 | 1340 | |
| 1341 | 1341 | ob_get_clean(); |
| 1342 | 1342 | |
@@ -1364,7 +1364,7 @@ discard block |
||
| 1364 | 1364 | * @return string |
| 1365 | 1365 | */ |
| 1366 | 1366 | public function render_form_buttons() { |
| 1367 | - return gravityview_ob_include( GravityView_Edit_Entry::$file .'/partials/form-buttons.php', $this ); |
|
| 1367 | + return gravityview_ob_include( GravityView_Edit_Entry::$file . '/partials/form-buttons.php', $this ); |
|
| 1368 | 1368 | } |
| 1369 | 1369 | |
| 1370 | 1370 | |
@@ -1383,15 +1383,15 @@ discard block |
||
| 1383 | 1383 | */ |
| 1384 | 1384 | public function filter_modify_form_fields( $form, $ajax = false, $field_values = '' ) { |
| 1385 | 1385 | |
| 1386 | - if( $form['id'] != $this->form_id ) { |
|
| 1386 | + if ( $form[ 'id' ] != $this->form_id ) { |
|
| 1387 | 1387 | return $form; |
| 1388 | 1388 | } |
| 1389 | 1389 | |
| 1390 | 1390 | // In case we have validated the form, use it to inject the validation results into the form render |
| 1391 | - if( isset( $this->form_after_validation ) && $this->form_after_validation['id'] === $form['id'] ) { |
|
| 1391 | + if ( isset( $this->form_after_validation ) && $this->form_after_validation[ 'id' ] === $form[ 'id' ] ) { |
|
| 1392 | 1392 | $form = $this->form_after_validation; |
| 1393 | 1393 | } else { |
| 1394 | - $form['fields'] = $this->get_configured_edit_fields( $form, $this->view_id ); |
|
| 1394 | + $form[ 'fields' ] = $this->get_configured_edit_fields( $form, $this->view_id ); |
|
| 1395 | 1395 | } |
| 1396 | 1396 | |
| 1397 | 1397 | $form = $this->filter_conditional_logic( $form ); |
@@ -1399,8 +1399,8 @@ discard block |
||
| 1399 | 1399 | $form = $this->prefill_conditional_logic( $form ); |
| 1400 | 1400 | |
| 1401 | 1401 | // for now we don't support Save and Continue feature. |
| 1402 | - if( ! self::$supports_save_and_continue ) { |
|
| 1403 | - unset( $form['save'] ); |
|
| 1402 | + if ( ! self::$supports_save_and_continue ) { |
|
| 1403 | + unset( $form[ 'save' ] ); |
|
| 1404 | 1404 | } |
| 1405 | 1405 | |
| 1406 | 1406 | $form = $this->unselect_default_values( $form ); |
@@ -1423,29 +1423,29 @@ discard block |
||
| 1423 | 1423 | */ |
| 1424 | 1424 | public function verify_user_can_edit_post( $field_content = '', $field = null, $value = '', $lead_id = 0, $form_id = 0 ) { |
| 1425 | 1425 | |
| 1426 | - if( ! GFCommon::is_post_field( $field ) ) { |
|
| 1426 | + if ( ! GFCommon::is_post_field( $field ) ) { |
|
| 1427 | 1427 | return $field_content; |
| 1428 | 1428 | } |
| 1429 | 1429 | |
| 1430 | 1430 | $message = null; |
| 1431 | 1431 | |
| 1432 | 1432 | // First, make sure they have the capability to edit the post. |
| 1433 | - if( null === get_post( $this->entry['post_id'] ) ) { |
|
| 1433 | + if ( null === get_post( $this->entry[ 'post_id' ] ) ) { |
|
| 1434 | 1434 | /** |
| 1435 | 1435 | * @filter `gravityview/edit_entry/no_post_text` Modify the message when someone is editing an entry attached to a post that no longer exists |
| 1436 | 1436 | * @param string $message The existing "This field is not editable; the post no longer exists." text |
| 1437 | 1437 | */ |
| 1438 | - $message = apply_filters('gravityview/edit_entry/no_post_text', __('This field is not editable; the post no longer exists.', 'gk-gravityview' ) ); |
|
| 1439 | - } elseif( false === current_user_can( 'edit_post', $this->entry['post_id'] ) ) { |
|
| 1438 | + $message = apply_filters( 'gravityview/edit_entry/no_post_text', __( 'This field is not editable; the post no longer exists.', 'gk-gravityview' ) ); |
|
| 1439 | + } elseif ( false === current_user_can( 'edit_post', $this->entry[ 'post_id' ] ) ) { |
|
| 1440 | 1440 | /** |
| 1441 | 1441 | * @filter `gravityview/edit_entry/unsupported_post_field_text` Modify the message when someone isn't able to edit a post |
| 1442 | 1442 | * @param string $message The existing "You don't have permission..." text |
| 1443 | 1443 | */ |
| 1444 | - $message = apply_filters('gravityview/edit_entry/unsupported_post_field_text', __('You don’t have permission to edit this post.', 'gk-gravityview') ); |
|
| 1444 | + $message = apply_filters( 'gravityview/edit_entry/unsupported_post_field_text', __( 'You don’t have permission to edit this post.', 'gk-gravityview' ) ); |
|
| 1445 | 1445 | } |
| 1446 | 1446 | |
| 1447 | - if( $message ) { |
|
| 1448 | - $field_content = sprintf('<div class="ginput_container ginput_container_' . $field->type . '">%s</div>', wpautop( $message ) ); |
|
| 1447 | + if ( $message ) { |
|
| 1448 | + $field_content = sprintf( '<div class="ginput_container ginput_container_' . $field->type . '">%s</div>', wpautop( $message ) ); |
|
| 1449 | 1449 | } |
| 1450 | 1450 | |
| 1451 | 1451 | return $field_content; |
@@ -1469,8 +1469,8 @@ discard block |
||
| 1469 | 1469 | |
| 1470 | 1470 | // If the form has been submitted, then we don't need to pre-fill the values, |
| 1471 | 1471 | // Except for fileupload type and when a field input is overridden- run always!! |
| 1472 | - if( |
|
| 1473 | - ( $this->is_edit_entry_submission() && !in_array( $field->type, array( 'fileupload', 'post_image' ) ) ) |
|
| 1472 | + if ( |
|
| 1473 | + ( $this->is_edit_entry_submission() && ! in_array( $field->type, array( 'fileupload', 'post_image' ) ) ) |
|
| 1474 | 1474 | && false === ( $gv_field && is_callable( array( $gv_field, 'get_field_input' ) ) ) |
| 1475 | 1475 | && ! GFCommon::is_product_field( $field->type ) |
| 1476 | 1476 | || ! empty( $field_content ) |
@@ -1490,7 +1490,7 @@ discard block |
||
| 1490 | 1490 | $return = null; |
| 1491 | 1491 | |
| 1492 | 1492 | /** @var GravityView_Field $gv_field */ |
| 1493 | - if( $gv_field && is_callable( array( $gv_field, 'get_field_input' ) ) ) { |
|
| 1493 | + if ( $gv_field && is_callable( array( $gv_field, 'get_field_input' ) ) ) { |
|
| 1494 | 1494 | $return = $gv_field->get_field_input( $this->form, $field_value, $this->entry, $field ); |
| 1495 | 1495 | } else { |
| 1496 | 1496 | $return = $field->get_field_input( $this->form, $field_value, $this->entry ); |
@@ -1499,7 +1499,7 @@ discard block |
||
| 1499 | 1499 | // If there was output, it's an error |
| 1500 | 1500 | $warnings = ob_get_clean(); |
| 1501 | 1501 | |
| 1502 | - if( !empty( $warnings ) ) { |
|
| 1502 | + if ( ! empty( $warnings ) ) { |
|
| 1503 | 1503 | gravityview()->log->error( '{warning}', array( 'warning' => $warnings, 'data' => $field_value ) ); |
| 1504 | 1504 | } |
| 1505 | 1505 | |
@@ -1524,7 +1524,7 @@ discard block |
||
| 1524 | 1524 | $override_saved_value = apply_filters( 'gravityview/edit_entry/pre_populate/override', false, $field ); |
| 1525 | 1525 | |
| 1526 | 1526 | // We're dealing with multiple inputs (e.g. checkbox) but not time or date (as it doesn't store data in input IDs) |
| 1527 | - if( isset( $field->inputs ) && is_array( $field->inputs ) && !in_array( $field->type, array( 'time', 'date' ) ) ) { |
|
| 1527 | + if ( isset( $field->inputs ) && is_array( $field->inputs ) && ! in_array( $field->type, array( 'time', 'date' ) ) ) { |
|
| 1528 | 1528 | |
| 1529 | 1529 | $field_value = array(); |
| 1530 | 1530 | |
@@ -1533,10 +1533,10 @@ discard block |
||
| 1533 | 1533 | |
| 1534 | 1534 | foreach ( (array)$field->inputs as $input ) { |
| 1535 | 1535 | |
| 1536 | - $input_id = strval( $input['id'] ); |
|
| 1536 | + $input_id = strval( $input[ 'id' ] ); |
|
| 1537 | 1537 | |
| 1538 | 1538 | if ( isset( $this->entry[ $input_id ] ) && ! gv_empty( $this->entry[ $input_id ], false, false ) ) { |
| 1539 | - $field_value[ $input_id ] = 'post_category' === $field->type ? GFCommon::format_post_category( $this->entry[ $input_id ], true ) : $this->entry[ $input_id ]; |
|
| 1539 | + $field_value[ $input_id ] = 'post_category' === $field->type ? GFCommon::format_post_category( $this->entry[ $input_id ], true ) : $this->entry[ $input_id ]; |
|
| 1540 | 1540 | $allow_pre_populated = false; |
| 1541 | 1541 | } |
| 1542 | 1542 | |
@@ -1544,7 +1544,7 @@ discard block |
||
| 1544 | 1544 | |
| 1545 | 1545 | $pre_value = $field->get_value_submission( array(), false ); |
| 1546 | 1546 | |
| 1547 | - $field_value = ! $allow_pre_populated && ! ( $override_saved_value && !gv_empty( $pre_value, false, false ) ) ? $field_value : $pre_value; |
|
| 1547 | + $field_value = ! $allow_pre_populated && ! ( $override_saved_value && ! gv_empty( $pre_value, false, false ) ) ? $field_value : $pre_value; |
|
| 1548 | 1548 | |
| 1549 | 1549 | } else { |
| 1550 | 1550 | |
@@ -1555,13 +1555,13 @@ discard block |
||
| 1555 | 1555 | |
| 1556 | 1556 | // saved field entry value (if empty, fallback to the pre-populated value, if exists) |
| 1557 | 1557 | // or pre-populated value if not empty and set to override saved value |
| 1558 | - $field_value = isset( $this->entry[ $id ] ) && ! gv_empty( $this->entry[ $id ], false, false ) && ! ( $override_saved_value && !gv_empty( $pre_value, false, false ) ) ? $this->entry[ $id ] : $pre_value; |
|
| 1558 | + $field_value = isset( $this->entry[ $id ] ) && ! gv_empty( $this->entry[ $id ], false, false ) && ! ( $override_saved_value && ! gv_empty( $pre_value, false, false ) ) ? $this->entry[ $id ] : $pre_value; |
|
| 1559 | 1559 | |
| 1560 | 1560 | // in case field is post_category but inputType is select, multi-select or radio, convert value into array of category IDs. |
| 1561 | - if ( 'post_category' === $field->type && !gv_empty( $field_value, false, false ) ) { |
|
| 1561 | + if ( 'post_category' === $field->type && ! gv_empty( $field_value, false, false ) ) { |
|
| 1562 | 1562 | $categories = array(); |
| 1563 | 1563 | foreach ( explode( ',', $field_value ) as $cat_string ) { |
| 1564 | - $categories[] = GFCommon::format_post_category( $cat_string, true ); |
|
| 1564 | + $categories[ ] = GFCommon::format_post_category( $cat_string, true ); |
|
| 1565 | 1565 | } |
| 1566 | 1566 | $field_value = 'multiselect' === $field->get_input_type() ? $categories : implode( '', $categories ); |
| 1567 | 1567 | } |
@@ -1589,7 +1589,7 @@ discard block |
||
| 1589 | 1589 | * @param GF_Field $field Gravity Forms field object |
| 1590 | 1590 | * @param GravityView_Edit_Entry_Render $this Current object |
| 1591 | 1591 | */ |
| 1592 | - $field_value = apply_filters( 'gravityview/edit_entry/field_value_' . $field->type , $field_value, $field, $this ); |
|
| 1592 | + $field_value = apply_filters( 'gravityview/edit_entry/field_value_' . $field->type, $field_value, $field, $this ); |
|
| 1593 | 1593 | |
| 1594 | 1594 | return $field_value; |
| 1595 | 1595 | } |
@@ -1606,12 +1606,12 @@ discard block |
||
| 1606 | 1606 | */ |
| 1607 | 1607 | public function gform_pre_validation( $form ) { |
| 1608 | 1608 | |
| 1609 | - if( ! $this->verify_nonce() ) { |
|
| 1609 | + if ( ! $this->verify_nonce() ) { |
|
| 1610 | 1610 | return $form; |
| 1611 | 1611 | } |
| 1612 | 1612 | |
| 1613 | 1613 | // Fix PHP warning regarding undefined index. |
| 1614 | - foreach ( $form['fields'] as &$field) { |
|
| 1614 | + foreach ( $form[ 'fields' ] as &$field ) { |
|
| 1615 | 1615 | |
| 1616 | 1616 | // This is because we're doing admin form pretending to be front-end, so Gravity Forms |
| 1617 | 1617 | // expects certain field array items to be set. |
@@ -1619,7 +1619,7 @@ discard block |
||
| 1619 | 1619 | $field->{$key} = isset( $field->{$key} ) ? $field->{$key} : NULL; |
| 1620 | 1620 | } |
| 1621 | 1621 | |
| 1622 | - switch( RGFormsModel::get_input_type( $field ) ) { |
|
| 1622 | + switch ( RGFormsModel::get_input_type( $field ) ) { |
|
| 1623 | 1623 | |
| 1624 | 1624 | /** |
| 1625 | 1625 | * this whole fileupload hack is because in the admin, Gravity Forms simply doesn't update any fileupload field if it's empty, but it DOES in the frontend. |
@@ -1633,26 +1633,26 @@ discard block |
||
| 1633 | 1633 | // Set the previous value |
| 1634 | 1634 | $entry = $this->get_entry(); |
| 1635 | 1635 | |
| 1636 | - $input_name = 'input_'.$field->id; |
|
| 1637 | - $form_id = $form['id']; |
|
| 1636 | + $input_name = 'input_' . $field->id; |
|
| 1637 | + $form_id = $form[ 'id' ]; |
|
| 1638 | 1638 | |
| 1639 | 1639 | $value = NULL; |
| 1640 | 1640 | |
| 1641 | 1641 | // Use the previous entry value as the default. |
| 1642 | - if( isset( $entry[ $field->id ] ) ) { |
|
| 1642 | + if ( isset( $entry[ $field->id ] ) ) { |
|
| 1643 | 1643 | $value = $entry[ $field->id ]; |
| 1644 | 1644 | } |
| 1645 | 1645 | |
| 1646 | 1646 | // If this is a single upload file |
| 1647 | - if( !empty( $_FILES[ $input_name ] ) && !empty( $_FILES[ $input_name ]['name'] ) ) { |
|
| 1648 | - $file_path = GFFormsModel::get_file_upload_path( $form['id'], $_FILES[ $input_name ]['name'] ); |
|
| 1649 | - $value = $file_path['url']; |
|
| 1647 | + if ( ! empty( $_FILES[ $input_name ] ) && ! empty( $_FILES[ $input_name ][ 'name' ] ) ) { |
|
| 1648 | + $file_path = GFFormsModel::get_file_upload_path( $form[ 'id' ], $_FILES[ $input_name ][ 'name' ] ); |
|
| 1649 | + $value = $file_path[ 'url' ]; |
|
| 1650 | 1650 | |
| 1651 | 1651 | } else { |
| 1652 | 1652 | |
| 1653 | 1653 | // Fix PHP warning on line 1498 of form_display.php for post_image fields |
| 1654 | 1654 | // Fix PHP Notice: Undefined index: size in form_display.php on line 1511 |
| 1655 | - $_FILES[ $input_name ] = array('name' => '', 'size' => '' ); |
|
| 1655 | + $_FILES[ $input_name ] = array( 'name' => '', 'size' => '' ); |
|
| 1656 | 1656 | |
| 1657 | 1657 | } |
| 1658 | 1658 | |
@@ -1662,7 +1662,7 @@ discard block |
||
| 1662 | 1662 | if ( isset( GFFormsModel::$uploaded_files[ $form_id ][ $input_name ] ) ) { |
| 1663 | 1663 | $value = empty( $value ) ? '[]' : $value; |
| 1664 | 1664 | $value = stripslashes_deep( $value ); |
| 1665 | - $value = GFFormsModel::prepare_value( $form, $field, $value, $input_name, $entry['id'], array() ); |
|
| 1665 | + $value = GFFormsModel::prepare_value( $form, $field, $value, $input_name, $entry[ 'id' ], array() ); |
|
| 1666 | 1666 | } else if ( GFCommon::is_json( $value ) ) { |
| 1667 | 1667 | // Existing file; let GF derive the value from the `$_gf_uploaded_files` object (see `\GF_Field_FileUpload::get_multifile_value()`) |
| 1668 | 1668 | global $_gf_uploaded_files; |
@@ -1682,8 +1682,8 @@ discard block |
||
| 1682 | 1682 | |
| 1683 | 1683 | case 'number': |
| 1684 | 1684 | // Fix "undefined index" issue at line 1286 in form_display.php |
| 1685 | - if( !isset( $_POST['input_'.$field->id ] ) ) { |
|
| 1686 | - $_POST['input_'.$field->id ] = NULL; |
|
| 1685 | + if ( ! isset( $_POST[ 'input_' . $field->id ] ) ) { |
|
| 1686 | + $_POST[ 'input_' . $field->id ] = NULL; |
|
| 1687 | 1687 | } |
| 1688 | 1688 | break; |
| 1689 | 1689 | } |
@@ -1720,7 +1720,7 @@ discard block |
||
| 1720 | 1720 | * You can enter whatever you want! |
| 1721 | 1721 | * We try validating, and customize the results using `self::custom_validation()` |
| 1722 | 1722 | */ |
| 1723 | - add_filter( 'gform_validation_'. $this->form_id, array( $this, 'custom_validation' ), 10, 4); |
|
| 1723 | + add_filter( 'gform_validation_' . $this->form_id, array( $this, 'custom_validation' ), 10, 4 ); |
|
| 1724 | 1724 | |
| 1725 | 1725 | // Needed by the validate funtion |
| 1726 | 1726 | $failed_validation_page = NULL; |
@@ -1728,14 +1728,14 @@ discard block |
||
| 1728 | 1728 | |
| 1729 | 1729 | // Prevent entry limit from running when editing an entry, also |
| 1730 | 1730 | // prevent form scheduling from preventing editing |
| 1731 | - unset( $this->form['limitEntries'], $this->form['scheduleForm'] ); |
|
| 1731 | + unset( $this->form[ 'limitEntries' ], $this->form[ 'scheduleForm' ] ); |
|
| 1732 | 1732 | |
| 1733 | 1733 | // Hide fields depending on Edit Entry settings |
| 1734 | - $this->form['fields'] = $this->get_configured_edit_fields( $this->form, $this->view_id ); |
|
| 1734 | + $this->form[ 'fields' ] = $this->get_configured_edit_fields( $this->form, $this->view_id ); |
|
| 1735 | 1735 | |
| 1736 | 1736 | $this->is_valid = GFFormDisplay::validate( $this->form, $field_values, 1, $failed_validation_page ); |
| 1737 | 1737 | |
| 1738 | - remove_filter( 'gform_validation_'. $this->form_id, array( $this, 'custom_validation' ), 10 ); |
|
| 1738 | + remove_filter( 'gform_validation_' . $this->form_id, array( $this, 'custom_validation' ), 10 ); |
|
| 1739 | 1739 | } |
| 1740 | 1740 | |
| 1741 | 1741 | |
@@ -1763,7 +1763,7 @@ discard block |
||
| 1763 | 1763 | |
| 1764 | 1764 | $gv_valid = true; |
| 1765 | 1765 | |
| 1766 | - foreach ( $validation_results['form']['fields'] as $key => &$field ) { |
|
| 1766 | + foreach ( $validation_results[ 'form' ][ 'fields' ] as $key => &$field ) { |
|
| 1767 | 1767 | $value = RGFormsModel::get_field_value( $field ); |
| 1768 | 1768 | $field_type = RGFormsModel::get_input_type( $field ); |
| 1769 | 1769 | $is_required = ! empty( $field->isRequired ); |
@@ -1771,7 +1771,7 @@ discard block |
||
| 1771 | 1771 | |
| 1772 | 1772 | // Manually validate required fields as they can be skipped be skipped by GF's validation |
| 1773 | 1773 | // This can happen when the field is considered "hidden" (see `GFFormDisplay::validate`) due to unmet conditional logic |
| 1774 | - if ( $is_required && !$failed_validation && rgblank( $value ) ) { |
|
| 1774 | + if ( $is_required && ! $failed_validation && rgblank( $value ) ) { |
|
| 1775 | 1775 | $field->failed_validation = true; |
| 1776 | 1776 | $field->validation_message = esc_html__( 'This field is required.', 'gk-gravityview' ); |
| 1777 | 1777 | |
@@ -1795,7 +1795,7 @@ discard block |
||
| 1795 | 1795 | if ( \GV\Utils::get( $field, 'maxFiles' ) && \GV\Utils::get( $field, 'multipleFiles' ) ) { |
| 1796 | 1796 | $input_name = 'input_' . $field->id; |
| 1797 | 1797 | //uploaded |
| 1798 | - $file_names = isset( GFFormsModel::$uploaded_files[ $validation_results['form']['id'] ][ $input_name ] ) ? GFFormsModel::$uploaded_files[ $validation_results['form']['id'] ][ $input_name ] : array(); |
|
| 1798 | + $file_names = isset( GFFormsModel::$uploaded_files[ $validation_results[ 'form' ][ 'id' ] ][ $input_name ] ) ? GFFormsModel::$uploaded_files[ $validation_results[ 'form' ][ 'id' ] ][ $input_name ] : array(); |
|
| 1799 | 1799 | |
| 1800 | 1800 | //existent |
| 1801 | 1801 | $entry = $this->get_entry(); |
@@ -1814,7 +1814,7 @@ discard block |
||
| 1814 | 1814 | $gv_valid = false; |
| 1815 | 1815 | |
| 1816 | 1816 | // in case of error make sure the newest upload files are removed from the upload input |
| 1817 | - GFFormsModel::$uploaded_files[ $validation_results['form']['id'] ] = null; |
|
| 1817 | + GFFormsModel::$uploaded_files[ $validation_results[ 'form' ][ 'id' ] ] = null; |
|
| 1818 | 1818 | } |
| 1819 | 1819 | } |
| 1820 | 1820 | |
@@ -1822,7 +1822,7 @@ discard block |
||
| 1822 | 1822 | } |
| 1823 | 1823 | |
| 1824 | 1824 | // This field has failed validation. |
| 1825 | - if( !empty( $field->failed_validation ) ) { |
|
| 1825 | + if ( ! empty( $field->failed_validation ) ) { |
|
| 1826 | 1826 | |
| 1827 | 1827 | gravityview()->log->debug( 'GravityView_Edit_Entry[custom_validation] Field is invalid.', array( 'data' => array( 'field' => $field, 'value' => $value ) ) ); |
| 1828 | 1828 | |
@@ -1840,19 +1840,19 @@ discard block |
||
| 1840 | 1840 | } |
| 1841 | 1841 | |
| 1842 | 1842 | // You can't continue inside a switch, so we do it after. |
| 1843 | - if( empty( $field->failed_validation ) ) { |
|
| 1843 | + if ( empty( $field->failed_validation ) ) { |
|
| 1844 | 1844 | continue; |
| 1845 | 1845 | } |
| 1846 | 1846 | |
| 1847 | 1847 | // checks if the No Duplicates option is not validating entry against itself, since |
| 1848 | 1848 | // we're editing a stored entry, it would also assume it's a duplicate. |
| 1849 | - if( !empty( $field->noDuplicates ) ) { |
|
| 1849 | + if ( ! empty( $field->noDuplicates ) ) { |
|
| 1850 | 1850 | |
| 1851 | 1851 | $entry = $this->get_entry(); |
| 1852 | 1852 | |
| 1853 | 1853 | // If the value of the entry is the same as the stored value |
| 1854 | 1854 | // Then we can assume it's not a duplicate, it's the same. |
| 1855 | - if( !empty( $entry ) && $value == $entry[ $field->id ] ) { |
|
| 1855 | + if ( ! empty( $entry ) && $value == $entry[ $field->id ] ) { |
|
| 1856 | 1856 | //if value submitted was not changed, then don't validate |
| 1857 | 1857 | $field->failed_validation = false; |
| 1858 | 1858 | |
@@ -1865,7 +1865,7 @@ discard block |
||
| 1865 | 1865 | } |
| 1866 | 1866 | |
| 1867 | 1867 | // if here then probably we are facing the validation 'At least one field must be filled out' |
| 1868 | - if( GFFormDisplay::is_empty( $field, $this->form_id ) && empty( $field->isRequired ) ) { |
|
| 1868 | + if ( GFFormDisplay::is_empty( $field, $this->form_id ) && empty( $field->isRequired ) ) { |
|
| 1869 | 1869 | unset( $field->validation_message ); |
| 1870 | 1870 | $field->failed_validation = false; |
| 1871 | 1871 | continue; |
@@ -1877,12 +1877,12 @@ discard block |
||
| 1877 | 1877 | |
| 1878 | 1878 | } |
| 1879 | 1879 | |
| 1880 | - $validation_results['is_valid'] = $gv_valid; |
|
| 1880 | + $validation_results[ 'is_valid' ] = $gv_valid; |
|
| 1881 | 1881 | |
| 1882 | 1882 | gravityview()->log->debug( 'GravityView_Edit_Entry[custom_validation] Validation results.', array( 'data' => $validation_results ) ); |
| 1883 | 1883 | |
| 1884 | 1884 | // We'll need this result when rendering the form ( on GFFormDisplay::get_form ) |
| 1885 | - $this->form_after_validation = $validation_results['form']; |
|
| 1885 | + $this->form_after_validation = $validation_results[ 'form' ]; |
|
| 1886 | 1886 | |
| 1887 | 1887 | return $validation_results; |
| 1888 | 1888 | } |
@@ -1895,7 +1895,7 @@ discard block |
||
| 1895 | 1895 | */ |
| 1896 | 1896 | public function get_entry() { |
| 1897 | 1897 | |
| 1898 | - if( empty( $this->entry ) ) { |
|
| 1898 | + if ( empty( $this->entry ) ) { |
|
| 1899 | 1899 | // Get the database value of the entry that's being edited |
| 1900 | 1900 | $this->entry = gravityview_get_entry( GravityView_frontend::is_single_entry() ); |
| 1901 | 1901 | } |
@@ -1927,10 +1927,10 @@ discard block |
||
| 1927 | 1927 | } |
| 1928 | 1928 | |
| 1929 | 1929 | // If edit tab not yet configured, show all fields |
| 1930 | - $edit_fields = !empty( $properties['edit_edit-fields'] ) ? $properties['edit_edit-fields'] : NULL; |
|
| 1930 | + $edit_fields = ! empty( $properties[ 'edit_edit-fields' ] ) ? $properties[ 'edit_edit-fields' ] : NULL; |
|
| 1931 | 1931 | |
| 1932 | 1932 | // Hide fields depending on admin settings |
| 1933 | - $fields = $this->filter_fields( $form['fields'], $edit_fields ); |
|
| 1933 | + $fields = $this->filter_fields( $form[ 'fields' ], $edit_fields ); |
|
| 1934 | 1934 | |
| 1935 | 1935 | // If Edit Entry fields are configured, remove adminOnly field settings. Otherwise, don't. |
| 1936 | 1936 | $fields = $this->filter_admin_only_fields( $fields, $edit_fields, $form, $view_id ); |
@@ -1963,7 +1963,7 @@ discard block |
||
| 1963 | 1963 | */ |
| 1964 | 1964 | private function filter_fields( $fields, $configured_fields ) { |
| 1965 | 1965 | |
| 1966 | - if( empty( $fields ) || !is_array( $fields ) ) { |
|
| 1966 | + if ( empty( $fields ) || ! is_array( $fields ) ) { |
|
| 1967 | 1967 | return $fields; |
| 1968 | 1968 | } |
| 1969 | 1969 | |
@@ -1980,12 +1980,12 @@ discard block |
||
| 1980 | 1980 | |
| 1981 | 1981 | // Remove the fields that have calculation properties and keep them to be used later |
| 1982 | 1982 | // @since 1.16.2 |
| 1983 | - if( $field->has_calculation() ) { |
|
| 1984 | - $this->fields_with_calculation[] = $field; |
|
| 1983 | + if ( $field->has_calculation() ) { |
|
| 1984 | + $this->fields_with_calculation[ ] = $field; |
|
| 1985 | 1985 | // don't remove the calculation fields on form render. |
| 1986 | 1986 | } |
| 1987 | 1987 | |
| 1988 | - if( in_array( $field->type, $field_type_blocklist ) ) { |
|
| 1988 | + if ( in_array( $field->type, $field_type_blocklist ) ) { |
|
| 1989 | 1989 | unset( $fields[ $key ] ); |
| 1990 | 1990 | } |
| 1991 | 1991 | } |
@@ -2015,7 +2015,7 @@ discard block |
||
| 2015 | 2015 | continue; // Never include when no fields are configured |
| 2016 | 2016 | } |
| 2017 | 2017 | |
| 2018 | - $out_fields[] = $field; |
|
| 2018 | + $out_fields[ ] = $field; |
|
| 2019 | 2019 | } |
| 2020 | 2020 | |
| 2021 | 2021 | return array_values( $out_fields ); |
@@ -2026,8 +2026,8 @@ discard block |
||
| 2026 | 2026 | |
| 2027 | 2027 | /** @var GF_Field $field */ |
| 2028 | 2028 | foreach ( $fields as $field ) { |
| 2029 | - if( intval( $configured_field['id'] ) === intval( $field->id ) && $this->user_can_edit_field( $configured_field, false ) ) { |
|
| 2030 | - $edit_fields[] = $this->merge_field_properties( $field, $configured_field ); |
|
| 2029 | + if ( intval( $configured_field[ 'id' ] ) === intval( $field->id ) && $this->user_can_edit_field( $configured_field, false ) ) { |
|
| 2030 | + $edit_fields[ ] = $this->merge_field_properties( $field, $configured_field ); |
|
| 2031 | 2031 | break; |
| 2032 | 2032 | } |
| 2033 | 2033 | |
@@ -2050,14 +2050,14 @@ discard block |
||
| 2050 | 2050 | |
| 2051 | 2051 | $return_field = $field; |
| 2052 | 2052 | |
| 2053 | - if( empty( $field_setting['show_label'] ) ) { |
|
| 2053 | + if ( empty( $field_setting[ 'show_label' ] ) ) { |
|
| 2054 | 2054 | $return_field->label = ''; |
| 2055 | - } elseif ( !empty( $field_setting['custom_label'] ) ) { |
|
| 2056 | - $return_field->label = $field_setting['custom_label']; |
|
| 2055 | + } elseif ( ! empty( $field_setting[ 'custom_label' ] ) ) { |
|
| 2056 | + $return_field->label = $field_setting[ 'custom_label' ]; |
|
| 2057 | 2057 | } |
| 2058 | 2058 | |
| 2059 | - if( !empty( $field_setting['custom_class'] ) ) { |
|
| 2060 | - $return_field->cssClass .= ' '. gravityview_sanitize_html_class( $field_setting['custom_class'] ); |
|
| 2059 | + if ( ! empty( $field_setting[ 'custom_class' ] ) ) { |
|
| 2060 | + $return_field->cssClass .= ' ' . gravityview_sanitize_html_class( $field_setting[ 'custom_class' ] ); |
|
| 2061 | 2061 | } |
| 2062 | 2062 | |
| 2063 | 2063 | /** |
@@ -2095,16 +2095,16 @@ discard block |
||
| 2095 | 2095 | */ |
| 2096 | 2096 | $use_gf_adminonly_setting = apply_filters( 'gravityview/edit_entry/use_gf_admin_only_setting', empty( $edit_fields ), $form, $view_id ); |
| 2097 | 2097 | |
| 2098 | - if( $use_gf_adminonly_setting && false === GVCommon::has_cap( 'gravityforms_edit_entries', $this->entry['id'] ) ) { |
|
| 2099 | - foreach( $fields as $k => $field ) { |
|
| 2100 | - if( $field->adminOnly ) { |
|
| 2098 | + if ( $use_gf_adminonly_setting && false === GVCommon::has_cap( 'gravityforms_edit_entries', $this->entry[ 'id' ] ) ) { |
|
| 2099 | + foreach ( $fields as $k => $field ) { |
|
| 2100 | + if ( $field->adminOnly ) { |
|
| 2101 | 2101 | unset( $fields[ $k ] ); |
| 2102 | 2102 | } |
| 2103 | 2103 | } |
| 2104 | 2104 | return array_values( $fields ); |
| 2105 | 2105 | } |
| 2106 | 2106 | |
| 2107 | - foreach( $fields as &$field ) { |
|
| 2107 | + foreach ( $fields as &$field ) { |
|
| 2108 | 2108 | $field->adminOnly = false; |
| 2109 | 2109 | } |
| 2110 | 2110 | |
@@ -2125,7 +2125,7 @@ discard block |
||
| 2125 | 2125 | */ |
| 2126 | 2126 | private function unselect_default_values( $form ) { |
| 2127 | 2127 | |
| 2128 | - foreach ( $form['fields'] as &$field ) { |
|
| 2128 | + foreach ( $form[ 'fields' ] as &$field ) { |
|
| 2129 | 2129 | |
| 2130 | 2130 | if ( empty( $field->choices ) ) { |
| 2131 | 2131 | continue; |
@@ -2133,7 +2133,7 @@ discard block |
||
| 2133 | 2133 | |
| 2134 | 2134 | foreach ( $field->choices as &$choice ) { |
| 2135 | 2135 | if ( \GV\Utils::get( $choice, 'isSelected' ) ) { |
| 2136 | - $choice['isSelected'] = false; |
|
| 2136 | + $choice[ 'isSelected' ] = false; |
|
| 2137 | 2137 | } |
| 2138 | 2138 | } |
| 2139 | 2139 | } |
@@ -2158,22 +2158,22 @@ discard block |
||
| 2158 | 2158 | */ |
| 2159 | 2159 | function prefill_conditional_logic( $form ) { |
| 2160 | 2160 | |
| 2161 | - if( ! GFFormDisplay::has_conditional_logic( $form ) ) { |
|
| 2161 | + if ( ! GFFormDisplay::has_conditional_logic( $form ) ) { |
|
| 2162 | 2162 | return $form; |
| 2163 | 2163 | } |
| 2164 | 2164 | |
| 2165 | 2165 | // Have Conditional Logic pre-fill fields as if the data were default values |
| 2166 | 2166 | /** @var GF_Field $field */ |
| 2167 | - foreach ( $form['fields'] as &$field ) { |
|
| 2167 | + foreach ( $form[ 'fields' ] as &$field ) { |
|
| 2168 | 2168 | |
| 2169 | - if( 'checkbox' === $field->type ) { |
|
| 2169 | + if ( 'checkbox' === $field->type ) { |
|
| 2170 | 2170 | foreach ( $field->get_entry_inputs() as $key => $input ) { |
| 2171 | - $input_id = $input['id']; |
|
| 2171 | + $input_id = $input[ 'id' ]; |
|
| 2172 | 2172 | $choice = $field->choices[ $key ]; |
| 2173 | 2173 | $value = \GV\Utils::get( $this->entry, $input_id ); |
| 2174 | 2174 | $match = RGFormsModel::choice_value_match( $field, $choice, $value ); |
| 2175 | - if( $match ) { |
|
| 2176 | - $field->choices[ $key ]['isSelected'] = true; |
|
| 2175 | + if ( $match ) { |
|
| 2176 | + $field->choices[ $key ][ 'isSelected' ] = true; |
|
| 2177 | 2177 | } |
| 2178 | 2178 | } |
| 2179 | 2179 | } else { |
@@ -2181,15 +2181,15 @@ discard block |
||
| 2181 | 2181 | // We need to run through each field to set the default values |
| 2182 | 2182 | foreach ( $this->entry as $field_id => $field_value ) { |
| 2183 | 2183 | |
| 2184 | - if( floatval( $field_id ) === floatval( $field->id ) ) { |
|
| 2184 | + if ( floatval( $field_id ) === floatval( $field->id ) ) { |
|
| 2185 | 2185 | |
| 2186 | - if( 'list' === $field->type ) { |
|
| 2186 | + if ( 'list' === $field->type ) { |
|
| 2187 | 2187 | $list_rows = maybe_unserialize( $field_value ); |
| 2188 | 2188 | |
| 2189 | 2189 | $list_field_value = array(); |
| 2190 | - foreach ( (array) $list_rows as $row ) { |
|
| 2191 | - foreach ( (array) $row as $column ) { |
|
| 2192 | - $list_field_value[] = $column; |
|
| 2190 | + foreach ( (array)$list_rows as $row ) { |
|
| 2191 | + foreach ( (array)$row as $column ) { |
|
| 2192 | + $list_field_value[ ] = $column; |
|
| 2193 | 2193 | } |
| 2194 | 2194 | } |
| 2195 | 2195 | |
@@ -2222,32 +2222,32 @@ discard block |
||
| 2222 | 2222 | * @see https://github.com/gravityview/GravityView/issues/840 |
| 2223 | 2223 | * @since develop |
| 2224 | 2224 | */ |
| 2225 | - $the_form = GFAPI::get_form( $form['id'] ); |
|
| 2225 | + $the_form = GFAPI::get_form( $form[ 'id' ] ); |
|
| 2226 | 2226 | $editable_ids = array(); |
| 2227 | - foreach ( $form['fields'] as $field ) { |
|
| 2228 | - $editable_ids[] = $field['id']; // wp_list_pluck is destructive in this context |
|
| 2227 | + foreach ( $form[ 'fields' ] as $field ) { |
|
| 2228 | + $editable_ids[ ] = $field[ 'id' ]; // wp_list_pluck is destructive in this context |
|
| 2229 | 2229 | } |
| 2230 | 2230 | $remove_conditions_rule = array(); |
| 2231 | - foreach ( $the_form['fields'] as $field ) { |
|
| 2232 | - if ( ! empty( $field->conditionalLogic ) && ! empty( $field->conditionalLogic['rules'] ) ) { |
|
| 2233 | - foreach ( $field->conditionalLogic['rules'] as $i => $rule ) { |
|
| 2234 | - if ( ! in_array( $rule['fieldId'], $editable_ids ) ) { |
|
| 2231 | + foreach ( $the_form[ 'fields' ] as $field ) { |
|
| 2232 | + if ( ! empty( $field->conditionalLogic ) && ! empty( $field->conditionalLogic[ 'rules' ] ) ) { |
|
| 2233 | + foreach ( $field->conditionalLogic[ 'rules' ] as $i => $rule ) { |
|
| 2234 | + if ( ! in_array( $rule[ 'fieldId' ], $editable_ids ) ) { |
|
| 2235 | 2235 | /** |
| 2236 | 2236 | * This conditional field is not editable in this View. |
| 2237 | 2237 | * We need to remove the rule, but only if it matches. |
| 2238 | 2238 | */ |
| 2239 | - if ( $_field = GFAPI::get_field( $the_form, $rule['fieldId'] ) ) { |
|
| 2239 | + if ( $_field = GFAPI::get_field( $the_form, $rule[ 'fieldId' ] ) ) { |
|
| 2240 | 2240 | $value = $_field->get_value_export( $this->entry ); |
| 2241 | - } elseif ( isset( $this->entry[ $rule['fieldId'] ] ) ) { |
|
| 2242 | - $value = $this->entry[ $rule['fieldId'] ]; |
|
| 2241 | + } elseif ( isset( $this->entry[ $rule[ 'fieldId' ] ] ) ) { |
|
| 2242 | + $value = $this->entry[ $rule[ 'fieldId' ] ]; |
|
| 2243 | 2243 | } else { |
| 2244 | - $value = gform_get_meta( $this->entry['id'], $rule['fieldId'] ); |
|
| 2244 | + $value = gform_get_meta( $this->entry[ 'id' ], $rule[ 'fieldId' ] ); |
|
| 2245 | 2245 | } |
| 2246 | 2246 | |
| 2247 | - $match = GFFormsModel::matches_operation( $value, $rule['value'], $rule['operator'] ); |
|
| 2247 | + $match = GFFormsModel::matches_operation( $value, $rule[ 'value' ], $rule[ 'operator' ] ); |
|
| 2248 | 2248 | |
| 2249 | 2249 | if ( $match ) { |
| 2250 | - $remove_conditions_rule[] = array( $field['id'], $i ); |
|
| 2250 | + $remove_conditions_rule[ ] = array( $field[ 'id' ], $i ); |
|
| 2251 | 2251 | } |
| 2252 | 2252 | } |
| 2253 | 2253 | } |
@@ -2255,21 +2255,21 @@ discard block |
||
| 2255 | 2255 | } |
| 2256 | 2256 | |
| 2257 | 2257 | if ( $remove_conditions_rule ) { |
| 2258 | - foreach ( $form['fields'] as &$field ) { |
|
| 2258 | + foreach ( $form[ 'fields' ] as &$field ) { |
|
| 2259 | 2259 | foreach ( $remove_conditions_rule as $_remove_conditions_r ) { |
| 2260 | 2260 | |
| 2261 | 2261 | list( $rule_field_id, $rule_i ) = $_remove_conditions_r; |
| 2262 | 2262 | |
| 2263 | - if ( $field['id'] == $rule_field_id ) { |
|
| 2264 | - unset( $field->conditionalLogic['rules'][ $rule_i ] ); |
|
| 2265 | - gravityview()->log->debug( 'Removed conditional rule #{rule} for field {field_id}', array( 'rule' => $rule_i, 'field_id' => $field['id'] ) ); |
|
| 2263 | + if ( $field[ 'id' ] == $rule_field_id ) { |
|
| 2264 | + unset( $field->conditionalLogic[ 'rules' ][ $rule_i ] ); |
|
| 2265 | + gravityview()->log->debug( 'Removed conditional rule #{rule} for field {field_id}', array( 'rule' => $rule_i, 'field_id' => $field[ 'id' ] ) ); |
|
| 2266 | 2266 | } |
| 2267 | 2267 | } |
| 2268 | 2268 | } |
| 2269 | 2269 | } |
| 2270 | 2270 | |
| 2271 | 2271 | /** Normalize the indices... */ |
| 2272 | - $form['fields'] = array_values( $form['fields'] ); |
|
| 2272 | + $form[ 'fields' ] = array_values( $form[ 'fields' ] ); |
|
| 2273 | 2273 | |
| 2274 | 2274 | /** |
| 2275 | 2275 | * @filter `gravityview/edit_entry/conditional_logic` Should the Edit Entry form use Gravity Forms conditional logic showing/hiding of fields? |
@@ -2279,16 +2279,16 @@ discard block |
||
| 2279 | 2279 | */ |
| 2280 | 2280 | $use_conditional_logic = apply_filters( 'gravityview/edit_entry/conditional_logic', true, $form ); |
| 2281 | 2281 | |
| 2282 | - if( $use_conditional_logic ) { |
|
| 2282 | + if ( $use_conditional_logic ) { |
|
| 2283 | 2283 | return $form; |
| 2284 | 2284 | } |
| 2285 | 2285 | |
| 2286 | - foreach( $form['fields'] as &$field ) { |
|
| 2286 | + foreach ( $form[ 'fields' ] as &$field ) { |
|
| 2287 | 2287 | /* @var GF_Field $field */ |
| 2288 | 2288 | $field->conditionalLogic = null; |
| 2289 | 2289 | } |
| 2290 | 2290 | |
| 2291 | - unset( $form['button']['conditionalLogic'] ); |
|
| 2291 | + unset( $form[ 'button' ][ 'conditionalLogic' ] ); |
|
| 2292 | 2292 | |
| 2293 | 2293 | return $form; |
| 2294 | 2294 | |
@@ -2305,7 +2305,7 @@ discard block |
||
| 2305 | 2305 | */ |
| 2306 | 2306 | public function manage_conditional_logic( $has_conditional_logic, $form ) { |
| 2307 | 2307 | |
| 2308 | - if( ! $this->is_edit_entry() ) { |
|
| 2308 | + if ( ! $this->is_edit_entry() ) { |
|
| 2309 | 2309 | return $has_conditional_logic; |
| 2310 | 2310 | } |
| 2311 | 2311 | |
@@ -2337,44 +2337,44 @@ discard block |
||
| 2337 | 2337 | * 2. There are two entries embedded using oEmbed |
| 2338 | 2338 | * 3. One of the entries has just been saved |
| 2339 | 2339 | */ |
| 2340 | - if( !empty( $_POST['lid'] ) && !empty( $_GET['entry'] ) && ( $_POST['lid'] !== $_GET['entry'] ) ) { |
|
| 2340 | + if ( ! empty( $_POST[ 'lid' ] ) && ! empty( $_GET[ 'entry' ] ) && ( $_POST[ 'lid' ] !== $_GET[ 'entry' ] ) ) { |
|
| 2341 | 2341 | |
| 2342 | 2342 | $error = true; |
| 2343 | 2343 | |
| 2344 | 2344 | } |
| 2345 | 2345 | |
| 2346 | - if( !empty( $_GET['entry'] ) && (string)$this->entry['id'] !== $_GET['entry'] ) { |
|
| 2346 | + if ( ! empty( $_GET[ 'entry' ] ) && (string)$this->entry[ 'id' ] !== $_GET[ 'entry' ] ) { |
|
| 2347 | 2347 | |
| 2348 | 2348 | $error = true; |
| 2349 | 2349 | |
| 2350 | - } elseif( ! $this->verify_nonce() ) { |
|
| 2350 | + } elseif ( ! $this->verify_nonce() ) { |
|
| 2351 | 2351 | |
| 2352 | 2352 | /** |
| 2353 | 2353 | * If the Entry is embedded, there may be two entries on the same page. |
| 2354 | 2354 | * If that's the case, and one is being edited, the other should fail gracefully and not display an error. |
| 2355 | 2355 | */ |
| 2356 | - if( GravityView_oEmbed::getInstance()->get_entry_id() ) { |
|
| 2356 | + if ( GravityView_oEmbed::getInstance()->get_entry_id() ) { |
|
| 2357 | 2357 | $error = true; |
| 2358 | 2358 | } else { |
| 2359 | - $error = __( 'The link to edit this entry is not valid; it may have expired.', 'gk-gravityview'); |
|
| 2359 | + $error = __( 'The link to edit this entry is not valid; it may have expired.', 'gk-gravityview' ); |
|
| 2360 | 2360 | } |
| 2361 | 2361 | |
| 2362 | 2362 | } |
| 2363 | 2363 | |
| 2364 | - if( ! GravityView_Edit_Entry::check_user_cap_edit_entry( $this->entry ) ) { |
|
| 2365 | - $error = __( 'You do not have permission to edit this entry.', 'gk-gravityview'); |
|
| 2364 | + if ( ! GravityView_Edit_Entry::check_user_cap_edit_entry( $this->entry ) ) { |
|
| 2365 | + $error = __( 'You do not have permission to edit this entry.', 'gk-gravityview' ); |
|
| 2366 | 2366 | } |
| 2367 | 2367 | |
| 2368 | - if( $this->entry['status'] === 'trash' ) { |
|
| 2369 | - $error = __('You cannot edit the entry; it is in the trash.', 'gk-gravityview' ); |
|
| 2368 | + if ( $this->entry[ 'status' ] === 'trash' ) { |
|
| 2369 | + $error = __( 'You cannot edit the entry; it is in the trash.', 'gk-gravityview' ); |
|
| 2370 | 2370 | } |
| 2371 | 2371 | |
| 2372 | 2372 | // No errors; everything's fine here! |
| 2373 | - if( empty( $error ) ) { |
|
| 2373 | + if ( empty( $error ) ) { |
|
| 2374 | 2374 | return true; |
| 2375 | 2375 | } |
| 2376 | 2376 | |
| 2377 | - if( $echo && $error !== true ) { |
|
| 2377 | + if ( $echo && $error !== true ) { |
|
| 2378 | 2378 | |
| 2379 | 2379 | $error = esc_html( $error ); |
| 2380 | 2380 | |
@@ -2382,10 +2382,10 @@ discard block |
||
| 2382 | 2382 | * @since 1.9 |
| 2383 | 2383 | */ |
| 2384 | 2384 | if ( ! empty( $this->entry ) ) { |
| 2385 | - $error .= ' ' . gravityview_get_link( '#', _x('Go back.', 'Link shown when invalid Edit Entry link is clicked', 'gk-gravityview' ), array( 'onclick' => "window.history.go(-1); return false;" ) ); |
|
| 2385 | + $error .= ' ' . gravityview_get_link( '#', _x( 'Go back.', 'Link shown when invalid Edit Entry link is clicked', 'gk-gravityview' ), array( 'onclick' => "window.history.go(-1); return false;" ) ); |
|
| 2386 | 2386 | } |
| 2387 | 2387 | |
| 2388 | - echo GVCommon::generate_notice( wpautop( $error ), 'gv-error error'); |
|
| 2388 | + echo GVCommon::generate_notice( wpautop( $error ), 'gv-error error' ); |
|
| 2389 | 2389 | } |
| 2390 | 2390 | |
| 2391 | 2391 | gravityview()->log->error( '{error}', array( 'error' => $error ) ); |
@@ -2405,17 +2405,17 @@ discard block |
||
| 2405 | 2405 | |
| 2406 | 2406 | $error = NULL; |
| 2407 | 2407 | |
| 2408 | - if( ! $this->check_user_cap_edit_field( $field ) ) { |
|
| 2409 | - $error = __( 'You do not have permission to edit this field.', 'gk-gravityview'); |
|
| 2408 | + if ( ! $this->check_user_cap_edit_field( $field ) ) { |
|
| 2409 | + $error = __( 'You do not have permission to edit this field.', 'gk-gravityview' ); |
|
| 2410 | 2410 | } |
| 2411 | 2411 | |
| 2412 | 2412 | // No errors; everything's fine here! |
| 2413 | - if( empty( $error ) ) { |
|
| 2413 | + if ( empty( $error ) ) { |
|
| 2414 | 2414 | return true; |
| 2415 | 2415 | } |
| 2416 | 2416 | |
| 2417 | - if( $echo ) { |
|
| 2418 | - echo GVCommon::generate_notice( wpautop( esc_html( $error ) ), 'gv-error error'); |
|
| 2417 | + if ( $echo ) { |
|
| 2418 | + echo GVCommon::generate_notice( wpautop( esc_html( $error ) ), 'gv-error error' ); |
|
| 2419 | 2419 | } |
| 2420 | 2420 | |
| 2421 | 2421 | gravityview()->log->error( '{error}', array( 'error' => $error ) ); |
@@ -2436,14 +2436,14 @@ discard block |
||
| 2436 | 2436 | private function check_user_cap_edit_field( $field ) { |
| 2437 | 2437 | |
| 2438 | 2438 | // If they can edit any entries (as defined in Gravity Forms), we're good. |
| 2439 | - if( GVCommon::has_cap( array( 'gravityforms_edit_entries', 'gravityview_edit_others_entries' ) ) ) { |
|
| 2439 | + if ( GVCommon::has_cap( array( 'gravityforms_edit_entries', 'gravityview_edit_others_entries' ) ) ) { |
|
| 2440 | 2440 | return true; |
| 2441 | 2441 | } |
| 2442 | 2442 | |
| 2443 | - $field_cap = isset( $field['allow_edit_cap'] ) ? $field['allow_edit_cap'] : false; |
|
| 2443 | + $field_cap = isset( $field[ 'allow_edit_cap' ] ) ? $field[ 'allow_edit_cap' ] : false; |
|
| 2444 | 2444 | |
| 2445 | - if( $field_cap ) { |
|
| 2446 | - return GVCommon::has_cap( $field['allow_edit_cap'] ); |
|
| 2445 | + if ( $field_cap ) { |
|
| 2446 | + return GVCommon::has_cap( $field[ 'allow_edit_cap' ] ); |
|
| 2447 | 2447 | } |
| 2448 | 2448 | |
| 2449 | 2449 | return false; |
@@ -2457,17 +2457,17 @@ discard block |
||
| 2457 | 2457 | public function verify_nonce() { |
| 2458 | 2458 | |
| 2459 | 2459 | // Verify form submitted for editing single |
| 2460 | - if( $this->is_edit_entry_submission() ) { |
|
| 2460 | + if ( $this->is_edit_entry_submission() ) { |
|
| 2461 | 2461 | $valid = wp_verify_nonce( $_POST[ self::$nonce_field ], self::$nonce_field ); |
| 2462 | 2462 | } |
| 2463 | 2463 | |
| 2464 | 2464 | // Verify |
| 2465 | - else if( ! $this->is_edit_entry() ) { |
|
| 2465 | + else if ( ! $this->is_edit_entry() ) { |
|
| 2466 | 2466 | $valid = false; |
| 2467 | 2467 | } |
| 2468 | 2468 | |
| 2469 | 2469 | else { |
| 2470 | - $valid = wp_verify_nonce( $_GET['edit'], self::$nonce_key ); |
|
| 2470 | + $valid = wp_verify_nonce( $_GET[ 'edit' ], self::$nonce_key ); |
|
| 2471 | 2471 | } |
| 2472 | 2472 | |
| 2473 | 2473 | /** |
@@ -2527,7 +2527,7 @@ discard block |
||
| 2527 | 2527 | */ |
| 2528 | 2528 | $labels = apply_filters( 'gravityview/edit_entry/button_labels', $labels, $this->form, $this->entry, $this->view_id ); |
| 2529 | 2529 | |
| 2530 | - return (array) $labels; |
|
| 2530 | + return (array)$labels; |
|
| 2531 | 2531 | } |
| 2532 | 2532 | |
| 2533 | 2533 | } //end class |