Plugin Directory

Changeset 2478216


Ignore:
Timestamp:
02/20/2021 08:12:05 PM (5 years ago)
Author:
webmarcello
Message:

fisual bugs vixed

Location:
news-search-engine/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • news-search-engine/trunk/includes/formElement.php

    r2280035 r2478216  
    22
    33if ( !function_exists( 'news_search_engine_country' ) ) {
    4     function news_search_engine_country($country){?>
     4    function news_search_engine_country($country = ''){?>
    55
    66    <select name="news-search-engine-country" data-placeholder="Choose a Country">
     
    7676
    7777if ( !function_exists( 'news_search_engine_language' ) ) {
    78     function news_search_engine_language($language){
     78    function news_search_engine_language($language = ''){
    7979?>
    8080    <select name="news-search-engine-language" data-placeholder="Choose a Language">
     
    100100
    101101if ( !function_exists( 'news_search_engine_category' ) ) {
    102     function news_search_engine_category($category){
     102    function news_search_engine_category($category = ''){
    103103?>
    104104    <select name="news-search-engine-category" data-placeholder="Choose a Category">
     
    117117
    118118if ( !function_exists( 'news_search_engine_sort_by' ) ) {
    119     function news_search_engine_sort_by($sortBy){
     119    function news_search_engine_sort_by($sortBy = ''){
    120120?>
    121121    <select name="news-search-engine-sort-by" data-placeholder="Sort By">
  • news-search-engine/trunk/news-search-engine.php

    r2447515 r2478216  
    44 * Plugin URI:        https://github.com/webmarcello8080/news-search-engine
    55 * Description:       News Search Engine is a Wordpress plugin that create a new section on the Wordpress Dashboard and it gives the possibility to search news through Google news API.
    6  * Version:           1.0.2
     6 * Version:           1.0.3
    77 * Requires at least: 4.5.13
    88 * Requires PHP:      7.0
  • news-search-engine/trunk/readme.txt

    r2447515 r2478216  
    8080== Changelog ==
    8181
     82= 1.0.3 =
     83* fisual bugs vixed
     84
    8285= 1.0.2 =
    8386* cleaning code and speeding up Ajax calls
  • news-search-engine/trunk/views/admin-form.php

    r2302481 r2478216  
    11<?php
    22
    3     if( current_user_can( 'edit_users' ) ){
     3if( current_user_can( 'edit_users' ) ){
    44    ?>
    55    <div class="wrap">
     
    1717                            <td class="news-search-engine-type" colspan="3">
    1818                                <lable>
    19                                 <input type="radio" name="news-search-engine-type" value="sources" <?= sanitize_text_field($_POST['news-search-engine-type']) == 'sources' ? ' checked' : ''; ?> /> <b>Sources</b>
     19                                <input type="radio" name="news-search-engine-type" value="sources" <?= $_POST ? sanitize_text_field($_POST['news-search-engine-type']) == 'sources' ? ' checked' : '' : ''; ?> /> <b>Sources</b>
    2020                                <p class="description">This endpoint returns the subset of news publishers that top headlines are available from.</p>
    2121                                </lable>
    2222                                <lable>
    23                                 <input type="radio" name="news-search-engine-type" value="everything" <?= sanitize_text_field($_POST['news-search-engine-type']) == 'everything' ? ' checked' : ''; ?> /> <b>Everything</b>
     23                                <input type="radio" name="news-search-engine-type" value="everything" <?= $_POST ? sanitize_text_field($_POST['news-search-engine-type']) == 'everything' ? ' checked' : '' : ''; ?> /> <b>Everything</b>
    2424                                <p class="description">Search through articles.</p>
    2525                                </lable>
    2626                                <lable>
    27                                 <input type="radio" name="news-search-engine-type" value="topHeadlines" <?= sanitize_text_field($_POST['news-search-engine-type']) == 'topHeadlines' ? ' checked' : ''; ?> /> <b>Top Headlines</b>
     27                                <input type="radio" name="news-search-engine-type" value="topHeadlines" <?= $_POST ? sanitize_text_field($_POST['news-search-engine-type']) == 'topHeadlines' ? ' checked' : '' : ''; ?> /> <b>Top Headlines</b>
    2828                                <p class="description">This endpoint provides live top and breaking headlines.</p>
    2929                                </lable>
     
    3737                            </th>
    3838                            <td class="sources topHeadlines">
    39                                 <?= news_search_engine_category(esc_html( $_POST['news-search-engine-category'] )); ?>
     39                                <?= news_search_engine_category($_POST ? esc_html( $_POST['news-search-engine-category'] ) : ''); ?>
    4040                                <p class="description">Find sources that display news of this category.</p>
    4141                            </td>
     
    4646                            </th>
    4747                            <td class="everything">
    48                                 <?= news_search_engine_sort_by(esc_html( $_POST['news-search-engine-sort-by'] )); ?>
     48                                <?= news_search_engine_sort_by( $_POST ? esc_html( $_POST['news-search-engine-sort-by'] ) : ''); ?>
    4949                                <p class="description">The order to sort the articles in.</p>
    5050                            </td>
     
    5757                            </th>
    5858                            <td class="sources topHeadlines everything">
    59                                 <?= news_search_engine_language(esc_html( $_POST['news-search-engine-language'] )); ?>
     59                                <?= news_search_engine_language( $_POST ? esc_html( $_POST['news-search-engine-language'] ) : ''); ?>
    6060                                <p class="description">Find sources that display news in a specific language.</p>
    6161                            </td>
     
    6666                            </th>
    6767                            <td class="sources topHeadlines">
    68                                 <?= news_search_engine_country(esc_html( $_POST['news-search-engine-country'] )); ?>
     68                                <?= news_search_engine_country( $_POST ? esc_html( $_POST['news-search-engine-country'] ) : ''); ?>
    6969                                <p class="description">Note: you can't mix this param with the sources param.</p>
    7070                            </td>
     
    7777                            </th>
    7878                            <td class="topHeadlines everything">
    79                                 <input type="text" name="news-search-engine-q" value="<?= esc_html($_POST['news-search-engine-q']) ?>" />
     79                                <input type="text" name="news-search-engine-q" value="<?= $_POST ?  esc_html($_POST['news-search-engine-q']) : '' ?>" />
    8080                                <p class="description">Keywords or a phrase to search for.</p>
    8181                            </td>
     
    8686                            </th>
    8787                            <td class="everything">
    88                                 <input type="text" name="news-search-engine-qIn-title" value="<?= esc_html($_POST['news-search-engine-qIn-title']) ?>" />
     88                                <input type="text" name="news-search-engine-qIn-title" value="<?= $_POST ?  esc_html($_POST['news-search-engine-qIn-title']) : '' ?>" />
    8989                                <p class="description">Keywords or phrases to search for in the article title only.</p>
    9090                            </td>
     
    9797                            </th>
    9898                            <td class="everything">
    99                                 <input type="date" name="news-search-engine-from" value="<?= esc_html($_POST['news-search-engine-from']) ?>" />
     99                                <input type="date" name="news-search-engine-from" value="<?= $_POST ?  esc_html($_POST['news-search-engine-from']) : '' ?>" />
    100100                                <p class="description">A date and optional time for the oldest article allowed.</p>
    101101                            </td>
     
    106106                            </th>
    107107                            <td class="everything">
    108                                 <input type="date" name="news-search-engine-to" value="<?= esc_html($_POST['news-search-engine-to']) ?>" />
     108                                <input type="date" name="news-search-engine-to" value="<?= $_POST ?  esc_html($_POST['news-search-engine-to']) : '' ?>" />
    109109                                <p class="description">A date and optional time for the newest article allowed.</p>
    110110                            </td>
     
    118118                            </th>
    119119                            <td class="topHeadlines everything">
    120                                 <input type="text" name="news-search-engine-sources" value="<?= esc_html($_POST['news-search-engine-sources']) ?>" autocomplete="off" />
     120                                <input type="text" name="news-search-engine-sources" value="<?= $_POST ?  esc_html($_POST['news-search-engine-sources']) : '' ?>" autocomplete="off" />
    121121                                <div id="source-suggesstion-box"></div>
    122122                                <p class="description">A comma-seperated string of identifiers for the news sources or blogs you want headlines from.</p>
     
    128128                            </th>
    129129                            <td class="everything">
    130                                 <input type="text" name="news-search-engine-domains" value="<?= esc_html($_POST['news-search-engine-domains']) ?>" autocomplete="off" />
     130                                <input type="text" name="news-search-engine-domains" value="<?= $_POST ?  esc_html($_POST['news-search-engine-domains']) : '' ?>" autocomplete="off" />
    131131                                <div id="domain-suggesstion-box"></div>
    132132                                <p class="description">A comma-seperated string of domains (eg bbc.co.uk, techcrunch.com, engadget.com) to restrict the search to.</p>
Note: See TracChangeset for help on using the changeset viewer.