ption_render_time(); return true; } } } /** * Detect if we can write a new CSS file */ public function can_write_css() { global $blog_id; $upload_folder_dir = wp_upload_dir(); // If WP Multisite activated, add more $blog_id to the URL $css_file_id = ( is_multisite() && $blog_id > 1 ) ? '_blog-' . $blog_id : null; $css_file_name = '/customizer-style' . $css_file_id . '.min.css'; $folder_path = $upload_folder_dir['basedir'] . DIRECTORY_SEPARATOR . 'pencidesign'; // Check folder is exists or not if ( file_exists( $folder_path ) ) { // Forder can be write or not? if ( ! is_writable( $folder_path ) ) { // Check CSS file is exists or not if ( ! file_exists( $folder_path . $css_file_name ) ) { // Done because it can't be write return false; } else { if ( ! is_writable( $folder_path . $css_file_name ) ) { // Done because it can't be write return false; } } } else { if ( file_exists( $folder_path . $css_file_name ) ) { if ( ! is_writable( $folder_path . $css_file_name ) ) { // Done because it can't be write return false; } } } } else { // Create folder path return wp_mkdir_p( $folder_path ); } return true; } /** * Gets the css path or url of customizer CSS * */ public function generate_file( $return = 'path' ) { global $blog_id; $upload_folder_dir = wp_upload_dir(); // If WP Multisite activated, add more $blog_id to the URL $css_file_id = ( is_multisite() && $blog_id > 1 ) ? '_blog-' . $blog_id : null; $css_file_name = 'customizer-style' . $css_file_id . '.min.css'; $folder_path = $upload_folder_dir['basedir'] . DIRECTORY_SEPARATOR . 'pencidesign'; // File path $css_path = $folder_path . DIRECTORY_SEPARATOR . $css_file_name; // URL directory of customizer CSS $css_folder_uri = $upload_folder_dir['baseurl']; $css_uri = trailingslashit( $css_folder_uri ) . 'pencidesign/' . $css_file_name; // Check if WP Multisite domain mapping is activated - see more: https://wordpress.org/support/article/wordpress-multisite-domain-mapping/ if ( defined( 'DOMAIN_MAPPING' ) && DOMAIN_MAPPING ) { if ( function_exists( 'domain_mapping_siteurl' ) && function_exists( 'get_original_url' ) ) { $domain_mapping = domain_mapping_siteurl( false ); $original_url = get_original_url( 'siteurl' ); $css_uri = str_replace( $original_url, $domain_mapping, $css_uri ); } } // Protocols $css_uri = str_replace( 'https://', '//', $css_uri ); $css_uri = str_replace( 'http://', '//', $css_uri ); if ( 'path' === $return ) { return $css_path; } elseif ( 'uri' === $return || 'url' === $return ) { $version = get_option( 'penci_regenerate_version' ); $savetime = ( file_exists( $css_path ) ) ? '?version=' . $version : ''; return $css_uri . $savetime; } } /** * Update the option saved time */ public function update_option_render_time() { $data_time = time(); update_option( 'penci_regenerate_css_time', $data_time ); } /** * Delete the option saved time */ public function remove_option_render_time() { $data_time = get_option( 'penci_regenerate_css_time' ); if ( $data_time ) { delete_option( 'penci_regenerate_css_time' ); } update_option( 'penci_regenerate_version', time() ); } /** * Regenerate the CSS file. */ public function regenerate_css_file() { check_ajax_referer( 'penci_render_separate_css_file', '_nonce' ); if ( ! current_user_can( 'manage_options' ) ) { wp_send_json_error( __( 'User Permission Error', 'soledad' ) ); } $this->remove_option_render_time(); wp_send_json_success(); die(); } } Penci_Generate_Customizer_CSS_File::get_instance(); }eturn string The value of pagenow. */ private function get_current_page() { global $pagenow; return $pagenow; } } حقوق العامل عند الطرد التعسفي في بلجيكا: دليل التعويض والإجراءات القانونية

نحن نستخدم ملفات تعريف الارتباط (Cookies) لتحسين تجربتك. بالاستمرار في التصفح، فإنك توافق على استخدامنا لها. موافق اعرف المزيد