class Akismet_REST_API {
/**
* Register the REST API routes.
*/
public static function init() {
if ( ! function_exists( 'register_rest_route' ) ) {
// The REST API wasn't integrated into core until 4.4, and we support 4.0+ (for now).
return false;
}
register_rest_route( 'akismet/v1', '/key', array(
array(
'methods' => WP_REST_Server::READABLE,
'permission_callback' => array( 'Akismet_REST_API', 'privileged_permission_callback' ),
'callback' => array( 'Akismet_REST_API', 'get_key' ),
), array(
'methods' => WP_REST_Server::EDITABLE,
'permission_callback' => array( 'Akismet_REST_API', 'privileged_permission_callback' ),
'callback' => array( 'Akismet_REST_API', 'set_key' ),
'args' => array(
'key' => array(
'required' => true,
'type' => 'string',
'sanitize_callback' => array( 'Akismet_REST_API', 'sanitize_key' ),
'description' => __( 'A 12-character Akismet API key. Available at akismet.com/get/', 'akismet' ),
),
),
), array(
'methods' => WP_REST_Server::DELETABLE,
'permission_callback' => array( 'Akismet_REST_API', 'privileged_permission_callback' ),
'callback' => array( 'Akismet_REST_API', 'delete_key' ),
)
) );
register_rest_route( 'akismet/v1', '/settings/', array(
array(
'methods' => WP_REST_Server::READABLE,
'permission_callback' => array( 'Akismet_REST_API', 'privileged_permission_callback' ),
'callback' => array( 'Akismet_REST_API', 'get_settings' ),
),
array(
'methods' => WP_REST_Server::EDITABLE,
'permission_callback' => array( 'Akismet_REST_API', 'privileged_permission_callback' ),
'callback' => array( 'Akismet_REST_API', 'set_boolean_settings' ),
'args' => array(
'akismet_strictness' => array(
'required' => false,
'type' => 'boolean',
'description' => __( 'If true, Akismet will automatically discard the worst spam automatically rather than putting it in the spam folder.', 'akismet' ),
),
'akismet_show_user_comments_approved' => array(
'required' => false,
'type' => 'boolean',
'description' => __( 'If true, show the number of approved comments beside each comment author in the comments list page.', 'akismet' ),
),
),
)
) );
register_rest_route( 'akismet/v1', '/stats', array(
'methods' => WP_REST_Server::READABLE,
'permission_callback' => array( 'Akismet_REST_API', 'privileged_permission_callback' ),
'callback' => array( 'Akismet_REST_API', 'get_stats' ),
'args' => array(
'interval' => array(
'required' => false,
'type' => 'string',
'sanitize_callback' => array( 'Akismet_REST_API', 'sanitize_interval' ),
'description' => __( 'The time period for which to retrieve stats. Options: 60-days, 6-months, all', 'akismet' ),
'default' => 'all',
),
),
) );
register_rest_route( 'akismet/v1', '/stats/(?P
Cela ne peut être annulé !',
'confirmRepl' : 'Remplacer l\'ancien fichier par le nouveau ?',
'confirmRest' : 'Remplacer l\'élément existant par l\'élément de la corbeille ?', // fromv2.1.24 added 5.5.2017
'confirmConvUTF8' : 'L\'encodage n\'est pas UTf-8
Convertir en UTF-8 ?
Les contenus deviendront UTF-8 en sauvegardant après la conversion.', // from v2.1 added 08.04.2014
'confirmNonUTF8' : 'Impossible de détecter l\'encodage de ce fichier. Pour être modifié, il doit être temporairement convertit en UTF-8.
Veuillez s\'il vous plaît sélectionner un encodage pour ce fichier.', // from v2.1.19 added 28.11.2016
'confirmNotSave' : 'Ce fichier a été modifié.
Les données seront perdues si les changements ne sont pas sauvegardés.', // from v2.1 added 15.7.2015
'confirmTrash' : 'Êtes-vous certain de vouloir déplacer les éléments vers la corbeille?', //from v2.1.24 added 29.4.2017
'confirmMove' : 'Etes-vous sûr de vouloir déplacer ces éléments vers "$1"?', //from v2.1.50 added 27.7.2019
'apllyAll' : 'Appliquer à tous',
'name' : 'Nom',
'size' : 'Taille',
'perms' : 'Permissions',
'modify' : 'Modifié',
'kind' : 'Type',
'read' : 'Lecture',
'write' : 'Écriture',
'noaccess' : 'Pas d\'accès',
'and' : 'et',
'unknown' : 'inconnu',
'selectall' : 'Sélectionner tous les éléments',
'selectfiles' : 'Sélectionner le(s) élément(s)',
'selectffile' : 'Sélectionner le premier élément',
'selectlfile' : 'Sélectionner le dernier élément',
'viewlist' : 'Vue par liste',
'viewicons' : 'Vue par icônes',
'viewSmall' : 'Petites icônes', // from v2.1.39 added 22.5.2018
'viewMedium' : 'Moyennes icônes', // from v2.1.39 added 22.5.2018
'viewLarge' : 'Grandes icônes', // from v2.1.39 added 22.5.2018
'viewExtraLarge' : 'Très grandes icônes', // from v2.1.39 added 22.5.2018
'places' : 'Favoris',
'calc' : 'Calculer',
'path' : 'Chemin',
'aliasfor' : 'Raccourcis pour',
'locked' : 'Verrouiller',
'dim' : 'Dimensions',
'files' : 'Fichiers',
'folders' : 'Dossiers',
'items' : 'Éléments',
'yes' : 'oui',
'no' : 'non',
'link' : 'Lien',
'searcresult' : 'Résultats de la recherche',
'selected' : 'Éléments sélectionnés',
'about' : 'À propos',
'shortcuts' : 'Raccourcis',
'help' : 'Aide',
'webfm' : 'Gestionnaire de fichier Web',
'ver' : 'Version',
'protocolver' : 'Version du protocole',
'homepage' : 'Page du projet',
'docs' : 'Documentation',
'github' : 'Forkez-nous sur Github',
'twitter' : 'Suivez nous sur Twitter',
'facebook' : 'Joignez-nous sur Facebook',
'team' : 'Équipe',
'chiefdev' : 'Développeur en chef',
'developer' : 'Développeur',
'contributor' : 'Contributeur',
'maintainer' : 'Mainteneur',
'translator' : 'Traducteur',
'icons' : 'Icônes',
'dontforget' : 'et n\'oubliez pas votre serviette',
'shortcutsof' : 'Raccourcis désactivés',
'dropFiles' : 'Déposez les fichiers ici',
'or' : 'ou',
'selectForUpload' : 'Sélectionner les fichiers à envoyer',
'moveFiles' : 'Déplacer les éléments',
'copyFiles' : 'Copier les éléments',
'restoreFiles' : 'Restaurer les éléments', // from v2.1.24 added 5.5.2017
'rmFromPlaces' : 'Retirer des favoris',
'aspectRatio' : 'Ratio d’affichage',
'scale' : 'Mise à l\'échelle',
'width' : 'Largeur',
'height' : 'Hauteur',
'resize' : 'Redimensionner',
'crop' : 'Recadrer',
'rotate' : 'Rotation',
'rotate-cw' : 'Rotation de 90 degrés horaire',
'rotate-ccw' : 'Rotation de 90 degrés antihoraire',
'degree' : '°',
'netMountDialogTitle' : 'Monter un volume réseau', // added 18.04.2012
'protocol' : 'Protocole', // added 18.04.2012
'host' : 'Hôte', // added 18.04.2012
'port' : 'Port', // added 18.04.2012
'user' : 'Utilisateur', // added 18.04.2012
'pass' : 'Mot de passe', // added 18.04.2012
'confirmUnmount' : 'Démonter $1?', // from v2.1 added 30.04.2012
'dropFilesBrowser': 'Glissez-déposez depuis le navigateur de fichier', // from v2.1 added 30.05.2012
'dropPasteFiles' : 'Glissez-déposez les fichiers ici', // from v2.1 added 07.04.2014
'encoding' : 'Encodage', // from v2.1 added 19.12.2014
'locale' : 'Encodage régional', // from v2.1 added 19.12.2014
'searchTarget' : 'Destination: $1', // from v2.1 added 22.5.2015
'searchMime' : 'Recherche par type MIME', // from v2.1 added 22.5.2015
'owner' : 'Propriétaire', // from v2.1 added 20.6.2015
'group' : 'Groupe', // from v2.1 added 20.6.2015
'other' : 'Autre', // from v2.1 added 20.6.2015
'execute' : 'Exécuter', // from v2.1 added 20.6.2015
'perm' : 'Permission', // from v2.1 added 20.6.2015
'mode' : 'Mode', // from v2.1 added 20.6.2015
'emptyFolder' : 'Le dossier est vide', // from v2.1.6 added 30.12.2015
'emptyFolderDrop' : 'Le dossier est vide.\\ Glissez-déposez pour ajouter des éléments.', // from v2.1.6 added 30.12.2015
'emptyFolderLTap' : 'Le dossier est vide.\\ Appuyez longuement pour ajouter des éléments.', // from v2.1.6 added 30.12.2015
'quality' : 'Qualité', // from v2.1.6 added 5.1.2016
'autoSync' : 'Synchronisation automatique', // from v2.1.6 added 10.1.2016
'moveUp' : 'Déplacer vers le haut', // from v2.1.6 added 18.1.2016
'getLink' : 'Obtenir le lien d’URL', // from v2.1.7 added 9.2.2016
'selectedItems' : 'Éléments sélectionnés ($1)', // from v2.1.7 added 2.19.2016
'folderId' : 'ID du dossier', // from v2.1.10 added 3.25.2016
'offlineAccess' : 'Permettre l\'accès hors-ligne', // from v2.1.10 added 3.25.2016
'reAuth' : 'Pour se réauthentifier', // from v2.1.10 added 3.25.2016
'nowLoading' : 'En cours de chargement...', // from v2.1.12 added 4.26.2016
'openMulti' : 'Ouvrir multiples fichiers', // from v2.1.12 added 5.14.2016
'openMultiConfirm': 'Vous allez ouvrir $1 fichiers. Êtes-vous sûr de vouloir les ouvrir dans le navigateur ?', // from v2.1.12 added 5.14.2016
'emptySearch' : 'Aucun résultat trouvé avec les paramètres de recherche.', // from v2.1.12 added 5.16.2016
'editingFile' : 'Modification d\'un fichier.', // from v2.1.13 added 6.3.2016
'hasSelected' : 'Vous avez sélectionné $1 éléments.', // from v2.1.13 added 6.3.2016
'hasClipboard' : 'Vous avez $1 éléments dans le presse-papier.', // from v2.1.13 added 6.3.2016
'incSearchOnly' : 'Recherche incrémentale disponible uniquement pour la vue active.', // from v2.1.13 added 6.30.2016
'reinstate' : 'Rétablir', // from v2.1.15 added 3.8.2016
'complete' : '$1 complété', // from v2.1.15 added 21.8.2016
'contextmenu' : 'Menu contextuel', // from v2.1.15 added 9.9.2016
'pageTurning' : 'Tourner la page', // from v2.1.15 added 10.9.2016
'volumeRoots' : 'Volumes principaux', // from v2.1.16 added 16.9.2016
'reset' : 'Réinitialiser', // from v2.1.16 added 1.10.2016
'bgcolor' : 'Couleur de fond', // from v2.1.16 added 1.10.2016
'colorPicker' : 'Sélecteur de couleur', // from v2.1.16 added 1.10.2016
'8pxgrid' : 'Grille 8px', // from v2.1.16 added 4.10.2016
'enabled' : 'Actif', // from v2.1.16 added 4.10.2016
'disabled' : 'Inactif', // from v2.1.16 added 4.10.2016
'emptyIncSearch' : 'Aucun résultat trouvé.\\Appuyez sur [Entrée] pour développer la cible de recherche.', // from v2.1.16 added 5.10.2016
'emptyLetSearch' : 'Aucun résultat trouvé pour la recherche par première lettre.', // from v2.1.23 added 24.3.2017
'textLabel' : 'Label texte', // from v2.1.17 added 13.10.2016
'minsLeft' : '$1 mins restantes', // from v2.1.17 added 13.11.2016
'openAsEncoding' : 'Réouvrir avec l\'encodage sélectionné', // from v2.1.19 added 2.12.2016
'saveAsEncoding' : 'Sauvegarder avec l\'encodage sélectionné', // from v2.1.19 added 2.12.2016
'selectFolder' : 'Choisir le dossier', // from v2.1.20 added 13.12.2016
'firstLetterSearch': 'Recherche par première lettre', // from v2.1.23 added 24.3.2017
'presets' : 'Présélections', // from v2.1.25 added 26.5.2017
'tooManyToTrash' : 'Impossible de mettre autant d\'éléments à la corbeille.', // from v2.1.25 added 9.6.2017
'TextArea' : 'Zone de texte', // from v2.1.25 added 14.6.2017
'folderToEmpty' : 'Vider le dossier "$1".', // from v2.1.25 added 22.6.2017
'filderIsEmpty' : 'Il n\'y a pas d\'élément dans le dossier "$1".', // from v2.1.25 added 22.6.2017
'preference' : 'Préférences', // from v2.1.26 added 28.6.2017
'language' : 'Configuration de langue', // from v2.1.26 added 28.6.2017
'clearBrowserData': 'Initialisation des configurations sauvegardées dans ce navigateur', // from v2.1.26 added 28.6.2017
'toolbarPref' : 'Paramètres de la barre d\'outils', // from v2.1.27 added 2.8.2017
'charsLeft' : '... $1 caractère(s) restant(s).', // from v2.1.29 added 30.8.2017
'linesLeft' : '... $1 ligne(s) restante(s).', // from v2.1.52 added 16.1.2020
'sum' : 'Somme', // from v2.1.29 added 28.9.2017
'roughFileSize' : 'Taille de fichier brute', // from v2.1.30 added 2.11.2017
'autoFocusDialog' : 'Concentrez-vous sur l\'élément de dialogue avec le survol de la souris', // from v2.1.30 added 2.11.2017
'select' : 'Sélectionner', // from v2.1.30 added 23.11.2017
'selectAction' : 'Action lors de la sélection d\'un fichier', // from v2.1.30 added 23.11.2017
'useStoredEditor' : 'Ouvrir avec le dernier éditeur utilisé', // from v2.1.30 added 23.11.2017
'selectinvert' : 'Inverser la sélection', // from v2.1.30 added 25.11.2017
'renameMultiple' : 'Êtes-vous sûr de vouloir renommer les éléments sélectionnés $1 en $2 ?
L\'action est définitive !', // from v2.1.31 added 4.12.2017
'batchRename' : 'Renommer le Batch', // from v2.1.31 added 8.12.2017
'plusNumber' : '+ Nombre', // from v2.1.31 added 8.12.2017
'asPrefix' : 'Ajouter un préfixe', // from v2.1.31 added 8.12.2017
'asSuffix' : 'Ajouter un suffixe', // from v2.1.31 added 8.12.2017
'changeExtention' : 'Modifier l\'extention', // from v2.1.31 added 8.12.2017
'columnPref' : 'Paramètres des colonnes (List view)', // from v2.1.32 added 6.2.2018
'reflectOnImmediate' : 'Les changements seront immédiatement appliqués à l\'archive.', // from v2.1.33 added 2.3.2018
'reflectOnUnmount' : 'Aucun changement ne sera appliqué tant que ce volume n\'a pas été démonté.', // from v2.1.33 added 2.3.2018
'unmountChildren' : 'Le(s) volume(s) suivant(s) montés sur ce volume seront également démontés. Êtes-vous sûr de vouloir le démonter ?', // from v2.1.33 added 5.3.2018
'selectionInfo' : 'Informations sur la sélection', // from v2.1.33 added 7.3.2018
'hashChecker' : 'Algorithme de hachage de fichier', // from v2.1.33 added 10.3.2018
'infoItems' : 'Éléments d\'information (panneau de sélection d\'informations )', // from v2.1.38 added 28.3.2018
'pressAgainToExit': 'Appuyez à nouveau pour quitter.', // from v2.1.38 added 1.4.2018
'toolbar' : 'Barre d\'outils', // from v2.1.38 added 4.4.2018
'workspace' : 'Espace de travail', // from v2.1.38 added 4.4.2018
'dialog' : 'Dialogue', // from v2.1.38 added 4.4.2018
'all' : 'Tout', // from v2.1.38 added 4.4.2018
'iconSize' : 'Dimensions de l\'icône (Aperçu)', // from v2.1.39 added 7.5.2018
'editorMaximized' : 'Ouvrir la fenêtre d\'édition à la taille maximale', // from v2.1.40 added 30.6.2018
'editorConvNoApi' : 'Étant donné que la conversion par API n\'est pas disponible actuellement, veuillez effectuer la conversion sur le site Web.', //from v2.1.40 added 8.7.2018
'editorConvNeedUpload' : 'Après la conversion, vous devez ajouter l\'URL de l\'élément ou un fichier téléchargé pour enregistrer le fichier converti.', //from v2.1.40 added 8.7.2018
'convertOn' : 'Convertir sur le site de $1', // from v2.1.40 added 10.7.2018
'integrations' : 'Intégrations', // from v2.1.40 added 11.7.2018
'integrationWith' : 'Cet elFinder intègre les services externes suivants. Veuillez vérifier les conditions d\'utilisation, la politique de confidentialité, etc. avant de l\'utiliser.', // from v2.1.40 added 11.7.2018
'showHidden' : 'Afficher les élément cachés', // from v2.1.41 added 24.7.2018
'hideHidden' : 'Ne pas afficher les élément cachés', // from v2.1.41 added 24.7.2018
'toggleHidden' : 'Afficher/Cacher les éléments cachés', // from v2.1.41 added 24.7.2018
'makefileTypes' : 'Type de ficher autorisé avec "Nouveau fichier"', // from v2.1.41 added 7.8.2018
'typeOfTextfile' : 'Type du fichier de texte', // from v2.1.41 added 7.8.2018
'add' : 'Ajouter', // from v2.1.41 added 7.8.2018
'theme' : 'Thème', // from v2.1.43 added 19.10.2018
'default' : 'Par Défaut', // from v2.1.43 added 19.10.2018
'description' : 'Description', // from v2.1.43 added 19.10.2018
'website' : 'Site Web', // from v2.1.43 added 19.10.2018
'author' : 'Aauteur', // from v2.1.43 added 19.10.2018
'email' : 'E-mail', // from v2.1.43 added 19.10.2018
'license' : 'License', // from v2.1.43 added 19.10.2018
'exportToSave' : 'Cet élément ne peut être enregistrer. Pour éviter de perdre les modifications, vous devez exporter vers votre ordinateur.', // from v2.1.44 added 1.12.2018
'dblclickToSelect': 'Double-cliquez sur le fichier pour le sélectionner.', // from v2.1.47 added 22.1.2019
'useFullscreen' : 'Utiliser le mode plein écran', // from v2.1.47 added 19.2.2019
/********************************** mimetypes **********************************/
'kindUnknown' : 'Inconnu',
'kindRoot' : 'Volume principal', // from v2.1.16 added 16.10.2016
'kindFolder' : 'Dossier',
'kindSelects' : 'Sélections', // from v2.1.29 added 29.8.2017
'kindAlias' : 'Raccourci',
'kindAliasBroken' : 'Raccourci cassé',
// applications
'kindApp' : 'Application',
'kindPostscript' : 'Document Postscript',
'kindMsOffice' : 'Document Microsoft Office',
'kindMsWord' : 'Document Microsoft Word',
'kindMsExcel' : 'Document Microsoft Excel',
'kindMsPP' : 'Présentation Microsoft PowerPoint',
'kindOO' : 'Document OpenOffice',
'kindAppFlash' : 'Application Flash',
'kindPDF' : 'Format de document portable (PDF)',
'kindTorrent' : 'Fichier BitTorrent',
'kind7z' : 'Archive 7z',
'kindTAR' : 'Archive TAR',
'kindGZIP' : 'Archive GZIP',
'kindBZIP' : 'Archive BZIP',
'kindXZ' : 'Archive XZ',
'kindZIP' : 'Archive ZIP',
'kindRAR' : 'Archive RAR',
'kindJAR' : 'Fichier Java JAR',
'kindTTF' : 'Police True Type',
'kindOTF' : 'Police Open Type',
'kindRPM' : 'Package RPM',
// fonts
'kindFont' : 'Police',
'kindSFNT' : 'Police font',
'kindEOT' : 'Police Embedded Open Type',
'kindWOFF' : 'Police Web Open Font Format',
'kindWOFF2' : 'Police Web Open Font Format 2',
// texts
'kindText' : 'Document Text',
'kindTextPlain' : 'Texte non formaté',
'kindPHP' : 'Source PHP',
'kindCSS' : 'Feuille de style en cascade',
'kindHTML' : 'Document HTML',
'kindJS' : 'Source JavaScript',
'kindRTF' : 'Format de texte enrichi (Rich Text Format)',
'kindC' : 'Source C',
'kindCHeader' : 'Source header C',
'kindCPP' : 'Source C++',
'kindCPPHeader' : 'Source header C++',
'kindShell' : 'Shell script Unix',
'kindPython' : 'Source Python',
'kindJava' : 'Source Java',
'kindRuby' : 'Source Ruby',
'kindPerl' : 'Script Perl',
'kindSQL' : 'Source SQL',
'kindXML' : 'Document XML',
'kindAWK' : 'Source AWK',
'kindCSV' : 'CSV',
'kindDOCBOOK' : 'Document Docbook XML',
'kindMarkdown' : 'Markdown text', // added 20.7.2015
// images
'kindImage' : 'Image',
'kindBMP' : 'Image BMP',
'kindJPEG' : 'Image JPEG',
'kindGIF' : 'Image GIF',
'kindPNG' : 'Image PNG',
'kindTIFF' : 'Image TIFF',
'kindTGA' : 'Image TGA',
'kindPSD' : 'Image Adobe Photoshop',
'kindXBITMAP' : 'Image X bitmap',
'kindPXM' : 'Image Pixelmator',
// media
'kindAudio' : 'Son',
'kindAudioMPEG' : 'Son MPEG',
'kindAudioMPEG4' : 'Son MPEG-4',
'kindAudioMIDI' : 'Son MIDI',
'kindAudioOGG' : 'Son Ogg Vorbis',
'kindAudioWAV' : 'Son WAV',
'AudioPlaylist' : 'Liste de lecture audio',
'kindVideo' : 'Vidéo',
'kindVideoDV' : 'Vidéo DV',
'kindVideoMPEG' : 'Vidéo MPEG',
'kindVideoMPEG4' : 'Vidéo MPEG-4',
'kindVideoAVI' : 'Vidéo AVI',
'kindVideoMOV' : 'Vidéo Quick Time',
'kindVideoWM' : 'Vidéo Windows Media',
'kindVideoFlash' : 'Vidéo Flash',
'kindVideoMKV' : 'Vidéo Matroska',
'kindVideoOGG' : 'Vidéo Ogg'
}
};
}));
/**
* Common functions.
*
* @package Yoast\WP\Duplicate_Post
* @since 2.0
*/
use Yoast\WP\Duplicate_Post\Permissions_Helper;
use Yoast\WP\Duplicate_Post\UI\Link_Builder;
use Yoast\WP\Duplicate_Post\Utils;
/**
* Tests if post type is enabled to be copied.
*
* @param string $post_type The post type to check.
* @return bool
*/
function duplicate_post_is_post_type_enabled( $post_type ) {
$duplicate_post_types_enabled = get_option( 'duplicate_post_types_enabled', [ 'post', 'page' ] );
if ( ! is_array( $duplicate_post_types_enabled ) ) {
$duplicate_post_types_enabled = [ $duplicate_post_types_enabled ];
}
/** This filter is documented in src/permissions-helper.php */
$duplicate_post_types_enabled = apply_filters( 'duplicate_post_enabled_post_types', $duplicate_post_types_enabled );
return in_array( $post_type, $duplicate_post_types_enabled, true );
}
/**
* Template tag to retrieve/display duplicate post link for post.
*
* @param int $id Optional. Post ID.
* @param string $context Optional, default to display. How to write the '&', defaults to '&'.
* @param bool $draft Optional, default to true.
* @return string
*/
function duplicate_post_get_clone_post_link( $id = 0, $context = 'display', $draft = true ) {
$post = get_post( $id );
if ( ! $post ) {
return '';
}
$link_builder = new Link_Builder();
$permissions_helper = new Permissions_Helper();
if ( ! $permissions_helper->should_links_be_displayed( $post ) ) {
return '';
}
if ( $draft ) {
return $link_builder->build_new_draft_link( $post, $context );
}
else {
return $link_builder->build_clone_link( $post, $context );
}
}
/**
* Displays duplicate post link for post.
*
* @param string|null $link Optional. Anchor text.
* @param string $before Optional. Display before edit link.
* @param string $after Optional. Display after edit link.
* @param int $id Optional. Post ID.
*/
function duplicate_post_clone_post_link( $link = null, $before = '', $after = '', $id = 0 ) {
$post = get_post( $id );
if ( ! $post ) {
return;
}
$url = duplicate_post_get_clone_post_link( $post->ID );
if ( ! $url ) {
return;
}
if ( $link === null ) {
$link = __( 'Copy to a new draft', 'duplicate-post' );
}
$link = '' . esc_html( $link ) . '';
/**
* Filter on the clone link HTML.
*
* @param string $link The full HTML tag of the link.
* @param int $ID The ID of the post.
*
* @return string
*/
echo $before . apply_filters( 'duplicate_post_clone_post_link', $link, $post->ID ) . $after; // phpcs:ignore WordPress.Security.EscapeOutput
}
/**
* Gets the original post.
*
* @param int|null $post Optional. Post ID or Post object.
* @param string $output Optional, default is Object. Either OBJECT, ARRAY_A, or ARRAY_N.
* @return mixed Post data.
*/
function duplicate_post_get_original( $post = null, $output = OBJECT ) {
return Utils::get_original( $post, $output );
}
/**
* Contact Form
*
* Displays a customizable contact form
*/
if ( ! defined( 'ABSPATH' ) ) { exit; } // Exit if accessed directly
if ( !class_exists( 'avia_sc_contact' ) )
{
class avia_sc_contact extends aviaShortcodeTemplate
{
/**
* Create the config array for the shortcode button
*/
function shortcode_insert_button()
{
$this->config['self_closing'] = 'no';
$this->config['name'] = __('Contact Form', 'avia_framework' );
$this->config['tab'] = __('Content Elements', 'avia_framework' );
$this->config['icon'] = AviaBuilder::$path['imagesURL']."sc-contact.png";
$this->config['order'] = 43;
$this->config['target'] = 'avia-target-insert';
$this->config['shortcode'] = 'av_contact';
$this->config['shortcode_nested'] = array('av_contact_field');
$this->config['tooltip'] = __('Creates a customizable contact form', 'avia_framework' );
$this->config['preview'] = "large";
$this->config['disabling_allowed'] = true;
$this->config['id_name'] = 'id';
$this->config['id_show'] = 'yes';
$this->config['aria_label'] = 'yes';
$this->config['alb_desc_id'] = 'alb_description';
}
function extra_assets()
{
//load css
wp_enqueue_style( 'avia-module-contact' , AviaBuilder::$path['pluginUrlRoot'].'avia-shortcodes/contact/contact.css' , array('avia-layout'), false );
//load js
wp_enqueue_script( 'avia-module-contact' , AviaBuilder::$path['pluginUrlRoot'].'avia-shortcodes/contact/contact.js' , array('avia-shortcodes'), false, true );
}
/**
* Popup Elements
*
* If this function is defined in a child class the element automatically gets an edit button, that, when pressed
* opens a modal window that allows to edit the element properties
*
* @return void
*/
function popup_elements()
{
$link = '' . __( 'activated here', 'avia_framework' ) . '';
$captcha_desc = __( 'Do you want to display a Captcha field at the end of the form so users must prove they are human?', 'avia_framework' ) . '';
$captcha_desc .= __( 'Either by solving a simply mathematical question or by Google reCaptcha, that needs to be', 'avia_framework' ) . ' ' . $link . '. ';
$captcha_desc .= __( 'In case Google reCAPTCHA is deactivated (maybe later) in theme options, Enfold captcha will be used, if you selected to use V2 then V2 will be used for this contact form (even if you selected V3 in theme options). If you selected V3 here and the score fails or you did not selected V3 in theme options then V2 will be used to check if user is a human.', 'avia_framework' );
$captcha_desc .= '';
$captcha_desc .= __( '(It is recommended to only activate this if you receive spam from your contact form, since an invisible spam protection is also implemented that should filter most spam messages by robots anyway)', 'avia_framework' );
$default_from = parse_url( home_url() );
$default_from = ( ! empty( $default_from['host'] ) ) ? "no-reply@{$default_from['host']}" : 'no-reply@wp-message.com';
$this->elements = apply_filters( 'avf_sc_contact_popup_elements', array(
array(
"type" => "tab_container", 'nodescription' => true
),
array(
"type" => "tab",
"name" => __("Form" , 'avia_framework'),
'nodescription' => true
),
array(
"name" => __("Your email address", 'avia_framework' ),
"desc" => __("Enter one or more Email addresses (separated by comma) where mails should be delivered to.", 'avia_framework' ) ." (".__("Default:", 'avia_framework' ) ." ". get_option('admin_email').")",
"id" => "email",
'container_class' =>"avia-element-fullwidth",
"std" => get_option('admin_email'),
"type" => "input"),
array(
'name' => __( 'Your from address', 'avia_framework' ),
'desc' => sprintf( __( 'Enter your from address for the form - if left blank it will default to user email or %s', 'avia_framework' ), $default_from ),
'id' => 'from_email',
'std' => '',
'type' => 'input'
),
array(
"name" => __("Form Title", 'avia_framework' ),
"desc" => __("Enter a form title that is displayed above the form", 'avia_framework' ),
"id" => "title",
"std" => __("Send us mail", 'avia_framework' ),
"type" => "input"),
array(
'type' => 'template',
'template_id' => 'heading_tag',
'theme_default' => 'h3',
'context' => __CLASS__
),
array(
"name" => __("Add/Edit Contact Form Elements", 'avia_framework' ),
"desc" => __("Here you can add, remove and edit the form Elements of your contact form.", 'avia_framework' )."
".
__("Available form elements are: single line Input elements, Textareas, Checkboxes and Select-Dropdown menus.", 'avia_framework' )."
".
__("It is recommended to not delete the 'E-Mail' field if you want to use an auto responder.", 'avia_framework' ),
"type" => "modal_group",
"id" => "content",
"modal_title" => __("Edit Form Element", 'avia_framework' ),
"std" => array(
array('label'=>__('Name', 'avia_framework' ), 'type'=>'text', 'check'=>'is_empty'),
array('label'=>__('E-Mail', 'avia_framework' ), 'type'=>'text', 'check'=>'is_email'),
array('label'=>__('Subject', 'avia_framework' ), 'type'=>'text', 'check'=>'is_empty'),
array('label'=>__('Message', 'avia_framework' ), 'type'=>'textarea', 'check'=>'is_empty'),
),
'subelements' => array(
array(
"name" => __("Form Element Label", 'avia_framework' ),
"desc" => "",
"id" => "label",
"std" => "",
"type" => "input"),
array(
"name" => __("Form Element Type", 'avia_framework' ),
"desc" => "",
"id" => "type",
"type" => "select",
"std" => "text",
"no_first"=>true,
"subtype" => array( __('Form Element: Text Input', 'avia_framework' ) =>'text',
__('Form Element: Text Area', 'avia_framework' ) =>'textarea',
__('Form Element: Select Element', 'avia_framework' ) =>'select',
__('Form Element: Checkbox', 'avia_framework' ) =>'checkbox',
__('Form Element: Datepicker', 'avia_framework' ) =>'datepicker',
__('Custom HTML: Add a Description', 'avia_framework' ) =>'html',
)),
array(
"name" => __("Form Element Options", 'avia_framework' ) ,
"desc" => __("Enter any number of options that the visitor can choose from. Separate these Options with a comma.", 'avia_framework' ) ."
".
__("Example: Option 1, Option 2, Option 3", 'avia_framework' ).""."
".
__("Note: If you want to use a comma in the option text you have to write 2 comma.", 'avia_framework' )."" ,
"id" => "options",
"required" => array('type','equals','select'),
"std" => "",
"type" => "input"),
array(
"name" => __("Multiple answers", 'avia_framework' ),
"desc" => __("Check if you want to enable multiple answers", 'avia_framework' ) ,
"id" => "multi_select",
"required" => array('type','equals','select'),
"std" => "",
"type" => "checkbox"),
array(
"name" => __("Preselect checkbox", 'avia_framework' ),
"desc" => __("Check if you want to preselect the checkbox", 'avia_framework' ) ,
"id" => "av_contact_preselect",
"required" => array('type','equals','checkbox'),
"std" => "",
"type" => "checkbox"),
array(
"name" => __("Add Description", 'avia_framework' ) ,
"id" => "content",
"required" => array('type','equals','html'),
"std" => "",
"type" => "tiny_mce"),
array(
"name" => __("Form Element Validation", 'avia_framework' ),
"desc" => "When selecting "Valid E-Mail address with special characters" keep in mind, that not all E-Mail systems support this feature properly.",
"id" => "check",
"type" => "select",
"std" => "",
"no_first"=>true,
"required" => array('type','not','html'),
"subtype" => array( __('No Validation', 'avia_framework' ) =>'',
__('Is not empty', 'avia_framework' ) =>'is_empty',
__('Valid E-Mail address', 'avia_framework' ) =>'is_email',
__('Valid E-Mail address with special characters', 'avia_framework' ) =>'is_ext_email',
__('Valid Phone Number', 'avia_framework' ) =>'is_phone',
__('Valid Number', 'avia_framework' ) =>'is_number')),
array(
"name" => __("Form Element Width", 'avia_framework' ),
"desc" => __("Change the width of your elements and let them appear beside each other instead of underneath", 'avia_framework' ) ,
"id" => "width",
"type" => "select",
"std" => "",
"no_first"=>true,
"required" => array('type','not','html'),
"subtype" => array( "Fullwidth" =>'', "1/2" =>'element_half', "1/3" =>'element_third' , "2/3" =>'element_two_third', "1/4" => 'element_fourth', "3/4" => 'element_three_fourth')),
)
),
array(
"name" => __("Submit Button Label", 'avia_framework' ),
"desc" => __("Enter the submit buttons label text here", 'avia_framework' ),
"id" => "button",
"std" => __("Submit", 'avia_framework' ),
"type" => "input"),
array(
"name" => __("What should happen once the form gets sent?", 'avia_framework' ),
"desc" => "",
"id" => "on_send",
"type" => "select",
"std" => "",
"no_first"=>true,
"subtype" => array( __('Display a short message on the same page', 'avia_framework' ) =>'',
__('Redirect the user to another page', 'avia_framework' ) =>'redirect',
)),
array(
"name" => __("Message Sent label", 'avia_framework' ),
"desc" => __("What should be displayed once the message is sent?", 'avia_framework' ),
"id" => "sent",
"required" => array('on_send','not','redirect'),
"std" => __("Your message has been sent!", 'avia_framework' ),
"type" => "input"),
array(
"name" => __("Redirect", 'avia_framework' ),
"desc" => __("To which page do you want the user send to?", 'avia_framework' ),
"id" => "link",
"type" => "linkpicker",
"fetchTMPL" => true,
"std" => "",
"required" => array('on_send','equals','redirect'),
"subtype" => array(
__('Set Manually', 'avia_framework' ) =>'manually',
__('Single Entry', 'avia_framework' ) =>'single'
),
"std" => ""),
array(
"name" => __("E-Mail Subject", 'avia_framework' ),
"desc" => __("You can define a custom Email Subject for your form here. If left empty the subject will be", 'avia_framework' ).": ".__("New Message", 'avia_framework') . " (".__('sent by contact form at','avia_framework')." ".get_option('blogname').")" ,
"id" => "subject",
"std" => "",
"type" => "input"
),
array(
"name" => __("Autoresponder from email address", 'avia_framework' ),
"desc" => __("Enter the from email address for the autoresponder.", 'avia_framework' ) . " (" .__( "Default:", 'avia_framework' ) . " " . get_option( 'admin_email' ) . ")",
"id" => "autoresponder_email",
"std" => get_option('admin_email'),
"type" => "input"
),
array(
"name" => __("Autorespond Text", 'avia_framework' ),
"desc" => __("Enter a message that will be sent to the users email address once he has submitted the form.", 'avia_framework' )."
".
__("If left empty no auto-response will be sent.", 'avia_framework' ),
"id" => "autorespond",
"std" => "",
"type" => "textarea"
),
array(
'name' => __( 'Contact Form Captcha', 'avia_framework' ),
'desc' => $captcha_desc,
'id' => 'captcha',
'type' => 'select',
'std' => '',
'subtype' => array(
__( 'Don\'t display Captcha', 'avia_framework' ) => '',
__( 'Use Enfold Numeric Captcha', 'avia_framework' ) => 'active',
__( 'Use Google reCAPTCHA V2 if activated', 'avia_framework' ) => 'recaptcha_v2',
__( 'Use Google reCAPTCHA V3 if activated (fallback is V2)', 'avia_framework' ) => 'recaptcha_v3'
)
),
array(
'name' => __( 'reCAPTCHA V2 theme color', 'avia_framework' ),
'desc' => __( 'Select a theme color for this contact form widget', 'avia_framework' ),
'id' => 'captcha_theme',
'type' => 'select',
'required' => array( 'captcha', 'parent_in_array', 'recaptcha_v2 recaptcha_v3' ),
'std' => 'light',
'subtype' => array(
__( 'Light', 'avia_framework' ) => 'light',
__( 'Dark', 'avia_framework' ) => 'dark'
)
),
array(
'name' => __( 'reCAPTCHA V2 theme size', 'avia_framework' ),
'desc' => __( 'Select a size for this contact form widget', 'avia_framework' ),
'id' => 'captcha_size',
'type' => 'select',
'required' => array( 'captcha', 'parent_in_array', 'recaptcha_v2 recaptcha_v3'),
'std' => 'normal',
'subtype' => array(
__( 'Normal', 'avia_framework' ) => 'normal',
__( 'Compact', 'avia_framework' ) => 'compact'
)
),
array(
'name' => __( 'Select score for human', 'avia_framework' ),
'id' => 'captcha_score',
'desc' => __( 'A score of 1.0 is very likely a good interaction, 0.0 is very likely a bot. Google recommends a threshold of 0.5 by default. In case we encounter a non human we ask user to verify with Version 2 chckbox.', 'avia_framework' ),
'type' => 'select',
'required' => array( 'captcha', 'equals', 'recaptcha_v3' ),
'subtype' => AviaHtmlHelper::number_array( 0, 1, 0.1, array( __( 'Default', 'avia_framework' ) => '' ) ),
'std' => '0.5'
),
array(
"name" => __("Hide Form Labels", 'avia_framework' ),
"desc" => __("Check if you want to hide form labels above the form elements. The form will instead try to use an inline label (not supported on old browsers)", 'avia_framework' ) ,
"id" => "hide_labels",
"std" => "",
"type" => "checkbox"),
array(
"name" => __("Label/Send Button alignment", 'avia_framework' ),
"desc" => __("Select how to align the form labels and the send button", 'avia_framework' ),
"id" => "form_align",
"type" => "select",
"std" => "",
"subtype" => array(
__('Default', 'avia_framework' ) =>'',
__('Centered', 'avia_framework' ) => 'centered'
),
"std" => ""),
array(
"type" => "close_div",
'nodescription' => true
),
array(
"type" => "tab",
"name" => __("Colors",'avia_framework' ),
'nodescription' => true
),
array(
"name" => __("Form Color Scheme", 'avia_framework' ),
"desc" => __("Select a form color scheme here", 'avia_framework' ),
"id" => "color",
"type" => "select",
"std" => "",
"subtype" => array( __('Default', 'avia_framework' )=>'',
__('Light transparent', 'avia_framework' )=>'av-custom-form-color av-light-form',
__('Dark transparent', 'avia_framework' ) =>'av-custom-form-color av-dark-form'),
),
array(
"type" => "close_div",
'nodescription' => true
),
array(
'type' => 'template',
'template_id' => 'screen_options_tab'
),
array(
"type" => "close_div",
'nodescription' => true
),
));
}
/**
* Editor Sub Element - this function defines the visual appearance of an element that is displayed within a modal window and on click opens its own modal window
* Works in the same way as Editor Element
* @param array $params this array holds the default values for $content and $args.
* @return $params the return array usually holds an innerHtml key that holds item specific markup.
*/
function editor_sub_element($params)
{
$template = $this->update_template("label", __("Element", 'avia_framework' ). ": {{label}}");
$params['innerHtml'] = "";
$params['innerHtml'] .= "
Bu işlem geri alınamaz!',
'confirmRepl' : 'Eski dosya yenisi ile değiştirilsin mi?',
'confirmRest' : 'Mevcut öge çöp kutusundaki ögeyle değiştirilsin mi?', // fromv2.1.24 added 5.5.2017
'confirmConvUTF8' : 'UTF-8 değil
UTF-8\'e dönüştürülsün mü?
Dönüştürme sonrası kaydedebilmek için içeriğin UTF-8 olması gerekir.', // from v2.1 added 08.04.2014
'confirmNonUTF8' : 'Bu dosyanın karakter kodlaması tespit edilemedi. Düzenleme için geçici olarak UTF-8\'e dönüştürülmesi gerekir.
Lütfen bu dosyanın karakter kodlamasını seçin.', // from v2.1.19 added 28.11.2016
'confirmNotSave' : 'Düzenlenmiş içerik.
Değişiklikleri kaydetmek istemiyorsanız son yapılanlar kaybolacak.', // from v2.1 added 15.7.2015
'confirmTrash' : 'Öğeleri çöp kutusuna taşımak istediğinizden emin misiniz?', //from v2.1.24 added 29.4.2017
'confirmMove' : '"$1" değiştirmek istediğinizden emin misiniz?', //from v2.1.50 added 27.7.2019
'apllyAll' : 'Tümüne uygula',
'name' : 'İsim',
'size' : 'Boyut',
'perms' : 'Yetkiler',
'modify' : 'Değiştirildi',
'kind' : 'Tür',
'read' : 'oku',
'write' : 'yaz',
'noaccess' : 'erişim yok',
'and' : 've',
'unknown' : 'bilinmeyen',
'selectall' : 'Tüm öğeleri seç',
'selectfiles' : 'Öğe(ler)i seç',
'selectffile' : 'İlk öğeyi seç',
'selectlfile' : 'Son öğeyi seç',
'viewlist' : 'Liste görünümü',
'viewicons' : 'Simge görünümü',
'viewSmall' : 'Küçük simgeler', // from v2.1.39 added 22.5.2018
'viewMedium' : 'Orta simgleler', // from v2.1.39 added 22.5.2018
'viewLarge' : 'Büyük simgleler', // from v2.1.39 added 22.5.2018
'viewExtraLarge' : 'Çok büyük simgeler', // from v2.1.39 added 22.5.2018
'places' : 'Yerler',
'calc' : 'Hesapla',
'path' : 'Dosya Yolu',
'aliasfor' : 'Takma adı',
'locked' : 'Kilitli',
'dim' : 'Ölçüler',
'files' : 'Dosyalar',
'folders' : 'Dizinler',
'items' : 'Nesneler',
'yes' : 'evet',
'no' : 'hayır',
'link' : 'Bağlantı',
'searcresult' : 'Arama sonuçları',
'selected' : 'Seçili öğeler',
'about' : 'Hakkında',
'shortcuts' : 'Kısayollar',
'help' : 'Yardım',
'webfm' : 'Web dosyası yöneticisi',
'ver' : 'Sürüm',
'protocolver' : 'protokol sürümü',
'homepage' : 'Proje Anasayfası',
'docs' : 'Belgeler',
'github' : 'Github\'ta bizi takip edin',
'twitter' : 'Twitter\'da bizi takip edin',
'facebook' : 'Facebook\'ta bize katılın',
'team' : 'Takım',
'chiefdev' : 'geliştirici şefi',
'developer' : 'geliştirici',
'contributor' : 'iştirakçi',
'maintainer' : 'bakıcı',
'translator' : 'tercüman',
'icons' : 'Simgeler',
'dontforget' : 've havlunuzu almayı unutmayın',
'shortcutsof' : 'Kısayollar devre dışı',
'dropFiles' : 'Dosyaları buraya taşı',
'or' : 'veya',
'selectForUpload' : 'Yüklemek için dosyaları seçin',
'moveFiles' : 'Öğeleri taşı',
'copyFiles' : 'Öğeleri kopyala',
'restoreFiles' : 'Öğeleri geri yükle', // from v2.1.24 added 5.5.2017
'rmFromPlaces' : 'Yerlerinden sil',
'aspectRatio' : 'Görünüm oranı',
'scale' : 'Ölçeklendir',
'width' : 'Genişlik',
'height' : 'Yükseklik',
'resize' : 'Boyutlandır',
'crop' : 'Kırp',
'rotate' : 'Döndür',
'rotate-cw' : '90 derece sağa döndür',
'rotate-ccw' : '90 derece sola döndür',
'degree' : '°',
'netMountDialogTitle' : 'Bağlı (Mount) ağ birimi', // added 18.04.2012
'protocol' : 'Protokol', // added 18.04.2012
'host' : 'Host', // added 18.04.2012
'port' : 'Kapı(Port)', // added 18.04.2012
'user' : 'Kullanıcı', // added 18.04.2012
'pass' : 'Şifre', // added 18.04.2012
'confirmUnmount' : 'Bağlantı kesilsin mi $1?', // from v2.1 added 30.04.2012
'dropFilesBrowser': 'Dosyaları tarayıcıdan yapıştır veya bırak', // from v2.1 added 30.05.2012
'dropPasteFiles' : 'Dosyaları buraya yapıştır veya bırak', // from v2.1 added 07.04.2014
'encoding' : 'Kodlama', // from v2.1 added 19.12.2014
'locale' : 'Yerel', // from v2.1 added 19.12.2014
'searchTarget' : 'Hedef: $1', // from v2.1 added 22.5.2015
'searchMime' : 'Giriş MIME Türüne Göre Arama', // from v2.1 added 22.5.2015
'owner' : 'Sahibi', // from v2.1 added 20.6.2015
'group' : 'Grup', // from v2.1 added 20.6.2015
'other' : 'Diğer', // from v2.1 added 20.6.2015
'execute' : 'Çalıştır', // from v2.1 added 20.6.2015
'perm' : 'Yetki', // from v2.1 added 20.6.2015
'mode' : 'Mod', // from v2.1 added 20.6.2015
'emptyFolder' : 'Dizin boş', // from v2.1.6 added 30.12.2015
'emptyFolderDrop' : 'Dizin boş\\Öğe eklemek için sürükleyin', // from v2.1.6 added 30.12.2015
'emptyFolderLTap' : 'Dizin boş\\Öğe eklemek için basılı tutun', // from v2.1.6 added 30.12.2015
'quality' : 'Kalite', // from v2.1.6 added 5.1.2016
'autoSync' : 'Otomatik senkronizasyon', // from v2.1.6 added 10.1.2016
'moveUp' : 'Yukarı taşı', // from v2.1.6 added 18.1.2016
'getLink' : 'URL bağlantısı alın', // from v2.1.7 added 9.2.2016
'selectedItems' : 'Seçili öğeler ($1)', // from v2.1.7 added 2.19.2016
'folderId' : 'Dizin kimliği', // from v2.1.10 added 3.25.2016
'offlineAccess' : 'Çevrimdışı erişime izin ver', // from v2.1.10 added 3.25.2016
'reAuth' : 'Yeniden kimlik doğrulaması için', // from v2.1.10 added 3.25.2016
'nowLoading' : 'Şimdi yükleniyor...', // from v2.1.12 added 4.26.2016
'openMulti' : 'Çoklu dosya aç', // from v2.1.12 added 5.14.2016
'openMultiConfirm': '$1 dosyalarını açmaya çalışıyorsunuz. Tarayıcıda açmak istediğinizden emin misiniz?', // from v2.1.12 added 5.14.2016
'emptySearch' : 'Arama hedefinde eşleşen sonuç bulunamadı.', // from v2.1.12 added 5.16.2016
'editingFile' : 'Dosya düzenleniyor.', // from v2.1.13 added 6.3.2016
'hasSelected' : '$1 öğe seçtiniz.', // from v2.1.13 added 6.3.2016
'hasClipboard' : 'Panonuzda $1 öğeniz var.', // from v2.1.13 added 6.3.2016
'incSearchOnly' : 'Artan arama yalnızca geçerli görünümden yapılır.', // from v2.1.13 added 6.30.2016
'reinstate' : 'Eski durumuna getir', // from v2.1.15 added 3.8.2016
'complete' : '$1 tamamlandı', // from v2.1.15 added 21.8.2016
'contextmenu' : 'Konteks menüsü', // from v2.1.15 added 9.9.2016
'pageTurning' : 'Sayfa çevir', // from v2.1.15 added 10.9.2016
'volumeRoots' : 'Kök birimler', // from v2.1.16 added 16.9.2016
'reset' : 'Sıfırla', // from v2.1.16 added 1.10.2016
'bgcolor' : 'Arkaplan rengi', // from v2.1.16 added 1.10.2016
'colorPicker' : 'Renk seçici', // from v2.1.16 added 1.10.2016
'8pxgrid' : '8px Izgara', // from v2.1.16 added 4.10.2016
'enabled' : 'Etkin', // from v2.1.16 added 4.10.2016
'disabled' : 'Engelli', // from v2.1.16 added 4.10.2016
'emptyIncSearch' : 'Geçerli görünümde arama sonucu bulunamadı. Arama sonucunu genişletmek için \\APress [Enter] yapın', // from v2.1.16 added 5.10.2016
'emptyLetSearch' : 'Geçerli görünümde ilk harf arama sonuçları boş.', // from v2.1.23 added 24.3.2017
'textLabel' : 'Metin etiketi', // from v2.1.17 added 13.10.2016
'minsLeft' : '$1 dakika kaldı', // from v2.1.17 added 13.11.2016
'openAsEncoding' : 'Seçilen kodlamayla yeniden aç', // from v2.1.19 added 2.12.2016
'saveAsEncoding' : 'Seçilen kodlamayla kaydet', // from v2.1.19 added 2.12.2016
'selectFolder' : 'Dizin seç', // from v2.1.20 added 13.12.2016
'firstLetterSearch': 'İlk arama sayfası', // from v2.1.23 added 24.3.2017
'presets' : 'Hazır ayarlar', // from v2.1.25 added 26.5.2017
'tooManyToTrash' : 'çok fazla öge var çöp kutusuna atılamaz.', // from v2.1.25 added 9.6.2017
'TextArea' : 'Metin alanı(TextArea)', // from v2.1.25 added 14.6.2017
'folderToEmpty' : '"$1" dizinini boşalt.', // from v2.1.25 added 22.6.2017
'filderIsEmpty' : '"$1" dizininde öğe yok.', // from v2.1.25 added 22.6.2017
'preference' : 'Tercih', // from v2.1.26 added 28.6.2017
'language' : 'Dil ayarları', // from v2.1.26 added 28.6.2017
'clearBrowserData': 'Bu tarayıcıda kayıtlı ayarları başlat', // from v2.1.26 added 28.6.2017
'toolbarPref' : 'Araç çubuğu ayarları', // from v2.1.27 added 2.8.2017
'charsLeft' : '... $1 karakter kaldı', // from v2.1.29 added 30.8.2017
'linesLeft' : '... $1 satır kaldı.', // from v2.1.52 added 16.1.2020
'sum' : 'Toplam', // from v2.1.29 added 28.9.2017
'roughFileSize' : 'Kaba dosya boyutu', // from v2.1.30 added 2.11.2017
'autoFocusDialog' : 'Fare ile üzerine gelince diyalog öğesi odaklansın', // from v2.1.30 added 2.11.2017
'select' : 'Seç', // from v2.1.30 added 23.11.2017
'selectAction' : 'Dosya seçildiğinde işleme al', // from v2.1.30 added 23.11.2017
'useStoredEditor' : 'Geçen sefer kullanılan editörle aç', // from v2.1.30 added 23.11.2017
'selectinvert' : 'Zıt seçim', // from v2.1.30 added 25.11.2017
'renameMultiple' : '$1 seçilen öğeleri $2 gibi yeniden adlandırmak istediğinizden emin misiniz?Bu geri alınamaz!', // from v2.1.31 added 4.12.2017
'batchRename' : 'Yığın adını değiştir', // from v2.1.31 added 8.12.2017
'plusNumber' : '+ Sayı', // from v2.1.31 added 8.12.2017
'asPrefix' : 'Ön ek kele', // from v2.1.31 added 8.12.2017
'asSuffix' : 'Son ek ekle', // from v2.1.31 added 8.12.2017
'changeExtention' : 'Uzantıyı değiştir', // from v2.1.31 added 8.12.2017
'columnPref' : 'Sütun ayarları (Liste görünümü)', // from v2.1.32 added 6.2.2018
'reflectOnImmediate' : 'Tüm değişiklikler hemen arşive yansıtılacaktır.', // from v2.1.33 added 2.3.2018
'reflectOnUnmount' : 'Herhangi bir değişiklik, bu birimi kaldırılıncaya kadar yansıtılmayacaktır.', // from v2.1.33 added 2.3.2018
'unmountChildren' : 'Bağlatıyı kesmek istediğiniz birime bağlı şu birim(ler)\'in de bağlantısı kesilecek. Bağlantıyı kesmek istediğinize emin misiniz?', // from v2.1.33 added 5.3.2018
'selectionInfo' : 'Seçim Bilgisi', // from v2.1.33 added 7.3.2018
'hashChecker' : 'Dosya imza(hash) algoritmaları', // from v2.1.33 added 10.3.2018
'infoItems' : 'öğelerin bilgisi (Seçim Bilgi Paneli)', // from v2.1.38 added 28.3.2018
'pressAgainToExit': 'Çıkmak için tekrar basın.', // from v2.1.38 added 1.4.2018
'toolbar' : 'Araç Çubuğu', // from v2.1.38 added 4.4.2018
'workspace' : 'Çalışma alanı', // from v2.1.38 added 4.4.2018
'dialog' : 'Diyalog', // from v2.1.38 added 4.4.2018
'all' : 'Tümü', // from v2.1.38 added 4.4.2018
'iconSize' : 'Simge Boyutu (Simge Görünümü)', // from v2.1.39 added 7.5.2018
'editorMaximized' : 'Maksimum düzenleyici penceresini aç', // from v2.1.40 added 30.6.2018
'editorConvNoApi' : 'API ile dönüşüm şu anda mevcut olmadığından, lütfen web sitesinde dönüştürün.', //from v2.1.40 added 8.7.2018
'editorConvNeedUpload' : 'Dönüştürmeden sonra, dönüştürülen dosyayı kaydetmek için öğe URL\'si veya indirilen bir dosya ile karşıya yüklemeniz gerekir.', //from v2.1.40 added 8.7.2018
'convertOn' : ' $1 site çevrildi', // from v2.1.40 added 10.7.2018
'integrations' : 'Entegrasyonlar', // from v2.1.40 added 11.7.2018
'integrationWith' : 'Bu elFinder aşağıdaki harici hizmetlere entegre edilmiştir. Lütfen kullanmadan önce kullanım koşullarını, gizlilik politikasını vb. Kontrol edin.', // from v2.1.40 added 11.7.2018
'showHidden' : 'Gizli ögeleri aç.', // from v2.1.41 added 24.7.2018
'hideHidden' : 'Gizli ögeleri kapat.', // from v2.1.41 added 24.7.2018
'toggleHidden' : 'Gizli ögeleri aç/kapat', // from v2.1.41 added 24.7.2018
'makefileTypes' : '"Yeni dosya" ile etkinleştirilecek dosya türleri', // from v2.1.41 added 7.8.2018
'typeOfTextfile' : 'Text dosyası tipi.', // from v2.1.41 added 7.8.2018
'add' : 'Ekle', // from v2.1.41 added 7.8.2018
'theme' : 'Tema', // from v2.1.43 added 19.10.2018
'default' : 'Varsayılan', // from v2.1.43 added 19.10.2018
'description' : 'Açıklama', // from v2.1.43 added 19.10.2018
'website' : 'Websayfası', // from v2.1.43 added 19.10.2018
'author' : 'Yazar', // from v2.1.43 added 19.10.2018
'email' : 'E-mail', // from v2.1.43 added 19.10.2018
'license' : 'Lisans', // from v2.1.43 added 19.10.2018
'exportToSave' : 'Bu öğe kaydedilemez. Düzenlemeleri kaybetmemek için PC\'nize aktarmanız gerekir.', // from v2.1.44 added 1.12.2018
'dblclickToSelect': 'Dosyayı seçmek için çift tıklayın.', // from v2.1.47 added 22.1.2019
'useFullscreen' : 'Tam ekran modunu kullan', // from v2.1.47 added 19.2.2019
/********************************** mimetypes **********************************/
'kindUnknown' : 'Bilinmiyor',
'kindRoot' : 'Birim Kök dizini', // from v2.1.16 added 16.10.2016
'kindFolder' : 'Dizin',
'kindSelects' : 'Seçim', // from v2.1.29 added 29.8.2017
'kindAlias' : 'Alias (Takma ad)',
'kindAliasBroken' : 'Bozuk alias',
// applications
'kindApp' : 'Uygulama',
'kindPostscript' : 'Postscript dosyası',
'kindMsOffice' : 'Microsoft Office dosyası',
'kindMsWord' : 'Microsoft Word dosyası',
'kindMsExcel' : 'Microsoft Excel dosyası',
'kindMsPP' : 'Microsoft Powerpoint sunumu',
'kindOO' : 'Open Office dosyası',
'kindAppFlash' : 'Flash uygulaması',
'kindPDF' : 'PDF',
'kindTorrent' : 'Bittorrent dosyası',
'kind7z' : '7z arşivi',
'kindTAR' : 'TAR arşivi',
'kindGZIP' : 'GZIP arşivi',
'kindBZIP' : 'BZIP arşivi',
'kindXZ' : 'XZ arşivi',
'kindZIP' : 'ZIP arşivi',
'kindRAR' : 'RAR arşivi',
'kindJAR' : 'Java JAR dosyası',
'kindTTF' : 'True Type fontu',
'kindOTF' : 'Open Type fontu',
'kindRPM' : 'RPM paketi',
// fonts
'kindFont' : 'Fontu',
'kindSFNT' : 'SFNT fontu',
'kindEOT' : 'Embedded Open Type fontu',
'kindWOFF' : 'Web Open Font Format',
'kindWOFF2' : 'Web Open Font Format 2',
// texts
'kindText' : 'Metin dosyası',
'kindTextPlain' : 'Düz metin',
'kindPHP' : 'PHP kodu',
'kindCSS' : 'CSS dosyası',
'kindHTML' : 'HTML dosyası',
'kindJS' : 'Javascript kodu',
'kindRTF' : 'Zengin Metin Belgesi',
'kindC' : 'C kodu',
'kindCHeader' : 'C başlık kodu',
'kindCPP' : 'C++ kodu',
'kindCPPHeader' : 'C++ başlık kodu',
'kindShell' : 'Unix shell scripti',
'kindPython' : 'Python kodu',
'kindJava' : 'Java kodu',
'kindRuby' : 'Ruby kodu',
'kindPerl' : 'Perl scripti',
'kindSQL' : 'SQL kodu',
'kindXML' : 'XML dosyası',
'kindAWK' : 'AWK kodu',
'kindCSV' : 'CSV',
'kindDOCBOOK' : 'Docbook XML dosyası',
'kindMarkdown' : 'Markdown dosyası', // added 20.7.2015
// images
'kindImage' : 'Resim',
'kindBMP' : 'BMP dosyası',
'kindJPEG' : 'JPEG dosyası',
'kindGIF' : 'GIF dosyası',
'kindPNG' : 'PNG dosyası',
'kindTIFF' : 'TIFF dosyası',
'kindTGA' : 'TGA dosyası',
'kindPSD' : 'Adobe Photoshop dosyası',
'kindXBITMAP' : 'X bitmap dosyası',
'kindPXM' : 'Pixelmator dosyası',
// media
'kindAudio' : 'Ses ortamı',
'kindAudioMPEG' : 'MPEG ses',
'kindAudioMPEG4' : 'MPEG-4 ses',
'kindAudioMIDI' : 'MIDI ses',
'kindAudioOGG' : 'Ogg Vorbis ses',
'kindAudioWAV' : 'WAV ses',
'AudioPlaylist' : 'MP3 listesi',
'kindVideo' : 'Video ortamı',
'kindVideoDV' : 'DV video',
'kindVideoMPEG' : 'MPEG video',
'kindVideoMPEG4' : 'MPEG-4 video',
'kindVideoAVI' : 'AVI video',
'kindVideoMOV' : 'Quick Time video',
'kindVideoWM' : 'Windows Media video',
'kindVideoFlash' : 'Flash video',
'kindVideoMKV' : 'Matroska video',
'kindVideoOGG' : 'Ogg video'
}
};
}));
/**
* Progress Bars
*
* Creates some progress bars
*/
if ( ! defined( 'ABSPATH' ) ) { exit; } // Exit if accessed directly
if ( ! class_exists( 'avia_sc_progressbar' ) )
{
class avia_sc_progressbar extends aviaShortcodeTemplate
{
/**
* Create the config array for the shortcode button
*/
function shortcode_insert_button()
{
$this->config['self_closing'] = 'no';
$this->config['name'] = __( 'Progress Bars', 'avia_framework' );
$this->config['tab'] = __( 'Content Elements', 'avia_framework' );
$this->config['icon'] = AviaBuilder::$path['imagesURL']."sc-progressbar.png";
$this->config['order'] = 30;
$this->config['target'] = 'avia-target-insert';
$this->config['shortcode'] = 'av_progress';
$this->config['shortcode_nested'] = array( 'av_progress_bar' );
$this->config['tooltip'] = __( 'Create some progress bars', 'avia_framework' );
$this->config['preview'] = true;
$this->config['disabling_allowed'] = true;
$this->config['id_name'] = 'id';
$this->config['id_show'] = 'yes';
$this->config['alb_desc_id'] = 'alb_description';
}
function extra_assets()
{
//load css
wp_enqueue_style( 'avia-module-progress-bar' , AviaBuilder::$path['pluginUrlRoot'].'avia-shortcodes/progressbar/progressbar.css' , array('avia-layout'), false );
//load js
wp_enqueue_script( 'avia-module-numbers' , AviaBuilder::$path['pluginUrlRoot'].'avia-shortcodes/numbers/numbers.js' , array('avia-shortcodes'), false, true );
wp_enqueue_script( 'avia-module-progress-bar' , AviaBuilder::$path['pluginUrlRoot'].'avia-shortcodes/progressbar/progressbar.js' , array('avia-shortcodes'), false, true );
}
/**
* Popup Elements
*
* If this function is defined in a child class the element automatically gets an edit button, that, when pressed
* opens a modal window that allows to edit the element properties
*
* @return void
*/
function popup_elements()
{
$this->elements = array(
array(
"type" => "tab_container", 'nodescription' => true
),
array(
"type" => "tab",
"name" => __("Content" , 'avia_framework'),
'nodescription' => true
),
array(
"name" => __("Add/Edit Progress Bars", 'avia_framework' ),
"desc" => __("Here you can add, remove and edit the various progress bars.", 'avia_framework' ),
"type" => "modal_group",
"id" => "content",
"modal_title" => __("Edit Progress Bars", 'avia_framework' ),
"std" => array(
array('title'=>__('Skill or Task', 'avia_framework' ), 'icon'=>'43', 'progress'=>'100', 'icon_select'=>'no'),
),
'subelements' => array(
array(
"name" => __("Progress Bars Title", 'avia_framework' ),
"desc" => __("Enter the Progress Bars title here", 'avia_framework' ) ,
"id" => "title",
"std" => "",
"type" => "input"),
array(
"name" => __("Progress in %", 'avia_framework' ),
"desc" => __("Select a number between 0 and 100", 'avia_framework' ),
"id" => "progress",
"type" => "select",
"std" => "100",
"subtype" => AviaHtmlHelper::number_array(0,100,1, array(), '%')
),
array(
"name" => __("Bar Color", 'avia_framework' ),
"desc" => __("Choose a color for your progress bar here", 'avia_framework' ),
"id" => "color",
"type" => "select",
"std" => "theme-color",
"subtype" => array(
__('Theme Color', 'avia_framework' )=>'theme-color',
__('Blue', 'avia_framework' )=>'blue',
__('Red', 'avia_framework' )=>'red',
__('Green', 'avia_framework' )=>'green',
__('Orange', 'avia_framework' )=>'orange',
__('Aqua', 'avia_framework' )=>'aqua',
__('Teal', 'avia_framework' )=>'teal',
__('Purple', 'avia_framework' )=>'purple',
__('Pink', 'avia_framework' )=>'pink',
__('Silver', 'avia_framework' )=>'silver',
__('Grey', 'avia_framework' )=>'grey',
__('Black', 'avia_framework' )=>'black',
)),
array(
"name" => __("Icon", 'avia_framework' ),
"desc" => __("Should an icon be displayed at the left side of the progress bar", 'avia_framework' ),
"id" => "icon_select",
"type" => "select",
"std" => "no",
"subtype" => array(
__('No Icon', 'avia_framework' ) =>'no',
__('Yes, display Icon', 'avia_framework' ) =>'yes')),
array(
"name" => __("List Item Icon",'avia_framework' ),
"desc" => __("Select an icon for your list item below",'avia_framework' ),
"id" => "icon",
"type" => "iconfont",
"required" => array('icon_select','equals','yes'),
"std" => "",
),
)
),
array(
"name" => __("Progress Bar Coloring", 'avia_framework' ),
"desc" => __("Choose the coloring of the progress bar here", 'avia_framework' ),
"id" => "bar_styling",
"type" => "select",
"std" => "av-striped-bar",
"subtype" => array(
__( 'Striped', 'avia_framework' ) => 'av-striped-bar',
__( 'Single Color', 'avia_framework' ) => 'av-flat-bar'
)
),
array(
"name" => __("Progress Bar Animation enabled?", 'avia_framework' ),
"desc" => __("Choose if you want to enable the continuous animation of the progress bar", 'avia_framework' ),
"id" => "bar_animation",
"type" => "select",
"std" => "av-animated-bar",
"required" => array('bar_styling','not','av-flat-bar'),
"subtype" => array(
__('Enabled', 'avia_framework' ) =>'av-animated-bar',
__('Disabled', 'avia_framework' ) =>'av-fixed-bar')),
array(
"name" => __("Progress Bar Style", 'avia_framework' ),
"desc" => __("Choose the styling of the progress bar here", 'avia_framework' ),
"id" => "bar_styling_secondary",
"type" => "select",
"std" => "",
"subtype" => array(
__('Rounded Big Bars', 'avia_framework' ) =>'',
__('Minimal Bars', 'avia_framework' ) =>'av-small-bar')),
array(
"name" => __("Show Progress Bar percentage?", 'avia_framework' ),
"desc" => __("Choose if you want to show the numeric percentage of the progress bar", 'avia_framework' ),
"id" => "show_percentage",
"type" => "select",
"std" => "",
"required" => array('bar_styling_secondary','equals','av-small-bar'),
"subtype" => array(
__('Hide', 'avia_framework' ) =>'',
__('Show', 'avia_framework' ) =>'av-show-bar-percentage')),
array(
"name" => __("Progress Bar Height?", 'avia_framework' ),
"desc" => __("Set the height of the progress bar", 'avia_framework' ),
"id" => "bar_height",
"type" => "select",
"std" => "10",
"required" => array('bar_styling_secondary','equals','av-small-bar'),
"subtype" => AviaHtmlHelper::number_array(1,50,1, array(), 'px')),
array(
"type" => "close_div",
'nodescription' => true
),
array(
'type' => 'template',
'template_id' => 'screen_options_tab'
),
array(
"type" => "close_div",
'nodescription' => true
)
);
}
/**
* Editor Sub Element - this function defines the visual appearance of an element that is displayed within a modal window and on click opens its own modal window
* Works in the same way as Editor Element
* @param array $params this array holds the default values for $content and $args.
* @return $params the return array usually holds an innerHtml key that holds item specific markup.
*/
function editor_sub_element($params)
{
$template = $this->update_template("title","{{title}}: ");
$template_percent= $this->update_template("progress", "{{progress}}%");
extract(av_backend_icon($params)); // creates $font and $display_char if the icon was passed as param "icon" and the font as "font"
if(empty($params['args']['icon_select'])) $params['args']['icon_select'] = "no";
$params['innerHtml'] = "";
$params['innerHtml'] .= "