Plugin Directory

Changeset 3426187


Ignore:
Timestamp:
12/23/2025 12:27:23 PM (13 days ago)
Author:
devsoftbaltic
Message:

https://github.com/surveyjs/surveyjs-wordpress/pull/83

Location:
surveyjs/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • surveyjs/trunk/initializer.php

    r3417998 r3426187  
    2222        add_action('admin_enqueue_scripts', array($this, 'enqueue_admin_scripts'));
    2323
    24         add_action('init', array($this, 'register_sjs_gutenberg_block'));
    25     }
    26 
    27     public function register_sjs_gutenberg_block() {
     24        add_action('init', array($this, 'register_surveyjs_gutenberg_block'));
     25    }
     26
     27    public function register_surveyjs_gutenberg_block() {
    2828        if ( ! function_exists( 'register_block_type' ) ) {
    2929            return;
     
    3131
    3232        $blockname = 'sjs/gutenberg-block';
    33         $blockscriptname = 'sjs-block-js';
     33        $blockscriptname = 'surveyjs-block-js';
    3434
    3535        $client = new SurveyJS_Client();
     
    7676    public function enqueue_admin_scripts() {
    7777        if ( isset( $_GET["page"] ) &&
    78             ($_GET["page"] == "sjs-settings" ||
    79             $_GET['page'] == "sjs-main-menu" ||
     78            ($_GET["page"] == "surveyjs-settings" ||
     79            $_GET['page'] == "surveyjs-main-menu" ||
    8080            $_GET['page'] == "surveyjs_editor" ||
    8181            $_GET['page'] == "surveyjs_results")
     
    136136 
    137137    function wps_add_menu() {
    138         add_menu_page( 'My surveys', 'SurveyJS', 'manage_options', 'sjs-main-menu', array(
     138        add_menu_page( 'My surveys', 'SurveyJS', 'manage_options', 'surveyjs-main-menu', array(
    139139                        "SurveyJS_MySurveys", 'render'
    140140                        ), plugins_url('images/logo_20х20.png', __FILE__));
    141         // add_submenu_page( 'sjs-main-menu', __( 'My Surveys', 'sjs-main-menu' ), __( 'My Surveys', 'sjs-main-menu' ), 'manage_options', 'sjs-my-surveys', array(
     141        // add_submenu_page( 'surveyjs-main-menu', __( 'My Surveys', 'surveyjs-main-menu' ), __( 'My Surveys', 'surveyjs-main-menu' ), 'manage_options', 'sjs-my-surveys', array(
    142142        //                 __CLASS__, 'wps_mysurveys_page'
    143143        //                 ));
    144         add_submenu_page( 'sjs-main-menu', __( 'Settings', 'sjs-main-menu' ), __( 'Settings', 'sjs-main-menu' ), 'manage_options', 'sjs-settings', array( 'SurveyJS_SettingsPage', 'sjs_render_settings' ) );
     144        add_submenu_page( 'surveyjs-main-menu', __( 'Settings', 'surveyjs-main-menu' ), __( 'Settings', 'surveyjs-main-menu' ), 'manage_options', 'surveyjs-settings', array( 'SurveyJS_SettingsPage', 'surveyjs_render_settings' ) );
    145145        add_submenu_page('', '', '', 'manage_options', 'surveyjs_editor', array('SurveyJS_Editor', 'render'));
    146146        add_submenu_page('', '', '', 'manage_options', 'surveyjs_results', array('SurveyJS_Results', 'render'));
  • surveyjs/trunk/readme.txt

    r3417998 r3426187  
    22Contributors: devsoftbaltic
    33Tags: survey, quiz, form builder, survey creator, survey maker, quiz creator
    4 Requires at least: 6.4.1
    5 Tested up to: 6.8.1
     4Requires at least: 6.4
     5Tested up to: 6.9
    66Stable tag: trunk
    7 Requires PHP: php8.2
     7Requires PHP: 8.2
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    8282
    8383
    84 = v2.4.0 =
     84= v2.4.1 =
    8585
    8686== Support ==
  • surveyjs/trunk/surveyjs.php

    r3417998 r3426187  
    44Plugin URI: https://wordpress.org/plugins/surveyjs
    55Description: Easy to use, drag & drop Survey Builder with myriad options.
    6 Version: 2.4.0
     6Version: 2.4.1
    77Author: Devsoft Baltic OÜ
    88Author URI: http://devsoftbaltic.com/
  • surveyjs/trunk/views/editor.php

    r3417998 r3426187  
    7575                <div class="survey-page-header">
    7676                    <div class="sv_main survey-page-header-content">
    77                         <button style="min-width: 80px;color: white;background-color: #1ab394;border: none;padding: 6px;border-radius: 5px;margin-top: 10px;" onclick="window.location = '/wp-admin/admin.php?page=sjs-main-menu'">&lt&nbspBack</button>
     77                        <button style="min-width: 80px;color: white;background-color: #1ab394;border: none;padding: 6px;border-radius: 5px;margin-top: 10px;" onclick="window.location = '/wp-admin/admin.php?page=surveyjs-main-menu'">&lt&nbspBack</button>
    7878                    </div>
    7979                </div>
  • surveyjs/trunk/views/results.php

    r3403869 r3426187  
    2727                <div class="survey-page-header">
    2828                    <div class="sv_main survey-page-header-content">
    29                         <button style="min-width: 80px;color: white;background-color: #1ab394;border: none;padding: 6px;border-radius: 5px;margin-top: 10px;" onclick="window.location = '/wp-admin/admin.php?page=sjs-main-menu'">&lt&nbspBack</button>
     29                        <button style="min-width: 80px;color: white;background-color: #1ab394;border: none;padding: 6px;border-radius: 5px;margin-top: 10px;" onclick="window.location = '/wp-admin/admin.php?page=surveyjs-main-menu'">&lt&nbspBack</button>
    3030                    </div>
    3131                </div>
  • surveyjs/trunk/views/settings.php

    r3059576 r3426187  
    1313
    1414    public static function get_license_key() {
    15         $settings = (array) get_option( 'sjs-settings' );
     15        $settings = (array) get_option( 'surveyjs-settings' );
    1616        if ( isset( $settings['license_key'] ) ) {
    1717            return esc_js( $settings['license_key'] );
     
    2121
    2222    public function init() {
    23         register_setting( 'sjs-settings-group', 'sjs-settings' );
     23        register_setting( 'surveyjs-settings-group', 'surveyjs-settings' );
    2424
    25         add_settings_section( 'sjs-license-key-section', __( 'Set License Key', 'sjs' ), array($this, 'sjs_license_key_section'), 'sjs-settings-page' );
    26         add_settings_field( 'license_key', __( 'License Key', 'sjs' ), array($this, 'set_license_key_render'), 'sjs-settings-page', 'sjs-license-key-section' );
     25        add_settings_section( 'sjs-license-key-section', __( 'Set License Key', 'sjs' ), array($this, 'sjs_license_key_section'), 'surveyjs-settings-page' );
     26        add_settings_field( 'license_key', __( 'License Key', 'sjs' ), array($this, 'set_license_key_render'), 'surveyjs-settings-page', 'sjs-license-key-section' );
    2727    }
    2828
     
    3636
    3737    public function set_license_key_render() {
    38         $settings = (array) get_option( 'sjs-settings' );
     38        $settings = (array) get_option( 'surveyjs-settings' );
    3939
    4040        if (isset($settings['license_key']))
     
    4545        if ($license_key )
    4646        {
    47             echo "<input type='text' placeholder='put the license key here...' name='sjs-settings[license_key]' id='sjs-settings[license_key]' value='$license_key' style='width: 350px;'/>";
     47            echo "<input type='text' placeholder='put the license key here...' name='surveyjs-settings[license_key]' id='surveyjs-settings[license_key]' value='$license_key' style='width: 350px;'/>";
    4848        } else {
    49             echo "<input type='text' placeholder='put the license key here...' name='sjs-settings[license_key]' id='sjs-settings[license_key]' style='width: 350px;'/>";
     49            echo "<input type='text' placeholder='put the license key here...' name='surveyjs-settings[license_key]' id='surveyjs-settings[license_key]' style='width: 350px;'/>";
    5050        }
    5151    }
    5252
    53     public static function sjs_render_settings() {
     53    public static function surveyjs_render_settings() {
    5454        ?>
    5555        <div class="wrap">
    5656            <h2><?php _e( 'SurveyJS Settings', 'sjs' ); ?></h2>
    5757            <form action="options.php" method="POST">
    58                 <?php settings_fields( 'sjs-settings-group' ); ?>
    59                 <?php do_settings_sections( 'sjs-settings-page' ); ?>
     58                <?php settings_fields( 'surveyjs-settings-group' ); ?>
     59                <?php do_settings_sections( 'surveyjs-settings-page' ); ?>
    6060                <?php submit_button(); ?>
    6161            </form>
Note: See TracChangeset for help on using the changeset viewer.