| @@ -1,37 +1,38 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | /* |
| 3 | 3 | * this file contains pluing meta information and then shared |
| 4 | 4 | * between pluging and admin classes |
| 5 | - * | |
| 5 | + * | |
| 6 | 6 | * [1] |
| 7 | 7 | * TODO: change this meta as plugin needs |
| 8 | 8 | */ |
| 9 | 9 | |
| 10 | -$plugin_dir = 'wp-comment-fields'; | |
| 11 | 10 | |
| 12 | -$plugin_meta = array('name' => 'Comments Fields', | |
| 13 | - 'shortname' => 'wpcomments', | |
| 14 | - 'path' => WP_PLUGIN_DIR . DIRECTORY_SEPARATOR . $plugin_dir, | |
| 15 | - 'url' => plugins_url( $plugin_dir , dirname(__FILE__) ), | |
| 16 | - 'db_version' => 3.0, | |
| 17 | - 'logo' => plugins_url( $plugin_dir.'/images/logo.png' , dirname(__FILE__) ), | |
| 18 | - 'men_position' => 78); | |
| 11 | + // Updated as this still get used elsewhere in the plugin | |
| 12 | +$plugin_meta = array( | |
| 13 | + 'name' => 'Comments Fields', | |
| 14 | + 'shortname' => 'wpcomments', | |
| 15 | + 'path' => wpcf_get_path(), | |
| 16 | + 'url' => wpcf_get_url(), | |
| 17 | + 'db_version' => 3.0, | |
| 18 | + 'logo' => plugins_url( plugin_basename( __DIR__ ) . '/images/logo.png', dirname( __FILE__ ) ), | |
| 19 | + 'men_position' => 78, | |
| 20 | +); | |
| 19 | 21 | |
| 20 | 22 | /* |
| 21 | 23 | * TODO: change the function name |
| 22 | 24 | */ |
| 23 | -function get_plugin_meta_wpcomment(){ | |
| 24 | - | |
| 25 | +function get_plugin_meta_wpcomment() { | |
| 26 | + | |
| 25 | 27 | global $plugin_meta; |
| 26 | - | |
| 27 | - //print_r($plugin_meta); | |
| 28 | - | |
| 28 | + | |
| 29 | + // print_r($plugin_meta); | |
| 29 | 30 | return $plugin_meta; |
| 30 | 31 | } |
| 31 | 32 | |
| 32 | -function wpcomment_pa1($arr){ | |
| 33 | +function wpcomment_pa1( $arr ) { | |
| 33 | 34 | |
| 34 | 35 | echo '<pre>'; |
| 35 | - print_r($arr); | |
| 36 | + print_r( $arr ); | |
| 36 | 37 | echo '</pre>'; |
| 37 | -} | |
| 38 | +} | |