403Webshell
Server IP : 14.225.204.176  /  Your IP : 216.73.216.252
Web Server : nginx/1.24.0
System : Linux nodejs-ybgk 6.8.0-40-generic #40-Ubuntu SMP PREEMPT_DYNAMIC Fri Jul 5 10:34:03 UTC 2024 x86_64
User : root ( 0)
PHP Version : 8.1.34
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/html/php/happy-world/wp-content/themes/happyworld/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/php/happy-world/wp-content/themes/happyworld/functions.php
<?php

/**
 * Roots includes
 *
 * The $roots_includes array determines the code library included in your theme.
 * Add or remove files to the array as needed. Supports child theme overrides.
 *
 * Please note that missing files will produce a fatal error.
 *
 * @link https://github.com/roots/roots/pull/1042
 */

/**
 * Load core theme for ZiniMedia
 **/
$roots_includes = array(
  'lib/define.php',          // define(name, value)ine value
  'lib/init.php',            // Initial theme setup and constants
  // 'lib/utils.php',           // Utility functions
  'lib/post-type.php',       // Load post type
  // 'lib/wrapper.php',         // Theme wrapper class
  'lib/sidebar.php',         // Sidebar class
  // 'lib/config.php',          // Configuration
  // 'lib/activation.php',      // Theme activation
  // 'lib/titles.php',          // Page titles
  'lib/nav.php',             // Custom nav modificatisons
  // 'lib/gallery.php',         // Custom [gallery] modifications
  // 'lib/comments.php',        // Custom comments modifications
  'lib/scripts.php',         // Scripts and stylesheets
  // 'lib/extras.php',          // Extra functions
  'lib/custom.php',          // Custom functions
  // 'lib/shortcode.php',       // Shortcode functions
  // 'lib/widgets.php',         // Widgets functions
  'lib/acf.php',             // Advenced Custom Field Functions
  'lib/ajax.php',            // Load Ajax For App
);

foreach ($roots_includes as $file) {
  if (!$filepath = locate_template($file)) {
    trigger_error(sprintf(__('Error locating %s for inclusion', 'happyworld'), $file), E_USER_ERROR);
  }

  require_once $filepath;
}
unset($file, $filepath);
add_post_type_support('page', 'excerpt');

function alignjustify_mce_buttons($buttons){
  array_push($buttons,
       "alignjustify"
  );
  return $buttons;
}
//add_filter("mce_buttons", "alignjustify_mce_buttons");

function shortcode_posts_homepage()
{
  $args = array(
    'posts_per_page'   => 8,
    'orderby'          => 'date',
    'order'            => 'DESC',
    'post_type'        => 'post',
    'post_status'      => 'publish',
    'suppress_filters' => true
  );

  $result = '';
  $result = $result . '' . '<div class="slider-news custom-arrow wow fadeInUp">';
  $loop = new WP_Query($args, ARRAY_A);
  $cout = 1;
  if ($loop->have_posts()) while ($loop->have_posts()) : $loop->the_post();
    $result = $result . '' . '<div class="item">
    <div class="news-item">
      <div class="news-item-thumb"><a href="' . get_the_permalink() . '"><img src="' . get_the_post_thumbnail_url() . '"></a></div>
      <div class="news-item-text">
        <h3><a href="' . get_the_permalink() . '">' . get_the_title() . '</a></h3>
        <div class="meta"><i class="fa fa-clock-o"></i>' . get_the_date() . '</div>
      </div>
    </div>
  </div>';
  endwhile;
  $result = $result . '' . '</div>';
  return $result;
};
add_shortcode('posts_homepage', 'shortcode_posts_homepage');

Youez - 2016 - github.com/yon3zu
LinuXploit