PluginProbe
Bogo / 2.3
Bogo v2.3
3.9.3 trunk 1.0 1.1 2.0 2.0.1 2.1 2.1.1 2.1.2 2.1.3 2.2 2.3 2.4 2.4.1 2.4.2 2.4.3 2.5 2.6 2.6.1 2.7 2.8 2.8.1 2.9 3.0 3.0.1 All 52 releases
bogo / admin / admin.php

admin.php in Bogo 2.3, at admin/admin.php

49 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 require_once BOGO_PLUGIN_DIR . '/admin/user.php';
4 require_once BOGO_PLUGIN_DIR . '/admin/post.php';
5 require_once BOGO_PLUGIN_DIR . '/admin/nav-menu.php';
6 require_once BOGO_PLUGIN_DIR . '/admin/widgets.php';
7
8 add_action( 'admin_enqueue_scripts', 'bogo_admin_enqueue_scripts' );
9
10 function bogo_admin_enqueue_scripts( $hook_suffix ) {
11 if ( 'widgets.php' == $hook_suffix || 'user-edit.php' == $hook_suffix ) {
12 wp_enqueue_style( 'bogo-admin',
13 plugins_url( 'admin/admin.css', BOGO_PLUGIN_BASENAME ),
14 array(), BOGO_VERSION, 'all' );
15
16 return;
17 }
18
19 if ( 'nav-menus.php' == $hook_suffix ) {
20 $nav_menu_id = absint( get_user_option( 'nav_menu_recently_edited' ) );
21 $nav_menu_items = wp_get_nav_menu_items( $nav_menu_id );
22 $locales = array();
23
24 foreach ( (array) $nav_menu_items as $item ) {
25 $locales[$item->db_id] = $item->bogo_locales;
26 }
27
28 $prefix = 'menu-item-bogo-locale';
29
30 wp_enqueue_script( 'bogo-admin',
31 plugins_url( 'admin/admin.js', BOGO_PLUGIN_BASENAME ),
32 array( 'jquery' ),
33 BOGO_VERSION, true );
34
35 wp_localize_script( 'bogo-admin', '_bogo', array(
36 'availableLanguages' => bogo_available_languages( 'orderby=value' ),
37 'locales' => $locales,
38 'selectorLegend' => __( 'Displayed on pages in', 'bogo' ),
39 'cbPrefix' => $prefix ) );
40
41 wp_enqueue_style( 'bogo-admin',
42 plugins_url( 'admin/admin.css', BOGO_PLUGIN_BASENAME ),
43 array(), BOGO_VERSION, 'all' );
44
45 return;
46 }
47 }
48
49 ?>