Plugin Directory

Changeset 3287069


Ignore:
Timestamp:
05/04/2025 07:05:58 AM (11 months ago)
Author:
webangon
Message:

Update menu

Location:
educat/trunk
Files:
9 added
1 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • educat/trunk/admin/theme-builder/includes/modules/popup/module.php

    r3282779 r3287069  
    101101    public function register_admin_menu() {
    102102        add_submenu_page(
    103             'the-pack',
     103            'educat',
    104104            '',
    105105            esc_html__( 'Popups', 'educat' ),
  • educat/trunk/admin/theme-builder/includes/modules/theme-builder/module.php

    r3282779 r3287069  
    310310     */
    311311    public function admin_menu() {
    312         add_submenu_page( 'edit.php?post_type=elementor_library', '', __( 'Theme Builder', 'educat' ), 'publish_posts', $this->get_admin_templates_url( true ) );
     312        add_submenu_page( 'educat', '', __( 'Theme Builder', 'educat' ), 'publish_posts', $this->get_admin_templates_url( true ) );
    313313    }
    314314
  • educat/trunk/includes/query-functions.php

    r3282779 r3287069  
    1616        add_action('wp_ajax_nopriv_ec_ajax_modal', [$this,'ec_ajax_modal']);
    1717
    18         add_filter( 'template_include', array( $this, 'student_public_profile' ),99 );
    19         add_action('th_author_builder', [$this, 'th_author_builder']);
    20 
    2118        add_action('wp_footer', [$this,'footer_html']);
    2219
     
    4138        }
    4239        return;
    43         echo '<div class="ec-preloader"><div class="loader-circle"><div class="loader-logo"><img src="http://sites.test/eduboost/wp-content/uploads/sites/38/2025/04/original-0fc89434b929bb2616a499acdc72f7a4.gif"><span class="barloader"></span></div></div></div>';
    44         echo '<style>.ec-preloader{background-color: #fff;bottom: 0;height: 100%;left: 0;position: fixed;right: 0;top: 0;width: 100%;z-index: 999999;}
    45 .loader-circle {
    46     width: 320px;
    47     position: absolute;
    48     top: 0;
    49     left: 0;
    50     right: 0;
    51     bottom: 0;
    52     margin: auto;
    53 }
    54 .loader-logo {
    55     position: absolute;
    56     top: 50%;
    57     transform: translate(0%, -50%);
    58     left: 0;
    59     right: 0;
    60     text-align: center;
    61 }
    62 
    63 .barloader {
    64   width: 100%;
    65   height: 4.8px;
    66   display: inline-block;
    67   position: relative;
    68   background: rgb(76 76 76 / 15%);
    69   overflow: hidden;
    70 }
    71 .barloader::after {
    72   content: ""; 
    73   box-sizing: border-box;
    74   width: 0;
    75   height: 4.8px;
    76   background: #0b0b0b;
    77   position: absolute;
    78   top: 0;
    79   left: 0;
    80   animation: animFw 2s linear infinite;
    81 }
    82 
    83 @keyframes animFw {
    84   0% {
    85     width: 0;
    86   }
    87   100% {
    88     width: 100%;
    89   }
    90 }       
    91         </style>';
     40       
    9241    }
    9342
     
    565514    }
    566515
    567     static function th_author_builder(){
    568        $post_id = 793;
    569        echo Elementor\Plugin::instance()->frontend->get_builder_content( $post_id);
    570     }
    571 
    572     static function student_public_profile($template){
    573         global $wp_query;
    574         $query_var = $wp_query->query_vars;   
    575         if ( ! empty( $wp_query->query['tutor_profile_username'] ) ) {
    576             $template = EDUCAT_DIR . 'includes/profile.php';
    577         }
    578         return $template;
    579     }
    580 
    581516    static function pagination($type, $loop,$paged='')
    582517    {
  • educat/trunk/index.php

    r3287026 r3287069  
    1414}
    1515
     16if (!defined('EDUCAT_DIR')) {
     17    define('EDUCAT_DIR', plugin_dir_path(__FILE__));
     18}
     19
     20if (!defined('EDUCAT_URL')) {
     21    define('EDUCAT_URL', plugin_dir_url(__FILE__));
     22}
     23
     24if (!defined('EDUCAT_ADDON_ROOT')) {
     25    define('EDUCAT_ADDON_ROOT', __FILE__);
     26}
     27
    1628if (!class_exists('Educat_Addon_Widget')) {
    1729    class Educat_Addon_Widget
     
    5466                define('EDUCAT_VERSION', $plugin_data['Version']);
    5567            }
    56 
    57             if (!defined('EDUCAT_DIR')) {
    58                 define('EDUCAT_DIR', plugin_dir_path(__FILE__));
    59             }
    60 
    61             if (!defined('EDUCAT_URL')) {
    62                 define('EDUCAT_URL', plugin_dir_url(__FILE__));
    63             }
    64 
    65             if (!defined('EDUCAT_ADDON_ROOT')) {
    66                 define('EDUCAT_ADDON_ROOT', __FILE__);
    67             }
    68         }
     68        }
    6969
    7070        /**
     
    7878            include EDUCAT_DIR . 'includes/meta_render.php';
    7979            include EDUCAT_DIR . 'includes/tax_render.php';
    80             include EDUCAT_DIR . 'includes/customise.php';
     80            include EDUCAT_DIR . 'includes/customise.php'; 
    8181            include EDUCAT_DIR . 'includes/breadcrumb.php';
    8282            include EDUCAT_DIR . 'includes/contact_helper.php';
    8383            include EDUCAT_DIR . 'includes/author-meta-render.php';
    84             include EDUCAT_DIR . 'admin/theme-builder/index.php';
    85 
     84            //include EDUCAT_DIR . 'admin/theme-builder/index.php';
     85            include EDUCAT_DIR . 'admin/tutor-reviews/class-main.php';
    8686            include EDUCAT_DIR . 'admin/inc/dynamic-styles.php';
    87 
    8887            include EDUCAT_DIR . 'includes/menu_walker.php';
    89 
    9088            include EDUCAT_DIR . 'includes/extension/translate.php';
    9189            include EDUCAT_DIR . 'includes/extension/column.php';
     
    9391            include EDUCAT_DIR . 'includes/extension/container.php';
    9492            include EDUCAT_DIR . 'includes/extension/button.php';
    95             include EDUCAT_DIR . 'includes/extension/gallery.php';
    9693            include EDUCAT_DIR . 'includes/extension/accordion.php';
    9794            include EDUCAT_DIR . 'includes/extension/counter.php';
    9895            include EDUCAT_DIR . 'includes/extension/section.php';
    9996            include EDUCAT_DIR . 'includes/extension/icon-list.php';
    100 
     97            include EDUCAT_DIR . 'includes/extension/educat-options.php';
    10198            include EDUCAT_DIR . 'includes/extension/float-cart/index.php';
    102 
    10399            include EDUCAT_DIR . 'includes/page-template/index.php';
    104 
    105100            include_once EDUCAT_DIR . 'includes/widget-control-style.php';
    106 
    107101            include EDUCAT_DIR . 'includes/woo-functions.php';
    108102        }
     
    141135                'caption',
    142136            ]);
    143 
     137            load_plugin_textdomain( 'educat', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
    144138            register_nav_menus([
    145139                'primary' => esc_attr__('Primary', 'the-pack-addon'),
     
    189183            remove_action('template_redirect', [$instance, 'block_template_frontend']);
    190184        }
    191        
    192         public function initi()
    193         {
    194             include_once EDUCAT_DIR . 'admin/config/menu-meta.php';
    195         }
    196185
    197186        public function installed_active_elementor()
     
    241230            wp_enqueue_script('eduquest-filter', EDUCAT_URL . 'assets/js/kc-engine.js', '', '', true);
    242231            wp_enqueue_script('ec-widget', EDUCAT_URL . 'assets/js/ec-widget.js', '', '', true);
    243             //TODO work on sticky sidebar and more
     232
    244233            wp_enqueue_script('eduquest', EDUCAT_URL . 'assets/js/custom.js', '', '', true);
    245234            wp_localize_script('eduquest-filter', 'educat_params', [
     
    312301}
    313302
    314 add_action( 'init', 'run_eduquest_addon' );
    315 
    316 
    317 // add_filter( 'manage_pages_columns', 'page_column_views' );
    318 // add_action( 'manage_pages_custom_column', 'page_custom_column_views', 5, 2 );
    319 // function page_column_views( $defaults )
    320 // {
    321 //    $defaults['page-layout'] = __('Template');
    322 //    return $defaults;
    323 // }
    324 // function page_custom_column_views( $column_name, $id )
    325 // {
    326 //    if ( $column_name === 'page-layout' ) {
    327 //        $set_template = get_post_meta( get_the_ID(), '_wp_page_template', true );
    328 //        if ( $set_template == 'default' ) {
    329 //            echo 'Default';
    330 //        }
    331 //        $templates = get_page_templates();
    332 //        ksort( $templates );
    333 //        foreach ( array_keys( $templates ) as $template ) :
    334 //            if ( $set_template == $templates[$template] ) echo $template;
    335 //        endforeach;
    336 //    }
    337 // }
    338 
     303include EDUCAT_DIR . 'admin/theme-builder/index.php';
     304
     305add_action( 'init', 'run_eduquest_addon');
    339306
    340307add_action('admin_menu', 'example_admin_menu');
     
    348315
    349316    $url = admin_url( 'post.php?post='.$kit_id.'&action=elementor&active-document='.$kit_id.'');
    350     $submenu['themes.php'][] = array('Theme Options', 'manage_options', $url);
    351 }
     317    $submenu['educat'][] = array('Theme Options', 'manage_options', $url);
     318}
     319
     320function wpdocs_register_my_custom_menu_page(){
     321    add_menu_page(
     322        __( 'Educat', 'textdomain' ),
     323        'Educat',
     324        'manage_options',
     325        'educat',
     326        'educat_menu_page',
     327        plugins_url( 'educat/admin/img/menuicon.png' ),
     328        9
     329    );
     330}
     331add_action( 'admin_menu', 'wpdocs_register_my_custom_menu_page' );
     332
     333/**
     334 * Display a custom menu page
     335 */
     336function educat_menu_page(){
     337    //render menu html 
     338}
Note: See TracChangeset for help on using the changeset viewer.