123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169 |
- <?php
- function remove_menus()
- {
-
-
-
-
-
-
-
-
-
-
-
- }
- function new_excerpt_more($more)
- {
- return '... <a class="readmore" href="' . get_permalink() . ' ">Read more <i class="fa fa-external-link"></i></a>';
- }
- function pagination($pages = '', $range = 4)
- {
- $showitems = ($range * 2) + 1;
- global $paged;
- if (empty($paged)) $paged = 1;
- if ($pages == '') {
- global $wp_query;
- $pages = $wp_query->max_num_pages;
- if (!$pages) {
- $pages = 1;
- }
- }
- if (1 != $pages) {
- echo "<div class=\"pagination\"><span>Page " . $paged . " of " . $pages . "</span>";
- if ($paged > 2 && $paged > $range + 1 && $showitems < $pages) echo "<a href='" . get_pagenum_link(1) . "'>« First</a>";
- if ($paged > 1 && $showitems < $pages) echo "<a href='" . get_pagenum_link($paged - 1) . "'>‹ Previous</a>";
- for ($i = 1; $i <= $pages; $i++) {
- if (1 != $pages && (!($i >= $paged + $range + 1 || $i <= $paged - $range - 1) || $pages <= $showitems)) {
- echo ($paged == $i) ? "<span class=\"current\">" . $i . "</span>" : "<a href='" . get_pagenum_link($i) . "' class=\"inactive\">" . $i . "</a>";
- }
- }
- if ($paged < $pages && $showitems < $pages) echo "<a href=\"" . get_pagenum_link($paged + 1) . "\">Next ›</a>";
- if ($paged < $pages - 1 && $paged + $range - 1 < $pages && $showitems < $pages) echo "<a href='" . get_pagenum_link($pages) . "'>Last »</a>";
- echo "</div>\n";
- }
- }
- function tinymce_settings($settings)
- {
-
- $settings['extended_valid_elements'] = 'div[*],article[*]';
-
-
-
-
-
-
-
- $settings['allow_html_in_named_anchor'] = true;
-
-
-
-
-
-
-
- return $settings;
- }
- function prefix_disable_gutenberg($current_status, $post_type)
- {
- if ($post_type === 'news' || $post_type === 'event' || $post_type === 'success_story' || $post_type === 'alumni' || $post_type === 'notice') return false;
- return $current_status;
- }
- add_filter('use_block_editor_for_post_type', 'prefix_disable_gutenberg', 10, 2);
- function gs_custom_menu_order($menu_ord)
- {
- if (!$menu_ord) return true;
- return array(
- 'index.php',
-
- 'edit.php?post_type=page',
- 'edit.php',
- 'upload.php',
- 'edit-comments.php',
- 'separator1',
- );
-
-
- }
- add_filter('custom_menu_order', 'gs_custom_menu_order');
- add_filter('menu_order', 'gs_custom_menu_order');
|