Server IP : 103.119.228.120 / Your IP : 18.116.85.102 Web Server : Apache System : Linux v8.techscape8.com 3.10.0-1160.119.1.el7.tuxcare.els2.x86_64 #1 SMP Mon Jul 15 12:09:18 UTC 2024 x86_64 User : nobody ( 99) PHP Version : 5.6.40 Disable Function : shell_exec,symlink,system,exec,proc_get_status,proc_nice,proc_terminate,define_syslog_variables,syslog,openlog,closelog,escapeshellcmd,passthru,ocinum cols,ini_alter,leak,listen,chgrp,apache_note,apache_setenv,debugger_on,debugger_off,ftp_exec,dl,dll,myshellexec,proc_open,socket_bind,proc_close,escapeshellarg,parse_ini_filepopen,fpassthru,exec,passthru,escapeshellarg,escapeshellcmd,proc_close,proc_open,ini_alter,popen,show_source,proc_nice,proc_terminate,proc_get_status,proc_close,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,dl,symlink,shell_exec,system,dl,passthru,escapeshellarg,escapeshellcmd,myshellexec,c99_buff_prepare,c99_sess_put,fpassthru,getdisfunc,fx29exec,fx29exec2,is_windows,disp_freespace,fx29sh_getupdate,fx29_buff_prepare,fx29_sess_put,fx29shexit,fx29fsearch,fx29ftpbrutecheck,fx29sh_tools,fx29sh_about,milw0rm,imagez,sh_name,myshellexec,checkproxyhost,dosyayicek,c99_buff_prepare,c99_sess_put,c99getsource,c99sh_getupdate,c99fsearch,c99shexit,view_perms,posix_getpwuid,posix_getgrgid,posix_kill,parse_perms,parsesort,view_perms_color,set_encoder_input,ls_setcheckboxall,ls_reverse_all,rsg_read,rsg_glob,selfURL,dispsecinfo,unix2DosTime,addFile,system,get_users,view_size,DirFiles,DirFilesWide,DirPrintHTMLHeaders,GetFilesTotal,GetTitles,GetTimeTotal,GetMatchesCount,GetFileMatchesCount,GetResultFiles,fs_copy_dir,fs_copy_obj,fs_move_dir,fs_move_obj,fs_rmdir,SearchText,getmicrotime MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/softaculous/sitepad/editor/site-inc/customize/ |
Upload File : |
<?php /** * Customize API: WP_Customize_Themes_Section class * * @package WordPress * @subpackage Customize * @since 4.4.0 */ /** * Customize Themes Section class. * * A UI container for theme controls, which are displayed within sections. * * @since 4.2.0 * * @see WP_Customize_Section */ class WP_Customize_Themes_Section extends WP_Customize_Section { /** * Section type. * * @since 4.2.0 * @var string */ public $type = 'themes'; /** * Theme section action. * * Defines the type of themes to load (installed, wporg, etc.). * * @since 4.9.0 * @var string */ public $action = ''; /** * Theme section filter type. * * Determines whether filters are applied to loaded (local) themes or by initiating a new remote query (remote). * When filtering is local, the initial themes query is not paginated by default. * * @since 4.9.0 * @var string */ public $filter_type = 'local'; /** * Get section parameters for JS. * * @since 4.9.0 * @return array Exported parameters. */ public function json() { $exported = parent::json(); $exported['action'] = $this->action; $exported['filter_type'] = $this->filter_type; return $exported; } /** * Render a themes section as a JS template. * * The template is only rendered by PHP once, so all actions are prepared at once on the server side. * * @since 4.9.0 */ protected function render_template() { ?> <li id="accordion-section-{{ data.id }}" class="theme-section"> <button type="button" class="customize-themes-section-title themes-section-{{ data.id }}">{{ data.title }}</button> <?php if ( current_user_can( 'install_themes' ) || is_multisite() ) : // @todo: upload support ?> <?php endif; ?> <div class="customize-themes-section themes-section-{{ data.id }} control-section-content themes-php"> <div class="theme-overlay" tabindex="0" role="dialog" aria-label="<?php esc_attr_e( 'Theme Details' ); ?>"></div> <div class="theme-browser rendered"> <div class="customize-preview-header themes-filter-bar"> <?php $this->filter_bar_content_template(); ?> </div> <?php $this->filter_drawer_content_template(); ?> <div class="error unexpected-error" style="display: none; "><p><?php _e( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the <a href="https://wordpress.org/support/">support forums</a>.' ); ?></p></div> <ul class="themes"> </ul> <p class="no-themes"><?php _e( 'No themes found. Try a different search.' ); ?></p> <p class="no-themes-local"> <?php printf( /* translators: %s: "Search WordPress.org themes" button text */ __( 'No themes found. Try a different search, or %s.' ), sprintf( '<button type="button" class="button-link search-dotorg-themes">%s</button>', __( 'Search WordPress.org themes' ) ) ); ?> </p> <p class="spinner"></p> </div> </div> </li> <?php } /** * Render the filter bar portion of a themes section as a JS template. * * The template is only rendered by PHP once, so all actions are prepared at once on the server side. * The filter bar container is rendered by @see `render_template()`. * * @since 4.9.0 */ protected function filter_bar_content_template() { ?> <button type="button" class="button button-primary customize-section-back customize-themes-mobile-back"><?php _e( 'Back to theme sources' ); ?></button> <# if ( 'wporg' === data.action ) { #> <div class="search-form"> <label for="wp-filter-search-input-{{ data.id }}" class="screen-reader-text"><?php _e( 'Search themes…' ); ?></label> <input type="search" id="wp-filter-search-input-{{ data.id }}" placeholder="<?php esc_attr_e( 'Search themes…' ); ?>" aria-describedby="{{ data.id }}-live-search-desc" class="wp-filter-search"> <div class="search-icon" aria-hidden="true"></div> <span id="{{ data.id }}-live-search-desc" class="screen-reader-text"><?php _e( 'The search results will be updated as you type.' ); ?></span> </div> <button type="button" class="button feature-filter-toggle"> <span class="filter-count-0"><?php _e( 'Filter themes' ); ?></span><span class="filter-count-filters"> <?php /* translators: %s: number of filters selected. */ printf( __( 'Filter themes (%s)' ), '<span class="theme-filter-count">0</span>' ); ?> </span> </button> <# } else { #> <div class="themes-filter-container"> <label for="{{ data.id }}-themes-filter" class="screen-reader-text"><?php _e( 'Search themes…' ); ?></label> <input type="search" id="{{ data.id }}-themes-filter" placeholder="<?php esc_attr_e( 'Search themes…' ); ?>" aria-describedby="{{ data.id }}-live-search-desc" class="wp-filter-search wp-filter-search-themes" /> <div class="search-icon" aria-hidden="true"></div> <span id="{{ data.id }}-live-search-desc" class="screen-reader-text"><?php _e( 'The search results will be updated as you type.' ); ?></span> </div> <# } #> <div class="filter-themes-count"> <span class="themes-displayed"> <?php /* translators: %s: number of themes displayed. */ echo sprintf( __( '%s themes' ), '<span class="theme-count">0</span>' ); ?> </span> </div> <?php } /** * Render the filter drawer portion of a themes section as a JS template. * * The filter bar container is rendered by @see `render_template()`. * * @since 4.9.0 */ protected function filter_drawer_content_template() { $feature_list = get_theme_feature_list( false ); // @todo: Use the .org API instead of the local core feature list. The .org API is currently outdated and will be reconciled when the .org themes directory is next redesigned. ?> <# if ( 'wporg' === data.action ) { #> <div class="filter-drawer filter-details"> <?php foreach ( $feature_list as $feature_name => $features ) : ?> <fieldset class="filter-group"> <legend><?php echo esc_html( $feature_name ); ?></legend> <div class="filter-group-feature"> <?php foreach ( $features as $feature => $feature_name ) : ?> <input type="checkbox" id="filter-id-<?php echo esc_attr( $feature ); ?>" value="<?php echo esc_attr( $feature ); ?>" /> <label for="filter-id-<?php echo esc_attr( $feature ); ?>"><?php echo esc_html( $feature_name ); ?></label> <?php endforeach; ?> </div> </fieldset> <?php endforeach; ?> </div> <# } #> <?php } }