PluginProbe
Wp-Insert / 1.4
Wp-Insert v1.4
trunk 1.0 1.1 1.2 1.2.1 1.2.2 1.3.0 1.3.1 1.3.3 1.4 1.5.0 1.5.1 1.5.2 1.5.3 1.6.0 1.6.1 1.6.2 1.7 1.7.1 1.7.2 1.7.3 1.7.4 1.7.5 1.7.6 2.0 All 63 releases
wp-insert / includes / essentials.php

essentials.php in Wp-Insert 1.4, at includes/essentials.php

59 lines 1.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 //avoid direct calls to this file where wp core files not present
3 if (!function_exists ('add_action')) {
4 header('Status: 403 Forbidden');
5 header('HTTP/1.1 403 Forbidden');
6 exit();
7 }
8 // Pre-2.6 compatibility
9 if ( ! defined( 'WP_CONTENT_URL' ) )
10 define( 'WP_CONTENT_URL', get_option( 'siteurl' ) . '/wp-content' );
11 if ( ! defined( 'WP_CONTENT_DIR' ) )
12 define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' );
13 if ( ! defined( 'WP_PLUGIN_URL' ) )
14 define( 'WP_PLUGIN_URL', WP_CONTENT_URL. '/plugins' );
15 if ( ! defined( 'WP_PLUGIN_DIR' ) )
16 define( 'WP_PLUGIN_DIR', WP_CONTENT_DIR . '/plugins' );
17
18 add_action('admin_menu', 'smart_add_menu');
19 //wp_register_script('checkboxToSlider', WP_PLUGIN_URL.'/wp-insert/js/jquery.checkboxToSlider.js', array( 'jquery' ));
20
21 function screen_layout_columns($columns, $screen) {
22 $columns[$screen] = 2;
23 return $columns;
24 }
25
26 /*add_filter('screen_layout_columns', array(&$this, 'on_screen_layout_columns'), 10, 2);
27 //for WordPress 2.8 we have to tell, that we support 2 columns !
28 function on_screen_layout_columns($columns, $screen) {
29 if ($screen == $this->pagehook) {
30 $columns[$this->pagehook] = 2;
31 }
32 return $columns;
33 }*/
34
35 function wp_insert_get_current_page_details() {
36 if(is_home()) return 'HOME';
37 else if(is_archive()) return 'ARCHIVE';
38 else if(is_singular()) {
39 global $wp_query;
40 return $wp_query->post->ID;
41 }
42 else return 'NULL';
43 }
44
45 function wp_insert_is_in_array($inputString, $inputArray) {
46 foreach($inputArray as $arrayElements)
47 {
48 if($arrayElements == $inputString)
49 {
50 return 'TRUE';
51 }
52 }
53 return 'FALSE';
54 }
55
56 require_once (dirname(__FILE__) . '/widgethook.php');
57 require_once (dirname(__FILE__) . '/contenthook.php');
58 require_once (dirname(__FILE__) . '/ads.php');
59 ?>