<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Plugins - ThemesPress</title>
	<atom:link href="https://themespress.ca/en/sujets/plugins/feed/" rel="self" type="application/rss+xml" />
	<link>https://themespress.ca/en/</link>
	<description>Experts en développement d’API, plugins et intégrations WordPress.</description>
	<lastBuildDate>Sat, 01 Oct 2022 19:04:54 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.4</generator>

<image>
	<url>https://themespress.ca/wp-content/uploads/2020/10/cropped-Favicon-Themepress.ca_-32x32.png</url>
	<title>Plugins - ThemesPress</title>
	<link>https://themespress.ca/en/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Shortcode WP: Display or send post ID content via Formidable Form</title>
		<link>https://themespress.ca/en/shortcode-wp-display-or-send-post-id-content-via-formidable-form/</link>
					<comments>https://themespress.ca/en/shortcode-wp-display-or-send-post-id-content-via-formidable-form/#respond</comments>
		
		<dc:creator><![CDATA[Daniel]]></dc:creator>
		<pubDate>Fri, 07 Aug 2020 18:20:15 +0000</pubDate>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Forms]]></category>
		<category><![CDATA[Plugins]]></category>
		<guid isPermaLink="false">https://themespress.ca/?p=3997</guid>

					<description><![CDATA[]]></description>
										<content:encoded><![CDATA[<div class="wpb-content-wrapper"><div class="vc_row wpb_row vc_row-fluid"><div class="wpb_column vc_column_container vc_col-sm-12"><div class="vc_column-inner"><div class="wpb_wrapper">
	<div class="wpb_text_column wpb_content_element" >
		<div class="wpb_wrapper">
			<p>Shortcode WP: In this tutorial, we will show you how to create a Formidable form which in turn will be used to display a post ID&#8217;s content in a user&#8217;s email. First, we need to create a form that will allow us to choose the title of our post or the title. </p>
<p>Our newly created form will include two fields: Email and Select. In our example below, our Select field will allow us to display all post existing titles, publish and then convert them into selectable choices in the Select field. </p>
<p>In order to do so, we will use Populate Fields which will insert all post titles into our Select field. </p>

		</div>
	</div>
<div id="ts-enlighterjs-container-8086861" class="ts-enlighterjs-container-single-enabled  " style="width: 100%;  margin-top: 0px; margin-bottom: 0px;" data-enlighter-doubleclick="true" data-enlighter-windowbutton="true" data-enlighter-windowtext="New Window" data-enlighter-rawbutton="true" data-enlighter-rawtext="RAW Code" data-enlighter-infobutton="false" data-enlighter-infotext="EnlighterJS" data-enlighter-indent="2"><pre id="ts-enlighterjs-pre-8086861" class="" style="white-space: pre-wrap; height: 100%; margin: 0; padding: 0;" data-enlighter-language="standard" data-enlighter-theme="custom" data-enlighter-group="" data-enlighter-title="" data-enlighter-linenumbers="true" data-enlighter-lineoffset="1" data-enlighter-highlight="">add_filter(&#039;frm_setup_new_fields_vars&#039;, &#039;add_a_field_function_formidable&#039;, 20, 2);
add_filter(&#039;frm_setup_edit_fields_vars&#039;, &#039;add_a_field_function_formidable&#039;, 20, 2);
 
function add_a_field_function_formidable($values, $field){
        // Changer le ID 154 par le ID de votre champ formidable form
	if($field-&gt;id == 154){
		$arrayPositions = array();
		$pushobj = array(
			value =&gt; &quot;&quot;,
			label =&gt; &quot;S&eacute;lectionnez votre article&quot;
		);
		array_push($arrayPositions, $pushobj);
		$positionQuery = new WP_Query( array( &#039;post_type&#039; =&gt; &#039;post&#039;, &#039;posts_per_page&#039; =&gt; -1, &#039;orderby&#039; =&gt; &quot;menu_order&quot;, &#039;order&#039; =&gt; &quot;ASC&quot;) );
		if ( $positionQuery-&gt;have_posts() ) {
			while ( $positionQuery-&gt;have_posts() ) {
				$positionQuery-&gt;the_post();
				$pushobj = array(
					value =&gt; get_the_title(),
					label =&gt; get_the_title()
				);
				array_push($arrayPositions, $pushobj);
			}
			wp_reset_postdata();
		}
 
	   	$values[&#039;options&#039;] = $arrayPositions;
	}
	return $values;
}</pre></div>
	<div class="wpb_text_column wpb_content_element" >
		<div class="wpb_wrapper">
			<p>We will now use a function that wil fetch the ID of the post selected in the form. </p>

		</div>
	</div>
<div id="ts-enlighterjs-container-5172335" class="ts-enlighterjs-container-single-enabled  " style="width: 100%;  margin-top: 0px; margin-bottom: 0px;" data-enlighter-doubleclick="true" data-enlighter-windowbutton="true" data-enlighter-windowtext="New Window" data-enlighter-rawbutton="true" data-enlighter-rawtext="RAW Code" data-enlighter-infobutton="false" data-enlighter-infotext="EnlighterJS" data-enlighter-indent="2"><pre id="ts-enlighterjs-pre-5172335" class="" style="white-space: pre-wrap; height: 100%; margin: 0; padding: 0;" data-enlighter-language="php" data-enlighter-theme="custom" data-enlighter-group="" data-enlighter-title="" data-enlighter-linenumbers="true" data-enlighter-lineoffset="1" data-enlighter-highlight="">function get_post_by_title($page_title, $type = &quot;post&quot;, $output = OBJECT) {
	global $wpdb;
	$post = $wpdb-&amp;gt;get_var ( $wpdb-&amp;gt;prepare ( &quot;SELECT ID FROM $wpdb-&amp;gt;posts WHERE post_title = %s AND post_type=&#039;$type&#039;&quot;, $page_title ) );
	if ($post)
		return get_post ( $post, $output );
	return null;
}</pre></div>
	<div class="wpb_text_column wpb_content_element" >
		<div class="wpb_wrapper">
			<p>Now let&#8217;s create a shortcode that will generate the content of the post selected by the user so he can receive it by email. </p>

		</div>
	</div>
<div id="ts-enlighterjs-container-7130120" class="ts-enlighterjs-container-single-enabled  " style="width: 100%;  margin-top: 0px; margin-bottom: 0px;" data-enlighter-doubleclick="true" data-enlighter-windowbutton="true" data-enlighter-windowtext="New Window" data-enlighter-rawbutton="true" data-enlighter-rawtext="RAW Code" data-enlighter-infobutton="false" data-enlighter-infotext="EnlighterJS" data-enlighter-indent="2"><pre id="ts-enlighterjs-pre-7130120" class="" style="white-space: pre-wrap; height: 100%; margin: 0; padding: 0;" data-enlighter-language="php" data-enlighter-theme="custom" data-enlighter-group="" data-enlighter-title="" data-enlighter-linenumbers="true" data-enlighter-lineoffset="1" data-enlighter-highlight="">function via_create_shortcode_questions_reponses(){
	// Changer votre id par le field de votre champ select Titres des articles
        $title          = do_shortcode( &#039;[frm-field-value field_id=154]&#039; );
	$post_id        = get_post_by_title($title);
	
	$content = get_post_field(&#039;post_content&#039;, $post_id);
	return $content;
}
add_shortcode( &#039;reponse&#039;, &#039;via_create_shortcode_questions_reponses&#039; ); </pre></div>
	<div class="wpb_text_column wpb_content_element" >
		<div class="wpb_wrapper">
			<p>This feature of quick form can be easily displayed in a sidebar thanks to the Formidable form widget allowing you to select which form to display.</p>
<p>NB:  Please make sure to do a back up of your thème, files and database before proceeding with these tutorials. </p>

		</div>
	</div>
</div></div></div></div>
</div><p>The post <a href="https://themespress.ca/en/shortcode-wp-display-or-send-post-id-content-via-formidable-form/">Shortcode WP: Display or send post ID content via Formidable Form</a> first appeared on <a href="https://themespress.ca/en/">ThemesPress</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://themespress.ca/en/shortcode-wp-display-or-send-post-id-content-via-formidable-form/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Formidable Form: Display User&#8217;s IP</title>
		<link>https://themespress.ca/en/formidable-form-display-users-ip/</link>
					<comments>https://themespress.ca/en/formidable-form-display-users-ip/#respond</comments>
		
		<dc:creator><![CDATA[Daniel]]></dc:creator>
		<pubDate>Mon, 27 Jul 2020 20:43:03 +0000</pubDate>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Body]]></category>
		<category><![CDATA[Forms]]></category>
		<category><![CDATA[Plugins]]></category>
		<guid isPermaLink="false">https://themespress.ca/?p=4000</guid>

					<description><![CDATA[]]></description>
										<content:encoded><![CDATA[<div class="wpb-content-wrapper"><div class="vc_row wpb_row vc_row-fluid"><div class="wpb_column vc_column_container vc_col-sm-12"><div class="vc_column-inner"><div class="wpb_wrapper">
	<div class="wpb_text_column wpb_content_element" >
		<div class="wpb_wrapper">
			<p>This tutorial will show you how to fetch your user&#8217;s ID and IP address and display it under the Admin column in the WordPress dashboard.</p>
<p>First off, how to fetch the user&#8217;s IP address with the form. In your form, <a href="https://shareasale.com/r.cfm?b=841990&amp;u=1476870&amp;m=64739&amp;urllink=&amp;afftrack=" target="_blank" rel="noopener noreferrer"><strong>Formidable Form</strong></a>, we will create a hidden form and in its advanced parameters, we will look up a default value which will be the IP address.<br />

<a href='https://themespress.ca/wp-content/uploads/2020/07/Get-IP.jpg'><img decoding="async" width="150" height="150" src="https://themespress.ca/wp-content/uploads/2020/07/Get-IP-150x150.jpg" class="attachment-thumbnail size-thumbnail" alt="" srcset="https://themespress.ca/wp-content/uploads/2020/07/Get-IP-150x150.jpg 150w, https://themespress.ca/wp-content/uploads/2020/07/Get-IP-100x100.jpg 100w" sizes="(max-width: 150px) 100vw, 150px" /></a>
<a href='https://themespress.ca/wp-content/uploads/2020/07/IP.jpg'><img decoding="async" width="150" height="150" src="https://themespress.ca/wp-content/uploads/2020/07/IP-150x150.jpg" class="attachment-thumbnail size-thumbnail" alt="" srcset="https://themespress.ca/wp-content/uploads/2020/07/IP-150x150.jpg 150w, https://themespress.ca/wp-content/uploads/2020/07/IP-100x100.jpg 100w" sizes="(max-width: 150px) 100vw, 150px" /></a>
</p>
<p>Donc concrètement, quand l&#8217;utilisateur va poster son formulaire, ça va avoir l&#8217;adresse IP en champ caché. When a user will send the form, the hidden form will contain their IP. The next step will be to display it in a column in the WordPress user section.</p>
<p>We will add two new filters <a href="http://hookr.io/filters/manage_users_columns/" target="_blank" rel="noopener noreferrer"><strong>manage_users_columns</strong></a> and <a href="https://developer.wordpress.org/reference/hooks/manage_users_custom_column/" target="_blank" rel="noopener noreferrer"><strong>manage_users_custom_column</strong></a></p>

		</div>
	</div>
<div id="ts-enlighterjs-container-1947330" class="ts-enlighterjs-container-single-enabled  " style="width: 100%;  margin-top: 0px; margin-bottom: 0px;" data-enlighter-doubleclick="true" data-enlighter-windowbutton="true" data-enlighter-windowtext="New Window" data-enlighter-rawbutton="true" data-enlighter-rawtext="RAW Code" data-enlighter-infobutton="false" data-enlighter-infotext="EnlighterJS" data-enlighter-indent="2"><pre id="ts-enlighterjs-pre-1947330" class="" style="white-space: pre-wrap; height: 100%; margin: 0; padding: 0;" data-enlighter-language="php" data-enlighter-theme="custom" data-enlighter-group="" data-enlighter-title="" data-enlighter-linenumbers="true" data-enlighter-lineoffset="1" data-enlighter-highlight="">function add_column( $column ) {
    $column[&#039;userip&#039;] = &#039;IP utilisateur&#039;;
    return $column;
}
add_filter( &#039;manage_users_columns&#039;, &#039;add_column&#039; );

/*this will add column value in user list table*/
function add_column_value( $val, $column_name, $user_id ) {
   switch ($column_name) {
        case &#039;userip&#039; :
	// Remplacer 1094 par l&#039;ID du champ cach&eacute; de votre formulaire IP Adress
        return FrmProEntriesController::get_field_value_shortcode(array(&#039;field_id&#039; =&amp;gt; 1094, &#039;entry&#039; =&amp;gt; $entry_id, &#039;user_id&#039; =&amp;gt; $user_id));
        break;
        default:
    }
    return $val; 
}
add_filter( &#039;manage_users_custom_column&#039;, &#039;add_column_value&#039;, 10, 3 );</pre></div>
	<div class="wpb_text_column wpb_content_element" >
		<div class="wpb_wrapper">
			<p>Pour obtenir notre valeur IP de l&#8217;utilisateur, nous allons utiliser <a href="https://formidableforms.com/knowledgebase/get-a-value-from-an-entry/" target="_blank" rel="noopener noreferrer"><strong>FrmProEntriesController::get_field_value_shortcode</strong></a> that will allow you to display the Formidable form&#8217;s value of the field and inclure an argument is necessary.</p>
<p>In our return Query, we have added the following arguments: <strong>field_id</strong>, <strong>entry</strong>, and <strong>user_id</strong>  matching the user&#8217;s ID in the results table. This means, for example, to fetch the value matching the ID 1094 of each value each user ID.<br />
<strong><br />
NB: Make sure to do a backup of your theme, files and database before proceeding with these tutorials.</strong></p>

		</div>
	</div>
</div></div></div></div>
</div><p>The post <a href="https://themespress.ca/en/formidable-form-display-users-ip/">Formidable Form: Display User’s IP</a> first appeared on <a href="https://themespress.ca/en/">ThemesPress</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://themespress.ca/en/formidable-form-display-users-ip/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Create a User Status With Formidable Form</title>
		<link>https://themespress.ca/en/create-a-user-status-with-formidable-form/</link>
					<comments>https://themespress.ca/en/create-a-user-status-with-formidable-form/#respond</comments>
		
		<dc:creator><![CDATA[Daniel]]></dc:creator>
		<pubDate>Thu, 08 Aug 2019 15:45:04 +0000</pubDate>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Forms]]></category>
		<category><![CDATA[Plugins]]></category>
		<guid isPermaLink="false">https://themespress.ca/?p=4208</guid>

					<description><![CDATA[]]></description>
										<content:encoded><![CDATA[<div class="wpb-content-wrapper"><div class="vc_row wpb_row vc_row-fluid"><div class="wpb_column vc_column_container vc_col-sm-12"><div class="vc_column-inner"><div class="wpb_wrapper">
	<div class="wpb_text_column wpb_content_element" >
		<div class="wpb_wrapper">
			<p>With this tutorial we will show you how to create a function that will allow users to chose their roles based on a pre-determined list and subsequently create a new role for the user.</p>
<p>First we need to create our user role. In this example, we want to add a <strong>Doctor role</strong>, <strong>Pharmacist role</strong> and a <strong>Nurse role</strong>; via the functions.php or another file.</p>

		</div>
	</div>
<div id="ts-enlighterjs-container-2333769" class="ts-enlighterjs-container-single-enabled  " style="width: 100%;  margin-top: 0px; margin-bottom: 0px;" data-enlighter-doubleclick="true" data-enlighter-windowbutton="true" data-enlighter-windowtext="New Window" data-enlighter-rawbutton="true" data-enlighter-rawtext="RAW Code" data-enlighter-infobutton="false" data-enlighter-infotext="EnlighterJS" data-enlighter-indent="2"><pre id="ts-enlighterjs-pre-2333769" class="" style="white-space: pre-wrap; height: 100%; margin: 0; padding: 0;" data-enlighter-language="php" data-enlighter-theme="enlighter" data-enlighter-group="" data-enlighter-title="" data-enlighter-linenumbers="true" data-enlighter-lineoffset="1" data-enlighter-highlight="">//////////////////////// Add User Role /////////////////////// 
function medecin_new_role() {  
 
    //add the new user role
    add_role(
        &#039;medecin&#039;,
        &#039;Medecin&#039;,
        array(
            &#039;read&#039;         =&amp;gt; true,
            &#039;delete_posts&#039; =&amp;gt; false
        )
    );
 
}
add_action(&#039;admin_init&#039;, &#039;medecin_new_role&#039;);
 
function pharmacien_new_role() {  
 
    //add the new user role
    add_role(
        &#039;pharmacien&#039;,
        &#039;Pharmacien&#039;,
        array(
            &#039;read&#039;         =&amp;gt; true,
            &#039;delete_posts&#039; =&amp;gt; false
        )
    );
 
}
add_action(&#039;admin_init&#039;, &#039;pharmacien_new_role&#039;);
 
function infirmiere_new_role() {  
 
    //add the new user role
    add_role(
        &#039;infirmiere&#039;,
        &#039;Infirmi&egrave;r(e)&#039;,
        array(
            &#039;read&#039;         =&amp;gt; true,
            &#039;delete_posts&#039; =&amp;gt; false
        )
    );
 
}
add_action(&#039;admin_init&#039;, &#039;infirmiere_new_role&#039;);</pre></div>
	<div class="wpb_text_column wpb_content_element" >
		<div class="wpb_wrapper">
			<p>We can now validate a user&#8217;s profil and confirm that our three newly added roles are listed. Then we have to create a form that will allow someone to create their new user with the <strong><a href="https://formidableforms.com/knowledgebase/user-registration/" target="_blank" rel="noopener noreferrer">formidable User Registration add-on</a></strong>.</p>
<p>Simply create a form with the necessary fields such as first/last name, email, etc&#8230; For this to work, make sure to create a <strong>Statut</strong> field (you can name it however you see fit). For this field, make sure it&#8217;s a Radio button with the three roles we mentioned above for the example: </p>

		</div>
	</div>
<div class="vc_row wpb_row vc_inner vc_row-fluid"><div class="wpb_column vc_column_container vc_col-sm-4"><div class="vc_column-inner"><div class="wpb_wrapper">
	<div  class="wpb_single_image wpb_content_element vc_align_left wpb_content_element">
		
		<figure class="wpb_wrapper vc_figure">
			<div class="vc_single_image-wrapper   vc_box_border_grey"><img decoding="async" width="149" height="300" src="https://themespress.ca/wp-content/uploads/2019/08/options-roles-1-149x300.jpg" class="vc_single_image-img attachment-medium" alt="" title="options-roles" srcset="https://themespress.ca/wp-content/uploads/2019/08/options-roles-1-149x300.jpg 149w, https://themespress.ca/wp-content/uploads/2019/08/options-roles-1-416x840.jpg 416w, https://themespress.ca/wp-content/uploads/2019/08/options-roles-1.jpg 425w" sizes="(max-width: 149px) 100vw, 149px" /></div>
		</figure>
	</div>
</div></div></div><div class="wpb_column vc_column_container vc_col-sm-4"><div class="vc_column-inner"><div class="wpb_wrapper">
	<div  class="wpb_single_image wpb_content_element vc_align_left wpb_content_element">
		
		<figure class="wpb_wrapper vc_figure">
			<div class="vc_single_image-wrapper   vc_box_border_grey"><img loading="lazy" decoding="async" width="300" height="58" src="https://themespress.ca/wp-content/uploads/2019/08/boutons-1-300x58.jpg" class="vc_single_image-img attachment-medium" alt="" title="boutons" srcset="https://themespress.ca/wp-content/uploads/2019/08/boutons-1-300x58.jpg 300w, https://themespress.ca/wp-content/uploads/2019/08/boutons-1-416x81.jpg 416w, https://themespress.ca/wp-content/uploads/2019/08/boutons-1.jpg 510w" sizes="auto, (max-width: 300px) 100vw, 300px" /></div>
		</figure>
	</div>
</div></div></div><div class="wpb_column vc_column_container vc_col-sm-4"><div class="vc_column-inner"><div class="wpb_wrapper">
	<div  class="wpb_single_image wpb_content_element vc_align_left wpb_content_element">
		
		<figure class="wpb_wrapper vc_figure">
			<div class="vc_single_image-wrapper   vc_box_border_grey"><img loading="lazy" decoding="async" width="300" height="142" src="https://themespress.ca/wp-content/uploads/2019/08/user-registration-1-300x142.jpg" class="vc_single_image-img attachment-medium" alt="" title="user-registration" srcset="https://themespress.ca/wp-content/uploads/2019/08/user-registration-1-300x142.jpg 300w, https://themespress.ca/wp-content/uploads/2019/08/user-registration-1-600x284.jpg 600w, https://themespress.ca/wp-content/uploads/2019/08/user-registration-1-1024x485.jpg 1024w, https://themespress.ca/wp-content/uploads/2019/08/user-registration-1-768x364.jpg 768w, https://themespress.ca/wp-content/uploads/2019/08/user-registration-1-1536x728.jpg 1536w, https://themespress.ca/wp-content/uploads/2019/08/user-registration-1-1320x625.jpg 1320w, https://themespress.ca/wp-content/uploads/2019/08/user-registration-1.jpg 1925w" sizes="auto, (max-width: 300px) 100vw, 300px" /></div>
		</figure>
	</div>
</div></div></div></div>
	<div class="wpb_text_column wpb_content_element" >
		<div class="wpb_wrapper">
			<p>Now we will need to go into the form&#8217;s settings under Actions/Notifications to add a user registration function. Fill out the necessary and leave author by default.</p>
<p>For example:</p>
<p>Voici la fonction qui donne les conditions nécessaires d’attribuer le bon rôle utilisateur au moment de son inscription et de son choix de rôle. Here&#8217;s the function that will return the necessary conditions in order to assign the right role to the user when signing up and choosing their role. </p>
<p>We change the IDs by the appropriate IDs of your form and field. </p>
<ul>
<li>ID 190 is the field ID.</li>
<li>ID 6 is the form ID.</li>
</ul>

		</div>
	</div>
<div id="ts-enlighterjs-container-8886288" class="ts-enlighterjs-container-single-enabled  " style="width: 100%;  margin-top: 0px; margin-bottom: 0px;" data-enlighter-doubleclick="true" data-enlighter-windowbutton="true" data-enlighter-windowtext="New Window" data-enlighter-rawbutton="true" data-enlighter-rawtext="RAW Code" data-enlighter-infobutton="false" data-enlighter-infotext="EnlighterJS" data-enlighter-indent="2"><pre id="ts-enlighterjs-pre-8886288" class="" style="white-space: pre-wrap; height: 100%; margin: 0; padding: 0;" data-enlighter-language="php" data-enlighter-theme="enlighter" data-enlighter-group="" data-enlighter-title="" data-enlighter-linenumbers="true" data-enlighter-lineoffset="1" data-enlighter-highlight="">//////////////////////// Formidable form attribute user r&ocirc;le /////////////////////// 
function statut_new_role($user_role, $atts){
  extract($atts);
  if($form-&amp;gt;id == 6){ // WSIS: change this to your form ID
    if($_POST[&#039;item_meta&#039;][190] == &#039;medecin&#039;) //change 125 to the ID of your field and &#039;Author&#039; to the value of your radio button WSIS: or single checkbox
    $user_role = &#039;medecin&#039;; // WSIS: rolename
	if($_POST[&#039;item_meta&#039;][190] == &#039;infirmiere&#039;) //change 125 to the ID of your field and &#039;Author&#039; to the value of your radio button WSIS: or single checkbox
    $user_role = &#039;infirmiere&#039;; // WSIS: rolename
	if($_POST[&#039;item_meta&#039;][190] == &#039;pharmacien&#039;) //change 125 to the ID of your field and &#039;Author&#039; to the value of your radio button WSIS: or single checkbox
    $user_role = &#039;pharmacien&#039;; // WSIS: rolename
  }
  return $user_role;
}
 
add_filter(&#039;frmreg_new_role&#039;, &#039;statut_new_role&#039;, 10, 2);</pre></div>
	<div class="wpb_text_column wpb_content_element" >
		<div class="wpb_wrapper">
			<p> Finally, you will need to test the form to confirm that it will assign the selected tole to your user. Make sure that all data are displayed individually in your form and that in your conditional function, it displays the proper value assigned to each role.</p>

		</div>
	</div>
</div></div></div></div>
</div><p>The post <a href="https://themespress.ca/en/create-a-user-status-with-formidable-form/">Create a User Status With Formidable Form</a> first appeared on <a href="https://themespress.ca/en/">ThemesPress</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://themespress.ca/en/create-a-user-status-with-formidable-form/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Adding a Default Value in a Formidable Form field with Drop Down Menu</title>
		<link>https://themespress.ca/en/default-value-formidable-form-drop-down/</link>
					<comments>https://themespress.ca/en/default-value-formidable-form-drop-down/#respond</comments>
		
		<dc:creator><![CDATA[Daniel]]></dc:creator>
		<pubDate>Fri, 03 Aug 2018 15:19:45 +0000</pubDate>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Forms]]></category>
		<category><![CDATA[Plugins]]></category>
		<guid isPermaLink="false">https://themespress.ca/?p=5005</guid>

					<description><![CDATA[]]></description>
										<content:encoded><![CDATA[<div class="wpb-content-wrapper"><div class="vc_row wpb_row vc_row-fluid"><div class="wpb_column vc_column_container vc_col-sm-12"><div class="vc_column-inner"><div class="wpb_wrapper">
	<div class="wpb_text_column wpb_content_element" >
		<div class="wpb_wrapper">
			<p>With this tutorial, we will show you how to add a Selected text value in a drop down menu linked to a matching Posts or Post Type in a <a href="https://shareasale.com/r.cfm?b=841990&amp;u=1476870&amp;m=64739&amp;urllink=&amp;afftrack=" target="_blank" rel="noopener">Formidable Form</a>.</p>
<p>In order to do so, we need a drop-down field in our form that we will call Countries for our example (it&#8217;s a type of taxonomy; you can name it fruits if you want). Do not add any choices manually.</p>
<p>Save your form and then head to <strong>Settings &gt; Form actions</strong>.</p>
<p>Then select <strong>Create a post</strong> (if that is not already done – This will create a post entry or post type matching your form parameters and fields included). Select the fields matching the post ou post type.</p>

		</div>
	</div>

	<div  class="wpb_single_image wpb_content_element vc_align_left wpb_content_element">
		
		<figure class="wpb_wrapper vc_figure">
			<div class="vc_single_image-wrapper   vc_box_border_grey"><img loading="lazy" decoding="async" width="1065" height="226" src="https://themespress.ca/wp-content/uploads/2018/08/Creer-une-publication.jpg" class="vc_single_image-img attachment-full" alt="" title="Créer une publication dans Formidable Form" srcset="https://themespress.ca/wp-content/uploads/2018/08/Creer-une-publication.jpg 1065w, https://themespress.ca/wp-content/uploads/2018/08/Creer-une-publication-600x127.jpg 600w, https://themespress.ca/wp-content/uploads/2018/08/Creer-une-publication-300x64.jpg 300w, https://themespress.ca/wp-content/uploads/2018/08/Creer-une-publication-1024x217.jpg 1024w, https://themespress.ca/wp-content/uploads/2018/08/Creer-une-publication-768x163.jpg 768w, https://themespress.ca/wp-content/uploads/2018/08/Creer-une-publication-1320x280.jpg 1320w" sizes="auto, (max-width: 1065px) 100vw, 1065px" /></div>
		</figure>
	</div>

	<div class="wpb_text_column wpb_content_element" >
		<div class="wpb_wrapper">
			<p>For your taxonomy, go the <strong>Taxation/Category</strong> section, then add your taoxnomy&#8217;s name and select the field you&#8217;ve created for your dynamic input of your taxonomy i.e. it will contain all choices added in the Select option from the Taxation/Category section.</p>
<p><strong>Here&#8217;s an example:</strong></p>

		</div>
	</div>

	<div  class="wpb_single_image wpb_content_element vc_align_left wpb_content_element">
		
		<figure class="wpb_wrapper vc_figure">
			<div class="vc_single_image-wrapper   vc_box_border_grey"><img loading="lazy" decoding="async" width="890" height="70" src="https://themespress.ca/wp-content/uploads/2018/08/Ajouter-un-taxonomie-Formidable-Form.jpg" class="vc_single_image-img attachment-full" alt="" title="Ajouter un taxonomie Formidable Form" srcset="https://themespress.ca/wp-content/uploads/2018/08/Ajouter-un-taxonomie-Formidable-Form.jpg 890w, https://themespress.ca/wp-content/uploads/2018/08/Ajouter-un-taxonomie-Formidable-Form-600x47.jpg 600w, https://themespress.ca/wp-content/uploads/2018/08/Ajouter-un-taxonomie-Formidable-Form-300x24.jpg 300w, https://themespress.ca/wp-content/uploads/2018/08/Ajouter-un-taxonomie-Formidable-Form-768x60.jpg 768w, https://themespress.ca/wp-content/uploads/2018/08/Ajouter-un-taxonomie-Formidable-Form-1320x103.jpg 1320w" sizes="auto, (max-width: 890px) 100vw, 890px" /></div>
		</figure>
	</div>

	<div class="wpb_text_column wpb_content_element" >
		<div class="wpb_wrapper">
			<p>The problem is that your <a href="https://shareasale.com/r.cfm?b=841990&amp;u=1476870&amp;m=64739&amp;urllink=&amp;afftrack=" target="_blank" rel="noopener">Formidable Form</a> does not give you a default value or first category in alphabetical order. So if you don&#8217;t want the field to look empty, you need to use the <strong>Formidable Form frm_dropdown_cat</strong> filter.</p>
<p><strong>Here&#8217;s the filter:</strong></p>

		</div>
	</div>
<h2 style="text-align: left;font-family:Abril Fatface;font-weight:400;font-style:normal" class="vc_custom_heading vc_do_custom_heading" >Adding a default value – Formidable Form drop-down taxonomy</h2>
	<div class="wpb_text_column wpb_content_element" >
		<div class="wpb_wrapper">
			<p>In this filter, you&#8217;ll notice that 139 is the ID of our drop down menu field. Simply replace it with your ID.<br />
<strong>Add this filter in your theme&#8217;s functions.php file.</strong></p>

		</div>
	</div>
<div id="ts-enlighterjs-container-2714620" class="ts-enlighterjs-container-single-enabled  " style="width: 100%;  margin-top: 0px; margin-bottom: 0px;" data-enlighter-doubleclick="true" data-enlighter-windowbutton="true" data-enlighter-windowtext="New Window" data-enlighter-rawbutton="true" data-enlighter-rawtext="RAW Code" data-enlighter-infobutton="false" data-enlighter-infotext="EnlighterJS" data-enlighter-indent="2"><pre id="ts-enlighterjs-pre-2714620" class="" style="white-space: pre-wrap; height: 100%; margin: 0; padding: 0;" data-enlighter-language="php" data-enlighter-theme="enlighter" data-enlighter-group="" data-enlighter-title="" data-enlighter-linenumbers="true" data-enlighter-lineoffset="1" data-enlighter-highlight="">add_filter(&#039;frm_dropdown_cat&#039;, &#039;nomdevotrefonction&#039;, 10, 2);
function nomdevotrefonction($args, $field){
  if($field[&#039;id&#039;] == 139){ //change 25 to the ID of your field
    ///// Donner ici le nom htlm de votre texte
    $args[&#039;show_option_all&#039;] = &#039;- S&eacute;lectionner -&#039;;
  }
  return $args;
}</pre></div>
	<div class="wpb_text_column wpb_content_element" >
		<div class="wpb_wrapper">
			<p><strong>Results:</strong></p>

		</div>
	</div>

	<div  class="wpb_single_image wpb_content_element vc_align_left wpb_content_element">
		
		<figure class="wpb_wrapper vc_figure">
			<div class="vc_single_image-wrapper   vc_box_border_grey"><img loading="lazy" decoding="async" width="1018" height="80" src="https://themespress.ca/wp-content/uploads/2018/08/Résultats-taxonomie-Formidable-Form.jpg" class="vc_single_image-img attachment-full" alt="" title="Résultats taxonomie Formidable Form" srcset="https://themespress.ca/wp-content/uploads/2018/08/Résultats-taxonomie-Formidable-Form.jpg 1018w, https://themespress.ca/wp-content/uploads/2018/08/Résultats-taxonomie-Formidable-Form-600x47.jpg 600w, https://themespress.ca/wp-content/uploads/2018/08/Résultats-taxonomie-Formidable-Form-300x24.jpg 300w, https://themespress.ca/wp-content/uploads/2018/08/Résultats-taxonomie-Formidable-Form-768x60.jpg 768w, https://themespress.ca/wp-content/uploads/2018/08/Résultats-taxonomie-Formidable-Form-1320x103.jpg 1320w" sizes="auto, (max-width: 1018px) 100vw, 1018px" /></div>
		</figure>
	</div>
</div></div></div></div>
</div><p>The post <a href="https://themespress.ca/en/default-value-formidable-form-drop-down/">Adding a Default Value in a Formidable Form field with Drop Down Menu</a> first appeared on <a href="https://themespress.ca/en/">ThemesPress</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://themespress.ca/en/default-value-formidable-form-drop-down/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>WordPress: Hiding a Sub-Menu with a Plugin</title>
		<link>https://themespress.ca/en/wordpress-hiding-a-sub-menu-with-a-plugin/</link>
					<comments>https://themespress.ca/en/wordpress-hiding-a-sub-menu-with-a-plugin/#respond</comments>
		
		<dc:creator><![CDATA[Daniel]]></dc:creator>
		<pubDate>Sat, 10 Feb 2018 19:27:00 +0000</pubDate>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Plugins]]></category>
		<guid isPermaLink="false">https://themespress.ca/?p=5093</guid>

					<description><![CDATA[]]></description>
										<content:encoded><![CDATA[<div class="wpb-content-wrapper"><div class="vc_row wpb_row vc_row-fluid"><div class="wpb_column vc_column_container vc_col-sm-12"><div class="vc_column-inner"><div class="wpb_wrapper">
	<div class="wpb_text_column wpb_content_element" >
		<div class="wpb_wrapper">
			<p>With this tutorial, we will show you how to hide a sub-menu with a plugin we&#8217;re developing all the while keeping the slugs intact if required for developed plugin. (<a href="https://developer.wordpress.org/reference/functions/add_submenu_page/" target="_blank" rel="noopener">add_submenu_page</a>)</p>
<p>First, we need a menu and a sub-menu for our WordPress plugin.<br />
Let&#8217;s take a look at the function below; we see that the plugin has a Main Tab and Sub-Menu tab that are displayed on the WordPress dashboard with the name of the plugin.</p>

		</div>
	</div>
<div id="ts-enlighterjs-container-1059345" class="ts-enlighterjs-container-single-enabled  " style="width: 100%;  margin-top: 0px; margin-bottom: 0px;" data-enlighter-doubleclick="true" data-enlighter-windowbutton="true" data-enlighter-windowtext="New Window" data-enlighter-rawbutton="true" data-enlighter-rawtext="RAW Code" data-enlighter-infobutton="false" data-enlighter-infotext="EnlighterJS" data-enlighter-indent="2"><pre id="ts-enlighterjs-pre-1059345" class="" style="white-space: pre-wrap; height: 100%; margin: 0; padding: 0;" data-enlighter-language="php" data-enlighter-theme="enlighter" data-enlighter-group="" data-enlighter-title="" data-enlighter-linenumbers="true" data-enlighter-lineoffset="1" data-enlighter-highlight="">///////////////////////////////////////////// Menu Plugin Wordpress ////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
add_action(&#039;admin_menu&#039;, &#039;fonction_menu_page&#039;);
function fonction_menu_page() {
   add_menu_page( &#039;Titre Du Plugin&#039;, &#039;Titre Du Plugin&#039;, &#039;manage_options&#039;, &#039;slug-du-plugin&#039;, &#039;nomdelafonction&#039;, &#039;&#039;,2);
   add_submenu_page(&#039;slug-du-plugin&#039;, &#039;Titre Du Sous Menu Plugin&#039;, &#039;Titre Du Sous Menu Plugin&#039;, &#039;manage_options&#039;, &#039;slug-du-sous-menu&#039;, &#039;autrenomdelafonction&#039;);
}</pre></div>
	<div class="wpb_text_column wpb_content_element" >
		<div class="wpb_wrapper">
			<p>We want to keep our Main page of the WordPress plugin, but if we want we can hide the sub-menu.</p>
<p>In order to do so, simply add <strong>null</strong> in add_submenu_page. This allows us to keep the sub-menu slug in a tab or navigation item of our plugin.</p>

		</div>
	</div>
<h2 style="text-align: left" class="vc_custom_heading vc_do_custom_heading" >WordPress : Cacher un Sous-Menu Plugin</h2>
	<div class="wpb_text_column wpb_content_element" >
		<div class="wpb_wrapper">
			<p>Here&#8217;s the same function with the hidden sub-menu thanks to the null.</p>

		</div>
	</div>
<div id="ts-enlighterjs-container-4886320" class="ts-enlighterjs-container-single-enabled  " style="width: 100%;  margin-top: 0px; margin-bottom: 0px;" data-enlighter-doubleclick="true" data-enlighter-windowbutton="true" data-enlighter-windowtext="New Window" data-enlighter-rawbutton="true" data-enlighter-rawtext="RAW Code" data-enlighter-infobutton="false" data-enlighter-infotext="EnlighterJS" data-enlighter-indent="2"><pre id="ts-enlighterjs-pre-4886320" class="" style="white-space: pre-wrap; height: 100%; margin: 0; padding: 0;" data-enlighter-language="php" data-enlighter-theme="enlighter" data-enlighter-group="" data-enlighter-title="" data-enlighter-linenumbers="true" data-enlighter-lineoffset="1" data-enlighter-highlight="">///////////////////////////////////////////// Menu Plugin Wordpress ////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
add_action(&#039;admin_menu&#039;, &#039;fonction_menu_page&#039;);
function fonction_menu_page() {
   add_menu_page( &#039;Titre Du Plugin&#039;, &#039;Titre Du Plugin&#039;, &#039;manage_options&#039;, &#039;slug-du-plugin&#039;, &#039;nomdelafonction&#039;, &#039;&#039;,2);
   add_submenu_page( null, &#039;slug-du-plugin&#039;, &#039;Titre Du Sous Menu Plugin&#039;, &#039;Titre Du Sous Menu Plugin&#039;, &#039;manage_options&#039;, &#039;slug-du-sous-menu&#039;, &#039;autrenomdelafonction&#039;);
}</pre></div></div></div></div></div>
</div><p>The post <a href="https://themespress.ca/en/wordpress-hiding-a-sub-menu-with-a-plugin/">WordPress: Hiding a Sub-Menu with a Plugin</a> first appeared on <a href="https://themespress.ca/en/">ThemesPress</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://themespress.ca/en/wordpress-hiding-a-sub-menu-with-a-plugin/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Woocommerce: Adding Custom Content in your Cart Page</title>
		<link>https://themespress.ca/en/woocommerce-adding-custom-content-in-your-cart-page/</link>
					<comments>https://themespress.ca/en/woocommerce-adding-custom-content-in-your-cart-page/#respond</comments>
		
		<dc:creator><![CDATA[Daniel]]></dc:creator>
		<pubDate>Fri, 29 Sep 2017 16:08:33 +0000</pubDate>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[WooCommerce]]></category>
		<guid isPermaLink="false">https://themespress.ca/?p=5144</guid>

					<description><![CDATA[]]></description>
										<content:encoded><![CDATA[<div class="wpb-content-wrapper"><div class="vc_row wpb_row vc_row-fluid"><div class="wpb_column vc_column_container vc_col-sm-12"><div class="vc_column-inner"><div class="wpb_wrapper">
	<div class="wpb_text_column wpb_content_element" >
		<div class="wpb_wrapper">
			<p>This tutorial will show you how to add custom content in your WooCommerce cart page with the help of specific hooks.</p>
<p>To do this custom coding, we strongly recommend using a <strong>WordPress child them and Woocommerce (obviously)</strong>.</p>
<p>Make sure to not forget to enable the child them via Appearance &#8211;&gt; Themes. It&#8217;s also vital to keep the parent theme.</p>
<p><strong>Don&#8217;t forget to make a quick back up of your theme</strong> before making any changes.</p>

		</div>
	</div>
<h2 style="text-align: left" class="vc_custom_heading vc_do_custom_heading" >List of custom hooks.</h2>
	<div class="wpb_text_column wpb_content_element" >
		<div class="wpb_wrapper">
			<p>
1 – woocommerce_before_cart<br />
2 – woocommerce_before_cart_table<br />
3 – woocommerce_before_cart_table<br />
4 – woocommerce_cart_contents<br />
5 – woocommerce_after_cart_contents<br />
6 – woocommerce_after_cart_table<br />
7 – woocommerce_before_cart_totals<br />
8 – woocommerce_cart_totals_before_shipping<br />
9 – woocommerce_before_shipping_calculator<br />
10 – woocommerce_after_shipping_calculator<br />
11 – woocommerce_cart_totals_after_shipping<br />
12 – woocommerce_cart_totals_before_order_total<br />
13 – woocommerce_cart_totals_after_order_total<br />
14 – woocommerce_proceed_to_checkout<br />
15 – woocommerce_after_cart_totals<br />
16 – woocommerce_after_cart</p>
<p>By using the list of hooks above, here&#8217;s how you can add custom content to your cart page. For example, using the <strong>woocommerce_before_cart</strong> hook will display content just under the page&#8217;s title. Here&#8217;s how to insert it into your child theme.</p>
<p>It&#8217;s very important to change the naming of each function.</p>
<p>Here&#8217;s an example.</p>

		</div>
	</div>
<div id="ts-enlighterjs-container-3636198" class="ts-enlighterjs-container-single-enabled  " style="width: 100%;  margin-top: 0px; margin-bottom: 0px;" data-enlighter-doubleclick="true" data-enlighter-windowbutton="true" data-enlighter-windowtext="New Window" data-enlighter-rawbutton="true" data-enlighter-rawtext="RAW Code" data-enlighter-infobutton="false" data-enlighter-infotext="EnlighterJS" data-enlighter-indent="2"><pre id="ts-enlighterjs-pre-3636198" class="" style="white-space: pre-wrap; height: 100%; margin: 0; padding: 0;" data-enlighter-language="php" data-enlighter-theme="enlighter" data-enlighter-group="" data-enlighter-title="" data-enlighter-linenumbers="true" data-enlighter-lineoffset="1" data-enlighter-highlight="">add_action(&#039;woocommerce_before_cart&#039;, &#039;nomdemafonction&#039;, 1);
function nomdemafonction() {
    echo &#039;Cher Clients&#039;; 
	echo &#039;Vous pouvez obtenir la livraison gratuite &agrave; partir de 50 $ d&rsquo;achat.&#039;; 
}</pre></div><h2 style="text-align: left" class="vc_custom_heading vc_do_custom_heading" >La liste des hooks par default</h2><div id="ts-enlighterjs-container-3159515" class="ts-enlighterjs-container-single-enabled  " style="width: 100%;  margin-top: 0px; margin-bottom: 0px;" data-enlighter-doubleclick="true" data-enlighter-windowbutton="true" data-enlighter-windowtext="New Window" data-enlighter-rawbutton="true" data-enlighter-rawtext="RAW Code" data-enlighter-infobutton="false" data-enlighter-infotext="EnlighterJS" data-enlighter-indent="2"><pre id="ts-enlighterjs-pre-3159515" class="" style="white-space: pre-wrap; height: 100%; margin: 0; padding: 0;" data-enlighter-language="php" data-enlighter-theme="enlighter" data-enlighter-group="" data-enlighter-title="" data-enlighter-linenumbers="true" data-enlighter-lineoffset="1" data-enlighter-highlight="">// These are actions you can unhook/remove!
 
add_action( &#039;wp_loaded&#039;, array( WC_Cart, &#039;init&#039; ) );
add_action( &#039;wp&#039;, array( WC_Cart, &#039;maybe_set_cart_cookies&#039; ), 99 );
add_action( &#039;shutdown&#039;, array( WC_Cart, &#039;maybe_set_cart_cookies&#039; ), 0 );
add_action( &#039;woocommerce_add_to_cart&#039;, array( WC_Cart, &#039;calculate_totals&#039; ), 20, 0 );
add_action( &#039;woocommerce_applied_coupon&#039;, array( WC_Cart, &#039;calculate_totals&#039; ), 20, 0 );
add_action( &#039;woocommerce_check_cart_items&#039;, array( WC_Cart, &#039;check_cart_items&#039; ), 1 );
add_action( &#039;woocommerce_check_cart_items&#039;, array( WC_Cart, &#039;check_cart_coupons&#039; ), 1 );
add_action( &#039;woocommerce_after_checkout_validation&#039;, array( WC_Cart, &#039;check_customer_coupons&#039; ), 1 );
 
add_action( &#039;woocommerce_cart_collaterals&#039;, &#039;woocommerce_cross_sell_display&#039; );
add_action( &#039;woocommerce_cart_collaterals&#039;, &#039;woocommerce_cart_totals&#039;, 10 );
add_action( &#039;woocommerce_proceed_to_checkout&#039;, &#039;woocommerce_button_proceed_to_checkout&#039;, 20 );</pre></div></div></div></div></div>
</div><p>The post <a href="https://themespress.ca/en/woocommerce-adding-custom-content-in-your-cart-page/">Woocommerce: Adding Custom Content in your Cart Page</a> first appeared on <a href="https://themespress.ca/en/">ThemesPress</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://themespress.ca/en/woocommerce-adding-custom-content-in-your-cart-page/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Using the wp_enqueue_style Bootstrap Function</title>
		<link>https://themespress.ca/en/using-wp-enqueue-style/</link>
					<comments>https://themespress.ca/en/using-wp-enqueue-style/#respond</comments>
		
		<dc:creator><![CDATA[Daniel]]></dc:creator>
		<pubDate>Mon, 11 Sep 2017 14:59:19 +0000</pubDate>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Plugins]]></category>
		<guid isPermaLink="false">https://themespress.ca/?p=5177</guid>

					<description><![CDATA[]]></description>
										<content:encoded><![CDATA[<div class="wpb-content-wrapper"><div class="vc_row wpb_row vc_row-fluid"><div class="wpb_column vc_column_container vc_col-sm-12"><div class="vc_column-inner"><div class="wpb_wrapper">
	<div class="wpb_text_column wpb_content_element" >
		<div class="wpb_wrapper">
			<p>With this tutorial we will use the Bootstrap Stylesheet in one or multiple pages of our plugin; such as Settings, sub menus, etc&#8230;</p>
<p>This will help avoid CSS conflicts or force other CSS styling from other WordPress plugins. Here&#8217;s a quick trick to use <strong>wp_enqueue_style</strong> in the <strong>admin_enqueue_scripts</strong> hook.</p>
<p>This condition only works with a page ID. So if for example you have sub-pages in your plugin, we will develop it under it:</p>
<p>[gridzy id=&#8221;5&#8243;]</p>

		</div>
	</div>
<div id="ts-enlighterjs-container-1691817" class="ts-enlighterjs-container-single-enabled  " style="width: 100%;  margin-top: 0px; margin-bottom: 0px;" data-enlighter-doubleclick="true" data-enlighter-windowbutton="true" data-enlighter-windowtext="New Window" data-enlighter-rawbutton="true" data-enlighter-rawtext="RAW Code" data-enlighter-infobutton="false" data-enlighter-infotext="EnlighterJS" data-enlighter-indent="2"><pre id="ts-enlighterjs-pre-1691817" class="" style="white-space: pre-wrap; height: 100%; margin: 0; padding: 0;" data-enlighter-language="standard" data-enlighter-theme="enlighter" data-enlighter-group="" data-enlighter-title="" data-enlighter-linenumbers="true" data-enlighter-lineoffset="1" data-enlighter-highlight="">function themeplifyenqueuebootstrap()
{
    //replace themeplify with your slug page ID
    if(($_GET[&#039;page&#039;] == &#039;themeplify&#039;) || ($_GET[&#039;page&#039;] == &#039;autreslugid&#039;) || ($_GET[&#039;page&#039;] == &#039;encoreunautreslugid&#039;) ) {
        wp_enqueue_style(&#039;bootstrap.min&#039;, &#039;https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css&#039;);
    }
}

add_action(&#039;admin_enqueue_scripts&#039;, &#039;themeplifyenqueuebootstrap&#039;);</pre></div>
	<div class="wpb_text_column wpb_content_element" >
		<div class="wpb_wrapper">
			<p>With multiple GET pages &#8230;</p>

		</div>
	</div>
<div id="ts-enlighterjs-container-6268159" class="ts-enlighterjs-container-single-enabled  " style="width: 100%;  margin-top: 0px; margin-bottom: 0px;" data-enlighter-doubleclick="true" data-enlighter-windowbutton="true" data-enlighter-windowtext="New Window" data-enlighter-rawbutton="true" data-enlighter-rawtext="RAW Code" data-enlighter-infobutton="false" data-enlighter-infotext="EnlighterJS" data-enlighter-indent="2"><pre id="ts-enlighterjs-pre-6268159" class="" style="white-space: pre-wrap; height: 100%; margin: 0; padding: 0;" data-enlighter-language="standard" data-enlighter-theme="enlighter" data-enlighter-group="" data-enlighter-title="" data-enlighter-linenumbers="true" data-enlighter-lineoffset="1" data-enlighter-highlight="">function themeplifyenqueuebootstrap()
{
    //replace themeplify with your slug page ID
    if(($_GET[&#039;page&#039;] == &#039;themeplify&#039;) || ($_GET[&#039;page&#039;] == &#039;autreslugid&#039;) || ($_GET[&#039;page&#039;] == &#039;encoreunautreslugid&#039;) ) {
        wp_enqueue_style(&#039;bootstrap.min&#039;, &#039;https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css&#039;);
    }
}

add_action(&#039;admin_enqueue_scripts&#039;, &#039;themeplifyenqueuebootstrap&#039;);</pre></div>
	<div class="wpb_text_column wpb_content_element" >
		<div class="wpb_wrapper">
			<p>You can also add another function or class for the Javascripts Bootstrap by using the same conditions. You allow your plugin to have an independant Javascript and/or CSS stylesheet.</p>

		</div>
	</div>
</div></div></div></div>
</div><p>The post <a href="https://themespress.ca/en/using-wp-enqueue-style/">Using the wp_enqueue_style Bootstrap Function</a> first appeared on <a href="https://themespress.ca/en/">ThemesPress</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://themespress.ca/en/using-wp-enqueue-style/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Woocommerce Shop Page Variations Plugin</title>
		<link>https://themespress.ca/en/woocommerce-shop-page-variations-plugin/</link>
					<comments>https://themespress.ca/en/woocommerce-shop-page-variations-plugin/#respond</comments>
		
		<dc:creator><![CDATA[Daniel]]></dc:creator>
		<pubDate>Tue, 07 Mar 2017 23:28:35 +0000</pubDate>
				<category><![CDATA[Plugins]]></category>
		<guid isPermaLink="false">https://themespress.ca/?p=6205</guid>

					<description><![CDATA[<p>Woocommerce Shop Page Variations plugin will display automatically the variants of your WooCommerce shop. This plugin will allow you to display automatically the quantity and variations of your WooCommerce products with an animation. It will also automatically calculate the pricing of the various variations of the products of your WooCommerce shop. OPTIONS: – Customize the [&#8230;]</p>
<p>The post <a href="https://themespress.ca/en/woocommerce-shop-page-variations-plugin/">Woocommerce Shop Page Variations Plugin</a> first appeared on <a href="https://themespress.ca/en/">ThemesPress</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>Woocommerce Shop Page Variations plugin will display automatically the variants of your WooCommerce shop.</p>
<p>This plugin will allow you to display automatically the quantity and variations of your WooCommerce products with an animation. It will also automatically calculate the pricing of the various variations of the products of your WooCommerce shop.</p>
<p><strong>OPTIONS:</strong><br />
– Customize the CSS of your variants.</p>
<p><strong>Version:</strong> 1.2<br />
<strong>Latest update:</strong> March 5th 2017<br />
<strong>Updates available?</strong>: Yes</p><p>The post <a href="https://themespress.ca/en/woocommerce-shop-page-variations-plugin/">Woocommerce Shop Page Variations Plugin</a> first appeared on <a href="https://themespress.ca/en/">ThemesPress</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://themespress.ca/en/woocommerce-shop-page-variations-plugin/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Add TinyMCE WordPress Buttons by Default</title>
		<link>https://themespress.ca/en/add-tinymce-wordpress-buttons-by-default/</link>
					<comments>https://themespress.ca/en/add-tinymce-wordpress-buttons-by-default/#respond</comments>
		
		<dc:creator><![CDATA[Daniel]]></dc:creator>
		<pubDate>Sat, 21 Jan 2017 03:57:58 +0000</pubDate>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Plugins]]></category>
		<guid isPermaLink="false">https://themespress.ca/?p=6217</guid>

					<description><![CDATA[]]></description>
										<content:encoded><![CDATA[<div class="wpb-content-wrapper"><div class="vc_row wpb_row vc_row-fluid"><div class="wpb_column vc_column_container vc_col-sm-12"><div class="vc_column-inner"><div class="wpb_wrapper">
	<div class="wpb_text_column wpb_content_element" >
		<div class="wpb_wrapper">
			<p>With this tutorial, we will show how to add a function which will automatically add TinyMCE WordPress buttons by default. This tutorial was created after a lot of our clients noticed the buttons had disappeared after a core WordPress update.</p>
<p>With this function, all of your TinyMCE buttons will be accessible in your WordPress pages and posts.</p>
<p>Copy/paste this function in your functions.php file:</p>

		</div>
	</div>
<div id="ts-enlighterjs-container-4641911" class="ts-enlighterjs-container-single-enabled  " style="width: 100%;  margin-top: 0px; margin-bottom: 0px;" data-enlighter-doubleclick="true" data-enlighter-windowbutton="true" data-enlighter-windowtext="New Window" data-enlighter-rawbutton="true" data-enlighter-rawtext="RAW Code" data-enlighter-infobutton="false" data-enlighter-infotext="EnlighterJS" data-enlighter-indent="2"><pre id="ts-enlighterjs-pre-4641911" class="" style="white-space: pre-wrap; height: 100%; margin: 0; padding: 0;" data-enlighter-language="standard" data-enlighter-theme="enlighter" data-enlighter-group="" data-enlighter-title="" data-enlighter-linenumbers="true" data-enlighter-lineoffset="1" data-enlighter-highlight="">/////////////////////////////////////////////// ENABLE ALL EDITOR ///////////////////////////////////////////////////// 
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 
function enable_more_buttons($buttons) { 
	$buttons[] = &#039;fontselect&#039;; $buttons[] = &#039;fontsizeselect&#039;; 
	$buttons[] = &#039;styleselect&#039;; $buttons[] = &#039;backcolor&#039;; 
	$buttons[] = &#039;newdocument&#039;; $buttons[] = &#039;cut&#039;; 
	$buttons[] = &#039;copy&#039;; $buttons[] = &#039;charmap&#039;; 
	$buttons[] = &#039;hr&#039;; $buttons[] = &#039;visualaid&#039;; 
	return $buttons; 
} 

add_filter(&#039;mce_buttons_3&#039;, &#039;enable_more_buttons&#039;); 


function myformatTinyMCE( $in ) { 
   $in[&#039;wordpress_adv_hidden&#039;] = FALSE; return $in; 
}
add_filter( &#039;tiny_mce_before_init&#039;, &#039;myformatTinyMCE&#039; ); </pre></div>
	<div class="wpb_text_column wpb_content_element" >
		<div class="wpb_wrapper">
			<p>Short, but very important, tutorial for managing your pages or posts.</p>

		</div>
	</div>
</div></div></div></div>
</div><p>The post <a href="https://themespress.ca/en/add-tinymce-wordpress-buttons-by-default/">Add TinyMCE WordPress Buttons by Default</a> first appeared on <a href="https://themespress.ca/en/">ThemesPress</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://themespress.ca/en/add-tinymce-wordpress-buttons-by-default/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Configuring Language Files in a WordPress Plugin</title>
		<link>https://themespress.ca/en/configuring-language-files-wordpress-plugin/</link>
					<comments>https://themespress.ca/en/configuring-language-files-wordpress-plugin/#respond</comments>
		
		<dc:creator><![CDATA[Daniel]]></dc:creator>
		<pubDate>Wed, 11 Jan 2017 21:26:12 +0000</pubDate>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Plugins]]></category>
		<guid isPermaLink="false">https://themespress.ca/?p=6224</guid>

					<description><![CDATA[]]></description>
										<content:encoded><![CDATA[<div class="wpb-content-wrapper"><div class="vc_row wpb_row vc_row-fluid"><div class="wpb_column vc_column_container vc_col-sm-12"><div class="vc_column-inner"><div class="wpb_wrapper">
	<div class="wpb_text_column wpb_content_element" >
		<div class="wpb_wrapper">
			<p>With this tutorial, we will show you how to configure language files in a WordPress plugin.</p>
<p>If it&#8217;s not already the case, first we need to adapt our WordPress&#8217; core file this way:</p>
<p>Your file can be index.php for example, but it needs to be in the <strong>root folder of your WordPress plugin</strong>. We cannot add all details in a WordPress core plugin. Edit it with your parameters of your WordPress plugin.</p>

		</div>
	</div>
<div id="ts-enlighterjs-container-9273959" class="ts-enlighterjs-container-single-enabled  " style="width: 100%;  margin-top: 0px; margin-bottom: 0px;" data-enlighter-doubleclick="true" data-enlighter-windowbutton="true" data-enlighter-windowtext="New Window" data-enlighter-rawbutton="true" data-enlighter-rawtext="RAW Code" data-enlighter-infobutton="false" data-enlighter-infotext="EnlighterJS" data-enlighter-indent="2"><pre id="ts-enlighterjs-pre-9273959" class="" style="white-space: pre-wrap; height: 100%; margin: 0; padding: 0;" data-enlighter-language="standard" data-enlighter-theme="enlighter" data-enlighter-group="" data-enlighter-title="" data-enlighter-linenumbers="true" data-enlighter-lineoffset="1" data-enlighter-highlight="">/* 
Plugin Name: Le nom du Plugin 
Plugin URI: https:www.mondomaine.com/ 
Description: Explication en une phrase de votre plugin et de ses caract&eacute;ristiques. 
Version: La version actuelle (Ex:2.0) 
Author: Votre Nom ou nom d&#039;auteur 
Author URI: L&#039;adresse du site Web de l&#039;auteur 
*/ </pre></div>
	<div class="wpb_text_column wpb_content_element" >
		<div class="wpb_wrapper">
			<p>By adding the following code snippet, we will also secure your file:</p>

		</div>
	</div>
<div id="ts-enlighterjs-container-6721622" class="ts-enlighterjs-container-single-enabled  " style="width: 100%;  margin-top: 0px; margin-bottom: 0px;" data-enlighter-doubleclick="true" data-enlighter-windowbutton="true" data-enlighter-windowtext="New Window" data-enlighter-rawbutton="true" data-enlighter-rawtext="RAW Code" data-enlighter-infobutton="false" data-enlighter-infotext="EnlighterJS" data-enlighter-indent="2"><pre id="ts-enlighterjs-pre-6721622" class="" style="white-space: pre-wrap; height: 100%; margin: 0; padding: 0;" data-enlighter-language="standard" data-enlighter-theme="enlighter" data-enlighter-group="" data-enlighter-title="" data-enlighter-linenumbers="true" data-enlighter-lineoffset="1" data-enlighter-highlight="">if ( ! defined( &#039;ABSPATH&#039; ) ) { 
  exit; 
} </pre></div>
	<div class="wpb_text_column wpb_content_element" >
		<div class="wpb_wrapper">
			<p>Then we need to create a folder called <strong>languages</strong> where we will include all of our .mo and .po files for the required languages. Afterwards, we need to create a new function which will execute the language files:</p>

		</div>
	</div>
<div id="ts-enlighterjs-container-4738850" class="ts-enlighterjs-container-single-enabled  " style="width: 100%;  margin-top: 0px; margin-bottom: 0px;" data-enlighter-doubleclick="true" data-enlighter-windowbutton="true" data-enlighter-windowtext="New Window" data-enlighter-rawbutton="true" data-enlighter-rawtext="RAW Code" data-enlighter-infobutton="false" data-enlighter-infotext="EnlighterJS" data-enlighter-indent="2"><pre id="ts-enlighterjs-pre-4738850" class="" style="white-space: pre-wrap; height: 100%; margin: 0; padding: 0;" data-enlighter-language="standard" data-enlighter-theme="enlighter" data-enlighter-group="" data-enlighter-title="" data-enlighter-linenumbers="true" data-enlighter-lineoffset="1" data-enlighter-highlight="">/**************************************** Load folders Language ************************************/ 
function via_woocommerce_classement_load_plugin_textdomain() { 
$domain = &#039;woocommerce-classement&#039;; 
$locale = apply_filters( &#039;plugin_locale&#039;, get_locale(), $domain ); 
if ( $loaded = load_textdomain( $domain, trailingslashit( WP_LANG_DIR ) . $domain . &#039;/&#039; . $domain . &#039;-&#039; . $locale . &#039;.mo&#039; ) ) { 
  return $loaded; 
} 
else { 
  load_plugin_textdomain( $domain, FALSE, basename( dirname( __FILE__ ) ) . &#039;/languages/&#039; ); } 
} 
add_action( &#039;init&#039;, &#039;via_woocommerce_classement_load_plugin_textdomain&#039; );</pre></div>
	<div class="wpb_text_column wpb_content_element" >
		<div class="wpb_wrapper">
			<p>In the function, we can see that the variable $domain = &#8216;woocommerce-classement&#8217;; is storing the plugin name. It is vital to change it by the name of the WordPress plugin folder. Finally, make sure that your language folder exists.</p>
<p>Now all that there&#8217;s left to do is edit your language files with <a href="https://poedit.net/" target="_blank" rel="noopener">Poedit</a>.</p>

		</div>
	</div>

	<div class="wpb_text_column wpb_content_element" >
		<div class="wpb_wrapper">
			<p><strong>Here&#8217;s how the code snippet should look:</strong></p>

		</div>
	</div>
<div id="ts-enlighterjs-container-9654125" class="ts-enlighterjs-container-single-enabled  " style="width: 100%;  margin-top: 0px; margin-bottom: 0px;" data-enlighter-doubleclick="true" data-enlighter-windowbutton="true" data-enlighter-windowtext="New Window" data-enlighter-rawbutton="true" data-enlighter-rawtext="RAW Code" data-enlighter-infobutton="false" data-enlighter-infotext="EnlighterJS" data-enlighter-indent="2"><pre id="ts-enlighterjs-pre-9654125" class="" style="white-space: pre-wrap; height: 100%; margin: 0; padding: 0;" data-enlighter-language="standard" data-enlighter-theme="enlighter" data-enlighter-group="" data-enlighter-title="" data-enlighter-linenumbers="true" data-enlighter-lineoffset="1" data-enlighter-highlight="">&lt;?php 
/* 
Plugin Name: Le nom du Plugin 
Plugin URI: https:www.mondomaine.com/ 
Description: Explication en une phrase de votre plugin et de ses caract&eacute;ristiques. 
Version: La version actuelle (Ex:2.0) 
Author: Votre Nom ou nom d&#039;auteur 
Author URI: L&#039;adresse du site Web de l&#039;auteur 
*/ 

if ( ! defined( &#039;ABSPATH&#039; ) ) { 
  exit; 
} 

/**************************************** Load folders Language ************************************/ 
function via_woocommerce_classement_load_plugin_textdomain() { 
$domain = &#039;woocommerce-classement&#039;; 
$locale = apply_filters( &#039;plugin_locale&#039;, get_locale(), $domain ); 
if ( $loaded = load_textdomain( $domain, trailingslashit( WP_LANG_DIR ) . $domain . &#039;/&#039; . $domain . &#039;-&#039; . $locale . &#039;.mo&#039; ) ) { 
  return $loaded; 
} 
else { 
  load_plugin_textdomain( $domain, FALSE, basename( dirname( __FILE__ ) ) . &#039;/languages/&#039; ); } 
} 
add_action( &#039;init&#039;, &#039;via_woocommerce_classement_load_plugin_textdomain&#039; );</pre></div></div></div></div></div>
</div><p>The post <a href="https://themespress.ca/en/configuring-language-files-wordpress-plugin/">Configuring Language Files in a WordPress Plugin</a> first appeared on <a href="https://themespress.ca/en/">ThemesPress</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://themespress.ca/en/configuring-language-files-wordpress-plugin/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
