"o^Ѻo^Ѻo^to mgdefault tcutet. * * This set will be displayed to any user that does not have another set * assigned, unless overridden by a hook_short*o^ߺo^ߺo^/ de !"#$%hhook_hel */unction shortcut_help($path, $arg) { global $user; switch ($path) { case 'admin/help#shortcut': $output = '

&"o^Ѻo^Ѻo^put *+,irtcutsets. Each user with Select any shortcut set*o^ߺo^ߺo^ut s-./0123456789jandbook y foShortcut module.', array('@shortcut' => 'http://drupal.org/documentation/modules/shortcut/')) . '

'"o^Ѻo^Ѻo^) . >?@k/dt>'; $ouut .= '
' . t('Users with the Administer shortcuts permission can manage shortcut sets and edit the shortcuts with*o^ߺo^ߺo^">ShABCDEFGHIJKLMlig/user-rfacshortcut'))) . '
'; $output .= '
' . t('Choosing shortcut sets') . '
'; $output .= '
' . t('Users wi2"o^Ѻo^Ѻo^s caRSTmunt page. '<d>'; $output .= '
' . t('Adding and removing shortcuts') . '
'; $output .= '
' . t('The Shortcut module  *o^o^o^pageUVWXYZ[\]^_`an currentnabl set of shortcuts (if your theme displays it and you have permission to edit your shortcut set). The core Seven administration&"o^Ѻo^Ѻo^e pahijodd that to ur preferred set of shortcuts. If the page is already part of your shortcut set, the link will be a - sign, and will allow you*o^o^o^r shklmnopqrstuvwpts') . '>';  $output .= '
' . t('You can display your shortcuts by enabling the Shortcuts block on the Blocks admi6"o^Ѻo^Ѻo^trat|}~q@toolbarp">Tlbar module displays them near the top of the page, along with an Edit shortcuts link.', array('@blocks' => url('@*o^o^o^elp'r returutpu case 'admin/config/user-interface/shortcut': case 'admin/config/user-interface/shortcut/%': if (user_access('s"o^Ѻo^Ѻo^tputshortcut-">Shtcuts tab of your account page.', array('@shortcut-link' => url("user/{$user->uid}/shortcuts"))) . '

'; return *o^o^o^mentt( 'aisteshortcuts' => array( 'title' => t('Administer shortcuts'), ), 'customize shortcut links' => array( 'title'"o^Ѻo^Ѻo^ u users iat s has been assigned to or selected by other users. Granting "Select any shortcut set" permission along with this permission wil*o^o^o^cut vSelect ahortt set'), 'description' => t('From all shortcut sets, select one to be own active set. Without this permission, an admini!o^Ѻo^Ѻo^ers.wmenu() {item'admin/config/user-interface/shortcut'] = array( 'title' => 'Shortcuts', 'description' => 'Add and modify shortcut set*o^o^o^t_sexfile' =>ortc.admin.inc', ); $items['admin/config/user-interface/shortcut/add-set'] = array( 'title' => 'Add shortcut set', 'pa#o^Ѻo^Ѻo^ 'y' => arradmister shortcuts'), 'type' => MENU_LOCAL_ACTION, 'file' => 'shortcut.admin.inc', ); $items['admin/config/user-interf*o^o^o^( z 'pargumts' => array('shortcut_set_customize', 4), 'title callback' => 'shortcut_set_title_callback', 'title arguments' => arr$"o^Ѻo^Ѻo^rtcu{hortcut.n.in, ); $items['admin/config/user-interface/shortcut/%shortcut_set/links'] = array( 'title' => 'List links', 'type' = *o^o^o^tems| 'title''Ediset name', 'page callback' => 'drupal_get_form', 'page arguments' => array('shortcut_set_edit_form', 4), 'access c"o^Ѻo^Ѻo^s', }file' =>ortc.admin.inc', 'weight' => 10, ); $items['admin/config/user-interface/shortcut/%shortcut_set/delete'] = array( 'titl*o^o^o^ge c !"#$%&'()*+,~et_deletrm',), 'access callback' => 'shortcut_set_delete_access', 'access arguments' => array(4), 'file' => 'shortcut.admin.in&"o^Ѻo^Ѻo^-int12ortcut', 'pa callback' => 'drupal_get_form', 'page arguments' => array('shortcut_link_add', 4), 'access callback' => 'shortcut_set*o^o^o^' =>n.inc', $ems['admin/config/user-interface/shortcut/%shortcut_set/add-link-inline'] = array( 'title' => 'Add shortcut', 'page car(o^Ѻo^Ѻo^', edit_acc, 'access arguments' => array(4), 'type' => MENU_CALLBACK, 'file' => 'shortcut.admin.inc', ); $items['admin/config/u*o^o^o^nk']_get_for age arguments' => array('shortcut_link_edit', 5), 'access callback' => 'shortcut_link_access', 'access arguments' => a8#o^Ѻo^Ѻo^in.i/delete'arra 'title' => 'Delete shortcut', 'page callback' => 'drupal_get_form', 'page arguments' => array('shortcut_link_dele*o^o^o^hortrtcut.adinc' ); $items['user/%user/shortcuts'] = array( 'title' => 'Shortcuts', 'page callback' => 'drupal_get_form', 'page"o^Ѻo^Ѻo^witcss argum' =>rray(1), 'type' => MENU_LOCAL_TASK, 'file' => 'shortcut.admin.inc', ); return $items; } /** * Implements hook_a@*o^o^o^admiurn $pat} / * Implements hook_theme(). */ function shortcut_theme() { return array( 'shortcut_set_customize' => array( 'rend"o^Һo^Ѻo^ =>   . */ fuon srtcut_block_info() { $blocks['shortcuts']['info'] = t('Shortcuts'); // Shortcut blocks can't be cached because each menu i *o^o^o^llba./0123DRUPAL_NCHE; return $blocks; } /** * Implements hook_block_view(). */ function shortcut_block_view($delta = '') { if ($delta == 'shor"o^Һo^Һo^ut_c:;<s', arrashorut_set' => $shortcut_set->title)); $data['content'] = shortcut_renderable_links($shortcut_set); return $data; } } /*o^o^o^shor= set to dite If not set, the current user's * shortcut set will be used. * * @return * TRUE if the current user has access to edit"o^Һo^Һo^ise.icientlyviled users can edit their currently displayed shortcut // set, but not other sets. Shortcut administrators can edit any set.  *o^o^o^s')) !"#$% ret!iss($shortcut_set) || $shortcut_set == shortcut_current_displayed_set(); } return FALSE; } /** * Access callback for deletiB#o^Һo^Һo^rtcu,-.e currener h access to delete shortcut sets and this is * not the site-wide default set; FALSE otherwise. */ function shortcut_set_del@*o^o^o^ y ad/01234567HIJKreturn F;  // Never let the default shortcut set be deleted. if ($shortcut_set->set_name == SHORTCUT_DEFAULT_SET_NAME) { return j"o^Һo^Һo^ Acc * * @p objt $account * (optional) The user account whose shortcuts will be switched. If not set, * permissions will be checked for*o^o^o^ * DEFGHIJKLMNO switch shorut set of the * provided account, FALSE otherwise. */ function shortcut_set_switch_access($account = NULL) { global $use$"o^Һo^Һo^ortcTUVurn TRUE} f (!user_access('switch shortcut sets')) { // The user has no permission to switch anyone's shortcut set. return FALSE*o^o^o^er->WXYZ[\]^_`abcmission swit their own // shortcuts sets. return TRUE; } return FALSE; } /** * Access callback for editing a link in a shor!o^Һo^Һo^_acchijurrent uhas cess // to edit. if ($shortcut_set = shortcut_set_load($menu_link['menu_name'])) { return shortcut_set_edit_access($sh *o^o^o^/** klmnopqrstuvwme of thortc set to load. * * @return object * If the shortcut set exists, an object containing the following properties: * - 'set"o^Һo^Һo^rtcu~ array onks sociated with this shortcut set. * If the shortcut set does not exist, the function returns FALSE. */ function shortcut_se`*o^o^o^ct('e) ->ete() ->fetchObject(); if (!$set) { return FALSE; } $set->links = menu_load_links($set_name); return $set; } /** * Sa"o^Һo^Һo^ortc': The t of e shortcut set. * - 'set_name': (optional) The internal name of the shortcut set. If * omitted, a new shortcut set wil*o^o^o^pertl) An arof mu links to save for the shortcut set. * Each link is an array containing at least the following keys (which will * b"o^Һo^Һo^valuupal pat extnal path that the link points to. * - 'link_title': The title of the link. * Any other keys accepted by menu_link_sa*o^o^o^turn whether a w set was created or an existing one was updated. * * @see menu_link_save() */ function shortcut_set_save(&$shortcut_set) {4o^Ӻo^Һo^ selford('shot_se, $shortcut_set, 'set_name'); } else { $shortcut_set->set_name = shortcut_set_get_unique_name(); $return = drupal_`*o^o^o^0ut_s!($shortcet->nks)) { foreach ($shortcut_set->links as &$link) { // Do not specifically associate these links with the shortcut moz6o^Ӻo^Ӻo^ ay m3333pecify torre menu name. $link['menu_name'] = $shortcut_set->set_name; $link['plid'] = 0; menu_link_save($link); } *o^o^o^ val3333333333333 the cal drul_write_record() above // would not return an indication that anything had changed. if (empty($return)) { $retur"o^Ӻo^Ӻo^n $r333 cannot elet. * * @param $shortcut_set * An object representing the shortcut set to delete. * * @return * TRUE if the set was de*o^o^o^ sho3333333333333m defaulortc set. if ($shortcut_set->set_name == SHORTCUT_DEFAULT_SET_NAME) { return FALSE; } // First, delete any user assignmJ3o^Ӻo^Ӻo^ hese33.4/4ete('shot_seusers') ->condition('set_name', $shortcut_set->set_name) ->execute(); // Next, delete the menu links for this set. *o^o^o^et_n04142434445464748494:4;4<4tcut_set -ondition('set_name', $shortcut_set->set_name) ->execute(); return (bool) $deleted; } /** * Resets the link weights inl"o^Ӻo^Ӻo^nt oA4B4C4link is d to* the set. If the link is added to the end of the array and this function is * called, it will force that link to display at  *o^o^o^jectD4E4F4G4H4I44444444hts of tassein * object will be reset as described above. */ function shortcut_set_reset_link_weights(&$shortcut_set) { $weight = -5#o^Ӻo^Ӻo^s &$444gns a uso a rticular shortcut set. * * @param $shortcut_set * An object representing the shortcut set. * @param $account * A user*o^o^o^e th4444444444444 db_mershorut_set_users') ->key(array('uid' => $account->uid)) ->fields(array('set_name' => $shortcut_set->set_name)) ->execu!o^Ӻo^Ӻo^t_cu444they maye be assigned to. * * The user will go back to using whatever default set applies. * * @param $account * A user account tha*o^o^o^set 4444444444444to a shot seand has been * successfully removed from it. FALSE if the user was already not assigned * to any set. */ function shortt"o^Ӻo^Ӻo^$del444uid) xecu(); return (bool) $deleted; } /** * Returns the current displayed shortcut set for the provided user account. * * @param*o^o^o^ccou4444444444555ed-in us * @return * An object representing the shortcut set that should be displayed to the * current user. If the user does not h $o^Ӻo^Ӻo^, *55 5set($acc = NL) { $shortcut_sets = &drupal_static(__FUNCTION__, array()); global $user; if (!isset($account)) { $account = $user; *o^o^o^et f 5 5 5 5555555555return $tcutets[$account->uid]; } // If none was found, try to find a shortcut set that is explicitly assigned // to this user. $q!o^Ӻo^Ӻo^); 555 'u', 's_nam= u.set_name'); $query->condition('u.uid', $account->uid); $shortcut_set_name = $query->execute()->fetchField(); if ($sh*o^o^o^ = s 5!5"5#5$5%5&5'5(5)5*5+5,5t set. e {  $shortcut_set = shortcut_default_set($account); } $shortcut_sets[$account->uid] = $shortcut_set; return $shortcut_set!o^Ӻo^Ӻo^tcut152535al) The accnt whose default shortcut set will be returned. * If not provided, the function will return the currently logged-in user's  *o^o^o^turn455565758595:5;5<5=5>5?5@5tcut_def_setaccount = NULL) { global $user; if (!isset($account)) { $account = $user; } // Allow modules to return a default !o^Ӻo^Ӻo^ /G5H5I5e // pdenc If no module returns a valid set, fall back on the site-wide // default, which is the lowest-numbered shortcut set. $sugg *o^o^o^e_alJ5K5L5M5N5O5P5Q5R5S5T5U5V5T_SET_NA foach ($suggestions as $name) { if ($shortcut_set = shortcut_set_load($name)) { break; } } return $shortcut_s!o^Ӻo^Ӻo^ine-]5^5_5{ // Scut ts are numbered sequentially, so we keep trying until we find // one that is available. For better performance, we start wit*o^o^o^an t`5a5b5c5d5e5f5g5h5i5j5k5l5e been ded fm the database, this will // automatically give us the correct one. $number = db_query("SELECT COUNT(*) FROM {shortcut_set"o^Ӻo^Ӻo^ame q5r5s5shortcut_loa$name)); return $name; } /** * Returns the name of a shortcut set, based on a provided number. * * All shortcut sets hav@*o^o^o^t tht5u5v5w5x5y5z5{5|5}5~555} table. * @ram $number * A number representing the shortcut set whose name should be retrieved. * * @return * A string representi!o^Ӻo^Ӻo^unct555 * Retuan aay of all shortcut sets, keyed by the set name. * * @return * An array of shortcut sets. Note that only the basic shortcu*o^o^o^e) a5555555555555g to the. *function shortcut_sets() { return db_select('shortcut_set', 'ss') ->fields('ss') ->execute() ->fetchAllAssoc('set_name!o^Ӻo^Ӻo^tcut555-readablme othe shortcut set to check. * * @return * TRUE if a shortcut set with that title exists; FALSE otherwise. */ function sho*o^o^o^etur5555555555555le', 0, rray:title' => $title))->fetchField(); } /** * Determines if a path corresponds to a valid shortcut link. * * @param $path * !o^Ӻo^Ӻo^* 555s * tcorrpond to actual paths on the site. * * @see menu_edit_item_validate() */ function shortcut_valid_link($path) { // Do not u*o^o^o^pal_5555555555555al_path; /An empty path is valid too and will be converted to . return (!url_is_external($path) && menu_get_item($path)) || emp!o^Ӻo^Ӻo^/** 555ram $shot_se * (optional) An object representing the set whose links will be displayed. * If not provided, the user's current set wil*o^o^o^rray5555555555555e menu_t) *function shortcut_renderable_links($shortcut_set = NULL) { if (!isset($shortcut_set)) { $shortcut_set = shortcut_currentF$o^Ӻo^Ӻo^tree555 */ func shocut_preprocess_page(&$variables) { // Only display the shortcut link if the user has the ability to edit // shortcuts and @*o^o^o^g sh5555555555555r "page foun // pages). if (shortcut_set_edit_access() && ($item = menu_get_item()) && $item['access']) { $link = $_GET['q']; "o^Ӻo^Ӻo^_par555al_http_d_quy($query_parameters); } $query = array( 'link' => $link, 'name' => drupal_get_title(), ); $query +=  *o^o^o^tcut5555555566666Ždy a shot anset $link_mode accordingly. foreach ($shortcut_set->links as $shortcut) { if ($link == $shortcut['link_path']) { !o^Ӻo^Ӻo^ 6 6 6Î if (k_mo == "add") { $query['token'] = drupal_get_token('shortcut-add-link'); $link_text = shortcut_set_switch_access() ?  *o^o^o^arra6666666666666Ď $linkh = dmin/config/user-interface/shortcut/' . $shortcut_set->set_name . '/add-link-inline'; } else { $query['mlid'] = ,"o^Ӻo^Ӻo^et_s!6"6#6Ŏut_set' shorut_set->title)) : t('Remove from shortcuts'); $link_path = 'admin/config/user-interface/shortcut/link/' . $mlid . '/dele*o^o^o^g('s$6%6&6'6(6)6*6+6,6-6.6/606Ǝ_shortcu= ary( '#attached' => array('css' => array(drupal_get_path('module', 'shortcut') . '/shortcut.css')), '#prefix' =>L"o^Ӻo^Ӻo^s ' 566676ǎ' => '' . $link_text . '', '#href' => $link_path, '#options' => array('query*o^o^o^ '#8696:6;6<6=6>6?6@6A6B6C6D6Ȏlter(). funcon shortcut_page_alter(&$page) { if (isset($page['page_top']['toolbar'])) { // If the toolbar is available, add a pre-re"o^Ӻo^Ӻo^currI6J6K6Ɏpre_rend[] =shortcut_toolbar_pre_render'; } } /** * Pre-render function for adding shortcuts to the toolbar drawer. */ function short*o^o^o^ $liL6M6N6O6P6Q6R6S6T6U6V6W6X6ʎ> array(al_g_path('module', 'shortcut') . '/shortcut.css')); $links['#prefix'] = '
'; $links['#suffix'] "o^Ӻo^Ӻo^ut_ca6b6c6ˎt_accessortc_set)) { $configure_link = array( '#type' => 'link', '#title' => t('Edit shortcuts'), '#href' => 'admin/ *o^o^o^shord6e6f6g6h6i6j6k6l6m6n6o6p6̎ => 'ediortcs')), ); } $drawer = array( 'shortcuts' => $links, 'configure' => $configure_link, ); $toolbar['toolbar_L"o^Ӻo^Ӻo^bar;w6x6y6͎ed. Thisctiowas previously used as a menu item title callback * but has been replaced by shortcut_set_title_callback() (which does not **o^o^o^systz6{6|6}6~666666666Ύ callbacand ll check_plain() * directly if you need a sanitized title. In Drupal 8, this function will be * restored as a title callback#o^Ӻo^Ӻo^ze i666ώ shortcut, areturned by * shortcut_set_load(). */ function shortcut_set_title($shortcut_set) { return check_plain($shortcut_set->tit*o^o^o^a sh6666666666666Ў. * * am $ortcut_set * An object representing the shortcut set, as returned by * shortcut_set_load(). */ function shortcut_set_ti"o^Ӻo^Ӻo^rn $666 галерея детской одежды | Российский Дизайнер
x

Задать вопрос

Форма обратной связи