esc_html__( 'Primary Menu', 'aamla' ), 'social' => esc_html__( 'Social Links', 'aamla' ), ) ); // Register nav menu locations. register_nav_menus( $locations ); /** * Filter custom background args. * * @since 1.0.0 * * @param arrray $bg_args Array of extra arguments for custom background. */ $bg_args = apply_filters( 'aamla_custom_bg_args', array( 'default-image' => '', 'default-preset' => 'default', 'default-position-x' => 'left', 'default-position-y' => 'top', 'default-size' => 'auto', 'default-repeat' => 'repeat', 'default-attachment' => 'scroll', 'default-color' => 'fff', 'wp-head-callback' => '_custom_background_cb', 'admin-head-callback' => '', 'admin-preview-callback' => '', ) ); /* * This theme designed to work with plain white background. Therefore, custom backgrounds * are not supported. However, You can use following line of code to set up the WordPress * core custom background feature. * add_theme_support( 'custom-background', $bg_args ); */ /** * Filter custom logo args. * * @since 1.0.0 * * @param arrray $logo_args Array of extra arguments for custom logo. */ $logo_args = apply_filters( 'aamla_custom_logo_args', array( 'width' => 120, 'height' => 120, 'flex-width' => true, 'flex-height' => false, 'header_text' => '', ) ); // Set up the WordPress core custom logo feature. add_theme_support( 'custom-logo', $logo_args ); /** * Filter custom header args. * * @since 1.0.0 * * @param arrray $header_args Array of extra arguments for custom header. */ $header_args = apply_filters( 'aamla_custom_header_args', array( 'default-image' => '', 'random-default' => false, 'width' => 1680, 'height' => 600, 'flex-width' => false, 'flex-height' => true, 'default_text_color' => '', 'header-text' => false, 'uploads' => true, 'wp-head-callback' => '', 'admin-head-callback' => '', 'admin-preview-callback' => '', 'video' => false, 'video-active-callback' => 'is_front_page', ) ); /* * This theme is designed to work without header image. Therefore, custom headers are not * supported. However, You can use following line of code to set up the WordPress * core custom header feature. * add_theme_support( 'custom-header', $header_args ); */ // Load core files. These files provide basic functionality to this theme. require_once get_parent_theme_file_path( 'lib/multiuse-functions.php' ); require_once get_parent_theme_file_path( 'lib/default-filters.php' ); require_once get_parent_theme_file_path( 'lib/customizer/customize-frontend.php' ); // Load files to build and customize website's front-end. require_once get_parent_theme_file_path( 'inc/controller.php' ); require_once get_parent_theme_file_path( 'inc/modifier.php' ); require_once get_parent_theme_file_path( 'inc/constructor.php' ); /** * Filter list of activated custom addon features for this theme. * * @since 1.0.0 * * @param arrray $addons Array of addon features for this theme. */ $addons = apply_filters( 'aamla_theme_support', array( 'widgetlayer', 'jetpack', 'typography', 'display-posts', 'media-manager', 'woocommerce', 'gutenberg', ) ); foreach ( $addons as $addon ) { $file_path = "add-on/{$addon}/class-{$addon}.php"; /** * Filter add-on file path. * * @since 1.0.0 * * @param string $file_path File path for the addon. * @param string $addon The Addon. */ $file_path = apply_filters( 'aamla_theme_support_file_path', $file_path, $addon ); include_once get_parent_theme_file_path( $file_path ); } // Add custom styles for visual editor to resemble the theme style. add_editor_style( array( 'assets/admin/css/editor-style.css', esc_url( aamla_font_url() ) ) ); // Load theme customizer initiation file at last. require_once get_parent_theme_file_path( 'lib/customizer/customize-register.php' ); } add_action( 'after_setup_theme', 'aamla_setup', 5 ); /** * Set the content width in pixels, based on the theme's design and stylesheet. * * @since 1.0.0 * * @global int $content_width */ function aamla_content_width() { $content_width = $GLOBALS['content_width']; /** * Filter content width of the theme. * * @since 1.0.0 * * @param $content_width integer */ $GLOBALS['content_width'] = apply_filters( 'aamla_content_width', $content_width ); } add_action( 'template_redirect', 'aamla_content_width', 0 ); /** * Register widget area. * * @since 1.0.0 * * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar */ function aamla_widgets_init() { /** * Filter register widget area args. * * @since 1.0.0 * * @param array $widgets { * Array of arguments for the sidebar being registered. * * @type string $name The name or title of the sidebar. * @type string $id The unique identifier by which the sidebar will be called. * @type string $description Description of the sidebar. * } */ $widgets = apply_filters( 'aamla_register_sidebar', array( array( 'name' => esc_html__( 'Sidebar Widgets', 'aamla' ), 'id' => 'sidebar', ), array( 'name' => esc_html__( 'Action Widgets', 'aamla' ), 'id' => 'header', ), array( 'name' => esc_html__( 'Footer Widgets', 'aamla' ), 'id' => 'footer', ), ) ); $defaults = array( 'description' => esc_html__( 'Add widgets here.', 'aamla' ), 'before_widget' => '', 'before_title' => '