- Statut : non résolu
- Ce sujet contient 46 réponses, 3 participants et a été mis à jour pour la dernière fois par Anonyme, le il y a 10 années et 8 mois.
-
AuteurMessages
-
8 mai 2014 à 16 h 00 min #537477
Bonjour,
Ma configuration WP actuelle
– Version de WordPress : 4.9
– Version de PHP/MySQL :
– Thème utilisé : parabola
– Extensions en place : woocommerce
– Nom de l’hebergeur : 1&1
– Adresse du site : http://s308989164.onlinehome.fr/W_Press_TYF/produit/tirages-20×30/Problème(s) rencontré(s) :
Je souhaite changer les mentions copyright… en bas de page.
J’ai trouvé ou faire la modif : c ds le fichier « theme-functions.php », lui même ds un dossier « includes » du theme.
Afin de ne pas refaire cette modif à chaque màj du theme, j’ai crée un theme enfant et dans son dossier j y ai mis un « theme-functions.php » dont voici le code :/**
* Site info
*/
function parabola_site_info() {
$parabolas = parabola_get_theme_options();
foreach ($parabolas as $key => $value) { ${« $key »} = $value ; } ?>Site réalisé par
MONTPELLIER xxx ©2013 – 2014
} // parabola_site_info()add_action(‘cryout_footer_hook’,’parabola_site_info’,12);
/**
* Copyright text
*/
function parabola_copyright() {
$parabolas = parabola_get_theme_options();
foreach ($parabolas as $key => $value) { ${« $key »} = $value ; }
echo ‘‘.$parabola_copyright.’‘;
} // parabola_copyright()if ($parabola_copyright != ») add_action(‘cryout_footer_hook’,’parabola_copyright’,11);
add_action(‘wp_ajax_nopriv_do_ajax’, ‘parabola_ajax_function’);
add_action(‘wp_ajax_do_ajax’, ‘parabola_ajax_function’);if ( ! function_exists( ‘parabola_ajax_function’ ) ) :
function parabola_ajax_function(){
ob_clean();?>
Mais là, les changements ne sont pas visible sur la page, si je fais la modif sur le Theme Parent, ça marche!?!
Ou ai je déraillé?
8 mai 2014 à 17 h 16 min #951916AnonymeInvitéMaître WordPress34072 contributionsCe message a été supprimé suite à la demande de l’auteur.
8 mai 2014 à 19 h 13 min #951917Bsr noaneo, en fait c pas tant de changer le footer qui m interesse, c surtout le fonctionnement des fichiers du theme enfant!
Car quand je fé une modif ds le « theme-functions.php » parent, la modif marche,
cette meme modif ds le « theme-functions.php » enfant, pas de modif, donc le fichier du theme enfant est inopérant. c cela mon pb!9 mai 2014 à 7 h 54 min #951918AnonymeInvitéMaître WordPress34072 contributionsCe message a été supprimé suite à la demande de l’auteur.
9 mai 2014 à 9 h 40 min #951919Bjr et… merci, je vais essayer cette nuit 🍺
Donc et avant d’y passer quelques heures!?!…
1 Dans le dossier de mon thème enfant, je crée un fichier « theme-functions.php » avec juste :
<?php
?>
-dedans j y mettrais mes modifs-
2 Dans le dossier de mon thème enfant, je crée un fichiers « functions.php » avec la modif ci-dessus
<?php
require_once(dirname(__FILE__) . « /includes/theme-functions.php »); // Misc functions
?>Je peut y aller?
Ah, ces 2 fichiers, je les met à la racine du dossier « theme-enfant » (le « theme-functions.php » original est dans un sous-dossier « includes » du theme parent…)?
De toute façon, avant de triturer ces fichiers vais faire copie des originaux et si plus rien ne marche, je les remets, non?
Bon après-midi…9 mai 2014 à 10 h 23 min #951920AnonymeInvitéMaître WordPress34072 contributionsCe message a été supprimé suite à la demande de l’auteur.
9 mai 2014 à 12 h 12 min #951921Ok, merci!
Donc je recrée l arborescence des dossiers/fichiers dans le theme enfant.
Impatient d essayer tout ça, vais me liberer le + vite possible et tester!Il y a t il un moyen simple de vérifier que le « theme-functions.php » est operationnel?
A+, vous tiens informé!9 mai 2014 à 13 h 14 min #951922Bon, ai essayé les 2 syntaxes et invariablement :
Warning: require_once(/homepages/9/d308989148/htdocs/W_Press_TYF/wp-content/themes/parabola-child-01/includes/custom-styles.php) [function.require-once]: failed to open stream: No such file or directory in /homepages/9/d308989148/htdocs/W_Press_TYF/wp-content/themes/parabola-child-01/admin/main.php on line 7
Fatal error: require_once() [function.require]: Failed opening required ‘/homepages/9/d308989148/htdocs/W_Press_TYF/wp-content/themes/parabola-child-01/includes/custom-styles.php’ (include_path=’.:/usr/lib/php5′) in /homepages/9/d308989148/htdocs/W_Press_TYF/wp-content/themes/parabola-child-01/admin/main.php on line 7
Donc un pb sur le fichier main.php (ce fichier est bien présent dans le dossier
Pour info : le « functions.php » de mon « theme parent »
<?php
/*
* Functions file
* Calls all other required files
* PLEASE DO NOT EDIT THIS FILE IN ANY WAY
*
* @package parabola
*/// variable for theme version
define (« PARABOLA_VERSION », »1.3.4″);require_once(dirname(__FILE__) . « /admin/main.php »); // Load necessary admin files
//Loading include files
require_once( get_stylesheet_directory() . « /includes/theme-functions.php »); // Misc functions
9 mai 2014 à 15 h 21 min #951923AnonymeInvitéMaître WordPress34072 contributionsCe message a été supprimé suite à la demande de l’auteur.
9 mai 2014 à 15 h 26 min #951924AnonymeInvitéMaître WordPress34072 contributionsCe message a été supprimé suite à la demande de l’auteur.
9 mai 2014 à 15 h 51 min #951925En fait j au un « functions.php » dans le theme parent
et un « functions.php » ds le theme enfant.
L’ intégrale de mon « functions.php » enfant<?php
/*
* Functions file
* Calls all other required files
* PLEASE DO NOT EDIT THIS FILE IN ANY WAY
*
* @package parabola
*/// variable for theme version
define (« PARABOLA_VERSION », »1.3.4″);require_once(dirname(__FILE__) . « /admin/main.php »); // Load necessary admin files
//Loading include files
require_once( get_stylesheet_directory() . « /includes/theme-functions.php »); // Misc functions
?>
Et la j’ai le message d erreur ci-dessus!?!
Je suis sur de rater kelke chose mais quoi???? Je vs l avais dit, quelques heures:boulet:9 mai 2014 à 17 h 08 min #951926Et voici pon « main.php »
à la ligne 7 il y arequire_once(dirname(dirname(__FILE__)) . « /includes/custom-styles.php »);
N est ce pas la kil fo faire une modif?
<?php
// Loading files for frontend// Loading Default values
require_once(dirname(__FILE__) . « /defaults.php »);
// Loading function that generates the custom css
require_once(dirname(dirname(__FILE__)) . « /includes/custom-styles.php »);// Loading the admin files
if( is_admin() ) {
// Loading the settings arrays
require_once(dirname(__FILE__) . « /settings.php »);
// Loading the callback functions
require_once(dirname(__FILE__) . « /admin-functions.php »);
// Loading the sanitize funcions
require_once(dirname(__FILE__) . « /sanitize.php »);
// Loading color scheme presets
include(dirname(__FILE__) . « /schemes.php »);
}// Getting the theme options and making sure defaults are used if no values are set
function parabola_get_theme_options() {
global $parabola_defaults;
$optionsParabola = get_option( ‘parabola_settings’, $parabola_defaults );
$optionsParabola = array_merge((array)$parabola_defaults, (array)$optionsParabola);
return $optionsParabola;
}$parabolas= parabola_get_theme_options();
foreach ($parabolas as $key => $value) {
${« $key »} = $value ;
}// Hooks/Filters
add_action(‘admin_init’, ‘parabola_init_fn’ );
add_action(‘admin_menu’, ‘parabola_add_page_fn’);
add_action(‘init’, ‘parabola_init’);$parabolas= parabola_get_theme_options();
// Registering and enqueuing all scripts and styles for the init hook
function parabola_init() {
//Loading Parabola text domain into the admin section
load_theme_textdomain( ‘parabola’, get_template_directory_uri() . ‘/languages’ );
}// Creating the parabola subpage
function parabola_add_page_fn() {
$page = add_theme_page(‘Parabola Settings’, ‘Parabola Settings’, ‘edit_theme_options’, ‘parabola-page’, ‘parabola_page_fn’);
add_action( ‘admin_print_styles-‘.$page, ‘parabola_admin_styles’ );
add_action(‘admin_print_scripts-‘.$page, ‘parabola_admin_scripts’);}
// Adding the styles for the Parabola admin page used when parabola_add_page_fn() is launched
function parabola_admin_styles() {
wp_register_style( ‘jquery-ui-style’,get_template_directory_uri() . ‘/js/jqueryui/css/ui-lightness/jquery-ui-1.8.16.custom.css’ );
wp_enqueue_style( ‘jquery-ui-style’ );
wp_register_style( ‘parabola-admin-style’,get_template_directory_uri() . ‘/admin/css/admin.css’ );
wp_enqueue_style( ‘parabola-admin-style’ );
// codemirror css markup
wp_register_style(‘cryout-admin-codemirror-style’,get_template_directory_uri() . ‘/admin/css/codemirror.css’ );
wp_enqueue_style(‘cryout-admin-codemirror-style’);
}// Adding the styles for the Parabola admin page used when parabola_add_page_fn() is launched
function parabola_admin_scripts() {
// The farbtastic color selector already included in WP
//wp_register_script(‘farbtastic-wp’,get_template_directory_uri() . ‘/admin/js/accordion-slider.js’, array(‘jquery’) );
//wp_enqueue_script(‘cryout_accordion’);
wp_enqueue_script(‘farbtastic’);
wp_enqueue_style( ‘farbtastic’ );//Jquery accordion and slider libraries alreay included in WP
wp_enqueue_script(‘jquery-ui-accordion’);
wp_enqueue_script(‘jquery-ui-slider’);
wp_enqueue_script(‘jquery-ui-tooltip’);
// For backwards compatibility where Parabola is installed on older versions of WP where the ui accordion and slider are not included
if (!wp_script_is(‘jquery-ui-accordion’,$list=’registered’)) {
wp_register_script(‘cryout_accordion’,get_template_directory_uri() . ‘/admin/js/accordion-slider.js’, array(‘jquery’) );
wp_enqueue_script(‘cryout_accordion’);
}
// For the WP uploader
if(function_exists(‘wp_enqueue_media’)) {
wp_enqueue_media();
}
else {
wp_enqueue_script(‘media-upload’);
wp_enqueue_script(‘thickbox’);
wp_enqueue_style(‘thickbox’);
}
// The js used in the admin
wp_register_script(‘cryout-admin-js’,get_template_directory_uri() . ‘/admin/js/admin.js’ );
wp_enqueue_script(‘cryout-admin-js’);
// codemirror css markup
wp_register_script(‘cryout-admin-codemirror-js’,get_template_directory_uri() . ‘/admin/js/codemirror.min.js’ );
wp_enqueue_script(‘cryout-admin-codemirror-js’);
}// The settings sectoions. All the referenced functions are found in admin-functions.php
function parabola_init_fn(){register_setting(‘parabola_settings’, ‘parabola_settings’, ‘parabola_settings_validate’);
/**************
sections
**************/add_settings_section(‘layout_section’, __(‘Layout Settings’,’parabola’), ‘cryout_section_layout_fn’, __FILE__);
add_settings_section(‘header_section’, __(‘Header Settings’,’parabola’), ‘cryout_section_header_fn’, __FILE__);
add_settings_section(‘presentation_section’, __(‘Presentation Page’,’parabola’), ‘cryout_section_presentation_fn’, __FILE__);
add_settings_section(‘text_section’, __(‘Text Settings’,’parabola’), ‘cryout_section_text_fn’, __FILE__);
add_settings_section(‘appereance_section’,__(‘Color Settings’,’parabola’) , ‘cryout_section_appereance_fn’, __FILE__);
add_settings_section(‘graphics_section’, __(‘Graphics Settings’,’parabola’) , ‘cryout_section_graphics_fn’, __FILE__);
add_settings_section(‘post_section’, __(‘Post Information Settings’,’parabola’) , ‘cryout_section_post_fn’, __FILE__);
add_settings_section(‘excerpt_section’, __(‘Post Excerpt Settings’,’parabola’) , ‘cryout_section_excerpt_fn’, __FILE__);
add_settings_section(‘featured_section’, __(‘Featured Image Settings’,’parabola’) , ‘cryout_section_featured_fn’, __FILE__);
add_settings_section(‘socials_section’, __(‘Social Media Settings’,’parabola’) , ‘cryout_section_social_fn’, __FILE__);
add_settings_section(‘misc_section’, __(‘Miscellaneous Settings’,’parabola’) , ‘cryout_section_misc_fn’, __FILE__);/*** layout ***/
add_settings_field(‘parabola_side’, __(‘Main Layout’,’parabola’) , ‘cryout_setting_side_fn’, __FILE__, ‘layout_section’);
add_settings_field(‘parabola_sidewidth’, __(‘Content / Sidebar Width’,’parabola’) , ‘cryout_setting_sidewidth_fn’, __FILE__, ‘layout_section’);
add_settings_field(‘parabola_mobile’, __(‘Responsiveness’,’parabola’) , ‘cryout_setting_mobile_fn’, __FILE__, ‘layout_section’);/*** presentation ***/
add_settings_field(‘parabola_frontpage’, __(‘Enable Presentation Page’,’parabola’) , ‘cryout_setting_frontpage_fn’, __FILE__, ‘presentation_section’);
add_settings_field(‘parabola_frontposts’, __(‘Show Posts on Presentation Page’,’parabola’) , ‘cryout_setting_frontposts_fn’, __FILE__, ‘presentation_section’);
add_settings_field(‘parabola_frontslider’, __(‘Slider Settings’,’parabola’) , ‘cryout_setting_frontslider_fn’, __FILE__, ‘presentation_section’);
add_settings_field(‘parabola_frontslider2’, __(‘Slides’,’parabola’) , ‘cryout_setting_frontslider2_fn’, __FILE__, ‘presentation_section’);
add_settings_field(‘parabola_frontcolumns’, __(‘Presentation Page Columns’,’parabola’) , ‘cryout_setting_frontcolumns_fn’, __FILE__, ‘presentation_section’);
add_settings_field(‘parabola_fronttext’, __(‘Extras’,’parabola’) , ‘cryout_setting_fronttext_fn’, __FILE__, ‘presentation_section’);/*** header ***/
add_settings_field(‘parabola_hheight’, __(‘Header Height’,’parabola’) , ‘cryout_setting_hheight_fn’, __FILE__, ‘header_section’);
add_settings_field(‘parabola_himage’, __(‘Header Image’,’parabola’) , ‘cryout_setting_himage_fn’, __FILE__, ‘header_section’);
add_settings_field(‘parabola_siteheader’, __(‘Site Header’,’parabola’) , ‘cryout_setting_siteheader_fn’, __FILE__, ‘header_section’);
add_settings_field(‘parabola_logoupload’, __(‘Custom Logo Upload’,’parabola’) , ‘cryout_setting_logoupload_fn’, __FILE__, ‘header_section’);
add_settings_field(‘parabola_headermargin’, __(‘Header Content Spacing’,’parabola’) , ‘cryout_setting_headermargin_fn’, __FILE__, ‘header_section’);
add_settings_field(‘parabola_favicon’, __(‘FavIcon Upload’,’parabola’) , ‘cryout_setting_favicon_fn’, __FILE__, ‘header_section’);/*** text ***/
add_settings_field(‘parabola_fontfamily’, __(‘General Font’,’parabola’) , ‘cryout_setting_fontfamily_fn’, __FILE__, ‘text_section’);
add_settings_field(‘parabola_fonttitle’, __(‘Post Title Font ‘,’parabola’) , ‘cryout_setting_fonttitle_fn’, __FILE__, ‘text_section’);
add_settings_field(‘parabola_fontside’, __(‘Widget Title Font’,’parabola’) , ‘cryout_setting_fontside_fn’, __FILE__, ‘text_section’);
add_settings_field(‘parabola_sitetitlefont’, __(‘Site Title Font’,’parabola’) , ‘cryout_setting_sitetitlefont_fn’, __FILE__, ‘text_section’);
add_settings_field(‘parabola_menufont’, __(‘Main Menu Font’,’parabola’) , ‘cryout_setting_menufont_fn’, __FILE__, ‘text_section’);
add_settings_field(‘parabola_fontheadings’, __(‘Headings Font’,’parabola’) , ‘cryout_setting_fontheadings_fn’, __FILE__, ‘text_section’);
add_settings_field(‘parabola_textalign’, __(‘Force Text Align’,’parabola’) , ‘cryout_setting_textalign_fn’, __FILE__, ‘text_section’);
add_settings_field(‘parabola_paragraphspace’, __(‘Paragraph spacing’,’parabola’) , ‘cryout_setting_paragraphspace_fn’, __FILE__, ‘text_section’);
add_settings_field(‘parabola_parindent’, __(‘Paragraph Indent’,’parabola’) , ‘cryout_setting_parindent_fn’, __FILE__, ‘text_section’);
add_settings_field(‘parabola_headingsindent’, __(‘Headings Indent’,’parabola’) , ‘cryout_setting_headingsindent_fn’, __FILE__, ‘text_section’);
add_settings_field(‘parabola_lineheight’, __(‘Line Height’,’parabola’) , ‘cryout_setting_lineheight_fn’, __FILE__, ‘text_section’);
add_settings_field(‘parabola_wordspace’, __(‘Word Spacing’,’parabola’) , ‘cryout_setting_wordspace_fn’, __FILE__, ‘text_section’);
add_settings_field(‘parabola_letterspace’, __(‘Letter Spacing’,’parabola’) , ‘cryout_setting_letterspace_fn’, __FILE__, ‘text_section’);
add_settings_field(‘parabola_letterspace’, __(‘Uppercase Text’,’parabola’) , ‘cryout_setting_uppercasetext_fn’, __FILE__, ‘text_section’);/*** appereance ***/
add_settings_field(‘parabola_sitebackground’, __(‘Background Image’,’parabola’) , ‘cryout_setting_sitebackground_fn’, __FILE__, ‘appereance_section’);
add_settings_field(‘parabola_generalcolors’, __(‘General’,’parabola’) , ‘cryout_setting_generalcolors_fn’, __FILE__, ‘appereance_section’);
add_settings_field(‘parabola_accentcolors’, __(‘Accents’,’parabola’) , ‘cryout_setting_accentcolors_fn’, __FILE__, ‘appereance_section’);
add_settings_field(‘parabola_titlecolors’, __(‘Site Title’,’parabola’) , ‘cryout_setting_titlecolors_fn’, __FILE__, ‘appereance_section’);add_settings_field(‘parabola_menucolors’, __(‘Main Menu’,’parabola’) , ‘cryout_setting_menucolors_fn’, __FILE__, ‘appereance_section’);
add_settings_field(‘parabola_topmenucolors’, __(‘Top Menu’,’parabola’) , ‘cryout_setting_topmenucolors_fn’, __FILE__, ‘appereance_section’);add_settings_field(‘parabola_contentcolors’, __(‘Content’,’parabola’) , ‘cryout_setting_contentcolors_fn’, __FILE__, ‘appereance_section’);
add_settings_field(‘parabola_frontpagecolors’, __(‘Presentation Page’,’parabola’) , ‘cryout_setting_frontpagecolors_fn’, __FILE__, ‘appereance_section’);
add_settings_field(‘parabola_sidecolors’, __(‘Sidebar Widgets’,’parabola’) , ‘cryout_setting_sidecolors_fn’, __FILE__, ‘appereance_section’);
add_settings_field(‘parabola_widgetcolors’, __(‘Footer Widgets’,’parabola’) , ‘cryout_setting_widgetcolors_fn’, __FILE__, ‘appereance_section’);
add_settings_field(‘parabola_linkcolors’, __(‘Links’,’parabola’) , ‘cryout_setting_linkcolors_fn’, __FILE__, ‘appereance_section’);add_settings_field(‘parabola_caption’, __(‘Caption Border’,’parabola’) , ‘cryout_setting_caption_fn’, __FILE__, ‘appereance_section’);
add_settings_field(‘parabola_metaback’, __(‘Meta Area Background’,’parabola’) , ‘cryout_setting_metaback_fn’, __FILE__, ‘appereance_section’);/*** graphics ***/
add_settings_field(‘parabola_breadcrumbs’, __(‘Breadcrumbs’,’parabola’) , ‘cryout_setting_breadcrumbs_fn’, __FILE__, ‘graphics_section’);
add_settings_field(‘parabola_pagination’, __(‘Pagination’,’parabola’) , ‘cryout_setting_pagination_fn’, __FILE__, ‘graphics_section’);
add_settings_field(‘parabola_menualign’, __(‘Menu Alignment’,’parabola’) , ‘cryout_setting_menualign_fn’, __FILE__, ‘graphics_section’);
add_settings_field(‘parabola_triangles’, __(‘Triangle Accents’,’parabola’) , ‘cryout_setting_triangles_fn’, __FILE__, ‘graphics_section’);
add_settings_field(‘parabola_image’, __(‘Post Images Border’,’parabola’) , ‘cryout_setting_image_fn’, __FILE__, ‘graphics_section’);
add_settings_field(‘parabola_contentlist’, __(‘Content List Bullets’,’parabola’) , ‘cryout_setting_contentlist_fn’, __FILE__, ‘graphics_section’);
add_settings_field(‘parabola_pagetitle’, __(‘Page Titles’,’parabola’) , ‘cryout_setting_pagetitle_fn’, __FILE__, ‘graphics_section’);
add_settings_field(‘parabola_categetitle’, __(‘Category Titles’,’parabola’) , ‘cryout_setting_categtitle_fn’, __FILE__, ‘graphics_section’);
add_settings_field(‘parabola_tables’, __(‘Hide Tables’,’parabola’) , ‘cryout_setting_tables_fn’, __FILE__, ‘graphics_section’);
add_settings_field(‘parabola_backtop’, __(‘Back to Top button’,’parabola’) , ‘cryout_setting_backtop_fn’, __FILE__, ‘graphics_section’);
add_settings_field(‘parabola_comtext’, __(‘Text Under Comments’,’parabola’) , ‘cryout_setting_comtext_fn’, __FILE__, ‘graphics_section’);
add_settings_field(‘parabola_comclosed’, __(‘Comments are closed text’,’parabola’) , ‘cryout_setting_comclosed_fn’, __FILE__, ‘graphics_section’);
add_settings_field(‘parabola_comoff’, __(‘Comments off’,’parabola’) , ‘cryout_setting_comoff_fn’, __FILE__, ‘graphics_section’);/*** post metas***/
add_settings_field(‘parabola_postcomlink’, __(‘Post Comments Link’,’parabola’) , ‘cryout_setting_postcomlink_fn’, __FILE__, ‘post_section’);
add_settings_field(‘parabola_postdatetime’, __(‘Post Date/Time’,’parabola’) , ‘cryout_setting_postdatetime_fn’, __FILE__, ‘post_section’);
add_settings_field(‘parabola_postauthor’, __(‘Post Author’,’parabola’) , ‘cryout_setting_postauthor_fn’, __FILE__, ‘post_section’);
add_settings_field(‘parabola_postcateg’, __(‘Post Category’,’parabola’) , ‘cryout_setting_postcateg_fn’, __FILE__, ‘post_section’);
add_settings_field(‘parabola_postmetas’, __(‘Meta Bar’,’parabola’) , ‘cryout_setting_postmetas_fn’, __FILE__, ‘post_section’);
add_settings_field(‘parabola_posttag’, __(‘Post Tags’,’parabola’) , ‘cryout_setting_posttag_fn’, __FILE__, ‘post_section’);
add_settings_field(‘parabola_postbook’, __(‘Post Permalink’,’parabola’) , ‘cryout_setting_postbook_fn’, __FILE__, ‘post_section’);/*** post exceprts***/
add_settings_field(‘parabola_excerpthome’, __(‘Home Page’,’parabola’) , ‘cryout_setting_excerpthome_fn’, __FILE__, ‘excerpt_section’);
add_settings_field(‘parabola_excerptsticky’, __(‘Sticky Posts’,’parabola’) , ‘cryout_setting_excerptsticky_fn’, __FILE__, ‘excerpt_section’);
add_settings_field(‘parabola_excerptarchive’, __(‘Archive and Category Pages’,’parabola’) , ‘cryout_setting_excerptarchive_fn’, __FILE__, ‘excerpt_section’);
add_settings_field(‘parabola_excerptwords’, __(‘Number of Words for Post Excerpts ‘,’parabola’) , ‘cryout_setting_excerptwords_fn’, __FILE__, ‘excerpt_section’);
add_settings_field(‘parabola_magazinelayout’, __(‘Magazine Layout’,’parabola’) , ‘cryout_setting_magazinelayout_fn’, __FILE__, ‘excerpt_section’);
add_settings_field(‘parabola_excerptdots’, __(‘Excerpt suffix’,’parabola’) , ‘cryout_setting_excerptdots_fn’, __FILE__, ‘excerpt_section’);
add_settings_field(‘parabola_excerptcont’, __(‘Continue reading link text ‘,’parabola’) , ‘cryout_setting_excerptcont_fn’, __FILE__, ‘excerpt_section’);
add_settings_field(‘parabola_excerpttags’, __(‘HTML tags in Excerpts’,’parabola’) , ‘cryout_setting_excerpttags_fn’, __FILE__, ‘excerpt_section’);/*** featured ***/
add_settings_field(‘parabola_fpost’, __(‘Featured Images as POST Thumbnails ‘,’parabola’) , ‘cryout_setting_fpost_fn’, __FILE__, ‘featured_section’);
add_settings_field(‘parabola_fauto’, __(‘Auto Select Images From Posts ‘,’parabola’) , ‘cryout_setting_fauto_fn’, __FILE__, ‘featured_section’);
add_settings_field(‘parabola_falign’, __(‘Thumbnails Alignment ‘,’parabola’) , ‘cryout_setting_falign_fn’, __FILE__, ‘featured_section’);
add_settings_field(‘parabola_fsize’, __(‘Thumbnails Size ‘,’parabola’) , ‘cryout_setting_fsize_fn’, __FILE__, ‘featured_section’);
add_settings_field(‘parabola_fheader’, __(‘Featured Images as HEADER Images ‘,’parabola’) , ‘cryout_setting_fheader_fn’, __FILE__, ‘featured_section’);/*** socials ***/
add_settings_field(‘parabola_socials1’, __(‘Link nr. 1′,’parabola’) , ‘cryout_setting_socials1_fn’, __FILE__, ‘socials_section’);
add_settings_field(‘parabola_socials2’, __(‘Link nr. 2′,’parabola’) , ‘cryout_setting_socials2_fn’, __FILE__, ‘socials_section’);
add_settings_field(‘parabola_socials3’, __(‘Link nr. 3′,’parabola’) , ‘cryout_setting_socials3_fn’, __FILE__, ‘socials_section’);
add_settings_field(‘parabola_socials4’, __(‘Link nr. 4′,’parabola’) , ‘cryout_setting_socials4_fn’, __FILE__, ‘socials_section’);
add_settings_field(‘parabola_socials5’, __(‘Link nr. 5′,’parabola’) , ‘cryout_setting_socials5_fn’, __FILE__, ‘socials_section’);
add_settings_field(‘parabola_socialshow’, __(‘Socials display’,’parabola’) , ‘cryout_setting_socialsdisplay_fn’, __FILE__, ‘socials_section’);/*** misc ***/
add_settings_field(‘parabola_iecompat’, __(‘Internet Explorer Compatibility Tag’,’parabola’) , ‘cryout_setting_iecompat_fn’, __FILE__, ‘misc_section’);
add_settings_field(‘parabola_copyright’, __(‘Custom Footer Text’,’parabola’) , ‘cryout_setting_copyright_fn’, __FILE__, ‘misc_section’);
add_settings_field(‘parabola_customcss’, __(‘Custom CSS’,’parabola’) , ‘cryout_setting_customcss_fn’, __FILE__, ‘misc_section’);
add_settings_field(‘parabola_customjs’, __(‘Custom JavaScript’,’parabola’) , ‘cryout_setting_customjs_fn’, __FILE__, ‘misc_section’);}
// Display the admin options page
function parabola_page_fn() {
// Load the import form page if the import button has been pressed
if (isset($_POST)) {
parabola_import_form();
return;
}
// Load the import form page after upload button has been pressed
if (isset($_POST)) {
parabola_import_file();
return;
}// Load the presets page after presets button has been pressed
if (isset($_POST)) {
parabola_init_fn();
parabola_presets();
return;
}if (!current_user_can(‘edit_theme_options’)) {
wp_die( __(‘Sorry, but you do not have sufficient permissions to access this page.’,’parabola’) );
}?><?php
if ( isset( $_GET ) ) {
echo «« ;
echo _e(‘Parabola settings updated successfully.’,’parabola’);
echo «« ;
}
?>Checking jQuery functionality…
If this message remains visible after the page has loaded then there is a problem with your WordPress jQuery library. This can have several causes, including incompatible plugins.
The Parabola Settings page cannot function without jQuery.
Parabola v by Cryout Creations
Coffee Break
<?php echo "Great power comes with great responsibility. We have complete faith that you will only use Parabola for good. You will not use it to destroy worlds, but to create them. You will not use it to control minds, but to expand them. You will not use it to enslave your peers but you will introduce them to Parabola so that they may one day become your equals. We *know* our theme won’t be crippled in your hands, you’ll nourish it and use it to its full potential.
But if you feel the dark forces are somehow taking over, if you sense Parabola is not serving its true, original purpose… buy us a coffee and we’ll stay up all night to restore the balance. We know the dark forces very well 😉
« ; ?>
<?php
$parabola_news = fetch_feed( array( ‘http://www.cryoutcreations.eu/cat/parabola/feed/’) );
if ( ! is_wp_error( $parabola_news ) ) {
$maxitems = $parabola_news->get_item_quantity( 10 );
$news_items = $parabola_news->get_items( 0, $maxitems );
}
?>-
<?php if ( $maxitems == 0 ) : echo '
- ‘ . __( ‘No news items.’, ‘parabola’ ) . ‘
-
<a class="news-header" href='get_permalink() ); ?>’>get_title() ); ?>
get_date(‘ j F Y, H:i’); ?>
get_description() ),40,’…’) ; ?>
<a class="news-read" href='get_permalink() ); ?>’>Read more »
‘; else :
foreach( $news_items as $news_item ) : ?>var reset_confirmation = »;
function startfarb(a,b) {
jQuery(b).css(‘display’,’none’);
jQuery(b).farbtastic(a).addtitle({id: a});jQuery(a).click(function() {
if(jQuery(b).css(‘display’) == ‘none’) {
jQuery(b).parents(‘div:eq(0)’).addClass(‘ui-accordion-content-overflow’);
jQuery(b).css(‘display’,’inline-block’).hide().show(150);
}
});jQuery(document).mousedown( function() {
jQuery(b).hide(300, function(){ jQuery(b).parents(‘div:eq(0)’).removeClass(‘ui-accordion-content-overflow’); });
// todo: find a better way to remove class after the fade on IEs
});
}function tooltip_terain() {
jQuery(‘#accordion small’).parent(‘div’).append(‘<img src="/images/icon-tooltip.png » />‘).
each(function() {
//jQuery(this).children(‘a.tooltip’).attr(‘title’,jQuery(this).children(‘small’).html() );
var tooltip_info = jQuery(this).children(‘small’).html();
jQuery(this).children(‘.tooltip’).tooltip({content : tooltip_info});
jQuery(this).children(‘.tooltip’).tooltip( « option », « items », « a » );
//jQuery(this).children(‘.tooltip’).tooltip( « option », « show », « false »);
jQuery(this).children(‘.tooltip’).tooltip( « option », « hide », « false »);
jQuery(this).children(‘small’).remove();
if (!jQuery(this).hasClass(‘slmini’) && !jQuery(this).hasClass(‘slidercontent’) && !jQuery(this).hasClass(‘slideDivs’)) jQuery(this).addClass(‘tooltip_div’);
});
}function coloursel(el){
var id = « # »+jQuery(el).attr(‘id’);
jQuery(id+ »2″).hide();
var bgcolor = jQuery(id).val();
if (bgcolor <= "#666666") { jQuery(id).css('color','#ffffff'); } else { jQuery(id).css('color','#000000'); };
jQuery(id).css(‘background-color’,jQuery(id).val());
}function vercomp(ver, req) {
var v = ver.split(‘.’);
var q = req.split(‘.’);
for (var i = 0; i < v.length; ++i) {
if (q.length == i) { return true; } // v is bigger
if (parseInt(v) == parseInt(q)) { continue; } // nothing to do here, move along
else if (parseInt(v) > parseInt(q)) { return true; } // v is bigger
else { return false; } // q is bigger
}
if (v.length != q.length) { return false; } // q is bigger
return true; // v = q;
}// farbtastic title addon function
(function($){
$.fn.extend({
addtitle: function(options) {
var defaults = {
id: »
}
var options = $.extend(defaults, options);
return this.each(function() {
var o = options;
var title = jQuery(o.id).attr(‘title’);
if (title===undefined) { } else { jQuery(o.id+’2′).children(‘.farbtastic’).append(‘‘+title+’‘); }
});
}
});
})(jQuery);jQuery(document).ready(function(){
//var _jQueryVer = parseFloat(‘.’+jQuery().jquery.replace(/./g, »)); // jQuery version as float, eg: 0.183
//var _jQueryUIVer = parseFloat(‘.’+jQuery.ui.version.replace(/./g, »)); // jQuery UI version as float, eg: 0.192
//if (_jQueryUIVer >= 0.190) {
if (vercomp(jQuery.ui.version, »1.9.0″)) {
tooltip_terain();
jQuery(‘.colorthingy’).each(function(){
id = « # »+jQuery(this).attr(‘id’);
startfarb(id,id+’2′);
});
} else {
jQuery(« #main-options »).addClass(‘oldwp’);
setTimeout(function(){jQuery(‘#parabola_slideType’).trigger(‘click’)},1000);
jQuery(‘.colorthingy’).each(function(){
id = « # »+jQuery(this).attr(‘id’);
jQuery(this).on(‘keyup’,function(){coloursel(this)});
coloursel(this);
});
// warn about the old partially unsupported version
jQuery(« #jsAlert »).after(«Parabola has detected you are running an older version of WordPress (jQuery) and will be running in compatibility mode. Some features may not work correctly. Consider updating your WordPress to the latest version.
« );
}
});
jQuery(‘#jsAlert’).hide();<?php } // parabola_page_fn()
?>10 mai 2014 à 10 h 34 min #951927AnonymeInvitéMaître WordPress34072 contributionsCe message a été supprimé suite à la demande de l’auteur.
10 mai 2014 à 13 h 59 min #951928Désolé pour mes abréviations (sms)
Pour mon code oui j’ai ce message d’erreur, mais je vais retravailler la dessus ce week-end et je vous ferais part de mes résultats lundi.
En attendant, bon w end à toutes et tous.:cool:10 mai 2014 à 14 h 42 min #951929AnonymeInvitéMaître WordPress34072 contributionsCe message a été supprimé suite à la demande de l’auteur.
-
AuteurMessages
- Vous devez être connecté pour répondre à ce sujet.