'page', 'posts_per_page' => 1, 'title' => $cafeteria_elementor_pagename ); $cafeteria_elementor_query = new WP_Query( $cafeteria_elementor_args ); $cafeteria_elementor_page_id = '1'; if (isset($cafeteria_elementor_query->post->ID)) { $cafeteria_elementor_page_id = $cafeteria_elementor_query->post->ID; } return $cafeteria_elementor_page_id; } //about theme info add_action( 'admin_menu', 'cafeteria_elementor_gettingstarted' ); function cafeteria_elementor_gettingstarted() { add_theme_page( esc_html__('Cafeteria Elementor', 'cafeteria-elementor'), esc_html__('Cafeteria Elementor', 'cafeteria-elementor'), 'edit_theme_options', 'cafeteria_elementor_about', 'cafeteria_elementor_mostrar_guide'); } // Add a Custom CSS file to WP Admin Area function cafeteria_elementor_admin_theme_style() { wp_enqueue_style('cafeteria-elementor-custom-admin-style', esc_url(get_template_directory_uri()) . '/inc/getstart/getstart.css'); wp_enqueue_script('cafeteria-elementor-tabs', esc_url(get_template_directory_uri()) . '/inc/getstart/js/tab.js'); wp_enqueue_style( 'font-awesome-css', get_template_directory_uri().'/assets/css/fontawesome-all.css' ); // Admin notice code START wp_register_script('cafeteria-elementor-notice', esc_url(get_template_directory_uri()) . '/inc/getstart/js/notice.js', array('jquery'), time(), true); wp_enqueue_script('cafeteria-elementor-notice'); // Admin notice code END } add_action('admin_enqueue_scripts', 'cafeteria_elementor_admin_theme_style'); // Changelog if ( ! defined( 'CAFETERIA_ELEMENTOR_CHANGELOG_URL' ) ) { define( 'CAFETERIA_ELEMENTOR_CHANGELOG_URL', get_template_directory() . '/readme.txt' ); } function cafeteria_elementor_changelog_screen() { global $wp_filesystem; $cafeteria_elementor_changelog_file = apply_filters( 'cafeteria_elementor_changelog_file', CAFETERIA_ELEMENTOR_CHANGELOG_URL ); if ( $cafeteria_elementor_changelog_file && is_readable( $cafeteria_elementor_changelog_file ) ) { WP_Filesystem(); $cafeteria_elementor_changelog = $wp_filesystem->get_contents( $cafeteria_elementor_changelog_file ); $cafeteria_elementor_changelog_list = cafeteria_elementor_parse_changelog( $cafeteria_elementor_changelog ); echo '