این فایل به هم ریخته . فایل کدوم تم هست ؟! خودت کپی میکنی اینجوری میشه ؟! باید سطر های جدا داشته باشه الان معلوم نیست کجا رو کامنت گذاشته کجا کد اصلی .نشد. این کد functions.php هست.
PHP:<?php /*-----------------------------------------------------------------------------------*//* Start WooThemes Functions - Please refrain from editing this section *//*-----------------------------------------------------------------------------------*/ // Set path to WooFramework and theme specific functions$functions_path = get_template_directory() . '/functions/';$includes_path = get_template_directory() . '/includes/'; // Define the theme-specific key to be sent to PressTrends.define( 'WOO_PRESSTRENDS_THEMEKEY', 'lt384huxazx27rvdk1mmm5byw4h73jrol' ); // WooFrameworkrequire_once ($functions_path . 'admin-init.php' ); // Framework Init /*-----------------------------------------------------------------------------------*//* Load the theme-specific files, with support for overriding via a child theme./*-----------------------------------------------------------------------------------*/ $includes = array( 'includes/theme-options.php', // Options panel settings and custom settings 'includes/theme-functions.php', // Custom theme functions 'includes/theme-plugins.php', // Theme specific plugins integrated in a theme 'includes/theme-actions.php', // Theme actions & user defined hooks 'includes/theme-comments.php', // Custom comments/pingback loop 'includes/theme-js.php', // Load JavaScript via wp_enqueue_script 'includes/sidebar-init.php', // Initialize widgetized areas 'includes/theme-widgets.php' // Theme widgets ); // Allow child themes/plugins to add widgets to be loaded.$includes = apply_filters( 'woo_includes', $includes ); foreach ( $includes as $i ) { locate_template( $i, true );} /*-----------------------------------------------------------------------------------*//* You can add custom functions below *//*-----------------------------------------------------------------------------------*/ if ( current_user_can('contributor') && !current_user_can('upload_files') ) { function allow_contributor_uploads() { $contributor = get_role('contributor'); $contributor->add_cap('upload_files'); } add_action('admin_init', 'allow_contributor_uploads'); } /*-----------------------------------------------------------------------------------*//* Don't add any code below here or the sky will fall down *//*-----------------------------------------------------------------------------------*/?>
فکر کنم این باید باشه .
PHP:
<?php
/*-----------------------------------------------------------------------------------*/
/* Start WooThemes Functions - Please refrain from editing this section */
/*-----------------------------------------------------------------------------------*/
// Set path to WooFramework and theme specific functions
$functions_path = get_template_directory() . '/functions/';
$includes_path = get_template_directory() . '/includes/';
// Define the theme-specific key to be sent to PressTrends.
define( 'WOO_PRESSTRENDS_THEMEKEY', 'lt384huxazx27rvdk1mmm5byw4h73jrol' );
// WooFramework
require_once ($functions_path . 'admin-init.php' ); // Framework Init
/*-----------------------------------------------------------------------------------*//* Load the theme-specific files, with support for overriding via a child theme./*-----------------------------------------------------------------------------------*/
$includes = array( 'includes/theme-options.php', // Options panel settings and custom settings
'includes/theme-functions.php',
// Custom theme functions
'includes/theme-plugins.php',
// Theme specific plugins integrated in a theme
'includes/theme-actions.php',
// Theme actions & user defined hooks
'includes/theme-comments.php',
// Custom comments/pingback loop
'includes/theme-js.php',
// Load JavaScript via wp_enqueue_script
'includes/sidebar-init.php',
// Initialize widgetized areas
'includes/theme-widgets.php' // Theme widgets
);
// Allow child themes/plugins to add widgets to be loaded.
$includes = apply_filters( 'woo_includes', $includes );
foreach ( $includes as $i ) { locate_template( $i, true );}
/*-----------------------------------------------------------------------------------*//* You can add custom functions below *//*-----------------------------------------------------------------------------------*/
if ( current_user_can('contributor') && !current_user_can('upload_files') ) {
function allow_contributor_uploads() { $contributor = get_role('contributor'); $contributor->add_cap('upload_files'); } add_action('admin_init', 'allow_contributor_uploads'); }
/*-----------------------------------------------------------------------------------*//* Don't add any code below here or the sky will fall down *//*-----------------------------------------------------------------------------------*/?>