Plugin Directory

Changeset 1684652


Ignore:
Timestamp:
06/24/2017 09:23:14 AM (9 years ago)
Author:
Pigrecolab
Message:

Change README.txt, added the text domain for translation

Location:
primary-category/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • primary-category/trunk/README.txt

    r1669453 r1684652  
    1414== Description ==
    1515
    16 This plugin adds radiobuttons near every category (even if you add a new category) so you can choose the primary category of your post **. Selecting a primary category and updating the post saves this data into a custom field with a meta key of “primary_category”.
     16This plugin adds radiobuttons near every category (even if you add a new category) so you can choose the primary category of your post **. Selecting a primary category and updating the post saves this data into a custom field with a meta key of "primary_category".
    1717
    18 To display a list of all posts with a particular primary category, use the shortcode [primary-category name=”CATEGORY NAME” post_type=”POST TYPE”] where CATEGORY NAME is the name of the primary category you wish to display and POST TYPE is the custom post type name. If a name is not specified, the shortcode will default to all posts with “uncategorized” set as the primary category. images or post.
     18To display a list of all posts with a particular primary category, use the shortcode [primary-category name="CATEGORY NAME" post_type="POST TYPE"] where CATEGORY NAME is the name of the primary category you wish to display and POST TYPE is the custom post type name. If a name is not specified, the shortcode will default to all posts with "uncategorized" set as the primary category. images or post.
    1919   
    2020== Installation ==
     
    2222
    23231. Upload the plugin files to the `/wp-content/plugins/` directory, or install the plugin through the WordPress plugins screen directly.
    24 2. Activate the plugin through the 'Plugins' screen in WordPress
     242. Activate the plugin through the `Plugins` screen in WordPress
    25253. See the categories tab in your post or custom post edit page. Set the radiobutton near your preferred category.
    2626
     
    3030 = How can I access the primary category data? =
    3131
    32 A post’s primary category is stored in the post meta under the key ‘primary_category’.
     32A post's primary category is stored in the post meta under the key 'primary_category'.
    3333
    3434 = What shortcode can I use to display posts with a particular primary category? =
    3535
    36 [primary-category name=”CATEGORY NAME” post_type=”POST TYPE”]
     36`[primary-category name="CATEGORY NAME" post_type="POST TYPE"]`
    3737
    3838== Screenshots ==
  • primary-category/trunk/classes/pri-cat-box.php

    r1669453 r1684652  
    7373                    }
    7474                });';
     75                $msg=sprintf('<br>%s<strong>%s</strong><br>',__('Please, use the radio button for ','primary-category'), __('primary category','primary-category'));
    7576
    76                 $html .= '$("#'.$taxonomy_name.'-adder a").before(\'<br>Please, use the radio button for <strong>primary category</strong><br>\')';
     77                $html .= '$("#'.$taxonomy_name.'-adder a").before(\''.$msg.'\')';
    7778
    7879        $html .= '});</script>';
  • primary-category/trunk/classes/pri-cat-shortcode.php

    r1669453 r1684652  
    6161        } else {
    6262           
    63             $ret .= "Sorry, there are no posts or custom posts with that primary category.";
     63            $ret .= __("Sorry, there are no posts or custom posts with that primary category.",'primary-category');
    6464           
    6565        }
  • primary-category/trunk/primary-category.php

    r1669453 r1684652  
    55 * Plugin URI: http://www.roberto-bruno.me
    66 * Author: Roberto Bruno
    7  * Version: 1.0.0
     7 * Version: 1.0.1
    88 * Author URI: http://www.roberto-bruno.me
     9 * Text Domain: primary-category
    910 * License: GPL2
    1011 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
Note: See TracChangeset for help on using the changeset viewer.